Trend chart color matching method, device, equipment and medium

By identifying the number of lines in the trend chart and matching colors according to preset color combinations, the problem of too many lines causing difficulty in identifying information is solved, and fast and clear information recognition is achieved, reducing error analysis and judgment.

CN116883519BActive Publication Date: 2025-03-04GUOTAI JUNAN SECURITIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310748788.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2025-03-04
Estimated Expiration
2043-06-21

AI Technical Summary

Technical Problem

When there are too many lines in the data chart, for example, when there are a lot of lines in the trend chart related to stock analysis, it is difficult for people to quickly identify the required information, resulting in incorrect analysis and judgment of the information.

Method used

Provide a trend chart color matching method, by obtaining the trend chart and determining whether the line has a preset color selection. If so, the color matching is performed according to the preset color selection; if not, identify the number of lines and color matching the lines according to the preset color combination. The preset color combination is formed by interlacing and arranging colors arranged in order of warm and cool tones.

Benefits of technology

Through this method, the user can quickly and clearly identify the required information, reducing the situation of information error analysis and judgment. The color values ​​of adjacent colors in the preset color combination are large, which reduces the appearance of colors of the same color values ​​in the trend chart, thereby improving the accuracy of information recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116883519B_ABST
    Figure CN116883519B_ABST
Patent Text Reader

Abstract

The present application provides a trend chart color matching method, device, equipment and medium. When the number of lines in the trend chart is less than or equal to the number of colors in a preset color combination, a first color that is the same as the number of lines and arranged in sequence is obtained from the preset color combination, and the lines arranged in sequence in the trend chart are sequentially matched according to the first color. When the number of lines is greater than the number of colors in the preset color combination, a second color that is the same as the difference between the number of lines and the number of colors in the preset color combination and arranged in sequence is obtained from the preset color combination, the second color is processed to obtain a third color, and some of the lines arranged in sequence in the trend chart are sequentially matched according to the colors arranged in sequence in the preset color combination, and the remaining lines arranged in sequence in the trend chart are sequentially matched according to the third color. The color values ​​between adjacent colors in the preset color combination differ greatly, so that users can quickly and clearly identify the required information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a trend chart color matching method, device, equipment and medium. Background Art

[0002] With the popularization of computers, stock trading activities and stock market analysis work have gradually shifted from offline to online, and computers have become the main tool for financial data analysis. People obtain massive amounts of financial data charts through mobile devices (such as mobile phones, computers, etc.) and obtain the required information by viewing the data charts.

[0003] However, when there are too many lines in a data chart, such as when there are many lines in a trend chart related to stock analysis, it is difficult for people to quickly identify the required information, resulting in incorrect analysis and judgment of the information. Summary of the invention

[0004] The present application provides a trend chart color matching method, device, equipment and medium, so that users can quickly identify required information.

[0005] In a first aspect, the present application provides a trend chart color matching method, comprising:

[0006] Obtain a trend chart, and determine whether the lines in the trend chart have preset colors;

[0007] If yes, color the lines in the trend chart according to the preset color, if no, identify the number of lines in the trend chart;

[0008] When the number of the lines is less than or equal to the number of colors in the preset color combination, first colors that are the same as the number of the lines and are arranged in sequence are obtained from the preset color combination, and the lines are matched according to the first colors;

[0009] When the number of the lines is greater than the number of colors in the preset color combination, the difference between the number of the lines and the number of colors in the preset color combination is calculated, and second colors that are arranged in sequence and have the same number as the difference are obtained from the preset color combination, and the second colors are processed to obtain a third color, and some of the lines in the trend chart are matched with colors arranged in sequence in the preset color combination, and the remaining lines in the trend chart are matched with colors according to the third color;

[0010] Among them, the preset color combination is obtained by interspersing a preset number of colors in warm tones arranged in order of warmth, and / or, by interspersing a preset number of colors in cool tones arranged in order of coolness, and / or, by interspersing a first preset number of colors in warm tones arranged in order of warmth and a second preset number of colors in cool tones arranged in order of coolness.

[0011] Optionally, the method further comprises: forming a preset color combination by at least one of the following methods;

[0012] Setting a preset number of colors in warm tones arranged in sequence according to their warmth, and interlacing the preset number of colors in warm tones arranged in sequence;

[0013] and / or, setting a preset number of colors in the cool tones that are arranged in sequence according to their coolness, and interlacing the preset number of colors in the cool tones that are arranged in sequence;

[0014] And / or, a first preset number of colors arranged in sequence according to warmth in warm tones are set, a second preset number of colors arranged in sequence according to coolness in cool tones are set, and the first preset number of colors arranged in sequence in warm tones and the second preset number of colors arranged in sequence in cool tones are arranged alternately to form the preset color combination.

[0015] Optionally, obtaining a trend chart specifically includes:

[0016] Get all trend charts in the target web page;

[0017] The identifying the number of lines in the trend chart specifically includes:

[0018] Identify the number of lines in at least part of the chart;

[0019] After matching the colors of the lines, the method further includes:

[0020] The trend chart with color matching of the lines is displayed in the browser.

[0021] Optionally, after obtaining all trend charts in the target webpage, the method further includes:

[0022] Filtering a first trend chart and a second trend chart from all the trend charts, wherein the first trend chart retains the original color scheme;

[0023] The identifying the number of lines in the trend chart specifically includes:

[0024] The number of lines in the second trend graph is identified.

[0025] Optionally, the method further includes at least one of the following methods:

[0026] Set or adjust the background color, tick mark color and / or auxiliary line color of some trend charts;

[0027] Color some trend charts according to preset color matching rules;

[0028] Individually color some lines in some trend charts;

[0029] Individually color some segments of some lines in some trend charts.

[0030] Optionally, the method further includes at least one of the following methods:

[0031] Processing the saturation of the first preset trend chart;

[0032] Make separate color matching for abnormal lines in some trend charts;

[0033] Apply the same color scheme to related trend charts.

[0034] Optionally, the method further includes:

[0035] Modify the color of at least part of the chart lines.

[0036] Optionally, the processing the second color to obtain a third color specifically includes:

[0037] The transparency of the second color is processed to obtain a third color.

[0038] In a second aspect, the present application provides a trend chart color matching device, comprising:

[0039] An acquisition module is used to obtain a trend chart and determine whether the lines in the trend chart have a preset color.

[0040] A processing module, for matching the colors of the lines in the trend chart according to the preset colors when the lines in the trend chart have preset colors, and for identifying the number of lines in the trend chart when the lines in the trend chart have no preset colors;

[0041] A first color matching module, configured to, when the number of the lines is less than or equal to the number of colors in a preset color combination, obtain first colors from the preset color combination that are the same as the number of the lines and are arranged in sequence, and match the lines according to the first colors;

[0042] A second color matching module is used for, when the number of the lines is greater than the number of colors in the preset color combination, calculating the difference between the number of the lines and the number of colors in the preset color combination, obtaining second colors from the preset color combination that are the same number as the difference and are arranged in sequence, processing the second colors to obtain a third color, matching colors for some of the lines in the trend chart according to the colors arranged in sequence in the preset color combination, and matching colors for the remaining lines in the trend chart according to the third color;

[0043] Among them, the preset color combination is obtained by interspersing a preset number of colors in warm tones arranged in order of warmth, and / or, by interspersing a preset number of colors in cool tones arranged in order of coolness, and / or, by interspersing a first preset number of colors in warm tones arranged in order of warmth and a second preset number of colors in cool tones arranged in order of coolness.

[0044] Optionally, the device further comprises:

[0045] A preset module, used to form a preset color combination by at least one of the following methods;

[0046] Setting a preset number of colors in warm tones arranged in sequence according to their warmth, and interlacing the preset number of colors in warm tones arranged in sequence;

[0047] and / or, setting a preset number of colors in the cool tones that are arranged in sequence according to their coolness, and interlacing the preset number of colors in the cool tones that are arranged in sequence;

[0048] And / or, a first preset number of colors arranged in sequence according to warmth in warm tones are set, a second preset number of colors arranged in sequence according to coolness in cool tones are set, and the first preset number of colors arranged in sequence in warm tones and the second preset number of colors arranged in sequence in cool tones are arranged alternately to form the preset color combination.

[0049] Optional,

[0050] The acquisition module is specifically used to acquire all trend charts on the target web page;

[0051] The processing module is specifically used for matching the colors of the lines in the trend chart according to the preset colors for the trend chart with preset colors, and for the trend chart with preset colors, identifying the number of lines in the trend chart;

[0052] The device also includes:

[0053] The presentation module is used to present the trend chart after the lines are colored in the browser.

[0054] Optionally, the device further comprises:

[0055] An independent configuration submodule is used to set or adjust the background color, scale line color and / or auxiliary line color of some trend charts, color some trend charts according to preset color matching rules, color some lines in some trend charts separately, and color some line segments in some lines in some trend charts separately.

[0056] Optionally, the device further comprises:

[0057] The key chart and key data submodule is used to process the saturation of the first preset trend chart;

[0058] The abnormal data submodule is used to perform separate color matching on abnormal lines in some trend charts;

[0059] The associated combination submodule is used to apply the same color scheme to the associated trend charts.

[0060] In a third aspect, the present application provides an electronic device, including: a memory and a processor;

[0061] The memory is used to store instructions; the processor is used to call the instructions in the memory to execute the trend chart color matching method in the first aspect and any possible design of the first aspect.

[0062] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer instructions are stored. When at least one processor of an electronic device executes the computer instructions, the electronic device executes the trend chart color matching method in the first aspect and any possible design of the first aspect.

[0063] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When at least one processor of an electronic device executes the computer instructions, the electronic device executes the trend chart color matching method in the first aspect and any possible design of the first aspect.

[0064] The trend chart color matching method, device, equipment and medium provided in the present application obtain a trend chart, determine whether there is a preset color for the lines in the trend chart, and if so, color the lines in the trend chart according to the preset color, if not, identify the number of lines in the trend chart. When the number of lines is less than or equal to the number of colors in the preset color combination, obtain a first color that is the same as the number of lines and is arranged in sequence from the preset color combination, and color the lines arranged in sequence in the trend chart in sequence according to the first color. When the number of lines is greater than the number of colors in the preset color combination, calculate the difference between the number of lines and the number of colors in the preset color combination, obtain a second color that is the same as the difference and is arranged in sequence from the preset color combination, process the second color to obtain a third color, color some of the lines arranged in sequence in the trend chart in sequence according to the colors arranged in sequence in the preset color combination, and color the remaining lines arranged in sequence in the trend chart in sequence according to the third color. Since the preset color combination is obtained by interspersing the colors arranged in order of warmth among the warm tones, and / or by interspersing the preset number of colors arranged in order of coolness among the cool tones, and / or by interspersing the first preset number of colors arranged in order of warmth among the warm tones and the second preset number of colors arranged in order of coolness among the warm tones, the color values ​​of adjacent colors in the preset color combination are greatly different, and the appearance of colors with the same color values ​​in the trend chart can be reduced, so that users can quickly and clearly identify the required information and reduce the occurrence of erroneous analysis and judgment of information. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0066] Figure 1 A flowchart of a trend chart color matching method provided in one embodiment of the present application;

[0067] Figure 2 A flowchart of a trend chart color matching method provided in one embodiment of the present application;

[0068] Figure 3 A flowchart of a trend chart color matching method provided in one embodiment of the present application;

[0069] Figure 4 A schematic diagram of the structure of a trend chart color matching device provided in one embodiment of the present application;

[0070] Figure 5A schematic diagram of the structure of a trend chart color matching device provided in one embodiment of the present application;

[0071] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0073] As described in the background art, when there are too many lines in a data chart, such as a trend chart related to stock analysis, it is difficult for people to quickly identify the required information, resulting in incorrect analysis and judgment of the information. For example, when there are too many lines in a trend chart, if the computer does not make a reasonable color value arrangement in advance, visually similar color values ​​will appear in large numbers, and the chaotic combination of lines will cause users to be unable to quickly identify the required data, resulting in a large number of incorrect analysis and judgment.

[0074] To solve the problem of difficulty in data analysis or visual fatigue for users, you can use the system's night mode to use dark or black as the background color of the data chart to highlight the color of the lines in the trend chart. You can also add a zoom function to the trend chart to make it easier for users to view the details of the trend chart.

[0075] However, these methods have not been able to completely solve the problem of users distinguishing different colors of lines in data charts. In addition, since the color of the lines in the trend chart is currently random, there is no classification or detailed definition of the line color in each trend chart, resulting in the frequent appearance of the same color value in the trend chart, which disrupts the user's judgment of the data.

[0076] In response to the above problems, the present application proposes a trend chart color matching method. When there is no preset color for the lines in the trend chart, the number of lines in the trend chart is identified. When the number of lines is less than or equal to the number of colors in the preset color combination, the lines are colored according to the first colors arranged in sequence in the preset color combination. When the number of lines is greater than the number of colors in the preset color combination, some of the colors in the preset color combination are processed to obtain a third color, some of the lines are colored according to the colors in the preset color combination, and the remaining lines are colored according to the third color. Since the color values ​​between adjacent colors in the preset color combination differ greatly, users can quickly and clearly identify the required information.

[0077] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0078] Figure 1 FIG. 1 is a flow chart showing a method for color matching a trend chart provided by an embodiment of the present application. Figure 1 As shown, with the electronic device as the execution subject, the method of this embodiment may include the following steps:

[0079] S101, obtaining a trend chart, and determining whether the lines in the trend chart have a preset color.

[0080] Optionally, the trend chart may be a trend chart related to stock analysis or other trend charts.

[0081] After obtaining the trend chart, it is determined whether the lines in the trend chart have preset colors, for example, whether a request for matching the lines with preset colors is received. The preset colors may include a variety of different colors.

[0082] When the lines in the trend chart have preset colors, execute step S102 ; when the lines in the trend chart have no preset colors, execute step S103 .

[0083] S102, matching colors of lines in the trend chart according to preset colors.

[0084] S103, identifying the number of lines in the trend chart.

[0085] Optionally, the number of lines in the trend chart can be identified based on the type of legend elements in the trend chart and the number of each type. The number of lines in the trend chart can also be identified using image recognition software.

[0086] S104: When the number of lines is less than or equal to the number of colors in the preset color combination, first colors that are the same as the number of lines and are arranged in sequence are obtained from the preset color combination, and the lines are matched according to the first colors.

[0087] When the number of lines is less than or equal to the number of colors in the preset color combination, the lines can be colored according to the colors in the preset color combination, and because the preset color combination is obtained by interlacing and arranging a preset number of colors in warm tones arranged in sequence according to warmth, and / or, by interlacing and arranging a preset number of colors in cool tones arranged in sequence according to coolness, and / or, by interlacing and arranging a first preset number of colors in warm tones arranged in sequence according to warmth and a second preset number of colors in cool tones arranged in sequence according to coolness. Therefore, in the first colors obtained from the preset color combination that are the same as the number of lines and are arranged in sequence, the color values ​​of adjacent colors differ greatly, and when the lines arranged in sequence in the trend chart are colored in sequence according to the first color, the user can quickly and clearly identify the required information.

[0088] Optionally, the lines arranged in sequence in the trend chart can be color matched in sequence from top to bottom or from bottom to top using the first color. Since the first color is a color arranged in sequence in the preset color combination, when the lines in the trend chart are color matched in sequence from top to bottom or from bottom to top using the first color, the color values ​​of the colors of adjacent lines differ greatly, thereby avoiding the situation where the color values ​​of the tones of the colors of adjacent lines differ slightly, which affects the user's recognition of the lines and judgment of the data.

[0089] S105. When the number of lines is greater than the number of colors in the preset color combination, calculate the difference between the number of lines and the number of colors in the preset color combination, obtain the same number of second colors as the difference and arranged in sequence from the preset color combination, process the second colors to obtain a third color, match colors for some lines in the trend chart according to the colors arranged in sequence in the preset color combination, and match colors for the remaining lines in the trend chart according to the third color.

[0090] When the number of lines is greater than the colors in the preset color combination, if all lines are matched with the colors in the preset color combination, the colors of the lines will have the same color value, which affects the user's acquisition and analysis of data. Therefore, the colors arranged in sequence in the preset color combination can be used to match the colors of some of the lines arranged in sequence in the trend chart. For the remaining lines arranged in sequence in the trend chart, some of the colors in the preset color combination can be processed, and the processed colors can be used to match the colors of the remaining lines arranged in sequence in the trend chart. Specifically, the difference between the number of lines and the number of colors in the preset color combination is calculated, and the second color that is the same number as the difference and arranged in sequence is obtained from the preset color combination. The third color is obtained after processing the second color, and then, the colors of some of the lines arranged in sequence in the trend chart are matched in sequence according to the colors arranged in sequence in the preset color combination, and the remaining lines arranged in sequence in the trend chart are matched in sequence according to the third color. Since the color values ​​of adjacent colors in the preset color combination differ greatly, the color values ​​of adjacent colors in the third color obtained after processing the second color using the same processing method also differ greatly. Therefore, after coloring some lines in the trend chart according to the colors arranged in sequence in the preset color combination, and coloring the remaining lines in the trend chart according to the third color, the color difference between the colors of adjacent lines in the trend chart is greatly different, thereby improving the user's recognition accuracy of the lines.

[0091] In actual application, some lines in the trend chart can be colored in order from top to bottom according to the colors arranged in sequence in the preset color combination, and the remaining lines in the trend chart can be colored in order from top to bottom according to the colors arranged in sequence in the third color. Some lines in the trend chart can also be colored in order from bottom to top according to the colors arranged in sequence in the preset color combination, and the remaining lines in the trend chart can be colored in order from bottom to top according to the colors arranged in sequence in the third color.

[0092] The trend chart color matching method provided by the present application is that when the number of lines is less than or equal to the number of colors in the preset color combination, a first color that is the same as the number of lines and is arranged in sequence is obtained from the preset color combination, and the lines arranged in sequence in the trend chart are sequentially matched with the first color. When the number of lines is greater than the number of colors in the preset color combination, the difference between the number of lines and the number of colors in the preset color combination is calculated, and the second color that is the same as the difference and is arranged in sequence is obtained from the preset color combination, and the second color is processed to obtain a third color, and the colors of some of the lines arranged in sequence in the trend chart are sequentially matched according to the colors arranged in sequence in the preset color combination, and the colors of the remaining lines arranged in sequence in the trend chart are sequentially matched according to the third color. Since the preset color combination is obtained by interspersing the colors arranged in order of warmth among the warm tones, or by interspersing the colors of a preset number of colors arranged in order of coolness among the cool tones, or by interspersing the colors of a preset first number of colors arranged in order of warmth among the warm tones and a preset second number of colors arranged in order of coolness among the warm tones, the color values ​​of adjacent colors in the preset color combination differ greatly, and the appearance of colors with the same color values ​​in the trend chart can be reduced, thereby allowing users to quickly and clearly identify the required information and reduce the occurrence of erroneous analysis and judgment of information.

[0093] Figure 2 FIG. 1 is a flow chart showing a method for color matching a trend chart provided by an embodiment of the present application. Figure 2 As shown, with the electronic device as the execution subject, the method of this embodiment may include the following steps:

[0094] S201, forming a preset color combination.

[0095] The preset color combination can be a warm color combination, a cool color combination, or a warm and cool color combination (cool and warm color combination). Therefore, warm color combinations, cool color combinations, and cool and warm color combinations can be preset. Then, when it is necessary to match the colors of the lines in the trend chart by the colors in the preset color combination, the colors can be obtained from the warm color combination, the cool color combination, or the cool and warm color combination to match the colors of the lines in the trend chart. For example, industries such as technology, energy, electronics, and manufacturing use cool color combinations, and industries such as consumer goods, finance, and services use warm color combinations. Warm colors can be selected from red, orange, and yellow colors. Cool colors can be selected from blue, green, and brown colors.

[0096] In some embodiments, a preset number of colors arranged in sequence according to warmth are set in the warm tones, and the preset number of colors arranged in sequence in the warm tones are interspersed to form a preset color combination. Specifically, a preset number of warm tones can be selected, and the preset number of warm tones can be arranged in sequence from high to low warmth, or the preset number of warm tones can be arranged in sequence from low to high warmth. Then, in order to prevent the colors between multiple lines from being too similar to interfere with the user, the preset number of colors arranged in sequence are interspersed. The specific interspersed arrangement method can be determined according to needs or actual conditions, and the color difference between adjacent colors can be increased as much as possible.

[0097] In practical applications, 20 warm colors can be selected and arranged in order of warmth from high to low, specifically color 1, color 2, color 3, color 4, color 5, color 6, color 7, color 8, color 9, color 10, color 11, color 12, color 13, color 14, color 15, color 16, color 17, color 18, color 19, color 20. The 20 colors arranged in sequence are interspersed, for example, the new order obtained is color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, color 20.

[0098] In other embodiments, a preset number of tones arranged in sequence according to the degree of coolness are set in the cool tones, and the preset number of colors arranged in sequence in the cool tones are interspersed to form a preset color combination. Specifically, a preset number of cool tones can be selected, and the preset number of cool tones can be arranged in sequence from high to low coolness, or the preset number of cool tones can be arranged in sequence from low to high coolness. Then, the preset number of colors arranged in sequence are interspersed.

[0099] In some other embodiments, a first preset number of colors arranged in sequence according to warmth is set in the warm tones, and a second preset number of colors arranged in sequence according to coolness is set in the cool tones, and the first preset number of colors arranged in sequence in the warm tones and the second preset number of colors arranged in sequence in the cool tones are interspersed to form a preset color difference combination. Specifically, a first preset number of warm tones and a second preset number of cool tones are selected to obtain a preset number of colors. Then, the first preset number of warm tones are arranged in sequence in order from high to low warmth, or the first preset number of warm tones are arranged in sequence in order from low to high warmth; the second preset number of cool tones are arranged in sequence in order from high to low coolness, and the second preset number of cool tones are arranged in sequence in order from low to high coolness. Subsequently, the first preset number of warm colors and the second preset number of cool colors which are arranged in sequence are interspersed and arranged. They can be arranged crosswise in the order of cool and warm, cool and warm, or the first preset number of warm colors can be interspersed first and then the second preset number of cool colors, or the second preset number of cool colors can be interspersed first and then the first preset number of warm colors.

[0100] S202, obtaining a trend chart, and determining whether the lines in the trend chart have a preset color.

[0101] If yes, execute step S203; if no, execute step S204.

[0102] S203, matching colors for the lines in the trend chart according to preset colors.

[0103] S204, identifying the number of lines in the trend chart.

[0104] When the number of lines is less than or equal to the number of colors in the preset color combination, step S205 is executed, and when the number of lines is greater than the number of colors in the preset color combination, step S206 is executed.

[0105] S205: When the number of lines is less than or equal to the number of colors in the preset color combination, first colors that are the same as the number of lines and are arranged in sequence are obtained from the preset color combination, and the lines are matched according to the first colors.

[0106] For example, the colors arranged in sequence in the preset color combination are color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20.

[0107] When the number of lines is 1, any color in the preset color combination, such as color 1, color 11, or color 6, can be selected as the first color;

[0108] When the number of lines is 2, any two adjacent colors such as color 1 and color 11, or color 11 and color 6, or color 6 and color 16 in the preset color combination can be selected as the first color;

[0109] When the number of lines is 3, any three adjacent colors of color 1, color 11, color 6, or color 11, color 6, color 16, or color 6, color 16, color 2 in the preset color combination can be selected as the first color;

[0110] When the number of lines is 4, any four adjacent colors such as color 1, color 11, color 6, color 16, or color 11, color 6, color 16, color 2, or color 6, color 16, color 2, color 12, etc. can be selected from the preset colors as the first color;

[0111] When the number of lines is 5, any five adjacent colors of the preset color combination of color 1, color 11, color 6, color 16, color 2, or color 11, color 6, color 16, color 2, color 12, or color 6, color 16, color 2, color 12, color 7 can be selected as the first color;

[0112] When the number of lines is 6, any six adjacent colors of the preset color combination of color 1, color 11, color 6, color 16, color 2, color 12, or color 11, color 6, color 16, color 2, color 12, color 7, or color 6, color 16, color 2, color 12, color 7, color 17 can be selected as the first color;

[0113] When the number of lines is 7, any seven adjacent colors of the preset color combination of color 1, color 11, color 6, color 16, color 2, color 12, color 7, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, or color 6, color 16, color 2, color 12, color 7, color 17, color 3 can be selected as the first color;

[0114] When the number of lines is 8, any eight adjacent colors including color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, or color 6, color 16, color 2, color 12, color 7, color 17, color 3, and color 13 in the preset color combination can be selected as the first color;

[0115] When the number of lines is 9, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, or any nine adjacent colors such as line 6, line 16, line 2, line 12, line 7, line 17, line 3, line 13, line 8 in the preset color combination as the first color;

[0116] When the number of lines is 10, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, or any ten adjacent colors such as color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, and color 18 in the preset color combination as the first color;

[0117] When the number of lines is 11, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, or any eleven adjacent colors such as color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, and color 4 in the preset color combination as the first color;

[0118] When the number of lines is 12, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18 in the preset color combination, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, or any twelve adjacent colors such as color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, and color 14 as the first color;

[0119] When the number of lines is 13, any thirteen adjacent colors including color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, or color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, and color 9 in the preset color combination can be selected as the first color;

[0120] When the number of lines is 14, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, or any fourteen adjacent colors such as color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19 in the preset color combination as the first color;

[0121] When the number of lines is 15, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, or any fifteen adjacent colors such as color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, and color 5 in the preset color combination as the first color;

[0122] When the number of lines is 16, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19 in the preset color combination, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, or color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, etc. Any sixteen adjacent colors can be selected as the first color;

[0123] When the number of lines is 17, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5 in the preset color combination, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, or color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, etc., as the first color;

[0124] When the number of lines is 18, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, or any eighteen adjacent colors of color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20 in the preset color combination as the first color;

[0125] When the number of lines is 19, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10 from the preset color combinations, or color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20 as the first color.

[0126] When the number of lines is 20, you can select color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20 from the preset color combination as the first color. When the number of lines is 20, the lines from top to bottom in the trend chart are line 1, line 2, line 3, line 4, line 5, line 6, line 7, line 8, line 9, line 10, line 11, line 12, line 13, line 14, line 15, line 16, line 17, line 18, line 19, and line 20, and you can use color 1 as the color of line 1, color 2 as the color of line 2, color 3 as the color of line 3, color 4 as the color of line 4, color 5 as the color of line 5, and color 6 as the color of line 6. Use color 7 as the color of line 7, color 8 as the color of line 8, color 9 as the color of line 9, color 10 as the color of line 10, color 11 as the color of line 11, color 12 as the color of line 12, color 13 as the color of line 13, color 14 as the color of line 14, color 15 as the color of line 15, color 16 as the color of line 16, color 17 as the color of line 17, color 18 as the color of line 18, color 19 as the color of line 19, and color 20 as the color of line 20. You can also use color 1 as the color of line 20, color 2 as the color of line 19, color 3 as the color of line 18, color 4 as the color of line 17, color 5 as the color of line 16, color 6 as the color of line 15, color 7 as the color of line 14, color 8 as the color of line 13, color 9 as the color of line 12, color 10 as the color of line 11, color 11 as the color of line 10, color 12 as the color of line 9, color 13 as the color of line 8, color 14 as the color of line 7, color 15 as the color of line 6, color 16 as the color of line 5, color 17 as the color of line 4, color 18 as the color of line 3, color 19 as the color of line 2, and color 20 as the color of line 1.

[0127] S205. When the number of lines is greater than the number of colors in the preset color combination, calculate the difference between the number of lines and the number of colors in the preset color combination, obtain the same number of second colors as the difference and arranged in sequence from the preset color combination, process the second colors to obtain a third color, match colors for some lines in the trend chart according to the colors arranged in sequence in the preset color combination, and match colors for the remaining lines in the trend chart according to the third color.

[0128] For example, the colors arranged in sequence in the preset color combination are color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20.

[0129] If the number of lines is 25, which are recorded as line 1 to line 25 in sequence, the difference between the number of lines and the number of colors in the preset color combination is calculated to be 5, and 5 colors arranged in sequence are obtained from the preset color combination as the second color. For example, any five adjacent colors in the preset color combination, such as color 1, color 11, color 6, color 16, color 2, or color 11, color 6, color 16, color 2, color 12, or color 6, color 16, color 2, color 12, color 7, or color 16, color 2, color 12, color 7, color 17, or color 2, color 12, color 7, color 17, etc., can be selected as the second color. Then, the transparency of the second color can be processed to obtain a third color. For example, the third color obtained by processing the transparency of color 1, color 11, color 6, color 16, and color 2 is recorded as color 1', color 11', color 6', color 16', and color 2'. Lines 1 to 20 are matched in sequence by color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20, and lines 21 to 25 are matched in sequence by color 1', color 11', color 6', color 16', and color 2'. Lines 6 to 25 may also be matched in sequence by color 1, color 11, color 6, color 16, color 2, color 12, color 7, color 17, color 3, color 13, color 8, color 18, color 4, color 14, color 9, color 19, color 5, color 15, color 10, and color 20, and lines 1 to 5 may be matched in sequence by color 1', color 11', color 6', color 16', and color 2'.

[0130] The trend chart color matching method of the present application pre-forms a preset color combination. After obtaining the trend chart, the lines in the trend chart can be colored according to the colors in the preset color combination. The color values ​​between adjacent colors in the preset color combination differ greatly, allowing users to quickly and clearly identify the required information.

[0131] Figure 3 FIG. 1 is a flow chart showing a method for color matching a trend chart provided by an embodiment of the present application. Figure 3As shown, with the electronic device as the execution subject, the method of this embodiment may include the following steps:

[0132] S301, obtaining all trend charts in the target web page, and determining whether at least a line in the trend chart has a preset color.

[0133] The target webpage includes one or more trend charts. After all trend charts in the target webpage are obtained, it is determined whether the lines in each trend chart have a preset color.

[0134] For a trend chart with preset colors, execute step S302 , and for a trend chart without preset colors, execute step S303 .

[0135] In some embodiments, after obtaining all trend graphs in the target webpage, the first trend graph and the second trend graph can be screened from all trend graphs in the target webpage, the first trend graph is not affected by the color matching rule and maintains the original color matching, and it can be determined whether the lines in the second trend graph have a preset color. The number of the first trend graphs can be one or more, and the number of the second trend graphs can also be one or more.

[0136] S302, matching colors of the lines in the trend chart according to preset colors.

[0137] Optionally, when all trend charts in the target web page are filtered to be the first trend chart and the second trend chart, the first trend chart retains its original color scheme, and when the lines in the second trend chart have preset colors, the lines in the trend chart are colored according to the preset colors.

[0138] S303, identifying the number of lines in the trend chart.

[0139] Optionally, when all trend charts in the target webpage are filtered to be the first trend chart and the second trend chart, the first trend chart retains the original color scheme, and when the lines in the second trend chart have no preset color scheme, the number of lines in the trend chart is identified.

[0140] When the number of lines is less than or equal to the number of colors in the preset color combination, step S204 is executed, and when the number of lines is greater than the number of colors in the preset color combination, step S205 is executed.

[0141] S204: When the number of lines is less than or equal to the number of colors in the preset color combination, first colors that are the same as the number of lines and are arranged in sequence are obtained from the preset color combination, and the lines are matched according to the first colors.

[0142] The preset color combination is obtained by interlacing a preset number of colors in warm tones arranged in order of warmth, and / or, by interlacing a preset number of colors in cool tones arranged in order of coolness, and / or, by interlacing a first preset number of colors in warm tones arranged in order of warmth and a second preset number of colors in cool tones arranged in order of coolness.

[0143] S305. When the number of lines is greater than the number of colors in the preset color combination, calculate the difference between the number of lines and the number of colors in the preset color combination, obtain the same number of second colors as the difference and arranged in sequence from the preset color combination, process the second colors to obtain a third color, match colors for some lines in the trend chart according to the colors arranged in sequence in the preset color combination, and match colors for the remaining lines in the trend chart according to the third color.

[0144] In some embodiments, the background color, scale color and / or auxiliary line color of a portion of the trend chart may be set or adjusted, such as the color matching of only two sides in the stock market and interest rate market.

[0145] Some trend charts can be colored according to preset color matching rules, that is, some charts need to be processed according to special color matching rules. For example, in medical experiment comparison charts, general colors or black are used as healthy control groups, and red is used as disease treatment groups to highlight the test data.

[0146] Some lines in some trend charts can be color-matched separately, that is, one or more indicators in a chart can be color-matched separately. Specifically, some lines in the trend chart can be color-matched according to the color matching rules, and the remaining lines can be color-matched separately. For example, the median indicator in the commodity price trend chart needs to be processed separately as a benchmark, and the median indicator can be color-matched separately. The color used for the separate color matching can be determined as needed.

[0147] You can color some segments of some lines in some trend charts separately, that is, you can color a certain range of data in a chart separately. Specifically, after coloring the lines, you can use a specific color to cover the color of a certain range of lines. For example, the two time periods of winter and summer vacations in the tourism consumption trend chart are processed separately.

[0148] In some embodiments, the saturation in the first preset trend graph can be processed, for example, for a graph or line determined to be a key mark, its importance can be reflected by changing the saturation so that it stands out among all the graphs on the entire page. The first preset trend graph can be, for example, a graph determined to be a key mark.

[0149] The abnormal lines in some trend charts can be processed with separate colors. For example, for dynamically displayed data, such as real-time trend charts such as stock quotes and indicator monitoring, the data in the charts are always accompanied by ups and downs. For some data with large fluctuations, special indication is often required. By setting the benchmark value and fluctuation range, the lines where the data outside the threshold is located can be specially colored to achieve the display effect.

[0150] The same color scheme can be applied to related trend charts. In actual chart applications, a theme is usually described through a combination of several charts. For related charts, the same color scheme can be applied. For example, the status of domestic aviation can be described through three trend charts of supply, demand, and passenger transport. The colors of the lines of other charts can also be colored using the derived colors of the color scheme of one chart in the related trend charts. For example, the main view of the Shanghai-Shenzhen-Hong Kong Stock Connect theme is used to represent the overall trend, and the auxiliary sub-views such as 'Shanghai Stock Connect' and 'Hong Kong Stock Connect' are listed below. At this time, the sub-charts use the color system derived from the colors displayed in the main chart, which can bring more intuitive performance overall.

[0151] S306, presenting the trend chart after color matching of the lines in the browser.

[0152] When the web page matches the preset line color values, the trend chart containing different numbers of lines presents an orderly visual effect.

[0153] If you are not satisfied with the lines in some of the trend charts, you can also modify the colors of at least some of the lines in the trend charts to improve the user experience and satisfaction.

[0154] The color matching method provided by the present application obtains all trend charts in a web page, identifies the number of lines in at least part of the trend chart when there is no preset color for the lines in at least part of the trend chart, and then uses the tones in the preset color combination to color the lines in at least part of the trend chart. After the color matching is completed, the color-matched trend chart is presented in the browser, thereby being able to present an orderly visual effect.

[0155] Figure 4 FIG. 1 shows a schematic diagram of a trend chart color matching device provided in an embodiment of the present application. Figure 4 As shown, the trend chart color matching device 10 of this embodiment is used to implement the operation corresponding to the electronic device in any of the above method embodiments. The trend chart color matching device 10 of this embodiment includes:

[0156] An acquisition module 11 is used to acquire a trend chart and determine whether a line in the trend chart has a preset color;

[0157] Processing module 12, for matching the colors of the lines in the trend chart according to the preset colors when the lines in the trend chart have preset colors, and for identifying the number of lines in the trend chart when the lines in the trend chart have no preset colors;

[0158] A first color matching module 13 is used to obtain first colors that are the same as the number of lines and are arranged in sequence from the preset color combination when the number of lines is less than or equal to the number of colors in the preset color combination, and to match the lines according to the first colors;

[0159] A second color matching module 14 is used for, when the number of lines is greater than the number of colors in the preset color combination, calculating the difference between the number of lines and the number of colors in the preset color combination, obtaining second colors from the preset color combination that are arranged in sequence and in the same number as the difference, processing the second colors to obtain a third color, matching colors for some of the lines in the trend chart according to the colors arranged in sequence in the preset color combination, and matching colors for the remaining lines in the trend chart according to the third color;

[0160] Among them, the preset color combination is obtained by interspersing a preset number of colors in warm tones arranged in order of warmth, and / or, by interspersing a preset number of colors in cool tones arranged in order of coolness, and / or, by interspersing a first preset number of colors in warm tones arranged in order of warmth and a second preset number of colors in cool tones arranged in order of coolness.

[0161] Optional, such as Figure 5 As shown, the trend chart color matching device includes a preset module 15, which is used to form a preset color combination in at least one of the following ways: setting a preset number of colors in warm tones arranged in sequence according to warmth, and interspersing the preset number of colors arranged in sequence in warm tones; and / or, setting a preset number of colors in cool tones arranged in sequence according to coolness, and interspersing the preset number of colors arranged in sequence in cool tones; and / or, setting a first preset number of colors in warm tones arranged in sequence according to warmth, setting a second preset number of colors in cool tones arranged in sequence according to coolness, and interspersing the first preset number of colors arranged in sequence in warm tones and the second preset number of colors arranged in sequence in cool tones to form a preset color combination.

[0162] Optionally, the acquisition module 11 is specifically used to acquire all trend charts in the target web page; the processing module 12 is specifically used to color the lines in the trend chart according to the preset color scheme for the trend chart with preset color schemes, and to identify the number of lines in the trend chart for the trend chart with preset color schemes; the device also includes: a presentation module, which is used to present the trend chart after the lines are colored in a browser.

[0163] Optionally, the device also includes: an independent configuration sub-module, used to set or adjust the background color, scale line color and / or auxiliary line color of part of the trend chart, color the part of the trend chart according to preset color matching rules, perform individual color matching processing on some lines in some trend charts, and perform individual color matching processing on some line segments in some lines in some trend charts.

[0164] Optionally, the device also includes: a key chart and key data sub-module, which is used to process the saturation of the first preset trend chart; an abnormal data sub-module, which is used to perform separate color processing on abnormal lines in some trend charts; and an associated combination sub-module, which is used to perform the same color processing on associated trend charts.

[0165] The trend chart color matching device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principle and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.

[0166] Figure 6 FIG. 1 shows a hardware structure diagram of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 20 is used to implement the operations corresponding to the electronic device in any of the above method embodiments. The electronic device 20 of this embodiment may include: a memory 21, a processor 22 and a communication interface 23.

[0167] The memory 21 is used to store computer instructions. The memory 21 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk.

[0168] The processor 22 is used to execute the computer instructions stored in the memory to implement the trend chart color matching method in the above embodiment. For details, please refer to the relevant description in the above method embodiment. The processor 22 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the invention can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0169] Optionally, the memory 21 may be independent or integrated with the processor 22 .

[0170] The communication interface 23 may be connected to the processor 22. The processor 22 may control the communication interface 23 to implement the functions of receiving and sending signals.

[0171] The electronic device provided in this embodiment can be used to execute the above-mentioned trend chart color matching method, and its implementation method and technical effect are similar, which will not be repeated in this embodiment.

[0172] The present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed by a processor, they are used to implement the methods provided in the various embodiments described above.

[0173] The present application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. At least one processor of a device can read the computer instructions from the computer-readable storage medium, and at least one processor executes the computer instructions so that the device implements the methods provided in the various embodiments described above.

[0174] An embodiment of the present application also provides a chip, which includes a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory, so that a device equipped with the chip executes the methods described in the various possible implementation modes above.

[0175] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the above embodiments can still be modified, or some or all of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A trend chart color matching method, characterized in that: The method comprises: Setting a preset number of colors in warm tones arranged in sequence according to their warmth, and interlacing the preset number of colors in warm tones arranged in sequence; Setting a preset number of colors in the cool tones that are arranged in sequence according to their coolness, and interlacing and arranging the preset number of colors in the cool tones that are arranged in sequence; Setting a first preset number of colors in warm tones arranged in sequence according to warmth, setting a second preset number of colors in cool tones arranged in sequence according to coolness, and interlacing the first preset number of colors in warm tones arranged in sequence and the second preset number of colors in cool tones arranged in sequence to form a preset color combination; Get all trend charts in the target web page; Determine whether the lines in the trend chart have a preset color; If yes, color the lines in the trend chart according to the preset color, and if no, identify the number of lines in at least part of the trend chart; When the number of the lines is less than or equal to the number of colors in the preset color combination, first colors that are the same as the number of the lines and are arranged in sequence are obtained from the preset color combination, and the lines are matched according to the first colors; When the number of the lines is greater than the number of colors in the preset color combination, the difference between the number of the lines and the number of colors in the preset color combination is calculated, a second color having the same number as the difference and arranged in sequence is obtained from the preset color combination, the transparency of the second color is processed to obtain a third color, color matching is performed for some of the lines in the trend chart according to the colors arranged in sequence in the preset color combination, and color matching is performed for the remaining lines in the trend chart according to the third color; After matching the colors of the lines, the method further includes: The trend chart after color matching of the lines is presented in the browser; Set or adjust the background color, tick mark color and / or auxiliary line color of some trend charts; Individually color some lines in some trend charts; Perform separate color matching on some segments of some lines in some trend charts; Processing the saturation of the first preset trend chart; Make separate color matching for abnormal lines in some trend charts; Apply the same color scheme to related trend charts.

2. The method according to claim 1, characterized in that After obtaining all trend charts in the target webpage, the method further includes: Filtering a first trend chart and a second trend chart from all the trend charts, wherein the first trend chart retains the original color scheme; The identifying the number of lines in the trend chart specifically includes: The number of lines in the second trend graph is identified.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Modify the color of at least part of the chart lines.

4. A trend chart color matching device, characterized in that: The device comprises: A preset module, for forming a preset color combination in the following manner: setting a preset number of colors in warm tones arranged in sequence according to warmth, and interspersing the preset number of colors arranged in sequence in the warm tones; setting a preset number of colors in cool tones arranged in sequence according to coolness, and interspersing the preset number of colors arranged in sequence in the cool tones; and, setting a first preset number of colors in warm tones arranged in sequence according to warmth, setting a second preset number of colors in cool tones arranged in sequence according to coolness, and interspersing the first preset number of colors arranged in sequence in the warm tones and the second preset number of colors arranged in sequence in the cool tones to form a preset color combination; The acquisition module is used to obtain all trend charts in the target web page; determine whether the lines in the trend chart have preset colors; A processing module, for matching the colors of the lines in the trend graph according to the preset colors when the lines in the trend graph have preset colors, and for identifying the number of lines in at least part of the trend graph when the lines in the trend graph do not have preset colors; A first color matching module, configured to, when the number of the lines is less than or equal to the number of colors in the preset color combination, obtain first colors from the preset color combination that are the same as the number of the lines and are arranged in sequence, and match the lines according to the first colors; A second color matching module is used for, when the number of the lines is greater than the number of colors in the preset color combination, calculating the difference between the number of the lines and the number of colors in the preset color combination, obtaining second colors of the same number as the difference and arranged in sequence from the preset color combination, processing the transparency of the second colors to obtain a third color, matching colors for some of the lines in the trend chart according to the colors arranged in sequence in the preset color combination, and matching colors for the remaining lines in the trend chart according to the third color; A presentation module is used to present the trend chart after color matching of the lines in the browser; Independent configuration submodule, used to set or adjust the background color, scale color and / or auxiliary line color of some trend charts, perform separate color matching on some lines in some trend charts, and perform separate color matching on some line segments in some lines in some trend charts; The key chart and key data submodule is used to process the saturation of the first preset trend chart; The abnormal data submodule is used to perform separate color matching on abnormal lines in some trend charts; The associated combination submodule is used to apply the same color scheme to the associated trend charts.

5. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer instructions; The processor executes the computer instructions stored in the memory to implement the trend chart color matching method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed by a processor, are used to implement the trend chart color matching method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Color matching method and device and computer readable storage medium

    CN115731320A