Disclosure of Invention
The invention aims to overcome the defects in the prior art and provides a method and a system for displaying pictures in a waterfall flow comparison mode, which can realize common browsing of pictures and comparison browsing of the pictures.
In order to achieve the purpose, the invention is realized by adopting the following technical scheme:
in one aspect, the present invention provides a method for displaying pictures in a comparative waterfall flow manner, comprising the steps of:
acquiring a plurality of pictures to be displayed;
each picture to be displayed is associated with a preset picture control;
sequentially loading the picture to be displayed and the corresponding picture control into a preset waterfall flow display area;
acquiring a click signal I of a picture in a waterfall flow display area, copying the clicked picture and a corresponding picture control in response to the click signal I, loading the copied picture and picture control in a preset picture comparison area, acquiring a corresponding comparison picture and comparison picture control, loading a closing control on the comparison picture control, and loading a semitransparent gray shade on the clicked picture and the top of the corresponding picture control in the waterfall flow display area;
and acquiring a click signal II of a closing control in the picture comparison area, removing a comparison picture, a comparison picture control and a closing control corresponding to the click signal II in the picture comparison area in response to the acquisition of the click signal II, and removing the picture and the topmost semitransparent gray shade of the picture control corresponding to the waterfall flow display area.
Further, the preset picture control comprises a plurality of picture controls, each picture control is provided with a coding parameter, the coding parameter of the first picture control is set to be X, and then the coding parameter of each picture control is the coding parameter of the previous picture control plus 1.
Further, the coding parameters of each picture control and the corresponding contrast picture control are the same.
Further, the click signal I is a mouse click signal I;
the method comprises the steps of obtaining a click signal I of a picture in a waterfall flow display area, wherein the step of responding to the obtained click signal I comprises the steps of taking the picture in the area where a cursor of a mouse is located and a corresponding picture control as a picture and a picture control to be associated when the mouse is detected to click the picture in the waterfall flow display area, and associating the picture and the picture control to be associated with an action of clicking the picture in the waterfall flow display area by the mouse.
Further, the click signal II is a mouse click signal II;
the step of obtaining a click signal II for closing the control in the picture comparison area in response to obtaining the click signal II comprises the following steps: when the fact that a mouse clicks a closing control is detected, the closing control in the area where a cursor of the mouse is located when the mouse clicks and corresponding contrast picture and contrast picture controls are used as a closing control to be associated, a contrast picture and a contrast picture control, and the closing control to be associated, the contrast picture and the contrast picture control are associated with actions of closing the control in the area where the mouse clicks the contrast picture.
Further, the sequentially loading the picture to be displayed and the corresponding picture control into the preset waterfall flow display area includes:
calculating the average height of the pictures according to the height of a preset waterfall flow display area and the number of the picture lines, and zooming the heights of all the pictures to be displayed and the corresponding picture controls to the average height of the pictures;
judging the number of the pictures to be displayed and the number of the lines of the pictures;
and sequentially loading the zoomed picture to be displayed and the corresponding picture control into a preset waterfall flow display area according to the judgment result and a preset loading rule I.
Further, the preset loading rule i includes:
when the number of the pictures to be displayed is less than or equal to the number of the picture lines:
sequentially loading all picture controls on the left side of the waterfall flow display area according to the sequence from top to bottom;
when the number of the pictures to be displayed is larger than the number of the picture lines:
comparing the total line width value of each picture control of each line of the waterfall flow display area,
when the minimum value of the total row width value of each picture control of each row is unique:
loading the Nth picture control to a row with the minimum total row width value in the waterfall flow display area;
when the minimum value of the total row width value of each picture control of each row is not unique:
and loading the Nth picture control to the row with the minimum row sequence number and the minimum total row width value in the waterfall flow display area.
Further, the step of loading the copied picture and picture control in the preset picture contrast area to obtain the corresponding contrast picture and contrast picture control comprises the following steps:
calculating the average width of the contrast pictures according to the preset width of the contrast area of the pictures and the number of columns of the contrast pictures, and zooming the copied pictures and the widths of the picture controls to the average width of the pictures;
judging the size of the number of the contrast pictures and the number of the columns of the contrast pictures in the picture contrast area;
loading the zoomed copied picture and the picture control into a preset picture comparison area according to the judgment result and a preset loading rule II;
further, the preset loading rule ii includes:
when the number of the contrast pictures in the picture contrast area is less than the number of the contrast picture columns:
sequentially loading copied picture controls in the first row of the picture comparison area according to the sequence from left to right;
when the number of the contrast pictures in the picture contrast area is more than or equal to the number of the contrast picture columns:
comparing the total column height values of each comparison picture control of each column in the picture comparison area,
wherein, when the minimum value of the comparison picture control total column height values of each column is unique:
loading the copied picture control into a column with the minimum total column height value in the picture contrast area;
when the minimum value of the total column height values of the comparative picture controls of the columns is not unique:
and loading the copied picture control into the column with the smallest total column height value and the smallest column sequence number in the picture contrast area.
In another aspect, the present invention provides a system for displaying pictures in a comparative waterfall flow manner, comprising the following modules:
the acquisition module is used for acquiring a plurality of pictures to be displayed;
the association module is used for associating a preset picture control with each picture to be displayed;
the display area loading module is used for sequentially loading the pictures to be displayed and the corresponding picture controls into a preset waterfall flow display area;
the signal I triggering module is used for acquiring a click signal I of a picture in the waterfall flow display area, copying the clicked picture and a corresponding picture control in response to the acquisition of the click signal I, loading the copied picture and picture control in a preset picture comparison area, acquiring a corresponding comparison picture and comparison picture control, loading a closing control on the comparison picture control, and loading a semitransparent gray shade on the clicked picture and the topmost part of the corresponding picture control in the waterfall flow display area;
a signal II triggering module used for obtaining a click signal II for closing the control in the picture contrast area, removing the contrast picture, the contrast picture control and the closing control corresponding to the click signal II in the picture contrast area in response to obtaining the click signal II, and removing the topmost semitransparent gray shade of the picture and the picture control corresponding to the picture and the picture control in the waterfall flow display area
Compared with the prior art, the invention has the following beneficial effects:
according to the invention, common browsing and contrast browsing of pictures can be realized through the preset waterfall flow display area and the picture contrast area; by arranging the semitransparent grey shade, the picture area of the waterfall flow display area can be divided into two types of pictures which are compared and not compared, so that the situation that a user repeatedly selects the same picture for comparison when comparing for one time is avoided; loading the commonly browsed pictures in the waterfall flow display area to a picture comparison area for comparison browsing by responding to the setting of the click signal I; through the setting of the response click signal II, the contrast browsed pictures in the picture contrast area are released, and the non-contrast state of the pictures corresponding to the waterfall flow display area is recovered for next contrast selection and standby; the invention can not only improve the comfort level of the user, but also improve the working efficiency of the user.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
Example 1
The embodiment provides a method for displaying pictures in a comparative waterfall flow manner, and referring to fig. 1, the method includes the following steps:
acquiring a plurality of pictures to be displayed;
each picture to be displayed is associated with a preset picture control;
sequentially loading the picture to be displayed and the corresponding picture control into a preset waterfall flow display area;
acquiring a click signal I of a picture in a waterfall flow display area, copying the clicked picture and a corresponding picture control in response to the click signal I, loading the copied picture and picture control in a preset picture comparison area, acquiring a corresponding comparison picture and comparison picture control, loading a closing control on the comparison picture control, and loading a semitransparent gray shade on the clicked picture and the top of the corresponding picture control in the waterfall flow display area;
and acquiring a click signal II of a closing control in the picture comparison area, removing a comparison picture, a comparison picture control and a closing control corresponding to the click signal II in the picture comparison area in response to the acquisition of the click signal II, and removing the picture and the topmost semitransparent gray shade of the picture control corresponding to the waterfall flow display area.
When the image browsing method is applied, an image browsing display page is constructed in advance, and the image browsing display page is provided with a waterfall flow display area and an image comparison area.
According to the invention, common browsing and contrast browsing of pictures can be realized through the preset waterfall flow display area and the picture contrast area; by acquiring and responding to the click signal I, the picture which is commonly browsed in the waterfall flow display area is loaded to the picture comparison area to be contrasted and browsed; removing the contrasted and browsed picture in the picture contrast area and removing the grey setting state of the picture corresponding to the waterfall flow display area by acquiring and responding to the click signal II; according to the invention, through setting the semitransparent gray shade, the picture area of the waterfall flow display area can be divided into two types of pictures which are compared and not compared, so that the user is prevented from repeatedly clicking the picture to be compared, and the working efficiency is improved.
Example 2
On the basis of embodiment 1, this embodiment introduces the click signal i, the click signal ii, and the preset picture control in detail.
2.1 click Signal I
The click signal I is a mouse click signal I, the click signal I of the picture in the waterfall flow display area is obtained, and in response to the fact that the click signal I is obtained, the click signal I is: when it is detected that the mouse clicks the picture in the waterfall flow display area, the picture in the area where the cursor of the mouse is located when the mouse clicks and the corresponding picture control are used as the picture and picture control to be associated, and the picture and picture control to be associated and the action of clicking the picture in the waterfall flow display area by the mouse are associated.
2.2 click Signal II
The click signal II is a mouse click signal II, the click signal II for closing the control in the picture contrast area is obtained, and in response to the obtaining of the click signal II, the method comprises the following steps: when the fact that the mouse clicks the closing control is detected, the closing control in the area where the cursor of the mouse is located when the mouse clicks and the corresponding contrast picture and contrast picture controls are used as the closing control to be associated, the contrast picture and contrast picture controls, and the closing control to be associated, the contrast picture and contrast picture controls and actions of the closing control in the area where the mouse clicks the contrast picture are associated.
2.3 Preset Picture control
The preset picture control comprises a plurality of picture controls, each picture control is provided with coding parameters, the coding parameter of the first picture control is set to be X, and then the coding parameter of each picture control is the coding parameter of the previous picture control plus 1.
In addition, the coding parameters of each picture control and the corresponding comparison picture control are the same.
When the method is applied, when the picture control is preset, a unique coding parameter is set for each picture control, the coding parameter of the first picture control is set to be 1, and then the coding parameter of each picture control is the coding parameter of the previous picture control plus 1, so that the uniqueness of each coding parameter is ensured.
In application, a click signal II of a closing control in a picture comparison area is obtained, a comparison picture control and a closing control corresponding to the click signal II in the picture comparison area are removed in response to the obtained click signal II, the picture control and the corresponding picture with the same coding parameters are found in a waterfall stream display area according to the coding parameters corresponding to the comparison picture control, and the highest semitransparent gray shade of the found picture control and the corresponding picture is removed.
Example 3
On the basis of embodiment 1 or 2, this embodiment describes in detail a method for sequentially loading a picture to be displayed and a corresponding picture control into a preset waterfall flow display area, and the specific steps are as follows:
s31, calculating the average height of the pictures according to the height of the preset waterfall flow display area and the number of the picture lines, and zooming the heights of the pictures to be displayed and the corresponding picture controls to the average height of the pictures;
s32, judging the number of the pictures to be displayed and the number of the picture lines;
and S33, sequentially loading the zoomed picture to be displayed and the corresponding picture control to a preset waterfall flow display area according to the judgment result and a preset loading rule I.
The preset loading rule i in S33 includes the following contents:
when the number of the pictures to be displayed is less than or equal to the number of the picture lines: sequentially loading all picture controls on the left side of the waterfall flow display area according to the sequence from top to bottom;
when the number of the pictures to be displayed is larger than the number of the picture lines: and comparing the total line width values of all the picture controls of all the lines in the waterfall flow display area.
In application, when the minimum value of the total row width value of each picture control of each row is unique: loading the Nth picture control to a row with the minimum total row width value in the waterfall flow display area; when the minimum value of the total row width value of each picture control of each row is not unique: and loading the Nth picture control to the row with the minimum row sequence number and the minimum total row width value in the waterfall flow display area.
Example 4
On the basis of the embodiment 1, 2 or 3, this embodiment introduces in detail a method for loading copied pictures and picture controls in a preset picture contrast area to obtain corresponding contrast pictures and contrast picture controls, which includes the following steps:
s41, calculating the average width of the contrast picture according to the preset width of the contrast area of the picture and the number of columns of the contrast picture, and zooming the copied picture and the picture control width to the average width of the picture;
s42, judging the size of the number of the contrast pictures and the number of the contrast picture columns in the picture contrast area;
s43, loading the zoomed copied picture and the picture control into a preset picture comparison area according to the judged result and a preset loading rule II;
wherein the preset loading rule ii in S43 includes the following contents:
when the number of the contrast pictures in the picture contrast area is less than the number of the contrast picture columns: sequentially loading copied picture controls in the first row of the picture comparison area according to the sequence from left to right;
when the number of the contrast pictures in the picture contrast area is more than or equal to the number of the contrast picture columns: and comparing the total column height values of the comparison picture controls of all columns in the picture comparison area.
In application, when the minimum value of each comparison picture control total column height value of each column is unique: loading the copied picture control into a column with the minimum total column height value in the picture contrast area; when the minimum value of the total column height values of the comparative picture controls of the columns is not unique: and loading the copied picture control into the column with the smallest total column height value and the smallest column sequence number in the picture contrast area.
Example 5
On the basis of any real-time example of embodiments 1 to 4, this embodiment obtains a click signal ii for closing a control in a picture contrast area, and in response to obtaining the click signal ii, removes a contrast picture, a contrast picture control, and a closing control corresponding to the click signal ii in the picture contrast area, and then loads the remaining contrast pictures and the corresponding contrast picture controls one by one again in the picture contrast area, which is specifically as follows:
judging the size of the number of the rest contrast pictures in the picture contrast area and the preset contrast picture column number:
when the number of the rest contrast pictures in the picture contrast area is less than or equal to the number of the contrast picture columns, sequentially loading all the rest contrast picture controls in the first row of the picture contrast area from left to right;
and when the number of the residual contrast pictures in the picture contrast area is greater than the number of the contrast picture columns, comparing the total column height value of each contrast picture control in each column in the picture contrast area.
Wherein, when the minimum value of the comparison picture control total column height values of each column is unique: loading the rest contrast picture controls to the column with the minimum total column height value in the picture contrast area; when the minimum value of the total column height values of the comparative picture controls of the columns is not unique: and loading the rest contrast picture controls to the column with the minimum column sequence number and the minimum total column height value in the picture contrast area.
Example 6 real time
The embodiment introduces a system for displaying pictures in a comparative waterfall flow mode, which includes the following modules:
the acquisition module is used for acquiring a plurality of pictures to be displayed;
the association module is used for associating a preset picture control with each picture to be displayed;
the display area loading module is used for sequentially loading the pictures to be displayed and the corresponding picture controls into a preset waterfall flow display area;
the signal I triggering module is used for acquiring a click signal I of a picture in the waterfall flow display area, copying the clicked picture and a corresponding picture control in response to the acquisition of the click signal I, loading the copied picture and picture control in a preset picture comparison area, acquiring a corresponding comparison picture and comparison picture control, loading a closing control on the comparison picture control, and loading a semitransparent gray shade on the clicked picture and the topmost part of the corresponding picture control in the waterfall flow display area;
and the signal II triggering module is used for acquiring a click signal II for closing the control in the picture comparison area, removing the comparison picture, the comparison picture control and the closing control corresponding to the click signal II in the picture comparison area in response to the acquisition of the click signal II, and removing the topmost semitransparent gray shade of the picture and the picture control corresponding to the waterfall flow display area.
The specific function implementation of each functional module refers to the relevant contents in the methods of the embodiments 2 to 5.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.