Embodiment
Fig. 2 is the method flow diagram that provides of client end interface information provided by the invention.
As shown in Figure 2, this flow process comprises:
Step 201, the services request of monitoring client.
Step 202 is according to the services request identify customer end type that listens to.
Step 203 is handled interface information according to the client type that identifies.
Step 204 is issued said client with the interface information after handling.
Wherein, Generally comprise graphical information in the said interface information; In order to save the required network transmission resource of transmission of graphical information, the present invention proposes: when the graphical information of needs transmission is FLASH information, different with original figure information such as the pixel position of every frame picture of transmission FLASH in the prior art and gray-scale values; The present invention utilizes figure to generate engine; Read preset graphics template, business data processing is become to be used to describe the simple data type of graphic structure, then this simple data type is issued client; When the graphical information of needs transmission is picture; Different with original figure information such as pixel position of transmitting picture in the prior art and gray-scale values; The present invention generates picture at server end, then client is issued in URL (URL) address of this picture.
Particularly; Can be according to operating system (OS) type of the services request identify customer end of monitoring; According to the support situation of different operating systems type, judge whether client supports FLASH, when client is supported FL ASH to figure; Business data processing is become to be used to describe the simple data type of graphic structure, this simple data type is issued client; When client is not supported FLASH, generate picture at server end, and client is issued in the URL address of picture.
For example; The operating system of pc client is generally the Windows series of operating, and the operating system of portable terminal can be RIM BlackBerryOS, Apple iPhone OS, Microsoft Windows Mobile and Android OS etc., wherein; The Windows series of operating of pc client had both been supported FLASH; Support the picture of JPEG, GIF and PNG type again, and portable terminal is only supported the picture (some mobile terminal model is not supported the picture of GIF type) of JPEG and PNG type, therefore; Can the pattern exhibiting type of client be divided into two types: pc client shows FLASH, mobile terminal displays static images.
After the interface provides the server end of system to receive the services request that client sends; According to this services request detecting customer terminal OS Type; Difference according to the OS Type of client; Respectively services request is distributed to the different data processing method of different processing modules implement, each processing module with result respectively through feeding back to corresponding client.
For example, be pc client when detecting client, when promptly detecting client support FLASH, utilize figure to generate engine, read preset graphics template, business data processing is become to be used to describe the simple data type of graphic structure; When detecting client when being portable terminal,, judge whether this portable terminal supports FLASH through the OS Type of identification portable terminal; If, then utilize figure to generate engine, read preset graphics template; Business data processing is become to be used to describe the simple data type of graphic structure; If not, then generate picture at server end, said portable terminal is issued in the URL address of this picture.
Wherein, it can be that the FreeMarker figure generates engine that said figure generates engine, also can be that other .net figures generate engine, for example can be FusionCharts figure formation component or JFreeChart figure formation component etc.For example figure generates engine and can generate figure commonly used, for example cake chart, histogram, broken line graph, composite figure etc.Adopting the FreeMarker figure to generate engine can be compatible with existing client and server well.
Server end is according to the graphical information of the client end interface of the services request analysis needs generation that receives; Confirm according to analysis result which graphics template needs read; Utilize figure to generate engine then and read corresponding graphics template, business data processing is become to be used to describe the simple data type of graphic structure.
The said simple data type that is used to describe graphic structure comprises XML data or JSON data.
Fig. 3 is that the system that provides of client end interface information provided by the invention forms synoptic diagram.
As shown in Figure 3, this system comprises monitors module 301, identification module 302, interface information processing module 303 and sending module 304.
Monitor module 301, be used to monitor the services request of client.
Identification module 302 is used for according to monitoring the services request identify customer end type that module 301 listens to.
Interface information processing module 303, the client type that is used for identifying according to identification module 302 is handled interface information.
Sending module 304 is used for the interface information after 303 processing of interface information processing module is issued corresponding client.
Usually; Interface information processing module 303 comprises a plurality of processing units, is respectively applied for the interface information of handling dissimilar clients, wherein; Identification module 302 is transmitted to corresponding processing unit with the services request of this client after identifying client type.
For example, interface information processing module 303 comprises first processing unit and second processing unit.
Said first processing unit is used for when identification module 302 identifies client type and is pc client, the interface information of this pc client being handled.
Said second processing unit is used for when identification module 302 identifies client type and is portable terminal, the interface information of this portable terminal being handled.
Said first processing unit is used to utilize figure to generate engine, reads preset graphics template, business data processing is become to be used to describe the simple data type of graphic structure.
Said first processing unit comprises graphics template memory module, business data processing module and simple data type generation module.
Said graphics template memory module is used for the graphics template.
Said business data processing module is used to utilize figure to generate engine, reads graphics template is used to describe interface figure structural information from professional extracting data data.
Said simple data type generation module, the data that are used for extracting according to said business data processing module generate the simple data type that is used to describe interface figure structural information.
Said second processing unit is used for when portable terminal is supported FLASH, utilizing figure to generate engine, reads preset graphics template, business data processing is become to be used to describe the simple data type of graphic structure.
Said second processing unit is used for when portable terminal is not supported FLASH, generates picture, correspondingly, transmitting element 304, said portable terminal is issued in the URL address of the picture that is used for second processing unit is generated.
Comprise that with client type pc client and portable terminal are example below, provide system to carry out exemplary illustration, specifically see also Fig. 4 and Fig. 5 interface of the present invention.
Fig. 4 is that pc client provided by the invention and the shared interface of portable terminal provide system to form synoptic diagram.
As shown in Figure 4, this interface provides system to comprise data server, application server and WEB server, and pc client all links to each other with said WEB server with portable terminal.
The WEB server receives services request; According to the services request identify customer end is pc client or portable terminal; According to recognition result services request is transmitted to the handled module in the application server then; Application server obtains interface information according to client type and handles from database server, result is returned to corresponding client through the WEB server.
Wherein, the WEB server adopts XML, JSON (JavaScript Object Notation) or the form of URL address that graphical information is issued client, with the minimizing volume of transmitted data, thereby saves network transmission resource.
Fig. 5 is the workflow diagram that interface that Fig. 4 provides provides system.
As shown in Figure 5, this flow process comprises:
Step 501, the WEB server receives the services request of holding the family end.
Step 502, WEB server judge that this services request is the services request of pc client or the services request of portable terminal, if the services request of pc client, then execution in step 503, if the services request of portable terminal, then execution in step 504.
Step 503, the WEB server is transmitted to the module of the interface information that is used to handle pc client in the application server, execution in step 505 with this services request.
Step 504, WEB server are transmitted to this services request the module of the interface information that is used for handle mobile terminal in the application server.
Step 505, application server are carried out corresponding interface information processing, through the WEB server result are returned to client.
The present invention also provides a kind of interface generating apparatus that is positioned at client, specifically sees also Fig. 6.
Fig. 6 is a client end interface generating apparatus structural drawing provided by the invention.
As shown in Figure 6, this device comprises receiver module 601, interface figure generation module 602, interface data generation module 603 and display module 604.
Receiver module 601 is used to receive the graphical information and the data message of network side transmitted.
Interface figure generation module 602 is used for the interface figure according to the graphical information generation client of network side transmitted.
Interface data generation module 603 is used for generating interface data according to the data message of network side transmitted;
Display module 604 is used for according to said interface figure and said interface data display client interface.
Wherein, said graphical information can be the simple data type that is used to describe graphic structure, and then interface figure generation module 602 generates the interface figure according to this simple data type, for example generates FLASH.
Wherein, interface shown in Figure 3 provides in the system, and first processing unit in the interface information processing module 303 can comprise graphics template memory module, business data processing module and simple data type generation module.
Said graphics template memory module is used for the graphics template.Wherein, said graphics template is the showing interface requirement according to client, and information such as the canvas size that generates figure, figure spacing, graphic color are carried out unified templating design, specifically can adopt FreeMarker engine design graphics template.
Said business data processing module is used to utilize figure to generate engine and reads graphics template, is used to describe the data of interface figure structural information from professional extracting data according to the graphics template that reads.
Said simple data type generation module, the data that are used for extracting according to said business data processing module generate the simple data type that is used to describe interface figure structural information.
Interface generating apparatus shown in Figure 6 comprises interface figure generation module 602 and interface data generation module 603 and display module 604.
Structure according to said first processing unit and said interface generating apparatus; Provide in the performance history of system and interface generating apparatus at the interface; The design effort that needs to accomplish mainly comprises: design interface provides graphics template, business data processing module and the simple data type generation module in the system; Interface figure generation module 602 and interface data generation module 603 in the design interface generating apparatus; The design effort amount is less, can shorten the construction cycle that the interface provides system and interface generating apparatus.
In a word, among the present invention, provide the interface of system and portable terminal to provide system to unite two into one, can reduce the network design expense and improve network facilities utilization factor through interface with pc client.
Replace original graphic file data stream to issue client through graphical information that client is needed with simple data type such as XML or JSON or URL address, can significantly save the required network transmission resource of graphical information.
Through the customized graphics template, the bandwagon effect at interface is unified, even total system is changed style, also can easily solve through revising template file, fully reduced the degree of coupling of data extract and interface pattern exhibiting.
Through separating of figure and data; Also the document flow with Network Transmission has replaced to data stream, greatly reduces Network Transmission bandwidth and time, makes full use of the constantly advantage of development of terminal; A part of data pressure is imputed to the terminal; Server only is responsible for the refinement processing of data, and the process of figure has been responsible for data are played up in the terminal, also makes service end and client decoupling zero.
For improving template development efficient based on assembly; Assembly has been realized based on the FusionCharts of Java technology and the encapsulation of JFreeChart interface; The external interface that FusionCharts and JFreeChart is abundant is encapsulated among the Java interface, for the developer provides complete interface fragment, simultaneously; Introducing makes the Java exploitation separate with interface development based on the FreeMarker templating engine of Java technology.
The above is merely preferred embodiment of the present invention, and is in order to restriction the present invention, not all within spirit of the present invention and principle, any modification of being made, is equal to replacement, improvement etc., all should be included within the scope that the present invention protects.