CN110968808B - Method and device for realizing webpage theme update - Google Patents

Method and device for realizing webpage theme update Download PDF

Info

Publication number
CN110968808B
CN110968808B CN201811150237.2A CN201811150237A CN110968808B CN 110968808 B CN110968808 B CN 110968808B CN 201811150237 A CN201811150237 A CN 201811150237A CN 110968808 B CN110968808 B CN 110968808B
Authority
CN
China
Prior art keywords
target
picture
color
color value
theme
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
Application number
CN201811150237.2A
Other languages
Chinese (zh)
Other versions
CN110968808A (en
Inventor
李培钊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811150237.2A priority Critical patent/CN110968808B/en
Publication of CN110968808A publication Critical patent/CN110968808A/en
Application granted granted Critical
Publication of CN110968808B publication Critical patent/CN110968808B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the application discloses a method and a device for updating a webpage theme, which are characterized in that color values corresponding to user interaction behaviors are recorded, target color values are determined from the color values corresponding to the user interaction behaviors, and the target color values can represent the preference of a user for colors; then, a current theme background picture of the target website is obtained, and a picture which is similar to the current theme background picture and has the same color system as the target color value is determined to be used as a target picture; when the user accesses the target website again, the theme color of the target website can be set to the color corresponding to the target color value, and the theme background picture of the target website is set to be the target picture, so that the automatic update of the webpage theme is completed. In the process, according to the user behavior and the current website theme background picture, the target color and the target picture are automatically acquired, the webpage theme update is automatically completed, the webpage theme update of each website can be realized aiming at different target websites, and the efficiency of the webpage theme update is improved.

Description

Method and device for realizing webpage theme update
Technical Field
The application relates to the technical field of Internet, in particular to a method and a device for realizing webpage theme update.
Background
With the development of internet technology in a new place, the current website basically has the function of switching different topics. In the process of browsing the web pages of the website, the user can select the existing web page topics according to own preference. However, at present, not all websites have multiple sets of webpage topics for users to select, or some websites provide multiple sets of webpage topics for users to select, but all websites do not meet the aesthetic requirements of users and cannot meet the demands of users on webpage topics.
In the prior art, users can customize the webpage theme, but more time is spent, and each customized webpage theme can only aim at one website and cannot be transplanted to other websites, so that the efficiency of user-defined webpage theme updating is lower.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and apparatus for implementing web page theme update, so as to solve the technical problem of low efficiency in updating web page theme in the prior art.
In order to solve the above problems, the technical solution provided in the embodiments of the present application is as follows:
a method of implementing web page theme updates, the method comprising:
recording a color value corresponding to user interaction behavior, wherein the user interaction behavior is generated when a user accesses a website;
Determining a target color value from the color values corresponding to the user interaction behaviors;
obtaining a current theme background picture of a target website, wherein the target website is any one of websites generating the user interaction behavior;
determining a target picture matched with the target color value and the current theme background picture;
when the user accesses the target website again, setting the theme color of the target website to be the color corresponding to the target color value, and setting the theme background picture of the target website to be the target picture.
In a possible implementation manner, the determining the target color value from the color values corresponding to the user interaction behavior includes:
and acquiring a color value corresponding to the user interaction behavior with the largest recording times in a preset time period, and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value.
In one possible implementation, the determining a target picture that matches the target color value and the current theme background picture includes:
carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
In one possible implementation, before determining a target picture that matches the target color value and the current subject background picture, the method further includes:
acquiring the numerical value of each color channel in the target color value;
obtaining the numerical value of each color channel within a preset range, and obtaining a group of approximate numerical values of each color channel;
and any one of a set of approximate values of each color channel is taken and combined to generate an approximate color value of a plurality of target color values.
In one possible implementation, the determining a target picture that matches the target color value and the current theme background picture includes:
carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the approximate color value as a target picture.
In one possible implementation manner, the setting the theme background picture of the target website as the target picture includes:
acquiring the display position and the display size of the theme background picture of the target website;
scaling and/or clipping the target picture to the display size to generate a processed target picture;
And setting the processed target picture at the display position of the theme background picture of the target website.
An apparatus for implementing web page theme updates, the apparatus comprising:
the recording unit is used for recording the color value corresponding to the user interaction behavior, wherein the user interaction behavior is generated when the user accesses the website;
the first determining unit is used for determining a target color value from the color values corresponding to the user interaction behaviors;
the first acquisition unit is used for acquiring a current theme background picture of a target website, wherein the target website is any one of websites generating the user interaction behavior;
the second determining unit is used for determining a target picture matched with the target color value and the current theme background picture;
and the replacing unit is used for setting the theme color of the target website to be the color corresponding to the target color value and setting the theme background picture of the target website to be the target picture when the user accesses the target website again.
In one possible implementation manner, the first determining unit is specifically configured to:
and acquiring a color value corresponding to the user interaction behavior with the largest recording times in a preset time period, and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value.
In one possible implementation manner, the second determining unit includes:
the analysis subunit is used for carrying out semantic analysis on the current theme background picture;
and the first retrieval subunit is used for retrieving a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
In one possible implementation, the apparatus further includes:
the second acquisition unit is used for acquiring the numerical value of each color channel in the target color value;
the third acquisition unit is used for acquiring the numerical value of each color channel within a preset range to obtain a group of approximate numerical values of each color channel;
and the generation unit is used for combining any one of a group of approximate values of each color channel to generate the approximate color values of a plurality of target color values.
In one possible implementation manner, the second determining unit includes:
the analysis subunit is used for carrying out semantic analysis on the current theme background picture;
and the second searching subunit is used for searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the approximate color value as a target picture.
In a possible implementation, the replacing unit is specifically configured to:
acquiring the display position and the display size of the theme background picture of the target website; scaling and/or clipping the target picture to the display size to generate a processed target picture; when the user accesses the target website again, setting the theme color of the target website to the color corresponding to the target color value, and setting the processed target picture at the display position of the theme background picture of the target website.
A storage medium comprising a stored program, wherein the program performs the above-described method of implementing web page theme updating.
The processor is used for running a program, wherein the program runs to execute the method for realizing the update of the webpage theme.
From this, the embodiment of the application has the following beneficial effects:
according to the embodiment of the application, the color value corresponding to the user interaction behavior is recorded, the target color value is determined from the color value corresponding to the user interaction behavior, and the target color value can represent the preference of the user for the color; then, a current theme background picture of the target website is obtained, and a picture which is similar to the current theme background picture and has the same color system as the target color value is determined to be used as a target picture; when the user accesses the target website again, the theme color of the target website can be set to the color corresponding to the target color value, and the theme background picture of the target website is set to be the target picture, so that the automatic update of the webpage theme is completed. In the process, according to the user behavior and the current website theme background picture, the target color and the target picture are automatically acquired, the webpage theme update is automatically completed without the user to operate by himself, the webpage theme update of each website can be realized aiming at different target websites, and the webpage theme update efficiency is improved.
Drawings
Fig. 1 is a schematic frame diagram of an exemplary application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of a method for implementing web page theme update according to an embodiment of the present application;
FIG. 3 is a flowchart of another method for implementing web page theme update according to an embodiment of the present disclosure;
fig. 4 is a block diagram of a device for implementing web topic updating according to an embodiment of the present application.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, embodiments accompanied with figures and detailed description are described in further detail below.
In order to facilitate understanding of the technical solutions provided in the present application, the following description will first explain the background art of the present application.
The inventor finds that the traditional user-defined webpage theme research can take more time for users, and the user-defined webpage theme can only aim at one website each time, so that the user-defined webpage theme can not be transplanted to other websites, and the use experience of the users is affected.
Based on this, the embodiment of the application provides a method and a device for realizing webpage theme update, when a user accesses a website through terminal equipment, a color value corresponding to interaction behavior generated by the user during the website access can be recorded, a target color value is determined from the recorded color value, the target color value can reflect the preference of the user for the color, a current theme background picture of the target website is obtained, and then a picture which has the same color system as the target color value and is similar to the current theme background picture is determined as a target picture; when the user accesses the target website again, setting the theme color of the target website as the color corresponding to the target color value, and setting the theme background picture of the target website as the target picture, thereby completing the automatic update of the webpage theme. Therefore, the webpage theme updating method provided by the embodiment not only can automatically update the webpage theme according to the preference of the user, but also can update the webpage theme of each website aiming at different target websites, and improves the efficiency of webpage theme updating.
Referring to fig. 1, this is a schematic diagram of a frame of an exemplary application scenario provided in an embodiment of the present application, where, when a user accesses a website through the client 10, for example, a browser client, a color value corresponding to an interaction behavior generated when the user accesses the website is recorded, then a target color value matching with a preference of the user is determined, a picture matching with a current theme background picture of the website may be retrieved through the server 20, then a picture matching with a color corresponding to the target color value in the retrieved picture is taken as a target picture according to the target color value, and when the user accesses the website again through the client 10, the theme color of the network is set to a color corresponding to the target color value, and meanwhile, the theme background picture is set to be a target picture, so as to implement theme update of the web page.
Those skilled in the art will appreciate that the schematic diagram of the framework shown in fig. 1 is only one example in which embodiments of the present application may be implemented, and the scope of applicability of embodiments of the present application is not limited in any way by the framework.
It should be noted that the client 10 in the embodiments of the present application may be implemented in a terminal, which may be any user device that is currently existing, being developed, or developed in the future, capable of interacting with the server 20 via any form of wired and/or wireless connection (e.g., wi-Fi, LAN, cellular, coaxial, etc.), including but not limited to: existing, developing or future developed smartphones, non-smartphones, tablet computers, laptop personal computers, desktop personal computers, minicomputers, midrange computers, mainframe computers, and the like. It should also be noted that server 20 in embodiments of the present application may be one example of an existing, developing or future developed device capable of providing picture-recommended application services to users. Embodiments of the present application are not limited in this respect.
In order to facilitate understanding of the technical solution provided in the present application, a method for implementing web page theme update provided in the embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 2, the flowchart of a method for implementing web page theme update according to an embodiment of the present application is shown in fig. 2, where the method may include:
s201: and recording the color value corresponding to the user interaction behavior.
In this embodiment, when a user browses different websites through a browser, color values corresponding to interaction behaviors may be recorded. The user interaction behavior is generated when the user accesses each website, for example, a mouse clicks an area, an area pointed by the mouse, and the like, and according to each interaction behavior, a color value corresponding to the interaction behavior, for example, a color value of the area clicked by the mouse, and a color value of the area pointed by the mouse currently, is recorded.
The color value corresponding to the interaction behavior is used for indicating the color corresponding to the interaction behavior, and in specific implementation, the color value may be expressed in various forms, such as RGB, CMYK, HSB. Where RGB is the identification of a color by superposition of three color channels Red (Red), green (Green), blue (Blue). CMYK is a color identified by a mix of three color channels, cyan (Cyan), magenta (Magenta), yellow (Yellow), black (Black). HSB is a color identified by three dimensions of Hue (Hue), saturation (Saturation), and Brightness (Brightness).
For easy understanding, RGB is taken as an example to illustrate, and when the color corresponding to the user interaction behavior is pink, a color value (255, 181, 197) corresponding to the pink is obtained; when the color corresponding to the user interaction behavior is light purple, acquiring a color value (230, 230, 250) corresponding to the light purple; and when the color corresponding to the user interaction behavior is white, acquiring a color value (255, 255, 255) corresponding to the white.
S202: and determining the target color value from the color values corresponding to the user interaction behaviors.
In this embodiment, when the color value corresponding to the user interaction behavior is acquired, the target color value is determined from the acquired color values. In practical applications, a user accessing a website may generate a plurality of interactions, each of which may correspond to a different color value, and thus, a target color value may be determined from the plurality of color values.
It is understood that the color values corresponding to the plurality of user interaction behaviors may be the same or different. When a user accesses a website, the number of occurrences of the corresponding color value of the interaction behavior generated during the user's access to the website may be recorded. When the obtained color value corresponding to a certain user interaction behavior is recorded, 1 can be added on the basis of the original recording, and when the obtained color value corresponding to the certain user interaction behavior is not recorded, the color value is recorded. When the target color value is determined from the color values corresponding to the user interaction behaviors, the target color value can be determined according to the times corresponding to each color value.
The step S202 may be to acquire the color value corresponding to the user interaction behavior with the largest number of recordings in the preset time period, and determine the color value corresponding to the user interaction behavior with the largest number of recordings in the preset time period as the target color value. The preset time period may be a preset time period of a certain length, for example, the preset time period may be 3 days. The preset time period may be specifically set according to actual situations, which is not limited in this embodiment.
In specific implementation, the number of times corresponding to the color value recorded in the preset time period is obtained, and the color value with the largest recording number is determined to be the target color value. For example, the color value corresponding to the user interaction behavior is recorded as (255, 255, 255) -white, (255, 181, 197) -pink, (230, 230, 250) -light purple in a preset time period, wherein the occurrence number of (255, 255, 255) is 5, (230, 230, 250) is 2, and the occurrence number of (255, 181, 197) is 1, and then the color value (255, 255, 255) corresponding to the white is determined as the target color value.
S203: and obtaining the current theme background picture of the target website.
In this embodiment, a current theme background picture of a target website accessed by a user is obtained, so that S204 is executed to determine a target picture according to the current theme background picture. The target website can be any one of the websites generating the user interaction behavior, and the target website can be understood as a website needing to update the theme of the webpage. The target website can be set by the user, or any website which can update the theme of the webpage can be selected from the websites.
It will be appreciated that a website may include one or more theme background pictures, and that when the current theme background picture of the target website is obtained, if the target website includes multiple theme background pictures, each current theme background picture may be obtained. In addition, when the current background picture of the target website is acquired, not only the current theme background picture, but also the position for displaying the theme background picture and the display size of the theme background picture can be acquired. When the website includes a plurality of theme background pictures, in order to ensure that a user can view each theme background picture, the display position of each theme background picture on the website is different, and the size of each theme background picture may also be different, so as to display the theme background picture conforming to the display size at the corresponding position. Therefore, the position and display size of each subject background picture can also be acquired.
In particular implementations, a current theme background picture of a web site that can be targeted and a display position and a display size of the theme background picture may be acquired by analyzing a cascading style sheet (Cascading Style Sheets, CSS) of a web page. The CSS can accurately control typesetting of element positions in the webpage and edit webpage objects and model styles.
It should be noted that, in actual implementation, S203 may be executed to obtain the current theme background picture of the target website, and then S202 may be executed to determine the target color value, where the execution sequence of S202 and S203 is not limited in this embodiment.
S204: and determining a target picture matched with the target color value and the current theme background picture.
In this embodiment, when the current theme background picture of the target website is obtained through S203, a picture matching with the current theme background picture may be searched from the network according to the current theme background picture, and then the target picture is determined from the matched pictures according to the target color value. That is, the theme of the target picture not only accords with the theme of the website, but also has the same color as the color corresponding to the target color value, so that the theme accords with the preference of the user.
In one possible implementation manner, the present embodiment provides an implementation manner of searching for a matched picture according to a current theme background picture, specifically, performing semantic analysis on the current theme background picture, and then retrieving a picture having the same semantic meaning as the current theme background picture.
Firstly, carrying out semantic analysis on a current theme background picture, obtaining the specific semantic of the current theme background picture, and then searching pictures with the same semantic in a network. In a specific implementation, when the current theme background picture includes characters, the characters in the current theme background picture can be identified through optical character recognition (OpticalCharacterRecognition, OCR) and the semantics represented by the characters are obtained, and then, the pictures with the same semantics are searched through a web crawler mode. When the current theme background picture includes a person, an event, etc., the picture semantics can also be analyzed by using the image recognition technology, and then the picture having the same semantics is retrieved by means of a web crawler.
S204 may be to take a picture having the same semantic meaning and the picture color system being the color corresponding to the target color value as the target picture. That is, when a plurality of pictures having the same semantics are retrieved, it is determined from the plurality of pictures that the picture color is the color corresponding to the target color value is the target picture.
In addition, when a plurality of theme background pictures are included in the web page, a corresponding target picture may be determined for each theme background picture.
S205: when the user accesses the target website again, setting the theme color of the target website as the color corresponding to the target color value, and setting the theme background picture of the target website as the target picture.
In this embodiment, the setting of the webpage theme is already completed according to the preference of the user through S201-S204, and when the user accesses the target website again, the theme color of the target website is updated to the color corresponding to the target color value, and the theme background picture of the target website is updated to the target picture, so as to realize automatic update of the webpage theme.
It should be noted that, when the theme background picture of the target website is set as the target picture, whether the target picture can be normally displayed may be further determined according to the display size obtained in S203, and if the size of the target picture is in accordance with the display size, the theme background picture of the target website is set as the target picture; if the size of the target picture does not conform to the display size, the target picture may be scaled and/or cut to the display size to generate a processed target picture, and then S205 is executed by using the processed target picture, where the processed target picture is set at the display position of the theme background picture of the target website.
Through the above description, the embodiment may record the color value corresponding to the user interaction behavior, and determine the target color value from the color values corresponding to the user interaction behavior, where the target color value may represent the preference of the user for the color; then, a current theme background picture of the target website is obtained, and a picture which is similar to the current theme background picture and has the same color system as the target color value is determined to be used as a target picture; when the user accesses the target website again, the theme color of the target website can be set to the color corresponding to the target color value, and the theme background picture of the target website is set to be the target picture, so that the automatic update of the webpage theme is completed. In the process, according to the user behavior and the current website theme background picture, the target color and the target picture are automatically acquired, the webpage theme update is automatically completed without the user to operate by himself, the webpage theme update of each website can be realized aiming at different target websites, and the webpage theme update efficiency is improved.
In one possible implementation manner of the embodiment of the present application, in order to ensure that when determining the target picture, there is a picture matching with the color corresponding to the target color value, the embodiment further provides an implementation manner of determining a series of approximate color values according to the target color value and then determining the target picture according to the approximate color value. For ease of understanding, the implementation will be described below with reference to the accompanying drawings.
Referring to fig. 3, a flowchart of another method for implementing web page theme update according to an embodiment of the present application is shown in fig. 3, where the method may include:
s301: and recording the color value corresponding to the user interaction behavior.
S302: and determining the target color value from the color values corresponding to the user interaction behaviors.
S303: and obtaining the current theme background picture of the target website.
It should be noted that, in this embodiment, S301 to S303 and S201 to S203 have the same implementation, and specific reference may be made to S201 to S203, which is not described herein.
S304: and acquiring the numerical value of each color channel in the target color value.
In this embodiment, the values of the respective color channels corresponding to the target color values need to be obtained, and the color values have multiple rendering forms, for example, RGB, CMYK, etc., where RGB has three color channels and CMYK has four color channels.
For ease of understanding, this embodiment will be described with reference to (Red, green, blue, alpha, RGBA). Among them, alpha channel is generally used as an opacity parameter. If the alpha channel value for a pixel is 0%, it indicates a completely transparent pixel, while a value of 100% indicates a completely opaque pixel. Values between 0% and 100% allow the pixel to be displayed across the background. In particular implementations, when the target color values are expressed in other ways, they may be converted to RGBA first and then the value for each channel obtained.
When the RGBA corresponding to the target color value is (230, 230, 250, 50%), the red channel value is 230, the green channel value is 230, the blue channel value is 250, and the alpha channel value is 50%.
S305: and obtaining the numerical value of each color channel within a preset range, and obtaining a group of approximate numerical values of each color channel.
In this embodiment, for any color channel, a value of the color access value within a preset range is obtained, so as to obtain a set of approximate values of the color access.
The preset range corresponding to the color channel may be [ x-a, x+b ], where x represents a value of the color channel, x-a and x+b represent a minimum value and a maximum value of the preset range of the value of the color channel, a and b may be the same or different, both are natural numbers greater than zero, and specific values of a and b may be set according to practical application situations. In specific implementation, a and b may be the same or different for each color channel.
For ease of understanding, the values of each color channel correspond to a predetermined range of [ x-5, x+5], then the approximate values of the red channel are 225-235, the approximate values of the green channel are 225-235, the approximate values of the blue channel are 245-255, and the approximate values of the alpha channel are 45% -55%. It will be appreciated that in practical applications, since the values of the color channels are all integers, the above-mentioned approximate values are also integers within a predetermined range.
S306: any one of a set of approximation values for each color channel is combined to generate an approximation color value for a plurality of target color values.
In this embodiment, one value is extracted from a set of approximate values of each color channel and combined, so that approximate color values of a plurality of target color values can be generated. For example, a plurality of approximation color values corresponding to a target color value may be generated by combining the different values of the different color channels, such as from a set of approximation values for the red channel 228, a set of approximation values for the green channel 232, a set of approximation values for the blue channel 248, a set of approximation values for the alpha channel 55%, combining the four values to generate an approximation color value (228,232,248,55%), and so on.
S307: and carrying out semantic analysis on the current theme background picture.
S308: and searching a picture which has the same semantic meaning as the current theme background picture and has a color corresponding to the approximate color value as a target picture.
In this embodiment, when a picture having the same semantic meaning as the current theme background picture is retrieved, a picture whose color is a color corresponding to an approximation value is taken as the target picture.
In a specific implementation, a plurality of approximation color values may be generated through S306, and when there are a plurality of pictures whose color systems are colors corresponding to the approximation color values, a picture in which the colors corresponding to the target color values are the closest match is determined as the target picture.
S309: when the user accesses the target website again, setting the theme color of the target website as the color corresponding to the target color value, and setting the theme background picture of the target website as the target picture.
In this embodiment, the design of the website is completed through S301-S308, when the user accesses the target website again, the theme color of the target website is updated to the color corresponding to the target color value, and the theme background picture of the target website is updated to the target picture, so as to update the theme of the webpage.
In the specific implementation, when the theme background picture of the target website is updated to be the target picture, the display position and the display size of the theme background picture of the target website can be obtained first, then the target picture is scaled and/or cut to the display size to generate a processed target picture, and finally the processed target picture is arranged at the display position of the theme background picture of the target website, so that the theme background picture of the target website is updated according to the preset display position and display size.
Through the embodiment, the plurality of approximate color values of the target color value can be determined according to the numerical value of each color channel in the target color value, and then the target picture is determined according to the approximate color values, so that the problem that the target picture cannot be determined due to mismatching of the color system of the retrieved picture and the color corresponding to the target color value is avoided, the existence probability of the target picture is improved, and further the update of the webpage theme is realized.
Referring to fig. 4, the schematic diagram of an apparatus for implementing web page theme update according to an embodiment of the present application is shown in fig. 4, where the apparatus may include:
a recording unit 401, configured to record a color value corresponding to a user interaction behavior, where the user interaction behavior is an interaction behavior generated when a user accesses a website;
a first determining unit 402, configured to determine a target color value from color values corresponding to the user interaction behavior;
a first obtaining unit 403, configured to obtain a current theme background picture of a target website, where the target website is any one of websites that generate the user interaction behavior;
a second determining unit 404, configured to determine a target picture that matches the target color value and the current theme background picture;
and the replacing unit 405 is configured to set, when the user accesses the target website again, a theme color of the target website to a color corresponding to the target color value, and set a theme background picture of the target website to the target picture.
In one possible implementation manner, the first determining unit is specifically configured to:
and acquiring a color value corresponding to the user interaction behavior with the largest recording times in a preset time period, and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value.
In one possible implementation manner, the second determining unit includes:
the analysis subunit is used for carrying out semantic analysis on the current theme background picture;
and the first retrieval subunit is used for retrieving a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
In one possible implementation, the apparatus further includes:
the second acquisition unit is used for acquiring the numerical value of each color channel in the target color value;
the third acquisition unit is used for acquiring the numerical value of each color channel within a preset range to obtain a group of approximate numerical values of each color channel;
and the generation unit is used for combining any one of a group of approximate values of each color channel to generate the approximate color values of a plurality of target color values.
In one possible implementation manner, the second determining unit includes:
the analysis subunit is used for carrying out semantic analysis on the current theme background picture;
and the second searching subunit is used for searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the approximate color value as a target picture.
In a possible implementation, the replacing unit is specifically configured to:
acquiring the display position and the display size of the theme background picture of the target website; scaling and/or clipping the target picture to the display size to generate a processed target picture; when the user accesses the target website again, setting the theme color of the target website to the color corresponding to the target color value, and setting the processed target picture at the display position of the theme background picture of the target website.
In this way, the embodiment of the application records the color value corresponding to the user interaction behavior, and determines the target color value from the color value corresponding to the user interaction behavior, wherein the target color value can represent the preference of the user for the color; then, a current theme background picture of the target website is obtained, and a picture which is similar to the current theme background picture and has the same color system as the target color value is determined to be used as a target picture; when the user accesses the target website again, the theme color of the target website can be set to the color corresponding to the target color value, and the theme background picture of the target website is set to be the target picture, so that the automatic update of the webpage theme is completed. In the process, according to the user behavior and the current website theme background picture, the target color and the target picture are automatically acquired, the webpage theme update is automatically completed without the user to operate by himself, the webpage theme update of each website can be realized aiming at different target websites, and the webpage theme update efficiency is improved.
The device for realizing the web page theme update comprises a processor and a memory, wherein the recording unit, the first determining unit, the first acquiring unit, the second determining unit, the replacing unit and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one, and the update of the webpage theme is realized by adjusting the kernel parameters.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a storage medium, and a program is stored on the storage medium, and the program is executed by a processor to realize the method for realizing the update of the webpage theme.
The embodiment of the invention provides a processor which is used for running a program, wherein the method for realizing the update of the webpage theme is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes the following steps when executing the program:
Recording a color value corresponding to user interaction behavior, wherein the user interaction behavior is generated when a user accesses a website;
determining a target color value from the color values corresponding to the user interaction behaviors;
obtaining a current theme background picture of a target website, wherein the target website is any one of websites generating the user interaction behavior;
determining a target picture matched with the target color value and the current theme background picture;
when the user accesses the target website again, setting the theme color of the target website to be the color corresponding to the target color value, and setting the theme background picture of the target website to be the target picture.
In a possible implementation manner, the determining the target color value from the color values corresponding to the user interaction behavior includes:
and acquiring a color value corresponding to the user interaction behavior with the largest recording times in a preset time period, and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value.
In one possible implementation, the determining a target picture that matches the target color value and the current theme background picture includes:
Carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
In one possible implementation, before determining the target picture matching the target color value and the current theme background picture, the method further includes:
acquiring the numerical value of each color channel in the target color value;
obtaining the numerical value of each color channel within a preset range, and obtaining a group of approximate numerical values of each color channel;
and any one of a set of approximate values of each color channel is taken and combined to generate an approximate color value of a plurality of target color values.
In one possible implementation, the determining a target picture that matches the target color value and the current theme background picture includes:
carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the approximate color value as a target picture.
In one possible implementation manner, the setting the theme background picture of the target website as the target picture includes:
Acquiring the display position and the display size of the theme background picture of the target website;
scaling and/or clipping the target picture to the display size to generate a processed target picture;
and setting the processed target picture at the display position of the theme background picture of the target website.
The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of:
recording a color value corresponding to user interaction behavior, wherein the user interaction behavior is generated when a user accesses a website;
determining a target color value from the color values corresponding to the user interaction behaviors;
obtaining a current theme background picture of a target website, wherein the target website is any one of websites generating the user interaction behavior;
determining a target picture matched with the target color value and the current theme background picture;
when the user accesses the target website again, setting the theme color of the target website to be the color corresponding to the target color value, and setting the theme background picture of the target website to be the target picture.
In a possible implementation manner, the determining the target color value from the color values corresponding to the user interaction behavior includes:
and acquiring a color value corresponding to the user interaction behavior with the largest recording times in a preset time period, and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value.
In one possible implementation, the determining a target picture that matches the target color value and the current theme background picture includes:
carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
In one possible implementation, before determining the target picture matching the target color value and the current theme background picture, the method further includes:
acquiring the numerical value of each color channel in the target color value;
obtaining the numerical value of each color channel within a preset range, and obtaining a group of approximate numerical values of each color channel;
and any one of a set of approximate values of each color channel is taken and combined to generate an approximate color value of a plurality of target color values.
In one possible implementation, the determining a target picture that matches the target color value and the current theme background picture includes:
carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the approximate color value as a target picture.
In one possible implementation manner, the setting the theme background picture of the target website as the target picture includes:
acquiring the display position and the display size of the theme background picture of the target website;
scaling and/or clipping the target picture to the display size to generate a processed target picture;
and setting the processed target picture at the display position of the theme background picture of the target website.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (9)

1. A method for implementing web page theme updates, the method comprising:
recording a color value corresponding to user interaction behavior, wherein the user interaction behavior is generated when a user accesses a website;
acquiring a color value corresponding to the user interaction behavior with the largest recording times in a preset time period, and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value;
obtaining a current theme background picture of a target website, wherein the target website is any one of websites generating the user interaction behavior;
determining a target picture which is matched with the target color value and has the same meaning as the current theme background picture;
when the user accesses the target website again, setting the theme color of the target website to be the color corresponding to the target color value, and setting the theme background picture of the target website to be the target picture.
2. The method of claim 1, wherein the determining a target picture that matches the target color value and that semantically is the same as the current subject background picture comprises:
carrying out semantic analysis on the current theme background picture;
And searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
3. The method of claim 1, wherein prior to determining a target picture that matches the target color value and that semantically is the same as the current subject background picture, the method further comprises:
acquiring the numerical value of each color channel in the target color value;
obtaining the numerical value of each color channel within a preset range, and obtaining a group of approximate numerical values of each color channel;
and any one of a set of approximate values of each color channel is taken and combined to generate an approximate color value of a plurality of target color values.
4. The method of claim 3, wherein the determining a target picture that matches the target color value and that semantically is the same as the current subject background picture comprises:
carrying out semantic analysis on the current theme background picture;
and searching a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the approximate color value as a target picture.
5. The method according to any one of claims 1-4, wherein the setting the theme background picture of the target website as the target picture includes:
Acquiring the display position and the display size of the theme background picture of the target website;
scaling and/or clipping the target picture to the display size to generate a processed target picture;
and setting the processed target picture at the display position of the theme background picture of the target website.
6. An apparatus for implementing web page theme updates, the apparatus comprising:
the recording unit is used for recording the color value corresponding to the user interaction behavior, wherein the user interaction behavior is generated when the user accesses the website;
the first determining unit is used for obtaining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period and determining the color value corresponding to the user interaction behavior with the largest recording times in the preset time period as a target color value;
the first acquisition unit is used for acquiring a current theme background picture of a target website, wherein the target website is any one of websites generating the user interaction behavior;
the second determining unit is used for determining a target picture which is matched with the target color value and has the same meaning as the current theme background picture;
and the replacing unit is used for setting the theme color of the target website to be the color corresponding to the target color value and setting the theme background picture of the target website to be the target picture when the user accesses the target website again.
7. The apparatus according to claim 6, wherein the second determining unit includes:
the analysis subunit is used for carrying out semantic analysis on the current theme background picture;
and the first retrieval subunit is used for retrieving a picture which has the same semantic meaning as the current theme background picture and has a picture color system of a color corresponding to the target color value as a target picture.
8. A storage medium comprising a stored program, wherein the program performs the method of implementing web page theme updates of any one of claims 1 to 5.
9. A processor for running a program, wherein the program when run performs the method of implementing a web page theme update as claimed in any one of claims 1 to 5.
CN201811150237.2A 2018-09-29 2018-09-29 Method and device for realizing webpage theme update Active CN110968808B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811150237.2A CN110968808B (en) 2018-09-29 2018-09-29 Method and device for realizing webpage theme update

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811150237.2A CN110968808B (en) 2018-09-29 2018-09-29 Method and device for realizing webpage theme update

Publications (2)

Publication Number Publication Date
CN110968808A CN110968808A (en) 2020-04-07
CN110968808B true CN110968808B (en) 2023-05-23

Family

ID=70027623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811150237.2A Active CN110968808B (en) 2018-09-29 2018-09-29 Method and device for realizing webpage theme update

Country Status (1)

Country Link
CN (1) CN110968808B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112185022A (en) * 2020-08-31 2021-01-05 北京三快在线科技有限公司 Intelligent cabinet control system, method and device, electronic equipment and computer medium
CN112099790B (en) * 2020-09-10 2024-03-29 北京百度网讯科技有限公司 Method, device, equipment and storage medium for determining page theme
CN112966141A (en) * 2021-03-17 2021-06-15 读书郎教育科技有限公司 Method for replacing theme of tablet computer
CN113204658A (en) * 2021-05-27 2021-08-03 北京字跳网络技术有限公司 Page display updating method and device, electronic equipment and storage medium
CN114510314A (en) * 2022-02-25 2022-05-17 北京达佳互联信息技术有限公司 Page theme updating method and device, electronic equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943924A (en) * 2017-11-21 2018-04-20 福州聆花信息科技有限公司 Method for automatically generating webpage theme, storage medium and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100394428C (en) * 2005-12-20 2008-06-11 北京亿中邮信息技术有限公司 Method for personalized replacing webpage subject
CN101136089A (en) * 2007-09-24 2008-03-05 腾讯科技(深圳)有限公司 Method, system and device for updating e-mail web page background
US9405734B2 (en) * 2012-12-27 2016-08-02 Reflektion, Inc. Image manipulation for web content
CN104750691B (en) * 2013-12-25 2017-11-28 中国移动通信集团公司 A kind of self-defined webpage generating method and device
US20150347578A1 (en) * 2014-06-03 2015-12-03 Go Daddy Operating Company, LLC System and methods for auto-generating video from website elements

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943924A (en) * 2017-11-21 2018-04-20 福州聆花信息科技有限公司 Method for automatically generating webpage theme, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Chaang-Ray Chen.THEME: A web tool for loop-design microarray data analysis.《Computers in Biology and Medicine》.2012,全文. *

Also Published As

Publication number Publication date
CN110968808A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
CN110968808B (en) Method and device for realizing webpage theme update
US11132349B2 (en) Update basis for updating digital content in a digital medium environment
WO2019200783A1 (en) Method for data crawling in page containing dynamic image or table, device, terminal, and storage medium
US11610066B2 (en) Creation of component templates based on semantically similar content
US20140250110A1 (en) Image attractiveness based indexing and searching
US9881002B1 (en) Content localization
CN111078221B (en) Page color theme switching method and device, storage medium and electronic equipment
CN110968314B (en) Page generation method and device
CN105843800A (en) DOI-based language information display method and device
CN109063542A (en) Image identification method, device, computer equipment and storage medium
CN113655999B (en) Page control rendering method, device, equipment and storage medium
CN110941428B (en) Website creation method and device
CN112287168A (en) Method and apparatus for generating video
US20160259852A1 (en) Audio file management method, device and storage medium
US10755318B1 (en) Dynamic generation of content
CN110134920B (en) Pictogram compatible display method, device, terminal and computer readable storage medium
CN111723177B (en) Modeling method and device of information extraction model and electronic equipment
US20200151241A1 (en) Webpage component replication system and method
CN111291685A (en) Training method and device of face detection model
CN113641933B (en) Abnormal webpage identification method, abnormal site identification method and device
CN115857906B (en) Method, system, electronic device and medium for generating low-code chart
CN113672836B (en) Method, device, equipment and storage medium for setting dynamic special effects of web pages
CN115357790A (en) Method, device, medium and electronic equipment for identifying key segments in content
CN113392624A (en) Sensitive vocabulary labeling method and device, electronic equipment and computer readable storage medium
CN113918194A (en) Page component display method and device, electronic equipment and storage 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