CN110968390B - Automatic color matching method and device for electronic screen - Google Patents
Automatic color matching method and device for electronic screen Download PDFInfo
- Publication number
- CN110968390B CN110968390B CN201911121335.8A CN201911121335A CN110968390B CN 110968390 B CN110968390 B CN 110968390B CN 201911121335 A CN201911121335 A CN 201911121335A CN 110968390 B CN110968390 B CN 110968390B
- Authority
- CN
- China
- Prior art keywords
- color
- keyword
- keywords
- matching
- combination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2462—Approximate or statistical queries
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
- G06F16/334—Query execution
- G06F16/3344—Query execution using natural language analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses an automatic color matching method and device for an electronic screen, wherein the method comprises the following steps: calculating the occurrence times of keywords corresponding to each keyword type in the text content of the current display page; the keyword type comprises a color keyword and a punctuation mark keyword; determining a color matching basis according to the occurrence times of the keywords corresponding to each keyword type; the color matching basis is a keyword type which is used for matching the background color of the currently displayed page; determining a color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations; and matching colors of the background color of the current display page according to various colors in the color combination. The attractive force of the electronic reading material to the user is improved through the color displayed by the real-time color matching screen according to the content of the electronic reading material.
Description
Technical Field
The invention relates to the technical field of screen display, in particular to an automatic color matching method and device for an electronic screen.
Background
With rapid development of the internet and functional diversification of mobile terminals, electronic reading has become a popular trend, and more users are installing reading applications through terminal devices, such as: and a browser, iReader, weChat and the like. As the reading time of users becomes longer and longer, commercial merchants push out a series of eye protection mode functions, and damage to eyes is generally reduced by reducing the brightness of a display screen.
The social background described above, while optimizing the visual display quality of page reading for users, does not enhance the attractiveness of electronic books to users.
Disclosure of Invention
The embodiment of the invention provides an automatic color matching method and device for an electronic screen, which can match the color displayed by the screen in real time according to the content of an electronic reading material, and improve the attraction of the electronic reading material to a user.
An embodiment of the invention provides an automatic color matching method for an electronic screen, which comprises the following steps:
calculating the occurrence times of keywords corresponding to each keyword type in the text content of the current display page; wherein the keyword type comprises a color keyword and a punctuation mark keyword;
determining a color matching basis according to the occurrence times of the keywords corresponding to the keyword types; the color matching basis is a keyword type according to which the background color of the current display page is matched;
determining a color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations;
and matching colors of the background color of the current display page according to various colors in the color combination.
Further, the keywords attributed to the color keywords include: red, orange, yellow, blue, green and cyan; keywords attributed to punctuation keywords include: question marks, exclamation marks, colon marks, dash marks, ellipses, and quotation marks.
Further, the color system comprises a warm color system and a cold color system; the keywords corresponding to the warm color system comprise: red, orange, yellow, colon and dash; the keywords corresponding to the cold color system comprise: blue, green, cyan, question mark, exclamation mark, ellipses, and quotation marks.
Further, the calculating the number of times of occurrence of the keywords corresponding to each keyword type in the text content of the current display page specifically includes:
calculating the occurrence times of each keyword in each independent sentence of the text content one by one; if the same keyword appears for a plurality of times in an independent sentence, only one processing is performed;
and calculating the total number of times of occurrence of each keyword in the text content according to the number of times of occurrence of each keyword in each independent sentence, and obtaining the number of times of occurrence of each keyword in the text content.
Further, the determining the color matching basis according to the occurrence times of the keywords corresponding to the keyword types specifically includes:
accumulating the times of occurrence of all keywords belonging to the color keywords in the text content to obtain the times of occurrence of the color keywords in the text content, and taking the times as a first numerical value;
accumulating the times of occurrence of all keywords belonging to punctuation keywords in the text content to obtain the times of occurrence of the punctuation keywords in the text content, and taking the times as a second numerical value;
respectively weighting the first numerical value and the second numerical value according to a preset weight proportion, and comparing the magnitudes of the weighted first numerical value and second numerical value;
if the weighted first numerical value is larger than the weighted second numerical value, the color key word is used as the color matching basis;
and if the weighted first numerical value is smaller than the weighted second numerical value, taking the punctuation mark keyword as the color matching basis.
Further, several color combinations corresponding to each color system are obtained in the following manner;
red, orange and yellow are combined as warm base colors of the warm system, and blue, green and cyan are combined as cool base colors of the cool system;
in a preset transparency interval, carrying out transparency color matching on any one or more colors in the warm basic color combination to obtain a plurality of warm expanded color combinations, and taking the warm basic color combination and the plurality of warm expanded color combinations as color combinations corresponding to the warm color system;
and in a preset transparency interval, carrying out transparency color matching on any one or more colors in the cold color system basic color combination to obtain a plurality of cold color system expansion color combinations, and taking the cold color system basic color combination and the plurality of cold color system expansion color combinations as color combinations corresponding to the cold color system.
Further, the determining, according to the color system to which each keyword corresponding to the color matching basis belongs, a color combination adopted when the background color of the current display page is matched, specifically includes:
if the color system of each keyword corresponding to the color matching basis is a warm color system, using any one of the color combinations corresponding to the warm color system as the color combination adopted when the background color of the current display page is matched;
if the color system of each keyword corresponding to the color matching basis is a cold color system, using any one of the color combinations corresponding to the cold color system as the color combination adopted when the background color of the current display page is matched;
if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system are smaller than a first preset threshold value, randomly selecting one color combination from the color combinations corresponding to the warm color system and the cold color system for recombination, and using the recombined color combination as the color combination adopted when the background color of the current display page is matched;
and if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system are larger than a first preset threshold value, selecting one color combination from the color combinations corresponding to the color system with larger occupation as the color combination adopted when the background color of the current display page is matched.
Further, the color matching of the background color of the current display page according to each kind of color in the color combination specifically includes:
calculating the number of color types in the color combination and the number of lines of the text content;
dividing the corresponding line number of each color type according to the number of the color types and the line number of the text content, and then displaying the background color corresponding to each line in the text content; wherein each row corresponds to displaying one type of color.
Further, the color matching of the background color of the current display page according to each kind of color in the color combination specifically includes:
calculating the number of color types in the color combination and the number of columns of the text content;
dividing the number of columns corresponding to each color type according to the number of color types and the number of columns of the text content, and displaying the background color corresponding to each column in the text content; wherein each column corresponds to a type of color.
On the basis of the method item embodiments, the invention correspondingly provides device item embodiments;
another embodiment of the present invention provides an automatic color matching device for an electronic screen, including: the device comprises a frequency calculation module, a color matching basis determination module, a color combination determination module and a color matching module;
the number calculation module is used for calculating the number of times of occurrence of keywords corresponding to each keyword type in the text content of the current display page; wherein the keyword type comprises a color keyword and a punctuation mark keyword;
the color matching basis determining module is used for determining color matching basis according to the occurrence times of the keywords corresponding to the keyword types; the color matching basis is a keyword type according to which the background color of the current display page is matched;
the color combination determining module is used for determining the color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations;
the color matching module is used for matching the background color of the current display page according to various colors in the color combination.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides an automatic color matching method and device for an electronic screen, wherein the method comprises the steps of firstly calculating keywords belonging to color keywords and punctuation marks, determining the number of times of occurrence in text content of a current electronic screen display page, determining the color matching basis of the content displayed on the page when the content is matched with background colors according to the number of times of occurrence, determining the color matching basis according to the punctuation marks or the color keywords, determining the color combination required to be adopted when the background colors of the display page are matched according to the color system to which the corresponding keywords belong after determining the color matching basis, and finally matching the background colors of the current display page according to the selected color combination. By implementing the method, the corresponding background color can be matched according to the text content of the display page in the reading process, so that the atmosphere rendered by the background color is closer to the text content of the current display page, thereby enhancing the attraction of the electronic reading material to the user and improving the reading experience of the user.
Drawings
Fig. 1 is a schematic flow chart of an automatic color matching method for an electronic screen according to an embodiment of the invention.
Fig. 2 is a schematic structural diagram of an automatic color matching method device for an electronic screen according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention provides an automatic color matching method for an electronic screen, as shown in fig. 1, comprising the following steps:
step S101, calculating the occurrence times of keywords corresponding to each keyword type in the text content of the current display page; wherein the keyword type comprises a color keyword and a punctuation mark keyword;
step S102, determining a color matching basis according to the occurrence times of the keywords corresponding to the keyword types; the color matching basis is a keyword type according to which the background color of the current display page is matched;
step 103, determining a color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations;
and step S104, matching colors of the background color of the current display page according to various colors in the color combination.
For step S101, first, the keyword types are described in detail, where in the present invention, the keyword types include two types, one is a color keyword, and the other is a punctuation keyword; color keywords refer to text used to describe colors, and punctuation keywords refer to punctuation in text.
In a preferred embodiment, the color keywords in the present invention include, but are not limited to: red, orange, yellow, blue, green and cyan, which are used to represent the corresponding colors of text, although more colors such as "black", "white" and the like may be included. Punctuation keywords include, but are not limited to: question marks, exclamation marks, colon marks, dash marks, ellipses and quotation marks, which can of course also contain more punctuation marks, such as "stop marks", "period marks" etc.
When the color matching of the current display page is needed, firstly counting the occurrence times of each keyword in the current display page. In a preferred embodiment, the specific calculation method comprises:
calculating the occurrence times of each keyword in each independent sentence of the text content one by one; if the same keyword appears for a plurality of times in an independent sentence, only one processing is performed;
and calculating the total number of times of occurrence of each keyword in the text content according to the number of times of occurrence of each keyword in each independent sentence, and obtaining the number of times of occurrence of each keyword in the text content.
The definition of independent sentences is consistent with the definition of the existing sentences, is a basic unit of language application, is composed of words and phrases, can express a complete meaning, and can express a problem, such as telling others of a matter, express requirements or stop, express a certain sense of feeling, and express continuation or omission of a section of speech.
In a preferred embodiment, punctuation segmentation rules are employed to segment with periods, question marks, exclamation marks, and ellipses.
Sentence dividing is carried out on the text content displayed on the current page, and then the occurrence times of each keyword in each sentence are counted: it should be noted that, in the process of calculation, when a plurality of identical keywords appear in a sentence, the same keywords are only processed once when they are made. The number of times that each keyword appears in the same sentence is only 0 or 1, then the number of times that each keyword appears in all sentences after correction is counted, and finally the number of times that each keyword appears in the text content displayed on the current page is obtained;
for a better illustration of the above steps, the following illustrates an example, for example, the current page is displayed as follows:
such efforts to see flowers are, of course, not behind the trees. And-! The soft spring wind is in close contact with the freshly awakened ground, the green mist of the Mongolian is swayed on the branches of the long branches of the … … willow on the branches of the willow, the yellow tender leaves are spread on the branches, and the branches are gently swayed in breeze; the kapok tree with the safflower fully added at the height is just like a lump of burning fire, which is really a spectacular one; the peach blossom is full of peach blossom, pink, as if the sheet of Chaberia sauvignon … … is Mo Mujing spring o-!
Calculating the color and punctuation mark keywords of the text content: the actual number of occurrences of the color key is (green 1, yellow 1, red 2) and the number of occurrences of the punctuation key is (exclamation mark 2, ellipsis 2). When the keyword "red" appears twice in the same sentence because "safflower" and "pink" appear simultaneously in the same sentence, the number of occurrences of the keyword "red" is simply recorded as 1 when the number of occurrences of the keyword "red" is finally calculated, i.e., the number of occurrences of the color keyword (green 1, yellow 1, red 1) is the final statistical result.
The frequency calculation method is mainly used for improving the rationality of color matching; for example, assume that there are 5 sentences in the display content of the current page, wherein 5 words representing red are included in one sentence, but one word representing gray is included in the other 4 sentences, if the number is calculated simply, the current page of the final electronic screen should be displayed in red, but actually the gray display is more reasonable.
For step S102, in a preferred embodiment, the determining the color matching basis according to the number of occurrences of the keyword corresponding to each keyword type specifically includes:
accumulating the times of occurrence of all keywords belonging to the color keywords in the text content to obtain the times of occurrence of the color keywords in the text content, and taking the times as a first numerical value;
accumulating the times of occurrence of all keywords belonging to punctuation keywords in the text content to obtain the times of occurrence of the punctuation keywords in the text content, and taking the times as a second numerical value;
respectively weighting the first numerical value and the second numerical value according to a preset weight proportion, and comparing the magnitudes of the weighted first numerical value and second numerical value;
if the weighted first numerical value is larger than the weighted second numerical value, the color key word is used as the color matching basis;
and if the weighted first numerical value is smaller than the weighted second numerical value, taking the punctuation mark keyword as the color matching basis.
Still taking the text content mentioned in the step 1 as an example, in the text content mentioned in the step 1, the keywords belonging to the color keywords and the occurrence number thereof are as follows: the keywords belonging to the punctuation mark keywords are "1 green occurrence", "1 yellow occurrence", "1 red occurrence" and the number of occurrences is "exclamation mark occurrences 2 times", "ellipsis occurrences 2 times", and then the first numerical value is 1+1+1=3; the second value is 2+2 equal to 4;
weighting is carried out according to a preset weighting proportion, and the weight of the color keywords is assumed to be 0.4 and the weight of the punctuation marks keywords is assumed to be 0.6; the first value is weighted to a value of 1.2 and the second value is weighted to a value of 2.4, wherein the current color matching basis is based on punctuation keywords because 2.4 > 1.2.
Step S103, firstly, explaining each color system and a plurality of corresponding color combinations;
in a preferred embodiment of the present invention, the color system includes a warm color system and a cool color system; the keywords corresponding to the warm color system comprise: red, orange, yellow, colon and dash; the keywords corresponding to the cold color system comprise: blue, green, cyan, question mark, exclamation mark, ellipses, and quotation marks.
Red, orange and yellow are combined as warm base colors of the warm system, and blue, green and cyan are combined as cool base colors of the cool system;
in a preset transparency interval, carrying out transparency color matching on any one or more colors in the warm basic color combination to obtain a plurality of warm expanded color combinations, and taking the warm basic color combination and the plurality of warm expanded color combinations as color combinations corresponding to the warm color system;
and in a preset transparency interval, carrying out transparency color matching on any one or more colors in the cold color system basic color combination to obtain a plurality of cold color system expansion color combinations, and taking the cold color system basic color combination and the plurality of cold color system expansion color combinations as color combinations corresponding to the cold color system.
Specifically, one color system corresponds to one basic color combination, namely: the basic color combinations of the warm color system are [ red, orange, huang ] and the basic color combinations of the cold color system are [ blue, green, cyan ]; and adjusting the transparency of a preset transparency interval of the color system to obtain all the extended color combinations, and establishing a color template database.
The preset transparency interval adjustment refers to adjusting the depth display degree of any one or a plurality of colors simultaneously in the color combinations of the two main color systems based on the designated transparency value range; the preset transparency interval set in this example is the smaller the (0.05,0.3) value, the more transparent. Such as: setting the transparency of 0.2 for any one of the color combinations belonging to the two main color systems, wherein the obtained extended color combinations can be [ pink, orange, huang, [ red, orange, light yellow ], [ sky blue, green, cyan ]; meanwhile, the transparency of 0.2 is set for a plurality of colors in the color combination of the two large color systems, and the obtained extended color combination can be [ pink, orange, light yellow ], [ pink, apricot, light yellow ], [ sky blue, light green, cyan ] and the like.
Based on the transparency adjustment of the color combinations, obtaining all the extended color combinations; classifying and storing the two color systems on a server to establish a color template database.
In a preferred embodiment, determining a color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis specifically includes:
if the color system of each keyword corresponding to the color matching basis is a warm color system, using any one of the color combinations corresponding to the warm color system as the color combination adopted when the background color of the current display page is matched;
if the color system of each keyword corresponding to the color matching basis is a cold color system, using any one of the color combinations corresponding to the cold color system as the color combination adopted when the background color of the current display page is matched;
if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system are smaller than a first preset threshold value, randomly selecting one color combination from the color combinations corresponding to the warm color system and the cold color system for recombination, and using the recombined color combination as the color combination adopted when the background color of the current display page is matched;
and if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system are larger than a first preset threshold value, selecting one color combination from the color combinations corresponding to the color system with larger occupation as the color combination adopted when the background color of the current display page is matched.
The following describes the above steps with the color key as the color matching basis;
1, assuming that the key words corresponding to the current color matching basis are: red 2, orange 2 and yellow 2 (numbers after the text in step S101, the calculated number of occurrences of the corresponding keyword); and at this time, the color matching is performed according to the warm color system of each corresponding keyword, and then, in the color template database, a color combination is arbitrarily selected as the color combination adopted when the background color of the current display page is matched, for example, the color combination of [ pink, orange and light yellow ] can be selected.
2, assuming that the key words corresponding to the current color matching basis are: blue 2, green 2 and cyan 2, the color matching at this time is a cold color system according to the color system to which each corresponding keyword belongs, and then, in the color template database, a color combination is arbitrarily selected as the color combination adopted when the background color of the current display page is matched, for example, the color combination of [ sky blue, light green and cyan ] can be selected.
3, assuming that the key words corresponding to the current color matching basis are: red 11, green 6 and cyan 3, wherein the first preset threshold is 10%, the ratio of the keywords belonging to the warm color system is 55%, the ratio of the keywords belonging to the cold color system is 45%, and the difference between the ratios is smaller than the first preset threshold, and then the two are recombined by selecting one color combination from the cold color system and the warm color system, for example, selecting one color combination of [ sky blue, light green and cyan ] from the cold color system, selecting one color combination of [ pink, orange and light yellow ] from the warm color system, and recombining to obtain one color combination of [ sky blue, light green, pink, orange and light ] as the color combination adopted when the background color of the current display page is matched;
4, assuming that the key words corresponding to the current color matching basis are: red 5, green 10 and cyan 5, wherein the first preset threshold is 10%, the ratio of the keywords belonging to the warm color system is 25%, the ratio of the keywords belonging to the cold color system is 75%, the difference between the two ratios is greater than the first preset threshold, and a color combination is selected from the color system with the large ratio and the cold color system as the color combination adopted when the background color of the current display page is matched.
And if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system is equal to a first preset threshold value, processing according to the condition that the number of the keywords is smaller than the first preset threshold value.
For step S104, in a preferred embodiment, the color matching for the background color of the current display page according to each kind of color in the color combination specifically includes:
calculating the number of color types in the color combination and the number of columns of the text content;
dividing the number of columns corresponding to each color type according to the number of color types and the number of columns of the text content, and displaying the background color corresponding to each column in the text content; wherein each column corresponds to a type of color.
In a further preferred embodiment, the number of color classes in the color combination and the number of lines of the text content are calculated;
dividing the corresponding line number of each color type according to the number of the color types and the line number of the text content, and then displaying the background color corresponding to each line in the text content; wherein each row corresponds to displaying one type of color.
In the process of color matching, color matching can be performed by rows or columns, and the following specific description will be given by taking color matching by rows as an example:
assuming that the text content of the current display page has 9 rows in total, and the color matching combination corresponding to the background of the current display page is [ red, orange and yellow ], then the background color of 3 rows is red, the background color of 3 rows is orange, and the background color of 3 rows is yellow; in a specific display process, the display may be sequentially performed in turn, for example:
line 1 shows red, line 2 shows orange, line 3 shows yellow, line 4 shows red, line 5 shows orange, line 6 shows yellow, line 7 shows red, line 8 shows orange, line 9 shows yellow
Of course, a mode of displaying red on lines 1, 2 and 3, orange on lines 4, 5 and 6, and yellow on lines 7, 8 and 9 can also be adopted;
if the text content of the current display page has 8 rows in total, the color matching combination corresponding to the background of the current display page is [ red, orange and yellow ], and the current display page cannot be equally distributed at the moment, the current display page can be alternately displayed according to the preset color display sequence; for example, the preset sequence is that red is displayed first, orange is displayed later, and yellow is displayed finally; then, at this time, the display is alternately performed in the above order; row 1 shows red, row 2 shows orange, row 3 shows yellow, row 4 shows red, row 5 shows orange, row 6 shows yellow, row 7 shows red, and row 8 shows orange.
It is necessary to explain that: the color matching basis is effective for the current page, and the rest pages are automatically calculated again according to the corresponding text content statistical color and punctuation mark keywords.
Any of the above embodiments of the method of the present invention may be applied to any display device having an electronic screen.
Correspondingly providing an embodiment of the device item on the basis of the embodiment of the method item;
as shown in fig. 2, another embodiment of the present invention provides an automatic color matching device for an electronic screen, which includes a frequency calculation module, a color matching basis determination module, a color combination determination module, and a color matching module;
the number calculation module is used for calculating the number of times of occurrence of keywords corresponding to each keyword type in the text content of the current display page; wherein the keyword type comprises a color keyword and a punctuation mark keyword;
the color matching basis determining module is used for determining color matching basis according to the occurrence times of the keywords corresponding to the keyword types; the color matching basis is a keyword type according to which the background color of the current display page is matched;
the color combination determining module is used for determining the color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations;
the color matching module is used for matching the background color of the current display page according to various colors in the color combination.
It can be understood that the above embodiment of the apparatus corresponds to the embodiment of the method of the present invention, and may implement automatic color matching of the electronic screen provided by any one of the above embodiments of the method of the present invention.
It should be noted that the above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden. The schematic diagram is merely an example of an electronic screen automatic color matching device, and does not constitute a limitation of an electronic screen automatic color matching device, and may include more or fewer components than shown, or may combine certain components, or different components,
by implementing the embodiment of the invention, the colors of the defined cold-warm color system and the common punctuation marks are used as keywords, the occurrence times of the colors in the text are matched and counted, and the screen background color matching basis is determined by combining the set weights. Analyzing the color matching, determining the color system according to the key word, randomly extracting one of the color combinations of the color system from the color template database, and displaying the color combination on the background of the current page screen to realize the mode function of automatic color matching of the electronic screen. Compared with the function of the traditional reading mode, the invention combines the screen background with the current page text, not only optimizes the visual display quality of page reading, but also realizes the fine process of color words and punctuation marks of text content, and improves the accuracy of color matching basis; the user reading is enabled to change along with the change of the story line as if the user is on the scene, so that the effects of improving the user experience and enhancing the attraction of the user are achieved.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.
Claims (10)
1. An automatic color matching method for an electronic screen, which is characterized by comprising the following steps:
calculating the occurrence times of keywords corresponding to each keyword type in the text content of the current display page; wherein the keyword type comprises a color keyword and a punctuation mark keyword;
determining a color matching basis according to the occurrence times of the keywords corresponding to the keyword types; the color matching basis is a keyword type according to which the background color of the current display page is matched;
determining a color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations;
and matching colors of the background color of the current display page according to various colors in the color combination.
2. The automatic color matching method of an electronic screen according to claim 1, wherein the keywords attributed to the color keywords include: red, orange, yellow, blue, green and cyan; keywords attributed to punctuation keywords include: question marks, exclamation marks, colon marks, dash marks, ellipses, and quotation marks.
3. The method of automatic color matching for electronic screen according to claim 2, wherein the color system comprises a warm color system and a cool color system; the keywords corresponding to the warm color system comprise: red, orange, yellow, colon and dash; the keywords corresponding to the cold color system comprise: blue, green, cyan, question mark, exclamation mark, ellipses, and quotation marks.
4. The automatic color matching method of electronic screen according to claim 2, wherein the calculating the number of occurrences of the keyword corresponding to each keyword type in the text content of the current display page is specifically as follows:
calculating the occurrence times of each keyword in each independent sentence of the text content one by one; if the same keyword appears for a plurality of times in an independent sentence, only one processing is performed;
and calculating the total number of times of occurrence of each keyword in the text content according to the number of times of occurrence of each keyword in each independent sentence, and obtaining the number of times of occurrence of each keyword in the text content.
5. The method for automatically matching colors on an electronic screen according to claim 4, wherein the determining the color matching basis according to the occurrence times of the keywords corresponding to the keyword types comprises:
accumulating the times of occurrence of all keywords belonging to the color keywords in the text content to obtain the times of occurrence of the color keywords in the text content, and taking the times as a first numerical value;
accumulating the times of occurrence of all keywords belonging to punctuation keywords in the text content to obtain the times of occurrence of the punctuation keywords in the text content, and taking the times as a second numerical value;
respectively weighting the first numerical value and the second numerical value according to a preset weight proportion, and comparing the magnitudes of the weighted first numerical value and second numerical value;
if the weighted first numerical value is larger than the weighted second numerical value, the color key word is used as the color matching basis;
and if the weighted first numerical value is smaller than the weighted second numerical value, taking the punctuation mark keyword as the color matching basis.
6. The automatic color matching method of an electronic screen according to claim 3, wherein a plurality of color combinations corresponding to each color system are obtained by;
red, orange and yellow are combined as warm base colors of the warm system, and blue, green and cyan are combined as cool base colors of the cool system;
in a preset transparency interval, carrying out transparency color matching on any one or more colors in the warm basic color combination to obtain a plurality of warm expanded color combinations, and taking the warm basic color combination and the plurality of warm expanded color combinations as color combinations corresponding to the warm color system;
and in a preset transparency interval, carrying out transparency color matching on any one or more colors in the cold color system basic color combination to obtain a plurality of cold color system expansion color combinations, and taking the cold color system basic color combination and the plurality of cold color system expansion color combinations as color combinations corresponding to the cold color system.
7. The method for automatically matching colors of an electronic screen according to claim 6, wherein the determining the color combination adopted when matching the background color of the current display page according to the color system of each keyword corresponding to the color matching basis comprises:
if the color system of each keyword corresponding to the color matching basis is a warm color system, using any one of the color combinations corresponding to the warm color system as the color combination adopted when the background color of the current display page is matched;
if the color system of each keyword corresponding to the color matching basis is a cold color system, using any one of the color combinations corresponding to the cold color system as the color combination adopted when the background color of the current display page is matched;
if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system are smaller than a first preset threshold value, randomly selecting one color combination from the color combinations corresponding to the warm color system and the cold color system for recombination, and using the recombined color combination as the color combination adopted when the background color of the current display page is matched;
and if the keywords corresponding to the color matching basis are keywords belonging to a warm color system and keywords belonging to a cold color system, and the difference between the number of the keywords corresponding to the warm color system and the number of the keywords corresponding to the cold color system are larger than a first preset threshold value, selecting one color combination from the color combinations corresponding to the color system with larger occupation as the color combination adopted when the background color of the current display page is matched.
8. The automatic color matching method of an electronic screen according to claim 1, wherein the color matching of the background color of the currently displayed page according to each kind of color in the color combination specifically comprises:
calculating the number of color types in the color combination and the number of lines of the text content;
dividing the corresponding line number of each color type according to the number of the color types and the line number of the text content, and then displaying the background color corresponding to each line in the text content; wherein each row corresponds to displaying one type of color.
9. The automatic color matching method of an electronic screen according to claim 1, wherein the color matching of the background color of the currently displayed page according to each kind of color in the color combination specifically comprises:
calculating the number of color types in the color combination and the number of columns of the text content;
dividing the number of columns corresponding to each color type according to the number of color types and the number of columns of the text content, and displaying the background color corresponding to each column in the text content; wherein each column corresponds to a type of color.
10. The automatic color matching device of the electronic screen is characterized by comprising a frequency calculation module, a color matching basis determination module, a color combination determination module and a color matching module;
the number calculation module is used for calculating the number of times of occurrence of keywords corresponding to each keyword type in the text content of the current display page; wherein the keyword type comprises a color keyword and a punctuation mark keyword;
the color matching basis determining module is used for determining color matching basis according to the occurrence times of the keywords corresponding to the keyword types; the color matching basis is a keyword type according to which the background color of the current display page is matched;
the color combination determining module is used for determining the color combination adopted when the background color of the current display page is matched according to the color system of each keyword corresponding to the color matching basis; wherein each color system corresponds to a plurality of color combinations;
the color matching module is used for matching the background color of the current display page according to various colors in the color combination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911121335.8A CN110968390B (en) | 2019-11-15 | 2019-11-15 | Automatic color matching method and device for electronic screen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911121335.8A CN110968390B (en) | 2019-11-15 | 2019-11-15 | Automatic color matching method and device for electronic screen |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110968390A CN110968390A (en) | 2020-04-07 |
CN110968390B true CN110968390B (en) | 2023-04-28 |
Family
ID=70030726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911121335.8A Active CN110968390B (en) | 2019-11-15 | 2019-11-15 | Automatic color matching method and device for electronic screen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110968390B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102169479A (en) * | 2011-04-19 | 2011-08-31 | 上海网达软件有限公司 | Text reading system and method thereof |
CN104331524A (en) * | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Page displaying method, device and terminal |
CN105979338A (en) * | 2016-05-16 | 2016-09-28 | 武汉斗鱼网络科技有限公司 | System and method for matching colors according to emotions of bullet screen contents |
CN106598436A (en) * | 2016-12-21 | 2017-04-26 | 掌阅科技股份有限公司 | Method and apparatus for displaying e-book mark, and terminal device |
US10319116B1 (en) * | 2014-12-02 | 2019-06-11 | Amazon Technologies, Inc. | Dynamic color adjustment of electronic content |
-
2019
- 2019-11-15 CN CN201911121335.8A patent/CN110968390B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102169479A (en) * | 2011-04-19 | 2011-08-31 | 上海网达软件有限公司 | Text reading system and method thereof |
CN104331524A (en) * | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Page displaying method, device and terminal |
US10319116B1 (en) * | 2014-12-02 | 2019-06-11 | Amazon Technologies, Inc. | Dynamic color adjustment of electronic content |
CN105979338A (en) * | 2016-05-16 | 2016-09-28 | 武汉斗鱼网络科技有限公司 | System and method for matching colors according to emotions of bullet screen contents |
CN106598436A (en) * | 2016-12-21 | 2017-04-26 | 掌阅科技股份有限公司 | Method and apparatus for displaying e-book mark, and terminal device |
Non-Patent Citations (1)
Title |
---|
丁莹 等."一种投影显示图像颜色失真校正方法".《计算机工程与应用》.2012,第14-17页. * |
Also Published As
Publication number | Publication date |
---|---|
CN110968390A (en) | 2020-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106951473A (en) | Towards the construction method of the deep vision question answering system of dysopia personage | |
CN108734146A (en) | Facial image Age estimation method, apparatus, computer equipment and storage medium | |
CN110475154A (en) | Network television video playing method and device, Web TV and computer media | |
CN107330455A (en) | Image evaluation method | |
CN111143613A (en) | Method, system, electronic device and storage medium for selecting video cover | |
CN104599274A (en) | Image quality evaluation method and device | |
CN109685713A (en) | Makeup analog control method, device, computer equipment and storage medium | |
CN107729361A (en) | It is automatically synthesized picture method for pushing, device and storage medium | |
CN110223358A (en) | Visible pattern design method, training method, device, system and storage medium | |
CN110782448A (en) | Rendered image evaluation method and device | |
CN109617999A (en) | Content delivery method, device, computer equipment and storage medium | |
Pourfathollah et al. | Viewerphilic nightscape based on correlated color temperature | |
CN110968390B (en) | Automatic color matching method and device for electronic screen | |
CN107609487A (en) | A kind of generation method and device of user's head portrait | |
KR20190038439A (en) | Personalized persona management server | |
CN113449808B (en) | Multi-source image-text information classification method and corresponding device, equipment and medium | |
CN112767038B (en) | Poster CTR prediction method and device based on aesthetic characteristics | |
US20030074454A1 (en) | Method and apparatus for personalized presentation of parametric values | |
CN117610524A (en) | Form generation method, form generation device, electronic equipment and computer readable storage medium | |
CN109491740A (en) | A kind of automatic multi version funnel page selection method based on context information | |
CN113256100A (en) | Teaching method and system for indoor design based on virtual reality technology | |
KR20220077790A (en) | Non-face-to-face online mentor, mentee matching platform system based on A.I. and big data | |
CN109299805B (en) | Artificial intelligence-based online education course request processing method | |
CN106095839A (en) | The extraction of specific viewing population data and processing method thereof | |
CN106485616A (en) | A kind of adaptive mobile network's teaching hierarchy model and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |