Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 2, an implementation environment diagram of a form display method according to an embodiment of the present invention is provided. The implementation environment includes: browser 101, web server 102, application server 103, and database 104.
The browser 101 is used for displaying form content and interacting with a user, and the web server 102 is used for interacting with the browser 101 and the application server 103 and providing web service for the browser 101; the application server 103 interacts with the database 104 to query the first data and the second data so that the browser 101 can display the first data and the second data.
The browser 101, the web server 102, the application server 103, and the database 104 may communicate with each other through a wireless network or a wired network.
Specifically, the browser 101 can support a user to input a link address and obtain a presentation page.
The Web server 102 is capable of performing routing configuration including storing a correspondence of uniform resource locators and pages. And finally converting the operation of the service on the page into the processing of the event in the Widget. Events (Events) involved in embodiments of the invention may include query data and presentation, extended presentation, and mobile presentation. The translation name in Widget is called as a Widget, and is a small piece of code that can be executed on any Web page based on HTML, and its representation may be video, map, news, game, etc. The basic idea of the method is derived from code multiplexing, and under the normal condition, the code form of the Widget comprises DHTML, JavaScript and Adobe Flash.
An example of codes for setting the corresponding relationship between the uniform resource locator and the page in the Web server 102 in the embodiment of the present invention is as follows:
referring to fig. 3, a schematic diagram of the relationship between various components in browser 101 and web server 102 is shown. The user browses to a page on the browser 101 by inputting an access address to the browser 101, and performs various operations on the page. The Web server 102 locates the page through the routing configuration function, and based on the widget component, the data query, the display, the extended display and the mobile display are realized in the page, and the page organization is realized in the Schema form. Schema can be understood as a language that describes the structure of an XML document. Specifically, the page is organized in a Document Object Model (DOM) by an HTML language, and display control is performed using Cascading Style Sheets (CSS) styles.
Referring to fig. 4, a schematic diagram of the relationship between the various components in the web server 102 and the application server 103 is shown. The query instruction issued by the user is transmitted to the web server 102, the web server 102 generates a request for querying data and transmits the request to the application server 103, the application server 103 obtains the data by interacting with the database 104 and feeds the data back to the web server 102 so that the browser can finally present the data. Specifically, in the embodiment of the present invention, the data may be divided into first data and second data, where the first data is basic data and is presented using a reduced mode, and the second data is extended data and is presented using an extended mode. In the simplified mode, the first data is displayed in a form, and the first data is relatively less in content, so that the first data can be displayed in a simplified and attractive mode. In the expansion mode, the second data is selectively presented only according to the interaction result of the user and the browser, so the effects of conciseness and attractiveness can still be achieved. In order to achieve a better display effect and enable the display of the first data and the second data not to be influenced mutually, the second data can be displayed in a floating layer mode, and the shape of a form displaying the first data cannot be changed when the second data is displayed. Specifically, the floating layer may be presented in the form of a modeless frame, a floating layer, and the like, and the embodiment of the present invention does not limit a specific presentation manner thereof.
Referring to fig. 5, an embodiment of the present invention specifically provides a form display method, including:
s101, displaying the first data in a form.
In the embodiment of the invention, the first data can be basic data in all data inquired according to the user inquiry instruction, and the content of the first data is relatively simplified, so that the first data can be completely presented in a form.
S103, positioning data are obtained, and the current target row position is obtained according to the positioning data.
And S105, acquiring second data corresponding to the current target line according to the current target line position and the first data.
Specifically, in order to accurately acquire positioning data and query second data corresponding to a current target row, an embodiment of the present invention provides an interactive method for acquiring the second data corresponding to the current target row. Referring to fig. 6, the interaction method includes:
A1. a mouse-in event and a mouse-out event are added to the form.
A3. When the mouse moves to a line in the form, a mouse entry event is triggered to acquire the current target line.
A5. And acquiring the data content corresponding to the current target row.
A7. And acquiring the extension data corresponding to the data content.
And the data content corresponding to the current target row belongs to the basic data, and the corresponding expanded data is the second data corresponding to the inquired current target row. In one possible embodiment, a mouse-in event triggers the generation of the first temporary display area and a mouse-out event triggers the disappearance of the first temporary display area.
And S107, generating a first temporary display area, wherein the first temporary display area comprises a text area and an interactive area, the text area is used for displaying the second data corresponding to the current target row, and the interactive area is used for triggering an interactive event for displaying the second data corresponding to the non-current target row.
Referring to fig. 7, a method for generating a first temporary display area is shown, which includes:
s1071, generating a text area according to the position of the first target line and the content of the second data corresponding to the current target line.
Specifically, the first target line is the current target line.
S1073, acquiring the position of the upper bottom line of the first target row, and acquiring the vertex of the interaction area according to the position of the upper bottom line.
S1075, obtaining the height of the interaction area.
And S1077, generating an interaction area according to the interaction area vertex and the interaction area height.
In particular, the interaction zone may be a rectangular interaction zone.
Further, before the first temporary display area is displayed, display parameters of the text area and the interactive area should be set, and the display parameters of the text area include, but are not limited to, a background color, a border color, an extended information display mode (horizontal/vertical), an extended information background color, and a border color; the display parameters of the interactive region include, but are not limited to, a display mode level, a region display width, and an edge line width.
In another possible embodiment, the method for generating the first temporary display area may further include: generating a text area according to the position of the first target line and the content of the second data corresponding to the current target line; the first target line is the current target line;
acquiring a lower bottom line position of a first target row, and acquiring a vertex of an interaction area according to the lower bottom line position; acquiring the height of an interaction area; and generating an interactive area according to the interactive area vertex and the interactive area height.
Specifically, the interactive region may be generated on the upper portion and/or the lower portion of the first target row, the interactive region generated on the upper portion of the first target row may be used to trigger the display of the second data corresponding to the first row on the first target row, and the interactive region generated on the lower portion of the first target row may be used to trigger the display of the second data corresponding to the second row on the lower portion of the first target row again.
In another possible embodiment, the method for generating the first temporary display area may further include:
generating a text area according to the position of the first target line and the content of the second data corresponding to the current target line; the first target line is the current target line;
acquiring the height of an interaction area;
acquiring the position of an upper bottom line of a first target row, and acquiring the vertex of a first interaction area according to the position of the upper bottom line; generating a first interactive area according to the vertex of the first interactive area and the height of the interactive area;
acquiring a lower bottom line position of a first target row, and acquiring a vertex of a second interaction area according to the lower bottom line position; and generating a second interactive area according to the vertex of the second interactive area and the height of the interactive area.
In this embodiment, the display of the second data corresponding to the row above the first target row may be triggered by the first interactive region, and the display of the second data corresponding to the row below the first target row may be triggered by the second interactive region.
Further, when the user interacts with the interactive area, an interactive event for displaying second data corresponding to a non-current target row may be triggered again, specifically, the interactive event triggers the following execution logic:
and S102, responding to a trigger instruction of the interaction area, and acquiring a second target row position.
S104, taking the second target row as a current target row; and acquiring second data corresponding to the current target line according to the current target line position and the first data.
And S106, generating a second temporary display area, wherein the second temporary display area comprises a text area and an interactive area, the text area is used for displaying second data corresponding to the current target row, and the interactive area is used for triggering an interactive event for displaying the second data corresponding to the non-current target row.
As can be seen from the above, the execution logic is the same as that in steps S103, S105, and S107, after the second temporary display area is generated, the first temporary display area is hidden, and the second temporary display area at this time can be used as the first temporary display area again, and the re-triggering of the interaction event for displaying the second data corresponding to the non-current target row is continuously and circularly received.
Referring to fig. 1, a diagram of presenting data in a form in the prior art is shown. Please refer to fig. 8, which illustrates a diagram of form display data according to an embodiment of the present invention. Obviously, the display mode in the embodiment of the invention is clearer and more beautiful. In fig. 8, the first data can be displayed in a form, the second data corresponding to the current target line can be displayed in response to the interaction between the user and the browser, and the second data corresponding to the non-current target line can be displayed again through the interaction area. Specifically, in fig. 8, the interactive region is presented in the form of a dividing line, which is indicated by a dashed box.
To further highlight the role of the interaction area in the embodiment of the present invention, please refer to fig. 9, which shows an operation path diagram of the user viewing the second data corresponding to the non-current target row when there is no interaction area. Referring to fig. 10, it shows a schematic diagram of an operation path of a user viewing second data corresponding to a non-current target row when an interaction area exists. The circles in which the numbers in fig. 9 and 10 are located represent the paths of mouse movement. When there is no interaction area, assuming that the second data corresponding to the first row, the second row, the third row and the fourth row needs to be viewed in sequence, the mouse needs to be moved six times, because the mouse has to leave the current row and re-enter other rows to trigger the display of the second data again, thereby increasing the operation path. When the interactive area exists, assuming that the second data corresponding to the first row, the second row, the third row and the fourth row needs to be checked in sequence, the mouse needs to be moved only three times, because the interactive area is set in the temporary display area, the detailed information of the previous row or the next row can be checked only by moving the mouse to the interactive area, and thus the operation path is shortened. Therefore, the interactive area provided by the embodiment of the invention can obviously shorten the operation path of the user for checking the data and improve the user experience.
Furthermore, in order to further improve user experience, the embodiment of the present invention further provides a technical scheme for generating different interaction results according to different interaction speeds, and an object of the present invention is to enable a user to implement both forward reading of second data and copying and pasting of second data corresponding to a current target row. In order to achieve the above object, in the embodiment of the present invention, the height of the interactive area is set, please refer to fig. 11, where the setting method includes:
B1. and acquiring the period T of the browser refresh time.
B2. And acquiring the target point average moving speed V.
B3. Obtaining the height S of the current target row1。
B4. According to the formula
Setting the height S of the interactive area
2。
In the actual interactive process, if the actual moving speed V' of the target point is less than or equal to (S)1/2+S2) Generating a trigger instruction for the interaction area; if the actual moving speed of the target point V' > (S)1/2+S2) And T, copying second data corresponding to the current target row. The target point may be any point that can interact with the browser, such as a mouse point.
According to the technical scheme, the technical effect that when the mouse of a user moves fast, the mouse point smoothly enters the first temporary display area, and second data corresponding to the current target row are copied; when the mouse of the user moves slowly, the mouse point is located in the interaction area for a long time, and the display of the second data corresponding to the previous line or the next line of the current target line is triggered.
The form display method provided by the embodiment of the invention optimizes the query page, so that the page is more refreshing and concise, the evaluation degree of the query service is improved, further, the efficiency of browsing form data by a user can be improved, the query requirements of each service are generally met by a mode of combining basic display and extended information display, and the browsing efficiency is also improved by a design mode of an interactive area. The embodiment of the invention can be widely applied to various inquiry-related services, such as order inquiry, management data inquiry and the like.
Another embodiment of the present invention provides a form display system, as shown in fig. 12, including:
the firstdata display module 1 is used for displaying the first data in a form.
And thepositioning module 2 is used for acquiring positioning data and acquiring the current target row position according to the positioning data.
And the seconddata query module 3 is configured to obtain second data corresponding to the current target row according to the current target row position and the first data.
The seconddata display module 4 is configured to generate a first temporary display area, where the first temporary display area includes a text area and an interaction area, the text area is used to display the second data corresponding to the current target row, and the interaction area is used to trigger an interaction event for displaying the second data corresponding to the non-current target row.
As shown in fig. 13, the seconddata display module 4 includes:
a text region generating unit 41 configured to generate a text region based on the first target line position and the content of the second data corresponding to the current target line; the first target row is the current target row.
The interaction zone height acquisition unit 42: for obtaining the interaction zone height.
The interaction area generating unit 43 is configured to obtain an upper baseline position of the first target row, and obtain an interaction area vertex according to the upper baseline position; and generating an interactive area according to the interactive area vertex and the interactive area height.
In another possible embodiment, the second data display module includes:
a text region generating unit, configured to generate a text region according to a first target line position and content of second data corresponding to the current target line; the first target line is the current target line;
an interaction zone height acquisition unit: the height of the interaction area is obtained;
the interactive area generating unit is used for acquiring the lower bottom line position of the first target row and acquiring the top point of the interactive area according to the lower bottom line position; and generating an interactive area according to the interactive area vertex and the interactive area height.
In another possible embodiment, the second data display module includes:
a text region generating unit, configured to generate a text region according to a first target line position and content of second data corresponding to the current target line; the first target line is the current target line;
an interaction zone height acquisition unit: the height of the interaction area is obtained;
the first interactive area generating unit is used for acquiring the position of an upper bottom line of a first target row and acquiring a vertex of a first interactive area according to the position of the upper bottom line; generating a first interactive area according to the vertex of the first interactive area and the height of the interactive area;
the second interactive area generating unit is used for acquiring the lower bottom line position of the first target row and acquiring the top point of the second interactive area according to the lower bottom line position; and generating a second interactive area according to the vertex of the second interactive area and the height of the interactive area.
As shown in fig. 14, the interaction zone height obtaining unit 42 includes:
the frequency obtaining unit 421 is configured to obtain a period T of the browser refresh time.
An average speed obtaining unit 422, configured to obtain the target point average moving speed V.
A height parameter acquiring unit 423 for acquiring the height S of the current target line1。
A setting unit 424 for calculating
Setting the height S of the interactive area
2。
Further, the system further comprises:
a trigger instruction generation module for generating a trigger instruction if the actual moving speed V' of the target point is less than or equal to (S)1/2+S2) Generating a trigger instruction for the interaction area;
a copy command generation module for generating a copy command if the actual moving speed V' > (S)1/2+S2) And T, copying second data corresponding to the current target row.
Thepositioning module 2 is further configured to respond to a trigger instruction for the interaction area to obtain a second target row position;
the seconddata query module 3 is further configured to take the second target row as a current target row; acquiring second data corresponding to the current target line according to the current target line position and the first data;
the seconddata display module 4 is further configured to generate a second temporary display area, where the second temporary display area includes a text area and an interaction area, the text area is used to display the second data corresponding to the current target row, and the interaction area is used to trigger an interaction event for displaying the second data corresponding to the non-current target row.
The embodiment of the form display system and the method in the embodiment of the device of the invention are based on the same inventive concept.
Embodiments of the present invention also provide a storage medium, which may be used to store program codes for implementing a form display method in a method embodiment. Optionally, in this embodiment, the storage medium may be located in at least one network device of a plurality of network devices of a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, which can store program codes.
Referring to fig. 15, fig. 15 is a schematic structural diagram of a form display apparatus according to an embodiment of the present invention. The form display device shown in fig. 15 may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. As shown in fig. 15, the terminal device may include:
aprocessor 601 and adisplay 603, amicrophone 604 and aspeaker 605 connected to theprocessor 601 via auser interface 602, and amemory 607 connected to theprocessor 601 via abus 606, and acoupler 609 connected to theprocessor 601 viavarious network interfaces 608 and anantenna 610 connected to thecoupler 609, wherein:
amemory 607 for storing application programs.
Theprocessor 601 is configured to call the application program stored in thememory 607 through thebus 606 to perform the form display operation.
In this embodiment of the present invention, themultiple network interfaces 608 may include an IEEE 802.11 network interface, an IEEE 802.16 network interface, a 3GPP network interface, and the like, which is not limited in this embodiment of the present invention.
In an embodiment of the present invention, the outputs of the IEEE 802.11 network interface, the IEEE 802.16 network interface, and the 3GPP network interface are coupled to anantenna 610 via acoupler 609.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Specifically, fig. 16 is a schematic diagram of a server structure provided in an embodiment of the present invention, where the server structure may include one or several functional modules in the form display system. Theserver 800, which may vary significantly depending on configuration or performance, may include one or more Central Processing Units (CPUs) 822 (e.g., one or more processors) andmemory 832, one or more storage media 830 (e.g., one or more mass storage devices) storingapplications 842 ordata 844.Memory 832 andstorage medium 830 may be, among other things, transient or persistent storage. The program stored in thestorage medium 830 may include one or more modules (not shown), each of which may include a series of instruction operations for the server. Still further, acentral processor 822 may be provided in communication with thestorage medium 830 for executing a series of instruction operations in thestorage medium 830 on theserver 800.Server 800 may also include one ormore power supplies 826, one or more wired or wireless network interfaces 850, one or more input-output interfaces 858, and/or one ormore operating systems 841, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, and so forth. The steps performed by the above-described method embodiment may be based on the server architecture shown in fig. 16.
It should be noted that: the sequence of the above embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.