Specific implementation mode
Embodiments herein proposes a kind of implementation method of new business graphics, and client is shown needed for business graphics
Total data be divided into business datum and configuration data, in server-side maintenance service table id and business datum source-information and
The correspondence of configuration data mark;Server-side is identified according to the business graphics to be shown that client uploads, and is returned to client
Corresponding configuration data mark and service data information are returned, client is configured by configuration data mark and service data information
Data and business datum, to carry out the display of business graphics;So corresponding industry is identified by changing business graphics in server-side
Business data origin information and/or configuration data mark, you can the service parameter and/or display business shown in modification business graphics
The mode of parameter so that the update of display and the realization of client decoupling and, to solve problems of the prior art.
In embodiments herein, the graph service system of client and server-side composition.Client operates in user side
Equipment on, such as equipment such as mobile phone, tablet computer, PC (Personal Computer, PC), notebooks;Server-side is transported
Row can be PC, server etc., the equipment of different responsibilities can also be shared by two or more in the equipment of network side
It mutually cooperates with to realize the various functions of server-side in the embodiment of the present application.
In embodiments herein, the total data needed for business graphics is shown to client, it can be according to practical application
The specific implementation of scene determines which partial data therein as configuration data, and using remainder as business datum.It can
It, may be because of business figure the data shown in multiple business graphics will can be multiplexed in practical application scene as configuration data
Table and different partial datas are as business datum.Business datum generally includes the business variable to be shown in business graphics
The part changed by the difference of business variable in value, the comment shown;Configuration data generally includes and how to show industry
Be engaged in the relevant data of variable, such as chart type (line chart, block diagram, accumulation graph, cake chart, radar map etc.), the type
Pattern data, display comment in be common to the parts etc. of multiple business variables.It should be noted that business datum
In can also include and how to show the relevant data of business variable, such as when some display parameters can be because of shown business variable
It is different without simultaneously, can be using this part display parameters as business datum.
In the graph service system that client and server-side are constituted, client is aobvious using the embodiment of the present application the method
There is each business graphics shown unique mark, each configuration data also to have unique mark.Business graphics mark can be appointed
It is intended to the information that can be represented the business graphics in graph service system, the business graphics is made to be different from other business graphics, this
The embodiment of application does not limit;Configuration data mark is also such.
In embodiments herein, server-side safeguards that the business datum source of the mark and business graphics that have business graphics is believed
The correspondence of breath and configuration data mark.Business datum source-information can be service server provide calling interface,
The predetermined network location etc. for preserving business datum, does not limit, as long as server-side or client are obtaining business datum
After source information, business datum to be shown can be got from its specified business datum source.
In embodiments herein, the implementation method of business graphics applies the flow in client as shown in Figure 1, applying
The flow of server-side is as shown in Figure 2.
In client, step 110, the mark of business graphics to be shown is sent to server-side.
In server-side, step 210, the mark for the business graphics to be shown that client is sent is received.
When client needs to show business graphics in the process of running, chart data request is sent to server-side, is being schemed
The mark of business graphics to be shown is carried in table request of data.
In server-side, step 220, corresponding business datum source-information is identified according to the business graphics and determines business datum
Information.
After receiving chart data request, server-side extracts business graphics mark therein, searches the correspondence that local terminal is safeguarded
Relationship obtains business datum source-information corresponding with business graphics mark and configuration data mark.
In one implementation, it can be obtained from the business datum source that business data origin information is specified by server-side
Business datum, and the business datum of acquisition is returned into client as service data information.
In another implementation, it can be returned business datum source-information as service data information by server-side
To client, business datum is obtained from the business datum source that business data origin information is specified by client.
In server-side, step 230, returns to service data information to client and the business graphics identifies corresponding configuration number
According to mark, service data information and the configuration data presentation of information business graphics are based on for client.
In client, step 120, service data information and configuration data mark, service data information are received from server-side
It identifies with configuration data and is determined according to the mark of the business graphics by server-side.
Service data information and business graphics are identified corresponding configuration data mark and are encapsulated in chart data sound by server-side
Ying Zhong returns to client.
In client, step 130, is identified according to configuration data and obtain configuration data, be based on configuration data and business datum
Business graphics described in presentation of information.
In one implementation, all available configuration datas can be all stored in client.Client from
After extracting configuration data mark in chart data response, found out with the mark in several configuration datas of preservation
Configuration data.In this realization method, if new configuration data is added, or the existing configuration data of change, it needs to rise
Grade client.
In another implementation, client is locally preserving several configuration datas.It is rung receiving chart data
Ying Hou is searched according to configuration data therein mark in the configuration data locally preserved, if there is the configuration with the mark
Data then read the configuration data.If the not configuration data with the mark, configuration data request is sent to server-side,
Configuration data mark is carried in configuration data request;Configuration data with the mark is returned to client by server-side;
After client receives, the configuration data of reception and corresponding configuration data mark are stored in local.In this realization method, visitor
Family end can prestore some configuration datas when mounted, when needing to add new configuration data or the existing configuration data of change
When, server-side can be that new configuration data or modified configuration data assign new mark, and client can be automatically from service
Corresponding configuration data is downloaded at end, and automatically updating for configuration data can be realized without updating client.Furthermore it is also possible to
It is that life cycle is arranged in the configuration data preserved in client, is more than when the time used apart from some configuration data last time
After life cycle, the configuration data is deleted, to remove old configuration data in time.
Using business datum source-information as in the realization method of service data information, client is receiving chart data sound
Ying Hou obtains the business datum of the business graphics from the business datum source that wherein business datum source-information is specified.With industry
Data of being engaged in are in the realization method of service data information, and client directly extracts business datum from chart data response.
After obtaining business datum and configuration data, client shows business figure using business datum and configuration data
Table.Specifically, client obtains the total data of business graphics after combining business datum and configuration data, according to combination
Data afterwards carry out the display of business graphics.The concrete mode and display business figure of composite service data and configuration data
The concrete mode of table can run soft according to the dividing mode of business datum in practical application scene and configuration data, client
Because usually determining, embodiments herein does not limit for programming realization that hardware platform, chart are shown etc..In one example,
Business datum may be used in client and configuration data generates graph object, and the business figure is shown according to the graph object of generation
Table;It generates graph object and shows that business graphics is referred to the prior art and realizes according to graph object, repeat no more.
In application scenes, in the case of difference, some business graphics need using different configuration datas come
Display.For example, section is shown using different colors, uses different patterns etc. to different user groups in different times.?
In these application scenarios, the situation using different configuration datas can will be described with predetermined applicable elements so that the business figure
Each configuration data that table may use has the predetermined applicable elements of oneself, and the predetermined applicable elements of different configuration datas are
(situation of i.e. any determination can only meet the predetermined applicable elements of a configuration data) of mutual exclusion.In the industry that server-side is safeguarded
It is engaged in the correspondence that table id is identified with business datum source-information and configuration data, preserves business graphics mark
The predetermined applicable elements of corresponding each each configuration data mark that may be used and each configuration data mark.It is taking
After business end receives the chart data request of client, if the business graphics in the correspondence safeguarded in chart data request
Mark corresponds to two or more configuration datas and identifies, then current situation meets the predetermined of which configuration data mark
Which configuration data mark applicable elements, server-side just return to client.
In some business, some business graphics may should be used for showing a business variable, also be used for while aobvious
Show two or more business variables.At this point, server-side can be by service data information, to make what client obtained
Business datum includes a value for arriving multiple business variables, the configuration data of the business graphics is used by client, according to each
The business variable is included respectively on the business graphics by the value of business variable.In this way, the business that can be returned according to server-side
One to multiple business variables is included on same business graphics by data information.This realization can become in business scenario
When change, by changing the business datum source-information in server-side correspondence, industry shown in additions and deletions business graphics at any time
Business variable.
As it can be seen that in embodiments herein, pass through disassociation service data and configuration data so that configuration data can be multiplexed
In the displaying of multiple business datums, reduce development amount;Pass through the service data information by server-side issuing service chart
It is identified with configuration data so that business graphics can be changed with the correspondence of modification business graphics mark at any time in server-side
Business datum to be shown, and/or the configuration data to be used avoid upgrade client without changing the realization of client
End;Business variation can be quickly matched to make chart show, and will not be due to changing chart and showing frequent upgrading
Influence the stability of client.
In the application example of the application, Internet Service Provider operation chart service system on its server
The server-side ChartKitServer of system and the server-side of multiple operation systems;User installs the net in the terminal of oneself
The App (application program) of network service provider, App include the client ChartKit of graph service system;The business in App
The display of chart is completed by ChartKit and ChartKitServer collaborations.
The structure of ChartKit and ChartKitServer is as shown in Figure 3.ChartKit include ChartEngine and
Two submodules of DataEngine, wherein:ChartEngine submodules are responsible for the drafting of business graphics, including legend, expository writing
The generation etc. of the information such as case;DataEngine submodules be responsible for the acquisition of business datum, configuration data acquiring and maintaining and
The synthesis of business datum and configuration data.
ChartKitServer includes operation support submodule, data publication submodule and configuration management submodule, wherein:
Operation support submodule is responsible for maintenance service table id and operation system interface (a kind of business datum source-information), Yi Jipei
Set the mapping table of Data Identification;Data publication submodule is responsible for obtaining business datum, and by business datum and configures number
It is sent to display of the client for business graphics according to mark;Configuration management submodule is responsible for creating, be issued, maintenance service chart
Configuration data.
When developer will carry out business graphics display in App using new configuration data, need first to
ChartKitServer registers new configuration data.Specifically, new configuration data is first added in configuration management submodule,
And specified by developer or generated by configuration management submodule the unique mark of the new configuration data;Then in operation support
In the mapping table that submodule is safeguarded, the row record that the new configuration data of new use identifies is added, or existing row is recorded
In configuration data mark be changed to the mark of new configuration data.Developer can also be by changing in configuration management submodule
Existing configuration data (configuration data mark is constant), to change the display of business graphics.That is, without carrying out App's
Upgrading, can both add new configuration data, can also change existing configuration data.Developer can also be by runing
Mapping table is changed in support submodule, to change service parameter to be shown in some business graphics, and/or to be used
Configuration data, the same upgrading without carrying out App.
When to show some business graphics in App, by the mark of the business graphics (assuming that the business graphics is identified as
ChartID-A) it is passed to ChartKit.Data publication of the DataEngine submodules of ChartKit to ChartKitServer
Module sends chart data request, and ChartID-A is carried in chart data request.
The data publication submodule of ChartKitServer extracts ChartID-A from chart data request, uses
ChartID-A initiates to inquire to operation support submodule.Operation support submodule in the mapping table of maintenance, find out with
(the interface t) and configuration data mark for being set as operation system m (are set as the corresponding operation system interfaces of ChartID-A
Config-1), and data publication submodule is passed to.
Data publication submodule calls the interface t of operation system m, obtains the business datum to be shown in ChartID-A.
Business datum (a kind of service data information) and configuration data mark Config-1 are encapsulated in chart numbers by data publication submodule
According to the DataEngine submodules in response, being sent to ChartKit.
The DataEngine submodules of ChartKit extraction business datum and configuration data mark from chart data response
Config-1 searches whether the configuration data for being identified as Config-1, if so, then reading in the configuration data locally preserved
Take the configuration data for being identified as Config-1.If the local configuration data for not being identified as Config-1, DataEngine
Module generates the configuration data request for carrying Config-1, is sent to the configuration management submodule of ChartKitServer.By
In before each configuration data mark is applied to mapping table, registration is completed in configuration management submodule, because
All configuration datas that can be used are preserved in this configuration management submodule.Configuration management submodule, which is found out, to be identified as
The configuration data of Config-1 is encapsulated in configuration data response and returns to DataEngine submodules.DataEngine submodules
After block receives configuration data response, the configuration data for being identified as Config-1 is obtained, and save it in local.
After obtaining business datum and configuration data, after DataEngine submodules combine business datum and configuration data
Chart universal model (a kind of graph object) is generated, and chart universal model is passed into ChartEngine submodules.
ChartEngine submodules generate business graphics according to chart universal model, and the business graphics is carried out in App
Display.
With the realization of above-mentioned flow corresponding, embodiments herein additionally provides a kind of business graphics applied in client
Realization device and a kind of realization device applied in the business graphics of server-side.Both devices can by software realization,
It can also be realized by way of hardware or software and hardware combining.For implemented in software, as the device on logical meaning, it is
Corresponding computer program instructions are read by the CPU (Central Process Unit, central processing unit) of place equipment
It is formed to operation in memory.For hardware view, in addition to CPU shown in Fig. 4, memory and nonvolatile memory it
Outside, the equipment where the realization device of business graphics also typically includes chip for carrying out wireless signal transmitting-receiving etc. other is hard
Part, and/or for realizing other hardware such as board of network communicating function.
Fig. 5 show a kind of realization device of business graphics provided by the embodiments of the present application, applies in client, including industry
Business table id transmission unit, chart data information receiving unit and business graphics display unit, wherein:Business graphics mark hair
Send mark of the unit for sending business graphics to be shown to server-side;Chart data information receiving unit is used to terminate from service
Service data information and configuration data mark are received, the service data information and configuration data are identified by server-side according to the industry
The mark of business chart determines;Business graphics display unit, which is used to be identified according to configuration data, obtains configuration data, is matched based on described
It sets data and service data information shows the business graphics.
Optionally, the business graphics display unit is identified according to configuration data obtains configuration data, including:As local guarantor
When having the configuration data identified with the configuration data, the configuration data of reading and saving;Otherwise the configuration data is used
Mark obtains configuration data from server-side, and the configuration data and corresponding configuration data mark are stored in local.
Optionally, the service data information includes:Business datum.
Optionally, the service data information includes:The source-information of business datum;The business graphics display unit base
The business graphics is shown in configuration data and service data information, including:The business specified from the source-information of business datum
Data source obtains business datum, and the business graphics is shown using business datum and configuration data.
Optionally, the business graphics display unit is based on configuration data and service data information shows the business figure
Table, including:Graph object is generated using business datum and configuration data, the business graphics is shown according to the graph object.
Optionally, the business datum includes:One value for arriving multiple business variables;The business graphics display unit base
The business graphics is shown in configuration data and service data information, including:Using configuration data, according to each business variable
Each business variable is included respectively on the business graphics by value.
Fig. 6 show a kind of realization device of business graphics provided by the embodiments of the present application, applies in server-side, the clothes
Business end, which is safeguarded, has the mark of business graphics corresponding with the business datum source-information and configuration data of the business graphics mark
Relationship, described device include that business graphics mark receiving unit, service data information determination unit and chart data information are sent
Unit, wherein:Business graphics mark receiving unit is used to receive the mark of the business graphics to be shown of client transmission;Business number
It is used to identify corresponding business datum source-information according to the business graphics according to information determination unit and determines service data information;
Chart data information transmitting unit is used to return to service data information to client and the business graphics identifies corresponding configuration
Data Identification is based on business graphics described in the service data information and configuration data presentation of information for client.
Optionally, described device further includes:Configuration data issuance unit, for receiving client with configuration data mark
After the configuration data request of knowledge, the configuration data that there is the configuration data to identify is returned to client.
Optionally, the mark of the business graphics is identified corresponding to two or more configuration datas, and different matches
Setting Data Identification has the predetermined applicable elements of mutual exclusion;The chart data information transmitting unit is specifically used for:It is returned to client
Service data information is returned, and in the business graphics identifies corresponding configuration data mark, meets its predetermined applicable elements
Configuration data identifies.
Optionally, the service data information includes:Business datum;The service data information determination unit is specifically used
In:Business datum is obtained from the business datum source that business data origin information is specified, using the business datum of acquisition as business
Data information.
Optionally, the service data information includes:Business datum source-information;The service data information determination unit
It is specifically used for:Business graphics is identified into corresponding business datum source-information as service data information.
The foregoing is merely the preferred embodiments of the application, not limiting the application, all essences in the application
With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of the application protection god.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus
Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described
There is also other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.