1. Technical Field
Embodiments of the present disclosure relate to computer graphics technology, and particularly to an electronic device and method for displaying images on screen.
2. Description of Related Art
Scalable vector graphics (SVG) is an XML-based vector image format for two-dimensional graphics. SVG images and their behaviors are defined in XML text files. This means that they can be searched, indexed, scripted, and, if need be, compressed. The SVG images can be created and zoomed (zoom in or zoom out) randomly.
However, the SVG image cannot be created and displayed on a screen according to user-defined data acquired from a remote database of a server. Therefore, a more efficient method for displaying SVG images is desired.
All of the processes described below may be embodied in, and fully automated via, functional code modules executed by one or more general purpose electronic devices or processors. The code modules may be stored in any type of non-transitory computer-readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory computer-readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other storage medium.
The first display device 20 displays scalable vector graphics (SVG) images, and the first input device 22 may be a mouse or a keyboard for data input. The first storage device 23 may be a non-volatile computer storage chip that can be electrically erased and reprogrammed, such as a hard disk or a flash memory card.
In one embodiment, the image displaying client system 24 is used to obtain data for drawing SVG images from the database 5 of the server 4 according to user-defined key words (e.g., query words), and create an SVG image according to the obtained data from the database 5, so that the SVG image can be displayed on the first display device 20 dynamically according to the user-defined key words. The image displaying client system 24 may include computerized instructions in the form of one or more programs that are executed by the first processor 25 and stored in the first storage device 23 (or memory).
In one embodiment, the image displaying server system 44 is used to receive the user-defined key words from the client computer 2, obtain query data from the database 5 according to the user-defined key words, and returns the query data to the client computer 2, so that the client computer 2 creates an SVG image according to the query data acquired from the database 5, and the SVG image can be displayed on the first display device 20 dynamically according to the user-defined key words. The image displaying server system 44 may include computerized instructions in the form of one or more programs that are executed by the second processor 45 and stored in the second storage device 43 (or memory).
In step S10, the third creating module 440 creates a service routine (service program) in the server 4, and creates a database query method in the service routine. For example, the service routine may be a web handler file (e.g., *.ashx file), or a web service file.
In step S11, the first creating module 240 creates a script document in the client computer 2, and creates a data acquiring method in the script document. For example, the script document is a Java script file (Jscript) or other suitable format files.
In one embodiment, the data acquiring method may include a data acquiring type, data acquiring parameters, and a data acquiring address. The data acquiring type may be a post type and a get type. The data acquiring parameters may include a user name of the client computer 2 and user-defined key words. The data acquiring address may be an address of the server 4 (i.e., an address of the service routine). For example, the data acquiring address is an universal resource locator (URL) address of the server 4.
In step S12, the second creating module 241 creates a web document in the client computer 2, and adds a library file and the script document in the web document, and invokes the data acquiring method of the script document in an on-load event of the web document. In one embodiment, the library file is added to the web document at first, and then the script document is added to the web document. The web document may be a hypertext markup language (HTML) document or other suitable formats. The library file may be Java query file (JQuery file).
In step S13, the data acquiring module 242 transmits the data acquiring parameters to the database query method of the server 4 using the data acquiring method, and receives query data returned by the database query method.
In detail, if the database query method of the server 4 receives the data acquiring parameters, the data querying module 441 invokes the database query method in a specified method (e.g., a process request method) of the service routine of the server 4, and obtains query data returned by the database query method. Then, the data transmitting module 442 transmits the query data acquired by the database query method to the client computer 2 using a specified format, such as a format of Response.Write( ).
In step S14, the data processing module 243 stores the query data received by the data acquiring module 242 in a data container of the web document, and classifies the query data using Java script. In one embodiment, the data container may be the division tag having a hidden display property in the web document, such as the <Div> tag in an HTML document, and the display property of the <Div> tag is set as hidden.
For example, when a user wants to check an examination history of a patent application, the user may enter an application number of the patent application, then the data acquiring module 242 transmits the user-defined key words (i.e., the application number of the patent application) to the data querying module 441 of the server 4. The data querying module 441 obtains examination information and documents corresponding to the patent application from the database 5 according to the application number. For example, as shown in
The data processing module 243 classifies the query data in
In step S15, the data processing module 243 creates an image document (e.g., an SVG document), inserts the image document into the web document, such as a html file, and loads the classified query data from the data container (e.g., the <Div> tag) of the web document to the image document using the library file in the web document. In one embodiment, the data processing module 243 inserts a link or an URL address of the image document into the web document according to object type of the target in the web document, for example, inserting into an <object> tag, an <embed> tag, or an <iFrame> tag.
In step S16, the image displaying module 244 creates first types of elements which are used to draw specified graphic shapes (e.g., a line and a rectangle), and creates second types of elements which are used to display the classified query data on the specified graphic shapes. Then, the image displaying module 244 creates an SVG image using the first types and the second types of elements based on a cascading style sheet (CSS) model in the image document, and displays the SVG image on the first display device 20.
In one embodiment, the first types and the second types of the elements are document object model (DOM) elements. For example, the first types of elements may include an element used to draw a line (e.g., the <line> tag), an element used to draw a rectangle (e.g., the <rect> tag), and an element used to draw an ellipse (e.g., the <ellipse> tag). The second types of elements may be the <text> tag.
If the SVG image needed to be drawn is a fishbone diagram of the examination history of the patent application, as shown in
Using the same method as described above, the image displaying module 244 obtains the second elements in the three character strings (e.g., Str 1[1], Str2[1], Str3[1]), and generates a second merged data (Rejection(F), 35U.S.C.112, 2009 Jul. 6) by merging the second elements in the three character strings.
The image displaying module 244 obtains the third elements in the three character strings (e.g., Str1[2], Str2[2], Str3[2]), and generates a third merged data (Rejection(FF), 35U.S.C.103(a), 2010 Feb. 2) by merging the third elements in the three character strings.
The image displaying module 244 obtains the fourth elements in the three character strings (e.g., Str1[3], Str2[3], Str3[3]), and generates a fourth merged data (Rejection(FF), 35U.S.C.112, 2010 Feb. 2) by merging the fourth elements in the three character strings.
Then, the image displaying module 244 displays the four merged data on the fishbone diagram and generates an SVG image on the first display device 20. That is, the SVG image is created and displayed on the first display device 20 dynamically according to the user-defined key words (e.g., the application number of the patent application).
In other embodiments, the image displaying client system 24 and the image displaying server system 44 may be used to control displaying of other images which have features similar to those of SVG images, such as raster graphics.
In other embodiments, in step S14, the data processing module 243 does not classify the query data when the query data received by the data acquiring module 242 is stored in the data container of the web document. Thus, in step S15, the data processing module 243 loads the un-classified query data from the data container of the web document to the image document. In step S16, the image displaying module 244 creates first types of elements which are used to draw specified graphic shapes (e.g., a line and a rectangle), and creates second types of elements which are used to display the un-classified query data on the specified graphic shapes. Then, the image displaying module 244 draws an SVG image according to the created elements, and displays the SVG image on the first display device 20.
It should be emphasized that the above-described embodiments of the present disclosure, particularly, any embodiments, are merely possible examples of implementations, merely set forth for a clear understanding of the principles of the disclosure. Many variations and modifications may be made to the above-described embodiment(s) of the disclosure without departing substantially from the spirit and principles of the disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the present disclosure and protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2012103298865 | Sep 2012 | CN | national |