Summary of the invention
In order to overcome the defect existed in above-mentioned prior art, the object of this invention is to provide a kind of display packing and the system that reduce effective page hiding rare, the present invention shows Query Result with landscape mode, can efficiency utilization page space, allow more effectively page content displaying to user, so that user checks, improve user experience.
In order to realize above-mentioned purpose of the present invention, according to an aspect of the present invention, the invention provides a kind of display packing reducing effective page hiding rare, comprise the steps:
S1, receives the query contents that user inputs in the edit box of user interface, display reminding frame in described user interface;
S2, controller is inquired about in a data storage device, obtains at least one matching result;
S3, controller calculates described matching result prompting frame word line number required when laterally arrangement shows, and concrete grammar is:
S31: the word quantity N of m result in statistical match resultm, described m=1,2 ..., q, described q is the quantity of matching result, and described q is positive integer, described Nmfor positive integer;
S32: make prompting frame word line number k=1, the numbering i=1 of first matching result making row k show;
S33: make matching result display number counter p=1;
S34: calculate total character duration in row k
TOTAL_WIDTH(k)=((Ni+Ni+1+....+Ni+p)+p)*font_width,
Described font_width is the width of font;
S35: judge TOTAL_WIDTH(k) whether be greater than the width tip_width of current drop-down prompting frame,
If TOTAL_WIDTH(k) <tip_width, and i+p<q, then make p=p+1, return step S34, if i+p=q, exit, the i-th to i+p matching result will show in row k;
If TOTAL_WIDTH(k) >tip_width, the i-th to i+p-1 matching result will show in row k, make line number k=k+1, i=i+p, return step S33, wherein, k, i, p will be positive integer;
S4, utilizes prompting frame laterally to show Query Result.
The display packing that the present invention reduces effective page hiding rare changes text display manner, with landscape mode display Query Result, and can efficiency utilization page space, save display space, allow more effectively page content displaying to user, so that user checks, improve user experience.
In order to realize above-mentioned purpose of the present invention, according to another aspect of the present invention, the invention provides a kind of display system reducing effective page hiding rare, comprise user interface, controller and data storage device, described user interface is connected with controller, and described controller is connected with described data storage device; Described controller is when receiving the inquiry request inputted by the edit box of user interface, the result of mating with described inquiry request is searched in described data storage device, calculate the matching result of required prompting frame word line number and every a line display when the horizontal arrangement of matching result shows simultaneously, and laterally Query Result is shown in prompting frame, calculating the matching result process of the matching result of required prompting frame word line number and every a line display when showing of laterally arranging is:
S31: the word quantity N of m result in statistical match resultm, described m=1,2 ..., q, described q is the quantity of matching result, and described q is positive integer, described Nmfor positive integer;
S32: make prompting frame word line number k=1, the numbering i=1 of first matching result making row k show;
S33: make matching result display number counter p=1;
S34: calculate total character duration in row k
TOTAL_WIDTH(k)=((Ni+Ni+1+....+Ni+p)+p)*font_width,
Described font_width is the width of font;
S35: judge TOTAL_WIDTH(k) whether be greater than the width tip_width of current drop-down prompting frame, if TOTAL_WIDTH(k) <tip_width, and i+p<q, then make p=p+1, return step S34, if i+p=q, exit, the i-th to i+p matching result will show in row k;
If TOTAL_WIDTH(k) >tip_width, the i-th to i+p-1 matching result will show in row k, make line number k=k+1, i=i+p, return step S33, wherein, k, i, p will be positive integer.
The present invention reduces the display system of effective page hiding rare, controller calculates the matching result of required prompting frame word line number and every a line display when the horizontal arrangement of matching result shows, text display manner is changed, with landscape mode display Query Result, can efficiency utilization page space, save display space, allow more effectively page content displaying to user, so that user checks, improve user experience.
In the preferred embodiment of the present invention, when controller laterally shows Query Result in prompting frame, every a line shows at least one matching result, have a space character with in a line between two neighbor results, the vacant length at previous row end is less than the length of the initial matching result of rear a line.
The present invention, can efficiency utilization page space by showing at least one matching result in every a line, saves display space, allows more effectively page content displaying to user, so that user checks, improve user experience.
Controller of the present invention accurately calculates the matching result of required prompting frame word line number and every a line display when the horizontal arrangement of matching result shows, and shown in same a line by multiple matching result, computation process is accurately quick.
In the preferred embodiment of the present invention, prompting frame is positioned at the bottom of edit box, when the word line number that the lower area that the word line number of the lower area actual displayed of prompting frame is greater than prompting frame can show, then and show scroll bars in prompting frame.Any number of Query Result can be shown.
In another kind of preferred implementation of the present invention, in described edit box after input inquiry content, the color of described query contents and the background color of described edit box are had any different.
The present invention distinguishes inquiry request and Query Result by utilizing color, improves user search speed and comfort level.
In another kind of preferred implementation of the present invention, described edit box is positioned at the top of described prompting frame, bottom or inside.Show Styles is more various, improves the Experience Degree of user.
Additional aspect of the present invention and advantage will part provide in the following description, and part will become obvious from the following description, or be recognized by practice of the present invention.
Embodiment
Be described below in detail embodiments of the invention, the example of described embodiment is shown in the drawings, and wherein same or similar label represents same or similar element or has element that is identical or similar functions from start to finish.Being exemplary below by the embodiment be described with reference to the drawings, only for explaining the present invention, and can not limitation of the present invention being interpreted as.
In describing the invention, unless otherwise prescribed and limit, it should be noted that, term " installation ", " being connected ", " connection " should be interpreted broadly, such as, can be mechanical connection or electrical connection, also can be the connection of two element internals, can be directly be connected, also indirectly can be connected by intermediary, for the ordinary skill in the art, the concrete meaning of above-mentioned term can be understood as the case may be.
The invention provides a kind of display packing reducing effective page hiding rare, as shown in Figure 3, it comprises the steps:
S1, receives the query contents that user inputs in the edit box of user interface, display reminding frame in described user interface;
S2, controller is inquired about in a data storage device, obtains at least one matching result;
S3, controller calculates described matching result prompting frame word line number required when laterally arrangement shows;
S4, utilizes prompting frame laterally to show Query Result.
In the preferred embodiment of the present invention, the detailed process reducing the display packing of effective page hiding rare is:
Controller receives the query contents that user inputs in the edit box of user interface, in the present embodiment, query contents is " China ", display reminding frame on a user interface, controller is inquired about in a data storage device, obtain at least one matching result, in the present embodiment, matching result is " Bank of China, the online business hall of China Mobile, ..., the most forte of China, ..., China Telecom " etc. 10 results, controller calculates required prompting frame word line number when the horizontal arrangement of matching result shows and utilizes prompting frame laterally to show Query Result.In the present embodiment, when controller laterally shows Query Result in prompting frame, every a line shows at least one matching result, and has a space character with in a line between two neighbor results, and the vacant length at previous row end is less than the length of the initial matching result of rear a line.As shown in the display interface of Fig. 4, every a line of prompting frame shows multiple matching result, such as the first row display " Bank of China; the online business hall of China Mobile; ...; the most forte of China " five matching results, and there is between two neighbor results a space character in same a line, such as " Bank of China " and " between the online business hall of China Mobile " have a space character.In addition, for saving display space, every a line will show as far as possible many contents, ensures that the vacant length at previous row end is less than the length of the initial matching result of rear a line.Vacant length such as, in Fig. 4 after " the most forte of China " is less than the length of " China Construction Bank ".The present invention, can efficiency utilization page space by showing at least one matching result in every a line, saves display space, allows more effectively page content displaying to user, so that user checks, improve user experience.
In the present embodiment, calculate the prompting frame word line number that matching result is required when laterally arrangement shows, and determine that the method for the matching result that every a line shows is:
S31: the word quantity N of m result in statistical match resultm, described m=1,2 ..., q, described q is the quantity of matching result, and described q is positive integer, described Nmfor positive integer, in the present embodiment, q is 10;
S32: make prompting frame word line number k=1, the numbering i=1 of first matching result making row k show;
S33: make matching result display number counter p=1;
S34: calculate total character duration in row k
TOTAL_WIDTH(k)=((Ni+Ni+1+....+Ni+p)+p)*font_width,
Described font_width is the width of font;
S35: judge TOTAL_WIDTH(k) whether be greater than the width tip_width of current drop-down prompting frame,
If TOTAL_WIDTH(k) <tip_width, and i+p<q, then make p=p+1, return step S34, if i+p=q, exit, the i-th to i+p matching result will show in row k;
If TOTAL_WIDTH(k) >tip_width, the i-th to i+p-1 matching result will show in row k, make line number k=k+1, i=i+p, return step S33, wherein, k, i, p will be positive integer.
The display packing that the present invention reduces effective page hiding rare changes text display manner, with landscape mode display Query Result, and can efficiency utilization page space, save display space, allow more effectively page content displaying to user, so that user checks, improve user experience.
In the present embodiment, edit box can be positioned at the top of described prompting frame, or edit box is positioned at the bottom of prompting frame, or edit box is positioned at the inside of prompting frame.In a kind of preferred implementation of the present invention, prompting frame is positioned at the bottom of edit box, when the word line number that the lower area that the word line number of the lower area actual displayed of prompting frame is greater than prompting frame can show, then and show scroll bars in prompting frame.Any number of Query Result can be shown.
Be more preferably in embodiment in one of the present invention, in edit box after input inquiry content, the color of query contents can be had any different with the background color of edit box.The present invention distinguishes inquiry request and Query Result by utilizing color, improves user search speed and comfort level.
The invention provides a kind of display system reducing effective page hiding rare, as shown in Figure 5, it comprises user interface 1, controller 2 and data storage device 3, and described user interface 1 is connected with controller 2, and described controller 1 is connected with described data storage device 3; Described controller 2 is when receiving the inquiry request inputted by the edit box of user interface 1, the result of mating with described inquiry request is searched in described data storage device 3, the matching result of required prompting frame word line number and every a line display when the horizontal arrangement of matching result shows is calculated with Time Controller 2, and laterally Query Result is shown in prompting frame, in the present embodiment, controller 2 calculate matching result laterally arrangement display time required prompting frame word line number and the process of matching result of every a line display be:
S31: the word quantity N of m result in controller 2 statistical match resultm, described m=1,2 ..., q, described q is the quantity of matching result, and described q is positive integer, described Nmfor positive integer;
S32: make prompting frame word line number k=1, the numbering i=1 of first matching result making row k show;
S33: make matching result display number counter p=1;
S34: calculate total character duration in row k
TOTAL_WIDTH(k)=((Ni+Ni+1+....+Ni+p)+p)*font_width,
Described font_width is the width of font;
S35: judge TOTAL_WIDTH(k) whether be greater than the width tip_width of current drop-down prompting frame,
If TOTAL_WIDTH(k) <tip_width, and i+p<q, then make p=p+1, return step S34, if i+p=q, exit, the i-th to i+p matching result will show in row k;
If TOTAL_WIDTH(k) >tip_width, the i-th to i+p-1 matching result will show in row k, make line number k=k+1, i=i+p, return step S33;
Wherein, k, i, p are positive integer.
In the present embodiment, when controller 2 laterally shows Query Result in prompting frame, every a line shows at least one matching result, has a space character with in a line between two neighbor results, and the vacant length at previous row end is less than the length of the initial matching result of rear a line.
In the present embodiment, prompting frame is positioned at the bottom of edit box, when the word line number that the lower area that the word line number of the lower area actual displayed of prompting frame is greater than prompting frame can show, then and show scroll bars in prompting frame.
In the present embodiment, edit box can be positioned at the top of described prompting frame, or edit box is positioned at the bottom of prompting frame, or edit box is positioned at the inside of prompting frame.In a kind of preferred implementation of the present invention, prompting frame is positioned at the bottom of edit box, when the word line number that the lower area that the word line number of the lower area actual displayed of prompting frame is greater than prompting frame can show, then and show scroll bars in prompting frame.Any number of Query Result can be shown.
In the present embodiment, in described edit box after input inquiry content, the color of described query contents and the background color of described edit box are had any different.
The present invention reduces the display system of effective page hiding rare, controller calculates the matching result of required prompting frame word line number and every a line display when the horizontal arrangement of matching result shows, text display manner is changed, with landscape mode display Query Result, can efficiency utilization page space, save display space, allow more effectively page content displaying to user, so that user checks, improve user experience.Because the Similar content of system embodiment and embodiment of the method is more, that therefore introduces is relatively simpler, and related content refers to embodiment of the method part.
In the description of this instructions, specific features, structure, material or feature that the description of reference term " embodiment ", " some embodiments ", " example ", " concrete example " or " some examples " etc. means to describe in conjunction with this embodiment or example are contained at least one embodiment of the present invention or example.In this manual, identical embodiment or example are not necessarily referred to the schematic representation of above-mentioned term.And the specific features of description, structure, material or feature can combine in an appropriate manner in any one or more embodiment or example.
Although illustrate and describe embodiments of the invention, those having ordinary skill in the art will appreciate that: can carry out multiple change, amendment, replacement and modification to these embodiments when not departing from principle of the present invention and aim, scope of the present invention is by claim and equivalents thereof.