CN111913863A - Statistical model establishing method, night mode page generating method, device and equipment - Google Patents
Statistical model establishing method, night mode page generating method, device and equipment Download PDFInfo
- Publication number
- CN111913863A CN111913863A CN202010790204.5A CN202010790204A CN111913863A CN 111913863 A CN111913863 A CN 111913863A CN 202010790204 A CN202010790204 A CN 202010790204A CN 111913863 A CN111913863 A CN 111913863A
- Authority
- CN
- China
- Prior art keywords
- page
- color
- mode
- target
- sample
- 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.)
- Granted
Links
- 238000013179 statistical model Methods 0.000 title claims abstract description 136
- 238000000034 method Methods 0.000 title claims abstract description 78
- 239000003086 colorant Substances 0.000 claims abstract description 65
- 238000013507 mapping Methods 0.000 claims abstract description 62
- 230000002776 aggregation Effects 0.000 claims description 26
- 238000004220 aggregation Methods 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 17
- 238000013461 design Methods 0.000 abstract description 10
- 230000000007 visual effect Effects 0.000 abstract description 10
- 230000007547 defect Effects 0.000 abstract description 7
- 239000000523 sample Substances 0.000 description 176
- 235000019580 granularity Nutrition 0.000 description 38
- 238000005192 partition Methods 0.000 description 19
- 238000012795 verification Methods 0.000 description 18
- 238000010586 diagram Methods 0.000 description 11
- 238000012360 testing method Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 7
- 230000007246 mechanism Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000012468 concentrated sample Substances 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3447—Performance evaluation by modeling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3452—Performance evaluation by statistical analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/349—Performance evaluation by tracing or monitoring for interfaces, buses
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Software Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Color Image Communication Systems (AREA)
Abstract
The embodiment of the disclosure relates to a statistical model establishing method, a night mode page generating method, a device and equipment. The statistical model establishing method for generating the night mode page comprises the following steps: acquiring a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples; counting color distribution data in each page sample and incidence relation data among colors in each page sample; and establishing a statistical model according to the statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample. The automation of generating the night mode page is realized through the statistical model, the defect caused by too single night mode page generation mode is overcome, the visual experience of a user is improved, meanwhile, developers are not required to design different night mode pages independently, and the labor cost is reduced.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a statistical model establishing method, a night mode page generating device and equipment.
Background
At present, mobile terminals have become an indispensable part of human life. In order to get a better visual perception of the user at night or in dimly lit scenes, many applications in mobile terminals provide a night mode.
In the related art, the night mode is realized by automatically reducing the page brightness, so that a user sees a darker page, which is substantially equivalent to reducing the brightness of the mobile terminal, and the user experience is poor. In addition, the night mode can be realized through manual design, developers need to design the night mode page corresponding to each day mode page independently, and labor cost is high.
Disclosure of Invention
The embodiment of the disclosure provides a statistical model establishing method, a night mode page generating method, a device and equipment, so as to overcome the defect caused by too single night mode generating mode in the related technology and solve the problem of high labor cost. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, a statistical model building method for generating a night mode page is provided, including: acquiring a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples; counting color distribution data in each page sample and incidence relation data among colors in each page sample; and establishing a statistical model according to the statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample.
According to a second aspect of the embodiments of the present disclosure, there is provided a method for generating a night mode page, including: acquiring a target daytime mode page to be switched in a display mode; determining a reference daytime mode page matched with the target daytime mode page according to a statistical model established by the statistical model establishing method for generating the nighttime mode page according to any embodiment of the disclosure; and adjusting the color of the target daytime mode page according to the mode switching color mapping relation corresponding to the reference daytime mode page in the statistical model, and generating a target night mode page corresponding to the target daytime mode page.
According to a third aspect of the embodiments of the present disclosure, there is provided a statistical model building apparatus for generating a night mode page, including: a page sample acquisition unit configured to acquire a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples; the data statistics unit is configured to count color distribution data in each page sample and incidence relation data among colors in each page sample; and the statistical model establishing unit is configured to establish a statistical model according to statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus for generating a night mode page, including: a target daytime mode page acquisition unit configured to acquire a target daytime mode page to be switched in a display mode; a reference daytime mode page determining unit configured to determine a reference daytime mode page matching the target daytime mode page according to a statistical model established by the statistical model establishing method for generating a nighttime mode page according to any embodiment of the present disclosure; and the target night mode page generation unit is configured to adjust the color of the target day mode page according to the mode switching color mapping relation corresponding to the reference day mode page in the statistical model, and generate the target night mode page corresponding to the target day mode page.
According to a fifth aspect of embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement a statistical model building method for generating a night mode page according to any embodiment of the present disclosure, or a generation method for a night mode page according to any embodiment of the present disclosure.
According to a sixth aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions, when executed by a processor of a server, enable the server to perform a statistical model building method for generating a night mode page according to any of the embodiments of the present disclosure, or a generation method of a night mode page according to any of the embodiments of the present disclosure.
According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer program product for use in conjunction with an electronic device, the computer program product comprising a computer-readable storage medium and a computer program mechanism embedded therein, the computer program being loaded into a computer and executed to implement the statistical model building method for generating a night mode page according to any of the embodiments of the present disclosure, or the method for generating a night mode page according to any of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the method and the device have the advantages that the automation of generating the night mode page is realized, the defect caused by too single night mode page generation mode (such as only adjusting the page brightness) is overcome, and the visual experience of a user is improved; meanwhile, developers do not need to design different night mode pages independently, and labor cost is reduced.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a statistical modeling method for generating a night mode page in accordance with an exemplary embodiment.
FIG. 2 is a flow diagram illustrating a statistical modeling method for generating a night mode page in accordance with an exemplary embodiment.
FIG. 3 is a flow diagram illustrating a statistical modeling method for generating a night mode page in accordance with an exemplary embodiment.
FIG. 4 is a flowchart illustrating a method of generating a night mode page in accordance with an exemplary embodiment.
FIG. 5 is a flowchart illustrating a method for generating a night mode page in accordance with an exemplary embodiment.
FIG. 6 is a block diagram illustrating a statistical model building apparatus for generating a night mode page in accordance with an exemplary embodiment.
Fig. 7 is a block diagram illustrating an apparatus for generating a night mode page according to an example embodiment.
Fig. 8 is a schematic structural diagram of an electronic device according to an exemplary embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
FIG. 1 is a flow diagram illustrating a statistical modeling method for generating a night mode page in accordance with an exemplary embodiment. The statistical model building method for generating the night mode page may be used in an electronic device, and is executed by a statistical model building device configured in the electronic device for generating the night mode page, as shown in fig. 1, and the method includes the following steps:
in step S110, a page sample set is obtained; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples.
The page sample set refers to a training sample set corresponding to a statistical model for generating a night mode page. The page sample set comprises a plurality of page samples, including a daytime mode page sample and a nighttime mode page sample, and the daytime mode page sample and the nighttime mode page sample exist in a one-to-one correspondence manner. The daytime mode page sample refers to a page sample with a display mode of a daytime mode, and is suitable for being provided for a user to browse in scenes such as daytime or sufficient light; the night mode page sample refers to a page sample whose display mode is night mode, and is suitable for being provided for a user to browse in scenes such as night or dim light. In an implementation manner of the embodiment of the present disclosure, the daytime mode page samples and the nighttime mode page samples that correspond to each other one by one only have color difference, and specifically, the color difference may be foreground color difference and/or background color difference. Optionally, the night mode page sample is designed for the developer based on the matched day mode page sample.
In step S120, the color distribution data in each page sample and the association relationship data between the colors in each page sample are counted.
The color distribution statistics are performed on each page sample in the page sample set (including the daytime mode page sample and the nighttime mode page sample), for example, which colors are included in each page sample, the distribution of each color, and the like may be counted. Meanwhile, statistics is also performed on the association relationship between the colors in each page sample, for example, which colors in the page sample are associated with each other and which colors are not associated with each other may be counted. The correlation may be a correlation between the foreground and the background, for example, a black word on a white background indicates that a correlation exists between white and black, or a correlation between adjacent areas, for example, a white area and a yellow area indicate that a correlation exists between white and yellow.
The color division and the color recognition method are not particularly limited in this embodiment.
In step S130, a statistical model is established according to the statistical data and the mapping relationship between the daytime mode page sample and the nighttime mode page sample.
After the statistical data of all the page samples are obtained, a statistical model for generating the night mode page can be established according to the statistical data and the mapping relation between the day mode page samples and the night mode page samples in the training sample set. In one implementation of the disclosed embodiment, the statistical model may be a statistical probability model.
After a target daytime mode page to be displayed is obtained, a plurality of mode switching color mapping relations corresponding to the target daytime mode page can be obtained through the statistical model, one with the highest probability is selected as the target mode switching color mapping relation used for generating a target night mode page matched with the target daytime mode page, and then the target night mode page can be generated after color adjustment is carried out on the target daytime mode page according to the target mode switching color mapping relation.
The mode switching color mapping relationship refers to a color mapping relationship for switching from a daytime mode to a nighttime mode, and the mode switching color mapping relationship at least comprises a color distribution mapping relationship and/or a color association mapping relationship. Furthermore, the statistical model for generating the night mode page may include a mapping relationship between a color distribution in the day mode page sample and a color distribution in the matched night mode page sample, may include a mapping relationship between a color association in the day mode page sample and a color association in the matched night mode page sample, and may further include a mapping relationship between a color distribution and a color association in the day mode page sample and a color distribution and a color association in the matched night mode page sample.
According to the technical scheme provided by the embodiment of the disclosure, the statistical model for generating the night mode page is established based on a large number of day mode page samples and night mode page samples, and then when the day mode page to be displayed is switched is obtained, the corresponding night mode page can be generated according to the statistical model, so that the automation of generating the night mode page is realized. The technical scheme overcomes the defect caused by too single generation mode of the night mode page (for example, only adjusting the page brightness and the like), realizes the switching from the day mode page to the night mode page based on the color visual angle, and improves the visual experience of a user; meanwhile, developers do not need to design different night mode pages independently, and labor cost is reduced.
In an implementation manner of the embodiment of the present disclosure, optionally, the step of obtaining the page sample set may specifically be: and acquiring a page sample set matched with the application requirement.
The design style of the night mode page sample corresponding to the day mode page sample is matched with the style of the night mode page generated according to the statistical model, and further, the statistical model for generating the night mode page with different design styles can be established by replacing the page sample set. For example, if the application requirement is to create a statistical model for generating a night mode page with personalization, a sample set of pages with corresponding personalization matching the application requirement may be selected to create a corresponding statistical model.
In the technical scheme, different page sample sets can be replaced according to different groups of users, a personalized statistical model for generating the night mode page is generated, and browsing experience of the night mode page with more personalization is given to the users.
In an implementation manner of the embodiment of the present disclosure, optionally, after the step of establishing the statistical model, the method further includes:
acquiring a pair of day mode page verification samples and night mode page verification samples;
generating a target night mode page corresponding to the day mode page verification sample by using the statistical model;
and if the similarity of the target night mode page and the night mode page verification sample is smaller than a preset similarity threshold, updating the statistical model.
The pair of day mode page verification samples and night mode page verification samples may be any pair of day mode page samples and night mode page samples included in the page sample set, or any pair of day mode page samples and night mode page samples specially used for verifying the generated statistical model.
When the generated statistical model is verified, firstly, a target night mode page corresponding to a day mode page verification sample is generated according to the statistical model, then the target night mode page is compared with the night mode page verification sample, the similarity of the target night mode page and the night mode page verification sample, especially the color distribution similarity, is determined, if the similarity is greater than or equal to a preset similarity threshold, the accuracy of the statistical model can be expected, if the similarity is smaller than the preset similarity threshold, the accuracy of the statistical model cannot be expected, and the statistical model needs to be updated.
In an implementation manner of the embodiment of the present disclosure, optionally, the step of updating the statistical model may specifically be: acquiring an updated page sample set; updating the statistical model by using the incremental page samples in the updated page sample set; the incremental page samples are a plurality of pairs of day mode page samples and night mode page samples which are newly added to the updated page sample set relative to the page sample set before updating.
Compared with the page sample set before updating, the updated page sample set has more corresponding daytime mode page samples and nighttime mode page samples. Further, the statistical model may be updated using incremental page samples (a plurality of pairs of new day mode page samples and night mode page samples) in the updated page sample set.
Illustratively, color distribution data in each page sample in the incremental page samples and association relation data among colors in each page sample are counted, and the statistical model is updated according to the statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample in the incremental page samples.
In the technical scheme, the generated statistical model is verified by using the day mode page verification sample and the night mode page verification sample, so that the accuracy and the effectiveness of the statistical model are ensured, and the accuracy of the established statistical model is higher and higher along with the increase of the number of the page sample concentrated samples.
Fig. 2 is a flowchart illustrating a statistical model building method for generating a night mode page according to an exemplary embodiment, which is a further refinement of the foregoing technical solution, and the technical solution in this embodiment may be combined with various alternatives in one or more embodiments described above.
The step of counting the color distribution data in each page sample and the association relationship data between the colors in each page sample may specifically be:
performing page block division on each page sample according to color distribution to obtain at least one page block corresponding to each page sample; and counting the distribution data of the colors of each page block in the page sample and the incidence relation data among the colors in the page sample.
As shown in fig. 2, the statistical model building method for generating the night mode page includes the following steps:
in step S210, a page sample set is obtained; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples.
In step S220, page block division is performed on each page sample according to color distribution, so as to obtain at least one page block corresponding to each page sample.
The color distribution refers to the distribution of colors in the page, and may be, for example, a color value in each pixel in the page sample. When each page sample is divided into page blocks according to the color distribution, if the colors of the adjacent pixels are the same or similar, the pixels can be divided into the same page block. In one example, each page tile may be a maximum connected region having the same or similar color values.
In an implementation manner of the embodiment of the present disclosure, the step of performing page block division on each page sample according to color distribution may specifically be:
counting a color set corresponding to the page sample set, and establishing a plurality of color clusters according to the color set; performing color aggregation processing on each page sample according to the plurality of color clusters; and performing page block division on each page sample subjected to the color aggregation processing according to the color distribution.
The color set corresponding to the page sample set refers to a set of all colors involved in the page samples in the page sample set; color cluster, refers to a color cluster comprising a plurality of similar colors. A plurality of color clusters are established according to the color set, that is, each color related in the color set is divided into a plurality of color clusters, and a color value of each color cluster may be identified by any color value included in the color cluster, or may be identified by a center color value of each color cluster, which is not specifically limited in this embodiment.
Taking an RGB color mode as an example, the number of colors is as many as (256 × 256), and the color aggregation processing is performed on the page sample according to the established color cluster, for example, the #333333 and #333334 original data are two color values, and can be grouped into the same color cluster during color aggregation, and then the page block division is performed according to the color distribution, so that the data calculation amount can be effectively reduced, and the interference of color noise can also be reduced.
After all colors corresponding to the page sample set are obtained, clustering processing is carried out on the colors, and a plurality of color clusters are obtained. The clustering algorithm is not specifically limited in this embodiment, and color clustering can be implemented. In an alternative embodiment, a plurality of color clusters may be established based on a K-means algorithm according to the color set, which is not described herein again.
In an implementation manner of the embodiment of the present disclosure, before the step of establishing a plurality of color clusters according to the color set, the method further includes: the number of color clusters is obtained, i.e. it is determined how many color clusters the colors comprised in the color set are to be divided into. Wherein the number of color clusters is predetermined or determined according to the color aggregation requirement.
In an example, the number of color clusters may be determined according to an empirical value, the order of magnitude may be thousands, tens of thousands, or hundreds of thousands, and the like, and color clusters obtained when the number is too large or too small are not good.
In another example, the number of color clusters may be determined according to color aggregation requirements, which may refer to, for example, which colors in a desired trial color set are grouped into the same color cluster. Optionally, a "color cluster number test mechanism" is set, a preset number of color clusters is selected to perform clustering processing on the test color set, and if the obtained color clusters meet the color aggregation requirement, the selected preset number of color clusters is used as the number of color clusters adopted in the embodiment; and if the obtained color cluster does not meet the color aggregation requirement, reselecting the number of one preset color cluster, and clustering the test color set again according to the reselected number of one color cluster until the obtained color cluster meets the color aggregation requirement. Optionally, the number of the preset color clusters belongs to a certain number interval, and a "dichotomy" may be adopted when the number of one preset color cluster is reselected, for example, the number interval to which the number of the preset color cluster belongs is [10000,100000], and if the obtained color cluster does not meet the color aggregation requirement when the number of the selected color cluster is 10000, the number of the reselected color cluster is 50000 and the test is performed again, and it is not necessary to perform the test one by one, and the color aggregation effects corresponding to the number of the color clusters of the same order of magnitude may not be very different.
And after a plurality of color clusters are obtained, performing color aggregation processing on each page sample according to the color clusters, wherein each page sample after the color aggregation processing only comprises colors corresponding to one or more color clusters. At this time, page block division is performed on each page sample subjected to color aggregation processing according to color distribution, and the color in each page block is the color corresponding to one color cluster.
In an implementation manner of the embodiment of the present disclosure, the step of performing page block division on each page sample according to color distribution may specifically be: and performing page block division on each page sample according to the color distribution and the page block division granularity.
The page block partition granularity refers to the granularity of a page block boundary, and may be identified by the number of pixels of a page block boundary line, for example. The smaller the number of pixels of the boundary line of the page block is, the smaller the partition granularity of the page block is; the larger the number of pixels of the boundary line of the page block, the larger the page block division granularity. For example, when the page block boundary line is identified by 1 × 1 pixel, the page block division granularity is larger when the page block boundary line is identified by 3 × 3 pixel.
In the present embodiment, the page partition of each page sample is implemented by combining the color distribution and the page partition granularity. Setting a proper page block division granularity can avoid the problem that the page block division is unreasonable or the page block comparison is inconvenient, for example, when the page block division granularity is small, the obtained page block boundary is not smooth, and when a night mode page is generated based on a statistical model, the problem that the page block matching is unsuccessful due to slight difference among the page blocks may exist.
In an implementation manner of the embodiment of the present disclosure, before performing the page block division step on each page sample according to the color distribution and the page block division granularity, the method further includes:
acquiring page block division granularity; the page block division granularity is preset or determined according to the page block division requirement.
The page block division granularity, which is used to identify the granularity of the boundary of the page block, may also refer to the fineness of the maximum connected region, which may be represented by M × N (pixels), and in an example, the values of M and N may be equal.
In an example, the page block division granularity may be determined according to an empirical value, and the page block division effect obtained by too large or too small page block division granularity is not good.
In another example, the page partition granularity may be according to a page partition requirement, which may refer to, for example, that each test page in the test page set is desired to be divided into several page partitions according to the color distribution. Optionally, a "page block partition granularity test mechanism" is set, a preset page block partition granularity is selected, page block partition is performed on each test page in the test page set according to the color distribution and the selected page block partition granularity, and if an obtained page block partition result meets a page block partition requirement, the selected page block partition granularity is used as the page block partition granularity adopted by the embodiment; and if the page block division result does not meet the page block division requirement, reselecting a preset page block division granularity until the obtained page block division result meets the page block division requirement. Optionally, when the number of the preset page block partition granularities is not large, the test can be performed one by one.
After the page block division granularity is obtained, the page block division of each page sample can be realized by combining the color distribution and the page block division granularity.
In a specific example, counting a color set corresponding to a page sample set, and establishing a plurality of color clusters according to the color set; performing color aggregation processing on each page sample according to the plurality of color clusters; and performing page block division on each page sample subjected to the color aggregation processing according to the color distribution and the page block division granularity.
In step S230, the distribution data of the colors of each page block in the page sample and the association relationship data between the colors in the page sample are counted.
After the page block division is completed, each page block can be used to replace each page as a statistical dimension, so as to improve the data statistical granularity. Specifically, the distribution data of the color of each page block in the page sample is counted, for example, the coverage degree of the color of each page block in the page sample may be counted. Meanwhile, the association relationship between the colors in each page sample can be counted, for example, which blocks in the page sample are associated with each other can be counted, so as to obtain the color with the association relationship.
In an implementation manner of the embodiment of the present disclosure, statistics may be further performed on distribution data of the color of each page block in the page sample, and association relationship data between the colors in the page sample specifically include:
and counting the distribution probability of the target color of each page block in the page sample, and the association relationship between the target color and other colors under the distribution probability.
The distribution probability, which is a representation of the distribution of the target color in the page sample, may exist in the form of a percentage, for example, in a certain page sample, 90% of the regions are all white, and 10% of the regions are black, two page blocks may be divided in the page sample, the target color of one page block is white, the distribution probability in the page sample is 90%, the target color of the other page block is black, and the distribution probability in the page sample is 10%.
The association relationship of the target color with other colors under the distribution probability thereof can be identified by an association index. Continuing with the previous example, the distribution probability of white in the page sample is 90%, white is associated with black if the distribution probability is 90%, and is associated with black only, so the association index of white with black may be 100% if the distribution probability is 90%. For another example, the distribution probability of white in the page sample is 90%, the distribution probability of black in the page sample is 5%, the distribution probability of red in the page sample is 5%, and white has a correlation with black and red when the distribution probability is 90%, so that the correlation index of white with black may be 50% when the distribution probability is 90%, and the correlation index of white with red may be 50% when the distribution probability is 90%.
In a specific example, the association relationship between the statistical target color and other colors under the distribution probability thereof can be determined by a bayesian formula, the association index between the target color and other colors can be determined by a prior probability, and the association index between the target color and other colors under the distribution probability thereof can be determined by a posterior probability.
In step S240, a statistical model is established according to the statistical data and the mapping relationship between the daytime mode page sample and the nighttime mode page sample.
In an implementation manner of the embodiment of the present disclosure, the mode switching color mapping relationship may be a mapping relationship between a distribution probability of a target color in a day mode page sample and an association index of the target color with other colors under the distribution probability thereof, and a distribution probability of the target color in a night mode page sample and an association index of the target color with other colors under the distribution probability thereof.
For example, in a day mode page, the target color of a larger page block is white, the distribution probability in the page sample is 90%, and the association index of white with black is 100% at the distribution probability, and in a night mode page corresponding to this day mode page, the target color of a larger page block is gray, the distribution probability in the page sample is 90%, and the association index of gray with cyan is 100% at the distribution probability. Thus, a mapping relationship between white and black at a distribution probability of 90% and gray and cyan at a distribution probability of 90%, that is, a mapping relationship between a white-black combination in the daytime mode and a gray-cyan combination in the nighttime mode, can be obtained.
Optionally, in the established statistical model, there may be a plurality of mode switching color mapping relationships corresponding to the distribution probability of the target color in the same page mode page sample and the association index of the target color with other colors under the distribution probability, and then the existence probabilities of the mode switching color mapping relationships may be respectively counted, so that when a target night mode page corresponding to the target day mode page is generated according to the statistical mode, one mode switching color mapping relationship with a higher existence probability may be selected as a basis for generating the target night mode page. For example, if the existence probability of the mapping relationship between the daytime mode white-black combination and the nighttime mode gray-cyan combination is 80% and the existence probability of the mapping relationship between the daytime mode white-black combination and the nighttime mode gray-cyan combination is 20%, the mapping relationship between the daytime mode white-black combination and the nighttime mode gray-cyan combination can be selected according to the existence probability when the target nighttime mode page is generated for the target daytime mode page corresponding to the daytime mode white-black combination.
According to the technical scheme, the statistical model for generating the night mode page is established based on a large number of day mode page samples and night mode page samples, page blocks included in the page samples are used as data statistical dimensions, the mode switching color mapping relation in the statistical model is refined, and therefore the accuracy of the statistical model for generating the page mode page is further improved.
FIG. 3 is a flow diagram illustrating a statistical modeling method for generating a night mode page in accordance with an exemplary embodiment. On the basis of the above embodiments, the present embodiment provides a specific implementation manner. As shown in fig. 3, the statistical model building method for generating the night mode page includes the following steps:
in step S310, a page sample set is obtained; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples.
In step S320, the number of color clusters K is acquired.
Wherein the number of color clusters is predetermined or determined according to the color aggregation requirement.
In step S330, a color set corresponding to the page sample set is counted, and K color clusters are established according to the color set.
In step S340, color aggregation processing is performed on each page sample according to the K color clusters.
In step S350, the page block partition granularity is obtained.
The page block division granularity is preset or determined according to the page block division requirement.
In step S360, page partition is performed on each page sample after color aggregation processing according to the color distribution and the page partition granularity.
In step S370, the distribution data of the colors of each page block in the page sample and the association relationship data between the colors in the page sample are counted.
In step S380, a statistical model is established according to the statistical data and the mapping relationship between the daytime mode page sample and the nighttime mode page sample.
For those parts of this embodiment that are not explained in detail, reference is made to the aforementioned embodiments, which are not repeated herein.
FIG. 4 is a flowchart illustrating a method of generating a night mode page in accordance with an exemplary embodiment. The method for generating the night mode page is used in an electronic device and is executed by a device for generating the night mode page configured in the electronic device, as shown in fig. 4, and the method includes the following steps:
in step S410, a target daytime mode page to be switched in display mode is acquired.
The target day mode page is a page whose display mode is to be switched from the day mode to the night mode.
In step S420, a reference day pattern page matching the target day pattern page is determined according to the statistical model established by the statistical model establishing method for generating the night pattern page according to any embodiment of the present disclosure.
After a statistical model used for generating the night mode page is obtained, a reference day mode page matched with the target day mode page is inquired in the statistical model, wherein the color distribution of the determined reference day mode page is the same as or similar to that of the target day mode page.
The number of the day pattern pages included in the statistical model is quite large, and one day pattern page closest to (or identical to) the color distribution of the target day pattern page can be queried in the statistical model as a matched reference day pattern page corresponding to the target day pattern page.
In an implementation manner of the embodiment of the present disclosure, determining a reference day mode page matching a target day mode page according to a statistical model established by the statistical model establishing method for generating a night mode page according to any embodiment of the present disclosure may specifically be:
counting color distribution data in the target daytime mode page and incidence relation data among colors in the target daytime mode page; and determining a reference daytime mode page matched with the target daytime mode page in the statistical model according to the data statistical result of the target daytime mode page.
The color distribution statistics is performed on the target day mode page sample, for example, it may be to count which colors are included in the target day mode page, the distribution of each color, and the like. Meanwhile, statistics is also performed on the association relationship between the colors in the target daytime mode page, for example, statistics may be performed on which colors in the target daytime mode page are associated with each other and which colors are not associated with each other. The correlation may be a correlation between the foreground and the background, for example, a black word on a white background indicates that a correlation exists between white and black, or a correlation between adjacent areas, for example, a white area and a yellow area indicate that a correlation exists between white and yellow.
The color division and the color recognition method are not particularly limited in this embodiment.
In step S430, the color of the target day mode page is adjusted according to the mode switching color mapping relationship corresponding to the reference day mode page in the statistical model, and a target night mode page corresponding to the target day mode page is generated.
After the reference daytime mode page corresponding to the target daytime mode page is determined, the mode switching color mapping relation corresponding to the reference daytime mode page is obtained, and the color of the target daytime mode page is adjusted according to the mode switching color mapping relation, so that the target night mode page corresponding to the target daytime mode page can be generated.
For example, if the target daytime mode page is a page with black characters in white, a reference daytime mode page similar to the distribution of the black characters in white is queried in the statistical model, and a mode switching color mapping relationship corresponding to the reference daytime mode page is obtained, where the mode switching color mapping relationship is, for example, mapping the black characters in white in daytime mode to white characters in gray in night mode, and then performing color adjustment on the target daytime mode page according to the mode switching color mapping relationship, so as to adjust the color distribution of the page from the black characters in white to the white characters in gray, and generate a page with corresponding white characters in gray as the target night mode page.
Optionally, there are a plurality of mode switching color mapping relationships corresponding to the reference daytime mode page, and at this time, one with a higher existence probability may be selected as the target mode switching color mapping relationship for performing color adjustment on the target daytime mode page.
For those parts of this embodiment that are not explained in detail, reference is made to the aforementioned embodiments, which are not repeated herein.
According to the technical scheme provided by the embodiment of the disclosure, after the statistical model for generating the night mode page is established based on a large number of day mode page samples and night mode page samples, the corresponding night mode page can be generated according to the statistical model, so that the night mode page generation automation is realized, and the accuracy of the established statistical model is higher and higher along with the increase of the number of concentrated page sample samples. The technical scheme overcomes the defect caused by too single generation mode of the night mode page (for example, only adjusting the page brightness and the like), realizes the switching from the day mode page to the night mode page based on the color visual angle, and improves the visual experience of a user; meanwhile, developers do not need to design different night mode pages independently, and labor cost is reduced.
FIG. 5 is a flowchart illustrating a method for generating a night mode page in accordance with an exemplary embodiment. On the basis of the above embodiments, the present embodiment provides a specific implementation manner.
The step of counting color distribution data in the target daytime mode page and incidence relation data between colors in the target daytime mode page may specifically be:
according to the statistical model established by the statistical model establishing method for generating the night mode page, page block division is carried out on the target day mode page to obtain at least one target page block corresponding to the target day mode page; counting the distribution data of the color of each page block in the target daytime mode page and the incidence relation data among the colors in the target daytime mode page;
correspondingly, the step of determining a reference daytime mode page matched with the target daytime mode page in the statistical model according to the data statistical result of the target daytime mode page specifically includes:
and determining at least one reference daytime mode page matched with the target daytime mode page in the statistical model according to the data statistical result of the target daytime mode page.
Further, the step of adjusting the color of the target day mode page according to the mode switching color mapping relationship corresponding to the reference day mode page in the statistical model may specifically be:
acquiring at least one target mode switching color mapping relation which is matched with each target page block in at least one reference daytime mode page; and respectively adjusting the color of each target page block in the target daytime mode page according to at least one target mode switching color mapping relation.
As shown in fig. 5, the method for generating the night mode page includes the following steps:
in step S510, a target daytime mode page to be switched in display mode is acquired.
In step S520, according to the statistical model established by the statistical model establishing method for generating a night mode page according to any embodiment of the present disclosure, page block division is performed on the target day mode page to obtain at least one target page block corresponding to the target day mode page.
In one implementation of the disclosed embodiment, the page block division may be performed on the target daytime mode page according to the color distribution, the method comprises the steps of carrying out color aggregation on a target day mode page according to a plurality of color clusters adopted in an established statistical model, then carrying out page block division according to color distribution, carrying out page block division on the target day mode page according to the color distribution and the page block division granularity adopted in the established statistical model, carrying out color aggregation on the target day mode page according to the plurality of color clusters adopted in the established statistical model, then carrying out page block division on the target day mode page according to the color distribution and the page block division granularity adopted in the established statistical model, and thus obtaining at least one target page block corresponding to the target day mode page.
In step S530, the distribution data of the color of each page block in the target daytime mode page and the association relationship data between the colors in the target daytime mode page are counted.
Specifically, the distribution data of the color of each target page block in the target daytime mode page may be counted, for example, the coverage degree of the color of each target page block in the target daytime mode page may be counted. Meanwhile, the association relationship among the colors in the target daytime mode page can be counted, for example, which target page blocks in the target daytime mode page are associated with each other can be counted, so that the colors with the association relationship are obtained.
In step S540, at least one reference day pattern page matching the target day pattern page is determined in the statistical model according to the data statistics of the target day pattern page.
In an example, the number of reference daytime pattern pages that match the target daytime pattern page may be one; in another example, the number of reference daytime pattern pages that match the target daytime pattern page may also be plural.
Optionally, if a plurality of target page blocks in the target daytime mode page may be divided into one or more groups according to the color association relationship (the group division method is not specifically limited in this embodiment), one reference daytime mode page matched with the group of target page blocks may be determined in the statistical model according to each group of target page blocks, so as to obtain one or more reference daytime mode pages matched with the target mode page.
Optionally, when determining the reference daytime mode page corresponding to a group of target page blocks, the statistical model may be queried according to the color distribution and color association of the group of target page blocks, specifically, according to the distribution probability of the target color of each target page block in the group of target page blocks and the association relationship between the target color and other colors under the distribution probability, so as to determine a reference daytime mode page matched with the group of target page blocks.
In a specific example, the statistical model may be queried to determine a reference daytime mode page matching the set of target page blocks according to a distribution probability of the target color of each target page block in the set of target page blocks, an association relationship between the target color and other colors under the distribution probability, and position information of each target page block in the set of target page blocks (for example, center point relative coordinate information of the target page block, etc.).
That is, the distribution probability of the target color of each page block in the reference daytime mode page matching the group of target page blocks in the reference daytime mode page, the association relationship between the target color and other colors under the distribution probability, and the position information of each page block in the reference daytime mode page are the same as or similar to the distribution probability of the target color of each target page block in the group of target page blocks, the association relationship between the target color and other colors under the distribution probability, and the position information of each target page block in the group of target page blocks.
In step S550, at least one target mode switching color mapping relationship respectively matched with each target page block in at least one reference daytime mode page is obtained.
And when the number of the reference daytime mode pages matched with the target daytime mode page is one, acquiring a mode switching color mapping relation corresponding to the reference daytime mode page as a target mode switching color mapping relation matched with the target daytime mode page.
When the number of reference daytime mode pages matched with the target daytime mode page is multiple, respectively acquiring multiple mode switching color mapping relations corresponding to the multiple reference daytime mode pages, and respectively determining a target mode switching color mapping relation matched with each target page block (or target page block group) according to the corresponding relation between the reference daytime mode page and the target page block (or target page block group).
In step S560, the color of each target page block in the target daytime mode page is adjusted according to the at least one target mode switching color mapping relationship, and a target nighttime mode page corresponding to the target daytime mode page is generated.
When the number of the reference daytime mode pages matched with the target daytime mode page is one, the color of the target daytime mode page can be directly adjusted by switching the color mapping relation of the target mode, so that the target night mode page corresponding to the target daytime mode page is generated.
When the number of the reference daytime mode pages matched with the target daytime mode page is multiple, the colors of the matched target page blocks (or the matched target page block groups) are respectively adjusted according to the target mode switching color mapping relation matched with each target page block (or each target page block group) so as to generate the target night mode pages corresponding to the target daytime mode pages.
For those parts of this embodiment that are not explained in detail, reference is made to the aforementioned embodiments, which are not repeated herein.
FIG. 6 is a block diagram illustrating a statistical model building apparatus for generating a night mode page in accordance with an exemplary embodiment. Referring to fig. 6, the apparatus includes a page sample acquiring unit 610, a data statistical unit 620, and a statistical model building unit 630. Wherein,
a page sample obtaining unit 610 configured to obtain a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples;
a data statistics unit 620 configured to count color distribution data in each page sample and association relationship data between colors in each page sample;
a statistical model establishing unit 630, configured to establish a statistical model according to the statistical data and the mapping relationship between the daytime mode page sample and the nighttime mode page sample.
According to the technical scheme provided by the embodiment of the disclosure, the statistical model for generating the night mode page is established based on a large number of day mode page samples and night mode page samples, and then when the day mode page to be displayed is switched is obtained, the corresponding night mode page can be generated according to the statistical model, so that the automation of generating the night mode page is realized, and the accuracy of the established statistical model is higher and higher along with the increase of the number of concentrated page sample samples. The technical scheme overcomes the defect caused by too single generation mode of the night mode page (for example, only adjusting the page brightness and the like), realizes the switching from the day mode page to the night mode page based on the color visual angle, and improves the visual experience of a user; meanwhile, developers do not need to design different night mode pages independently, and labor cost is reduced.
In an implementation manner of the embodiment of the present disclosure, optionally, the data statistics unit 620 includes:
the page block dividing unit is configured to perform page block division on each page sample according to color distribution to obtain at least one page block corresponding to each page sample;
and the data statistics subunit is configured to count distribution data of the color of each page block in the page sample and association relation data among the colors in the page sample.
In an implementation manner of the embodiment of the present disclosure, optionally, the page block dividing subunit is configured to count a color set corresponding to the page sample set, and establish a plurality of color clusters according to the color set; performing color aggregation processing on each page sample according to the plurality of color clusters; and performing page block division on each page sample subjected to the color aggregation processing according to the color distribution.
In an implementation manner of the embodiment of the present disclosure, optionally, the data statistics unit 620 further includes:
a color cluster number obtaining subunit configured to obtain the number of color clusters before the step of establishing a plurality of color clusters from the color set; wherein the number of color clusters is predetermined or determined according to color aggregation requirements.
In an implementation manner of the embodiment of the present disclosure, optionally, the page block dividing subunit is configured to perform page block division on each page sample according to a color distribution and a page block division granularity, so as to obtain at least one page block corresponding to each page sample.
In an implementation manner of the embodiment of the present disclosure, optionally, the data statistics unit 620 further includes:
a page block division granularity obtaining subunit configured to obtain the page block division granularity before the step of performing page block division on each page sample according to the color distribution and the page block division granularity; the page block division granularity is preset or determined according to the page block division requirement.
In an implementation manner of the embodiment of the present disclosure, optionally, the data statistics subunit is configured to count a distribution probability of the target color of each page block in the page sample, and an association relationship between the target color and other colors under the distribution probability.
In an implementation manner of the embodiment of the present disclosure, optionally, the page sample obtaining unit 610 is configured to obtain a page sample set matching the application requirement.
In an implementation manner of the embodiment of the present disclosure, optionally, the apparatus further includes: a model verification updating unit configured to obtain a pair of day mode page verification samples and night mode page verification samples after the step of establishing a statistical model; generating a target night mode page corresponding to the day mode page verification sample by using the statistical model; and if the similarity of the target night mode page and the night mode page verification sample is smaller than a preset similarity threshold, updating the statistical model.
In an implementation manner of the embodiment of the present disclosure, optionally, when the model verification updating unit updates the statistical model, the model verification updating unit is specifically configured to obtain an updated page sample set; and updating the statistical model by using the incremental page samples in the updated page sample set, wherein the incremental page samples are a plurality of pairs of day mode page samples and night mode page samples which are newly added to the updated page sample set relative to the page sample set before updating.
With regard to the statistical model building apparatus for generating a night mode page in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment related to the method, and will not be described in detail here.
Fig. 7 is a block diagram illustrating an apparatus for generating a night mode page according to an example embodiment. Referring to fig. 7, the apparatus includes a target daytime mode page acquisition unit 710, a reference daytime mode page determination unit 720, and a target nighttime mode page generation unit 730. Wherein,
a target daytime mode page acquiring unit 710 configured to acquire a target daytime mode page to be switched in a display mode;
a reference daytime mode page determining unit 720 configured to determine a reference daytime mode page matching the target daytime mode page according to a statistical model established by the statistical model establishing method for generating a nighttime mode page according to any embodiment of the present disclosure;
a target night mode page generation unit 730, configured to adjust the color of the target day mode page according to the mode switching color mapping relationship corresponding to the reference day mode page in the statistical model, and generate a target night mode page corresponding to the target day mode page.
According to the technical scheme provided by the embodiment of the disclosure, after the statistical model for generating the night mode page is established based on a large number of day mode page samples and night mode page samples, the corresponding night mode page can be generated according to the statistical model, so that the night mode page generation automation is realized, and the accuracy of the established statistical model is higher and higher along with the increase of the number of concentrated page sample samples. The technical scheme overcomes the defect caused by too single generation mode of the night mode page (for example, only adjusting the page brightness and the like), realizes the switching from the day mode page to the night mode page based on the color visual angle, and improves the visual experience of a user; meanwhile, developers do not need to design different night mode pages independently, and labor cost is reduced.
In an implementation manner of the embodiment of the present disclosure, optionally, the reference daytime mode page determining unit 720 includes:
the data statistics subunit is configured to count color distribution data in the target daytime mode page and incidence relation data among colors in the target daytime mode page;
a reference daytime mode page determining subunit configured to determine, in the statistical model, a reference daytime mode page that matches the target daytime mode page, according to a data statistical result of the target daytime mode page.
In an implementation manner of the embodiment of the present disclosure, optionally, the data statistics subunit is configured to perform, according to a statistical model established by the statistical model establishing method for generating a night mode page according to any embodiment of the present disclosure, page block division on the target day mode page to obtain at least one target page block corresponding to the target day mode page;
counting the distribution data of the color of each page block in the target daytime mode page and the incidence relation data among the colors in the target daytime mode page;
correspondingly, the reference daytime mode page determining subunit is configured to determine, according to the data statistical result of the target daytime mode page, at least one reference daytime mode page matched with the target daytime mode page in the statistical model.
In an implementation manner of the embodiment of the present disclosure, optionally, the target night mode page generating unit 730 is configured to obtain at least one target mode switching color mapping relationship, which is respectively matched with each target page block, in the at least one reference day mode page; and respectively adjusting the color of each target page block in the target daytime mode page according to the at least one target mode switching color mapping relation, and generating a target night mode page corresponding to the target daytime mode page.
With regard to the generation apparatus of the night mode page in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a schematic structural diagram illustrating an electronic device according to an exemplary embodiment, where the electronic device includes, as shown in fig. 8:
one or more of the processors 810 may be,
FIG. 8 illustrates an example of a processor 810;
a memory 820;
the processor 810 and the memory 820 in the device may be connected by a bus or other means, and fig. 8 illustrates the connection by a bus as an example.
The memory 820 may be used as a non-transitory computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to a statistical model building method for generating a night mode page in the embodiments of the present disclosure (for example, the page sample obtaining unit 610, the data statistical unit 620, and the statistical model building unit 630 shown in fig. 6), or program instructions/modules corresponding to a generation method for a night mode page in the embodiments of the present disclosure (for example, the target day mode page obtaining unit 710, the reference day mode page determining unit 720, and the target night mode page generating unit 730 shown in fig. 7). The processor 810 implements a statistical model building method for generating a night mode page of the above-described method embodiments by executing software programs, instructions, and modules stored in the memory 820 to execute various functional applications and data processing of a computer device, that is:
acquiring a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples;
counting color distribution data in each page sample and incidence relation data among colors in each page sample;
and establishing a statistical model according to the statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample.
Or the method for generating the night mode page in the embodiment of the method is realized, that is:
acquiring a target daytime mode page to be switched in a display mode;
determining a reference daytime mode page matched with the target daytime mode page according to a statistical model established by the statistical model establishing method for generating the nighttime mode page according to any embodiment of the disclosure;
and adjusting the color of the target daytime mode page according to the mode switching color mapping relation corresponding to the reference daytime mode page in the statistical model, and generating a target night mode page corresponding to the target daytime mode page.
The memory 820 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 820 may optionally include memory located remotely from processor 810, which may be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
In an exemplary embodiment, there is also provided a storage medium comprising instructions, such as the memory 820 comprising instructions, executable by the processor 810 of the electronic device to perform the above method, the statistical model building method for generating a night mode page as described in any of the embodiments of the present disclosure, or the method for generating a night mode page as described in any of the embodiments of the present disclosure. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product for use in conjunction with an electronic device is also provided, the computer program product comprising a computer-readable storage medium and a computer program mechanism embedded therein, the program being loaded into and executed by a computer to implement a statistical model building method for generating a night mode page according to any of the embodiments of the present disclosure, or a method for generating a night mode page according to any of the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A statistical model building method for generating a night mode page is characterized by comprising the following steps:
acquiring a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples;
counting color distribution data in each page sample and incidence relation data among colors in each page sample;
and establishing a statistical model according to the statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample.
2. The method according to claim 1, wherein the step of counting the color distribution data in each page sample and the association relationship data between the colors in each page sample comprises:
performing page block division on each page sample according to color distribution to obtain at least one page block corresponding to each page sample;
and counting the distribution data of the colors of each page block in the page sample and the incidence relation data among the colors in the page sample.
3. The method of claim 2, wherein the step of dividing each page sample into page blocks according to color distribution comprises:
counting a color set corresponding to the page sample set, and establishing a plurality of color clusters according to the color set;
performing color aggregation processing on each page sample according to the plurality of color clusters;
and performing page block division on each page sample subjected to the color aggregation processing according to the color distribution.
4. The method of claim 2, wherein the step of dividing each page sample into page blocks according to color distribution comprises:
and performing page block division on each page sample according to the color distribution and the page block division granularity.
5. The method according to claim 2, wherein the step of counting distribution data of the colors of each page block in the page sample and association data between the colors in the page sample comprises:
and counting the distribution probability of the target color of each page block in the page sample, and the association relationship between the target color and other colors under the distribution probability.
6. A method for generating a night mode page, comprising:
acquiring a target daytime mode page to be switched in a display mode;
determining a reference daytime mode page matching the target daytime mode page according to a statistical model established according to the method of any one of claims 1-5;
and adjusting the color of the target daytime mode page according to the mode switching color mapping relation corresponding to the reference daytime mode page in the statistical model, and generating a target night mode page corresponding to the target daytime mode page.
7. A statistical model building apparatus for generating a night mode page, comprising:
a page sample acquisition unit configured to acquire a page sample set; the page sample set comprises a plurality of pairs of daytime mode page samples and nighttime mode page samples;
the data statistics unit is configured to count color distribution data in each page sample and incidence relation data among colors in each page sample;
and the statistical model establishing unit is configured to establish a statistical model according to statistical data and the mapping relation between the daytime mode page sample and the nighttime mode page sample.
8. An apparatus for generating a night mode page, comprising:
a target daytime mode page acquisition unit configured to acquire a target daytime mode page to be switched in a display mode;
a reference daytime mode page determining unit configured to determine a reference daytime mode page matching the target daytime mode page according to the statistical model established by the method according to any one of claims 1 to 5;
and the target night mode page generation unit is configured to adjust the color of the target day mode page according to the mode switching color mapping relation corresponding to the reference day mode page in the statistical model, and generate the target night mode page corresponding to the target day mode page.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable commands;
wherein the processor is configured to execute the commands to implement the statistical model building method for generating a night mode page according to any one of claims 1 to 5 or the night mode page generating method according to claim 6.
10. A storage medium in which commands, when executed by a processor of a server, enable the server to perform the statistical model building method for generating a night mode page according to any one of claims 1 to 5 or the generation method of a night mode page according to claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010790204.5A CN111913863B (en) | 2020-08-07 | 2020-08-07 | Statistical model establishment method, night mode page generation method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010790204.5A CN111913863B (en) | 2020-08-07 | 2020-08-07 | Statistical model establishment method, night mode page generation method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111913863A true CN111913863A (en) | 2020-11-10 |
CN111913863B CN111913863B (en) | 2023-10-17 |
Family
ID=73283601
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010790204.5A Active CN111913863B (en) | 2020-08-07 | 2020-08-07 | Statistical model establishment method, night mode page generation method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111913863B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107861675A (en) * | 2017-09-21 | 2018-03-30 | 海南智媒云图科技股份有限公司 | A kind of method and device of intelligence switching Night |
CN108616649A (en) * | 2018-03-23 | 2018-10-02 | 北京京东尚科信息技术有限公司 | The display control method and device of electronic equipment |
CN109492182A (en) * | 2018-11-05 | 2019-03-19 | 珠海格力电器股份有限公司 | Page generation method and device, page display system and storage medium |
CN110458763A (en) * | 2019-07-08 | 2019-11-15 | 深圳中兴网信科技有限公司 | Restoring method, system, the medium of night color image based on deep learning |
CN110880016A (en) * | 2019-10-18 | 2020-03-13 | 平安科技(深圳)有限公司 | Image style migration method, device, equipment and storage medium |
CN110969981A (en) * | 2019-12-30 | 2020-04-07 | 维沃移动通信有限公司 | Screen display parameter adjusting method and electronic equipment |
-
2020
- 2020-08-07 CN CN202010790204.5A patent/CN111913863B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107861675A (en) * | 2017-09-21 | 2018-03-30 | 海南智媒云图科技股份有限公司 | A kind of method and device of intelligence switching Night |
CN108616649A (en) * | 2018-03-23 | 2018-10-02 | 北京京东尚科信息技术有限公司 | The display control method and device of electronic equipment |
CN109492182A (en) * | 2018-11-05 | 2019-03-19 | 珠海格力电器股份有限公司 | Page generation method and device, page display system and storage medium |
CN110458763A (en) * | 2019-07-08 | 2019-11-15 | 深圳中兴网信科技有限公司 | Restoring method, system, the medium of night color image based on deep learning |
CN110880016A (en) * | 2019-10-18 | 2020-03-13 | 平安科技(深圳)有限公司 | Image style migration method, device, equipment and storage medium |
CN110969981A (en) * | 2019-12-30 | 2020-04-07 | 维沃移动通信有限公司 | Screen display parameter adjusting method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111913863B (en) | 2023-10-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112232293B (en) | Image processing model training method, image processing method and related equipment | |
CN111708785B (en) | Big data mining processing method and device and cloud platform | |
CN112612686A (en) | Performance test method and device, electronic equipment and storage medium | |
CN104899853A (en) | Image region dividing method and device | |
CN112001274A (en) | Crowd density determination method, device, storage medium and processor | |
CN111383232A (en) | Matting method, matting device, terminal equipment and computer-readable storage medium | |
CN111898735A (en) | Distillation learning method, distillation learning device, computer equipment and storage medium | |
CN112950640A (en) | Video portrait segmentation method and device, electronic equipment and storage medium | |
CN111813700A (en) | Monitoring data display method and device | |
CN115760870A (en) | Image key area segmentation method, device, equipment and storage medium | |
CN108961268B (en) | Saliency map calculation method and related device | |
CN112162668B (en) | Interface updating method and monitoring terminal | |
CN113055423B (en) | Policy pushing method, policy execution method, device, equipment and medium | |
CN113741930A (en) | Application upgrading method and device, electronic equipment and computer readable storage medium | |
CN105488792A (en) | No-reference stereo image quality evaluation method based on dictionary learning and machine learning | |
CN111913863B (en) | Statistical model establishment method, night mode page generation method, device and equipment | |
CN117455895A (en) | Preparation device and preparation method for realizing wire clamp | |
JP2013164832A (en) | Object recognition device and method | |
CN112686205A (en) | Parameter updating method and device and multi-terminal network architecture | |
CN114492152A (en) | Method for updating network model, method for classifying images and method for language modeling | |
CN111800294A (en) | Gateway fault diagnosis method and device, network equipment and storage medium | |
CN110795251A (en) | Method and equipment for determining terminal operation parameters | |
CN109858380A (en) | Expansible gesture identification method, device, system, gesture identification terminal and medium | |
CN114004906A (en) | Image color matching method and device, storage medium and electronic equipment | |
CN113055212B (en) | Strategy pushing method, strategy execution method, device, equipment and medium |
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 |