Disclosure of Invention
In order to solve the problems, the invention discloses a hot spot information display method based on screen locking, which can display operable hot spots on screen locking wallpaper.
In order to achieve the purpose, the invention provides the following technical scheme:
a hot spot information display method based on screen locking comprises the following steps:
adding a screen locking wallpaper picture at a server side, configuring hotspot information in the wallpaper picture, adding hotspot contents and a position to be displayed by a hotspot in wallpaper, wherein the hotspot position is calculated in the following way: firstly, setting the percentage of hot spot display positions in the width and height of a picture, and calculating the specific coordinates of the hot spot display positions in the wallpaper picture according to the percentage of the hot spot display positions and the picture size;
step two, when the client requests data from the server, the server selects wallpaper information with the most suitable hotspot information through cloud computing according to the counted historical information and sends the wallpaper information to the client;
displaying wallpaper with the hot spot on a screen locking interface of the android electronic device, and when the hot spot is displayed, displaying the specific position of the hot spot by the client according to the configured position, wherein the color value of the hot spot is calculated through the following steps:
step three-1, taking the color values of all pixels in the position range, calculating the average value of the color values, and recording the average value as a global average color value;
step three-2, taking the minimum value of all pixel color values in the position range, and recording as a global minimum value;
step three-3, taking the maximum value of the color values of all pixels in the position range, and recording the maximum value as a global maximum value;
step three-4, calculating the average value of the global minimum and the global maximum, and recording the average value as a global intermediate value;
step three-5, if the global average value is larger than the global intermediate value, adopting a calculation result of the global average value- (the global maximum value-the global average value) as a target minimum value, filtering color values below the target minimum value from color values of all pixels in a position range, then taking an average value, and recording the average value as the target average value; if the global average value is smaller than the global intermediate value, adopting a calculation result of formula global average value + (global average value-global minimum) as a target maximum value, filtering color values above the target maximum value by all pixel color values in a position range, then taking the average value, and recording the average value as the target average value;
step three-6, carrying out bitwise XOR operation on the target average value and a hexadecimal number 0xFF to obtain a target color value, and taking the color value as a basic color value of the hotspot;
and fourthly, after clicking the hot spot button, executing corresponding operation.
Further, the hot content comprises four types of stories, out-link advertisements, direct-cast advertisements and jump applications;
when the hotspot is of a story type, after the hotspot is clicked in the fourth step, the current screen is not unlocked, and a new window is opened on the equipment to be switched to an interface for displaying the story so as to display detailed content;
when the hot spot is an external link advertisement, after the hot spot is clicked in the fourth step, the current screen is unlocked, and the corresponding advertisement address is skipped to display the external advertisement;
when the hot spot is a direct-cast advertisement, after the hot spot is clicked in the fourth step, the current screen is not unlocked, and the new interface is switched to display the advertisement content so as to obtain the advertisement income;
and when the hot spot is the jump application, unlocking the current screen and opening a corresponding software interface after clicking the hot spot in the fourth step.
Further, the cloud computing rule in the second step is as follows: and accurately pushing related hot content according to the specific information of the registered user.
Further, the hot spot button on the wallpaper in the third step adopts a dynamic display effect.
Further, the dynamic display effect comprises at least one of the following effects: water ripple effect, dithering effect, dissolve animation effect, rotate animation effect, zoom animation effect.
Further, in the fourth step, when the user clicks the hot spot button, the client records the operation, and uploads the wallpaper information, the type and the hot spot type information corresponding to the operation to the server for storage as historical information for counting the user preference.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the hotspot is combined with the wallpaper, the display space on the lock screen wallpaper is fully utilized, various background configurable hotspot types are provided, hotspot messages are dynamically displayed on a screen of the android electronic device, and a user can conveniently check and popularize advertisements. Meanwhile, the eye-catching color is calculated according to the surrounding color to serve as the display color of the hot spot, a dynamic display effect is adopted, the attention of a user can be effectively attracted, after the user clicks the hot spot, corresponding operation can be executed according to different types of hot spot contents, the response is rapid, and the operation steps are simplified. In addition, hot content which can most arouse the interest of the user can be calculated according to the data of the user, and the hot content is issued to the user, so that the hot wallpaper can be pushed accurately.
Detailed Description
The technical solutions provided by the present invention will be described in detail below with reference to specific examples, and it should be understood that the following specific embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention.
The hot spot information display method based on screen locking, as shown in fig. 1, includes the following steps:
step one, wallpaper is generated at a server side, and hotspot information and the percentage of hotspot display positions are configured.
Adding a group of screen locking wallpaper information at a server side, configuring complete information of a screen locking picture for display, configuring hotspot information, wherein a hotspot display position can be set according to the percentage of the hotspot display position in the width and height of the picture, if the X coordinate of the configured hotspot position is 20% and the Y coordinate is 70%, adding hotspot content and a position to be displayed by a hotspot in the screen locking wallpaper picture according to rules, calculating and storing a specific display position coordinate of the hotspot in the wallpaper picture according to the percentage of the configured hotspot display position, wherein the picture width is 720 pixels, and the height is 1280 pixels, and the calculated specific position is as follows: the X coordinate is 720 × 20% =144, and the Y coordinate is 1280 × 70% = 896. The content types of the hot spots are four types as follows:
1. story: the type describes the story content associated with the wallpaper, which may also be news or other audience-engaging content.
2. Outer chain advertisement: the type configures a set of advertisement information.
3. Direct advertisement: this type configures a set of autonomous advertising information.
4. Jump application: this type configures a set of package names and active window information for the application that needs to be opened.
Therefore, complete wallpaper with the hotspot information and the hotspot display position is generated at the server side.
And step two, issuing the wallpaper with the hot spots to the client.
When a client (mobile phone) requests data from a server, the server selects wallpaper information with the most suitable hotspot information through cloud computing according to the counted historical information and sends the wallpaper information to the client, and accurate pushing is achieved. The specific calculation rule for selecting the hot spot by the cloud is as follows: and accurately pushing related hot content according to the information of the sex, age, common software type, mobile phone model, flow use condition, mobile phone use frequency and the like of the registered user. For example, if the user is female, the user is 25 years old, and the mobile phone Taobao application is often used at 8 o 'clock to 10 o' clock in the evening, then hot information related to cosmetics on Taobao can be issued to the mobile phone in the time period.
And step three, displaying the wallpaper with the hot spot on a screen locking interface of the user terminal, and attracting the attention of the user through color configuration and dynamic effect display.
The method comprises the steps that a screen locking app is downloaded and installed on a client, screen locking is started, wallpaper with hot spots is displayed on a screen locking interface of the android electronic device, and when the hot spots are displayed, the client displays the specific positions of the hot spots according to the positions configured in a background. In order to avoid the situation that the hot spot button is close to the surrounding colors and is not striking, a new color value with high contrast is calculated according to the inherent color value in the position range and is used as the basic color value of the hot spot button, and the influence of the color value deviating from the inherent color value by a large amount is filtered out through secondary sampling in the calculation process, and the following algorithm is specifically adopted:
step three-1, taking the color values of all pixels in the position range, calculating the average value of the color values, and recording the average value as a global average color value;
step three-2, taking the minimum value of all pixel color values in the position range, and recording as a global minimum value;
step three-3, taking the maximum value of the color values of all pixels in the position range, and recording the maximum value as a global maximum value;
step three-4, calculating the average value of the global minimum and the global maximum, and recording the average value as a global intermediate value;
step three-5, if the global average value is larger than the global intermediate value, recording the calculation result of the formula 'global average value- (global maximum value-global average value)' as a target minimum value, filtering color values below the target minimum value by taking color values of all pixels in a position range, then taking an average value, and recording as a target average value; if the global average value is smaller than the global intermediate value, recording the calculation result of a formula 'global average value + (global average value-global minimum value)' as a target maximum value, filtering color values above the target maximum value by all pixel color values in a position range, then, taking the average value, and recording as the target average value;
and step three-6, carrying out bitwise XOR operation on the target average value and a hexadecimal number 0xFF to obtain a target color value, and taking the color value as a basic color value of the hot spot button.
In addition, in order to attract the eyes of the user, the hot spot button adopts a dynamic display effect, and constantly reminds the user that the current wallpaper has hot spot information for viewing. In addition, the dynamic display effects of the hotspot button include, but are not limited to: water ripple effects, dithering effects, dissolve animation effects, spin animation effects, zoom animation effects, and the like.
And fourthly, responding after clicking the hot spot, and executing corresponding operation.
After clicking the hot spot button, the user performs corresponding operations according to the four hot spot types, including:
1. and (4) the story type, the current screen is not unlocked, and after the user clicks the hot spot, a new window is opened on the device to be switched to an interface for displaying the story so as to display the detailed content.
2. And (4) the external link advertisement unlocks the current screen, and jumps to the corresponding advertisement address to display the external advertisement.
3. And directly casting the advertisement, not unlocking the current screen, and switching to a new interface to display the advertisement content so as to obtain the advertisement income.
4. And skipping the application, unlocking the current screen, and opening a corresponding software interface, such as an e-commerce interface of Taobao, Jingdong and the like, so that the user can conveniently view the content in which the user is interested.
When a user clicks a hot spot button, the client records the operation, uploads the wallpaper information, the type, the hot spot type and other information corresponding to the operation to the server for storage as historical information, and the historical information is used for counting user preferences, so that the server can push different types of hot spot information according to different preferences of the user.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.