Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and reality
Execute example, the present invention is further elaborated.Only should be appreciated that specific embodiment described herein
Only in order to explain the present invention, it is not intended to limit the present invention.
As it is shown in figure 1, in one embodiment, it is provided that a kind of electronic equipment, this electronic equipment includes leading to
Cross processor, internal memory, storage medium and network interface that system bus connects.Wherein, this electronic equipment
Storage medium storage has operating platform, data base, also storage to have a kind of tabular views generating means.This form
View generation device is used for realizing a kind of tabular views and generates method.The processor of this electronic equipment is configured to
Perform a kind of tabular views and generate method.This electronic equipment can be an independent equipment, or can be
Multiple can interconnected communication electronic equipment composition electronic equipment group, each function of tabular views generating means
Module can be deployed on each electronic equipment in electronic equipment group respectively.This electronic equipment can be desk-top
Computer.
As in figure 2 it is shown, in one embodiment, it is provided that a kind of tabular views generates method, the present embodiment
The electronic equipment being applied in above-mentioned Fig. 1 in this way illustrates.So-called view is a Virtual table,
The form of expression of view is similar with real tables of data, comprises a series of band denominative columns and rows data, but
It is that view does not exist with the data value collection form stored in data base.Tabular views is then based on form
The view set up.The method specifically includes following steps:
Step 202, after receiving tabular views idsplay order, obtains to be shown from tabular views allocation list
The field configuration information of each field of tabular views.
Specifically, it is provided that tabular views display trigger control, thus detecting, this tabular views is shown
When showing the operation of trigger control, trigger tabular views idsplay order.Tabular views display trigger control can be
An option in one button or menu page, tabular views is set up and can be shown in trigger control and " look into
See tabular views " functional interpretation word.
Tabular views allocation list storage has the field configuration information of each field, each field be by some according to
The title of the set of the data item composition of the same data type of certain boundary line delimitation.A word in data base
Section typically refers to the title of the data of certain string in data base, and the field of tabular views to be shown, then it is
Refer to certain row or title of certain row in the tabular views needing to show, specifically use row still row the most true
Fixed.
Field configuration information be configured in advance tabular views to be shown in the attribute of each field.At one
In enforcement, field configuration information includes but not limited to: the type of form, index belonging to field type, field
Mark and display mode etc..
This field during wherein field type refers to tabular views is original index field or parameter word
Section, original index field refers to that achievement data corresponding to this field directly from corresponding form, and is counted
Calculate index field and then refer to that the achievement data corresponding to this field is by the index number of other field in tabular views
Obtain according to calculating.Achievement data refers to the field value in form under corresponding index field.
Form includes index field and two kinds of fields of dimension field, and dimension field is for by the data in form
Carry out operating platform that the field of Classifying Sum, such as running software relied on, dbase, software version,
Webpage title, webpage login time, logging status etc..Index field is then for the dimension word in form
Duan Jinhang statistics to weigh the field of numerical characteristics of form, such as PV (Page View, page browsing amount),
In UV (Unique Visitor, independent visitor), per capita PV, at the appointed time section always log in number, refer to
The number of visiting people in visit capacity in the section of fixing time and at the appointed time section and the ratio etc. logging in number.Here
The appointment time period such as can be one day within or within one week etc..PV refers to that a page is accessed for
Number of times, UV then refers to different, by internet access, the natural person that browses particular webpage.
The type of form belonging to field, refers to be currently needed for being shown that tabular views or conventional statement.Refer to
Mark identifies in order to uniquely to identify an index record in index pond storage table, an index record correspondence one
An index field in individual form, the index field from different forms can be identical, but each of which pair
The index mark answered is different.Display mode ratio is such as whether show according to the former form in affiliated form, refer to
Mark decimal digits when data show, whether show with percents.
Step 204, each field configuration information that traversal gets, for including that field type is original index
First field configuration information of field, obtains this index included by the first field configuration information mark.
It is the first field configuration information by the field configuration information definition that field type is original index field, class
As, below by the field configuration information definition that field type is parameter field be second field configuration letter
Breath, to show differentiation.
The field configuration information of each field in traversal tabular views, the field configuration information to each field
It is respectively processed.Field type is original index field, represents when showing tabular views, in this field
Under, the achievement data directly obtaining respective field from corresponding form shows, without based on obtaining
The achievement data got further is calculated.
Step 206, obtains the index allocation information corresponding with the index mark got from index pond storage table,
And inquire about achievement data according to the report mark included by this index allocation information and index field.
Storage table correspondence storage in index pond has in index mark and index allocation information, referred to as index pond storage table
An index record.In one embodiment, an index record in index pond storage table is represented by
As shown in Table 1:
Table one:
As shown in Table 1, index allocation information is corresponding with index mark, and index allocation information at least includes: institute
Index field in the report mark of genus form and affiliated form, it is also possible to include but not limited to: dimension retrains
Condition and index everyone, alternatively, index allocation information can also include affiliated report name, element mark
When index field meanings, index state and index in knowledge, dimension constraints implication, affiliated form creates
Between.Wherein the value of everyone correspondence of index is ID, for by the index record in index pond storage table
Get up with user-association, represent that corresponding index mark and index allocation information are specific to this user, the most every
Individual user can safeguard the tabular views being specific to oneself.Index state is used for representing that corresponding index identifies institute
The effect of corresponding index, whether such as index is activated, and is used to show that tabular views is also used to display
Index contrasts.
The index allocation information corresponding with the index mark got, this index is got from index pond storage table
Configuration information includes report mark and index field, may determine that the inquiry of report data according to this report mark
Mode, queried access parameter and query configuration information, thus according to obtain report data;And according to this
Index field just can navigate to achievement data concrete in form, it is achieved the inquiry of achievement data.
Report data refers to the data in form, and the inquiry mode of report data includes but not limited to that data base looks into
Inquiry mode or CGI (Common Gateway Interface, CGI(Common gateway interface)) inquiry mode.If looking into
Inquiry mode is data base querying mode, then corresponding queried access parameter includes but not limited to the access of data base
Address, port numbers, database name, database user name and database user password etc..If inquiry mode
For CGI inquiry mode, then corresponding queried access parameter is URL (the Uniform Resoure of CGI
Locator: uniform resource locator).
If inquiry mode is data base querying mode, then the query configuration information of report data includes but not limited to
Query statement, Data Source are tables of data or view.If inquiry mode is CGI inquiry mode, then form
The query configuration information of data can be CGI required parameter.
Step 208, shows according to corresponding first field configuration information the achievement data inquired, with
Generate tabular views.
Achievement data refers to data corresponding under index word section in form, after inquiring achievement data, such as
Inquire after index field is the achievement data under visit capacity, can be according to corresponding first field configuration information wash with watercolours
All row by that analogy, are rendered and show by the string that dye is shown as in tabular views, have been generated as report
Table view.
In one embodiment, can be to the achievement data inquired according to corresponding first field configuration information
Included display mode shows, to generate tabular views.Such as display mode may include whether by
Show according to the former form in affiliated form, achievement data display time decimal digits, whether with percents
Display etc..
Above-mentioned tabular views generates method, is realized by index pond storage table and two tables of tabular views allocation list
Generating tabular views, wherein the storage of tabular views allocation list has the field configuration information of each field to be shown;
Storage table in index pond then stores the index allocation information of the index field from each form, and passes through index
Mark distinguishes the index field of each form.When generating tabular views, traversal tabular views allocation list is deposited
The field configuration information of each field of storage, obtains the index mark wherein included by the first field configuration information,
Thus according to come obtain corresponding index allocation information from index pond storage table, thus believe according to this index allocation
Breath shows after inquiring achievement data, generates tabular views.
As long as so depositing needing the display index allocation information in the index field of tabular views to add index pond
Storage table, it is possible to generate required tabular views according to tabular views allocation list.Deposited by change index pond
Storage table just can change the index field shown by tabular views, and tabular views realizes the lowest with maintenance cost.
As it is shown on figure 3, in one embodiment, this tabular views generates method and also includes selecting from each form
Select index field and write the step of index pond storage table, specifically including following steps:
Step 302, shows the index set of fields of each form respectively.
Specifically, region can be selected in the displayed page setting target field of each form, thus work as user
When checking form, it is possible to show the index field institute structure in current form in this index field selects region
The index set of fields become.
Step 304, after the index field of the index set of fields received for showing selects instruction, according to this
Selective goal field from the index set of fields shown.
Specifically, first index field all of in index set of fields can be shown and be not added with index field
In region, user clicks on this index field of certain index state representation therein and is chosen, by the finger of this selection
Marking-up section removes from being not added with index word section region or hides, and shows in adding index field area.
Until after clicking on ACK button as user and triggering confirmation instruction, being displayed on adding in index field area
All index fields as select index field.
Step 306, generate index allocation information, the index allocation information of generation include select index field and
The report mark of form belonging to the index field selected.
Index allocation information includes report mark and index field, may determine that form number according to this report mark
According to inquiry mode, queried access parameter and query configuration information, thus according to obtain report data;
And just can navigate to achievement data concrete in form according to this index field, it is achieved the inquiry of achievement data.
Step 308, identifies for the index field indicator of distribution selected, and the index of distribution is identified and generates
Index allocation information correspondence write index pond storage table.
Specifically, automatically for the index field indicator of distribution mark selected, can from the beginning of a certain initial value,
Such as from the beginning of 10000, it is incremented by 1 every time and distributes to an index field selected as new index mark.
Index mark is unique, and indexs different for distribution is identified by the identical index field from different forms.
Index mark write corresponding with the index allocation information the generated index pond of the index field selected is stored
Table.The wherein each item in the index allocation information of index mark and generation, can be respectively as index pond
A field value under each field in an index record in storage table.The content of specific targets pond storage table
Can be as shown in above-mentioned table one.
In the present embodiment, user index set of fields to each form can carry out selecting operation, choosing respectively
Select and want to add the index field that tabular views shows, distribute with automatic after generating corresponding index allocation information
Index mark correspondence write index pond storage table.Thus can give birth to quickly and easily according to user's request
Become the tabular views needed for user, improve operation ease.
As shown in Figure 4, in one embodiment, step 302 specifically includes following steps:
Step 402, shows the dimension set of fields of each form respectively.
Specifically, form includes index field and two kinds of fields of dimension field, and dimension field is for by form
In data carry out the field of Classifying Sum, operating platform that such as running software is relied on, dbase,
Software version, webpage title, webpage login time, logging status etc..
In one embodiment, the dimension word of affiliated form can be shown respectively at the displayed page of each form
Duan Jihe.Specifically, when user checks form, can be at the displayed page setting target word of current form
Section selects region, thus shows institute in the dimension set of fields of current form in this index field selects region
Dimension field that is that have or that specify.
For example, with reference to Fig. 5, when user checks current form, can be at the displayed page of current form
Index field select region show dimension constraints select interface, this dimension constraints select interface
Each optional dimension field in the current form of middle displaying, " operating platform ", " the software version in such as Fig. 5
This ", " target pages " and " User Status " etc. be all the dimension field shown.
Step 404, after the dimension field of the dimension set of fields received for showing selects instruction, according to this
From the dimension set of fields shown, select dimension field and set corresponding field value.
Specifically, can be at the dimension field ambient display choice box shown, when user clicks on this choice box
Represent that the dimension field receiving the dimension set of fields for showing selects instruction, thus according to this dimension word
Section selects to instruct the dimension field corresponding to choice box that will choose as selected dimension field.Can also be
Option list is shown, if for empty in option list, representing the dimension word of this displaying around the dimension field shown
Section is the most selected.
Set the field value corresponding with selected dimension field, can display around the dimension field shown
In option list, one field value option of selection is to set corresponding field value, or can also be in dimension field
Display input frame around, obtains the character inputted in input frame as the respective field value set.
For example, with reference to Fig. 5, for the dimension field " operating platform " shown, the choosing shown about
In item list, " Android " is selected, represents that the dimension field of this displaying is selected, and sets its field
Value is " Android ".Option list in Fig. 5 is concealed, when the ad-hoc location clicking on this option list
Time can show whole options, except " Android " in option list, also have " Windows ", " iOS "
Deng the option representing operating platform title.The option list shown can be to show in multiselect, such as Fig. 5
Dimension field " User Status ", multiple options such as " state 1 ", " state 2 " can be selected.
Step 406, according to selected dimension field and corresponding field value dimension constraints.
Specifically, each dimension field has respective Classifying Sum function, selected one or more dimensions
Degree field and corresponding field value are by constituting the further constraint to report data, here by selected dimension
The constraint that field and corresponding field value are constituted is referred to as dimension constraints.
Step 408, shows the index set of fields that dimension constraints is corresponding in affiliated form.
For example, after the dimension constraints selection interface in Fig. 5 is triggered confirmation instruction, trigger such as
The index of Fig. 6 adds interface.This index adds the dimension field of dimension constraints in interface 4,
It is respectively " operating platform ", " software version ", " target pages " and " User Status ", and each dimension word
Field value corresponding to Duan is respectively " Android ", " social software 4.9 editions ", " page 1 " and " state 1 ",
This four dimensions field and corresponding field value dimension constraints thereof.
Operating space 610 can be selected to show that in current form, above-mentioned dimension is about in the index during index adds interface
Index set of fields corresponding to bundle condition.The index set of fields shown is to be retrained with dimension constraints
Report data be associated.User is in index selects the unselected index field area 612 of operating space 610
Clicking on certain index field, this index field can remove from this unselected index field area 612 or hide,
And be illustrated in index select operating space 610 select in index field area 614, until confirm after, perform
Step 304, will select the index field shown in index field area 614 as the index field selected.
The report of form belonging to index field that the index allocation information generated includes selecting, the index field of selection
Table mark and the dimension constraints constituted.And step 206 specifically includes: from index pond, storage table obtains
The index allocation information corresponding with the index mark got, and according to the report included by this index allocation information
Table mark, index field and dimension constraints inquire about achievement data.
Specifically, when generating index allocation information within step 306, the index allocation information of generation is further
Including dimension constraints, so when performing step 206 with inquiry achievement data, will be according to index allocation
Achievement data original in form is screened by dimension constraints in information further, so inquires
Achievement data more accurate, meet user's request.
As it is shown in fig. 7, in one embodiment, this tabular views generates method and also includes and to field type is
The process step of the second field configuration information of parameter field, specifically includes following steps:
Step 702, for including the second field configuration information that field type is parameter field, obtaining should
Calculating coupling index mark included by second field configuration information.
Specifically, the field configuration information of each field in traversal tabular views, the field to each field
Configuration information is respectively processed.If field type is original index field, represent when showing tabular views,
Under this field, the achievement data directly obtaining respective field from corresponding form shows, without
Further to be calculated based on the achievement data got.And the field type for including is calculating refers to
Second field configuration information of marking-up section, represents when showing tabular views, under this field, needs foundation
In form, the achievement data of other field calculates further.Here included by the second field configuration information
Calculating coupling index identifies, and refers to the mark of the index corresponding to achievement data carrying out calculating institute's foundation.
Step 704, identifies institute according to the calculation included by the second field configuration information to calculating coupling index
Corresponding achievement data calculates, it is thus achieved that result of calculation.
Here calculation can be that one or more calculates the achievement data corresponding to coupling index mark
Between function, function here can be the arbitrary function determined according to actual needs, as add and, make poor,
Make business, seek product etc..
For example, if two indices mark is respectively " 10000 " and " 10001 ", another one field class
Type is that the index of the field of parameter field is designated " CAL01 ", and calculates coupling index and be designated
" 10000 " and " 10001 ", calculation is [10000]/[10001].When then performing step 704, will refer to
The achievement data being designated " 10000 " is designated in " 10001 " corresponding achievement data divided by index.
And in the present embodiment, step 208 specifically includes: to the achievement data inquired according to corresponding
One field configuration information shows, to the result of calculation calculated according to corresponding second field configuration information
Show, to generate tabular views.So tabular views will show the index of original index field simultaneously
Data and the result of calculation of parameter field, facilitate user to carry out various data analysis.
In one embodiment, before step 204, also include: in each field configuration information got
In, by the first field configuration information arrangement that field type is original index field of including front, will include
The second field configuration information arrangement that field type is parameter field rear.In the present embodiment, it is considered to
Need according to original index field to parameter field when calculating and obtaining result of calculation, here according to field
Type is ranked up, it is ensured that can directly obtain the data needed for calculating when calculating, and improves and generates report
The efficiency of table view.
As shown in Figure 8, in one embodiment, this tabular views generation method also includes tabular views
Field carries out the step configured, and specifically includes following steps:
Step 802, shows index option list according to index pond storage table.
Specifically, it is provided that tabular views sets up trigger control, thus builds this tabular views detecting
When standing the operation of trigger control, trigger tabular views and set up instruction.Then set up according to the tabular views triggered
Instruction, generates the tabular views configuration page, shows index option list in this tabular views configuration page.
It can be an option in a button or menu page that tabular views sets up trigger control, form
The functional interpretation word that can show " setting up tabular views " in trigger control set up by view.Index option
List includes some optional index options, in one of them index option correspondence index pond storage table
Bar index record, also corresponding index mark.
Step 804, after receiving the selection instruction of index option, selected index choosing from index option list according to this
?.
Specifically, after receiving the index option selection instruction acting on the tabular views configuration page, according to
This index option selects instruction selected index option from index option list.Selected index option correspondence one
Individual unique index identifies.
In one embodiment, every index record in index pond storage table can be shown as a line respectively
Data, referred to as one index option, and corresponding check box is set in every a line, the data often gone include
But it is not limited to report name corresponding to report mark, report mark, dimension constraints etc..Concrete such as Fig. 9
In tabular views configuration the page 900 in selecting index region 902 in display data.User is in index
Chosen area 902 is chosen one or more check box corresponding to index option, and clicks on " addition report
Table view ", it is possible to this index option is added in field configuration region 904.
Step 806, after the index allocation received instruction, generates the index mark of selected index option according to this
Corresponding field configuration information.
Specifically, user can be right in the field configuration region 904 during tabular views configures the page 900
Each selected index option carries out various configuration, after triggering the instruction of corresponding index allocation, thus according to this
Index allocation instruction generates the index of the index option selected with this and identifies corresponding field configuration information.
Specifically, the index option chosen can be deleted or increase operation by user.User can select
Whether one or more field selected in tabular views shows.The index option chosen can be carried out by user
Sequence, so generate tabular views time can according to this sortord display tabular views each field and
Corresponding field value.User can increase the index option that field type is parameter field, now user
Can input or can automatically generate index mark.Preferably, parameter field and original index field
Index mark generating mode be different, be so possible to prevent two kinds of field types index mark occur
Conflict.
For the index option of parameter field type, user needs to input calculation, as reported in Fig. 9
The index in field configuration region 904 in the table view configuration page 900 is designated the index option of CAL01,
If user inputs [10066]/[10065], represent that the field value under this field is index when showing tabular views
The field value being designated under the field of 10066 and index are designated the business of the field value under the field of 10065.
User can also set the field value that whether shows under each field on year-on-year basis and/or chain rate.Current period statistical data
Comparing with last issue, such as in July, 2005, compared with in June, 2005, was chain rate.Same with history
Period compares, and such as in July, 2005, compared with in July, 2004, was named on year-on-year basis.
User can also set the display mode of each field in tabular views, is such as shown as percentage ratio, or
Person is shown as the corresponding index field former form in corresponding form.Display mode can also include decimal
Figure place, title attribute etc..
Step 808, the field configuration information write tabular views allocation list that will generate.
Specifically, when user tabular views configuration the page 900 in field configuration region 904 complete field
After configuration generates field configuration information, the field configuration information write tabular views allocation list that will generate, each
Field configuration information can be distinguished with its unique index mark.
In the present embodiment, user can the word of field in the tabular views that flexible configuration is to be shown according to demand
Section configuration information, it is not necessary to developer gets involved just can realize freely configuring of tabular views, reduces report
Table view realize cost and maintenance cost.
As shown in Figure 10, in one embodiment, step 206 specifically includes following steps:
Step 1002, obtains the index allocation information corresponding with the index mark got from index pond storage table,
And obtain date segment information.
Storage table correspondence storage in index pond has index mark and index allocation information, in index pond storage table
Bar index record is represented by, as shown in above-mentioned table one, repeating no more here.Date segment information is used to determine
The information of the query context of achievement data, this date segment information can prestore, it is also possible to is user
Immediately input when generating tabular views.
Step 1004, according to the report mark included by index allocation information, index field, dimension constraint bar
Part and date segment information structure query argument.
Specifically, report mark and index field included by index allocation information can position certain in form
The field value of field, dimension constraints and date segment information then can be used to filter out further the finger of needs
Mark data, use such information for constructing query argument, and this query argument just can be used to inquire about required finger
Mark data.
Step 1006, according to query argument, uses corresponding with the report mark included by index allocation information
Inquiry mode, inquiry obtains achievement data.
Specifically, can with inquiry mode corresponding to the report mark included by Testing index configuration information, if
Data base querying mode, then can utilize the reference address of configured in advance, port numbers, database name, data
The parameters such as storehouse user name and database user password access data base, thus according to the query argument of structure
Achievement data is obtained from corresponding data base querying.If CGI inquiry mode, then can utilize and join in advance
The parameters such as the URL of the CGI put, access corresponding server by CGI and inquire about acquisition achievement data.
In the present embodiment, when generating tabular views, acquisition can be inquired about refer to by compatible different inquiry mode
Mark data, go for the generation of the tabular views of the form of various Data Source, highly versatile.
As shown in figure 11, in a specific embodiment, this tabular views generates method and specifically includes as follows
Step:
Step 1101, shows the dimension set of fields of each form respectively, is receiving the dimension for showing
After the dimension field of set of fields selects instruction, selected dimension field from the dimension set of fields shown according to this
And set corresponding field value.
Step 1102, according to selected dimension field and corresponding field value dimension constraints, shows
The index set of fields that dimension constraints is corresponding in affiliated form.
Step 1103, after the index field of the index set of fields received for showing selects instruction, according to
With selective goal field from the index set of fields shown.
Step 1104, generate index allocation information, the index allocation information of generation include select index field,
The report mark of form belonging to the index field selected and the dimension constraints of composition.
Step 1105, identifies for the index field indicator of distribution selected, and the index of distribution is identified and generate
Index allocation information correspondence write index pond storage table.
Step 1106, shows index option list according to index pond storage table, receives index option and selects to refer to
After order, selected index option from index option list according to this.
Step 1107, after the index allocation received instruction, generates the index mark of selected index option according to this
Know corresponding field configuration information, and the field configuration information write tabular views allocation list that will generate.
Step 1108, after receiving tabular views idsplay order, obtains to be shown from tabular views allocation list
The field configuration information of each field of tabular views.
Step 1109, each field configuration information that traversal gets.
Step 1110, for including the first field configuration information that field type is original index field, obtains
This index mark included by the first field configuration information.
Step 1111, obtains the index allocation information corresponding with the index mark got from index pond storage table,
And inquire about achievement data according to the report mark included by this index allocation information and index field.
Step 1112, for including the second field configuration information that field type is parameter field, obtains
This calculating coupling index mark included by the second field configuration information.
Step 1113, according to the calculation included by the second field configuration information to calculating coupling index mark
Corresponding achievement data calculates, it is thus achieved that result of calculation.
Step 1114, shows according to corresponding first field configuration information the achievement data inquired,
The result of calculation calculated is shown according to corresponding second field configuration information, to generate tabular views.
As shown in figure 12, in one embodiment, it is provided that a kind of tabular views generating means 1200, have
The tabular views realizing each embodiment above-mentioned generates the function of method.This tabular views generating means 1200 has
Body includes: viewdata acquisition module 1202, achievement data acquisition module 1204 and tabular views display module
1206。
Viewdata acquisition module 1202, for after receiving tabular views idsplay order, from tabular views
Allocation list obtains the field configuration information of each field of tabular views to be shown;It is each that traversal gets
Individual field configuration information, for including the first field configuration information that field type is original index field, obtains
Take this index included by the first field configuration information mark.
Specifically, viewdata acquisition module 1202 can be used for providing tabular views display trigger control, thus
When the operation to this tabular views display trigger control being detected, trigger tabular views idsplay order.Form
View display trigger control can be an option in a button or menu page, and tabular views is set up
The functional interpretation word of " checking tabular views " can be shown in trigger control.
Tabular views allocation list storage has the field configuration information of each field, each field be by some according to
The title of the set of the data item composition of the same data type of certain boundary line delimitation.A word in data base
Section typically refers to the title of the data of certain string in data base, and the field of tabular views to be shown, then it is
Refer to certain row or title of certain row in the tabular views needing to show, specifically use row still row the most true
Fixed.
Field configuration information be configured in advance tabular views to be shown in the attribute of each field.At one
In enforcement, field configuration information includes but not limited to: the type of form, index belonging to field type, field
Mark and display mode etc..
This field during wherein field type refers to tabular views is original index field or parameter word
Section, original index field refers to that achievement data corresponding to this field directly from corresponding form, and is counted
Calculate index field and then refer to that the achievement data corresponding to this field is by the index number of other field in tabular views
Obtain according to calculating.Achievement data refers to the field value in form under corresponding index field.
Form includes index field and two kinds of fields of dimension field, and dimension field is for by the data in form
Carry out operating platform that the field of Classifying Sum, such as running software relied on, dbase, software version,
Webpage title, webpage login time, logging status etc..Index field is then for the dimension word in form
Duan Jinhang statistics to weigh the field of numerical characteristics of form, such as PV, UV, per capita PV, when specifying
Between the visit capacity always logged in number, at the appointed time section in section and the at the appointed time the number of visiting people in section
With the ratio etc. logging in number.Within the appointment time period here such as can be one day or within one week etc..
PV refers to that a page is accessed for number of times, UV then refer to different, by internet access, browse spy
Determine the natural person of webpage.
The type of form belonging to field, refers to be currently needed for being shown that tabular views or conventional statement.Refer to
Mark identifies in order to uniquely to identify an index record in index pond storage table, an index record correspondence one
An index field in individual form, the index field from different forms can be identical, but each of which pair
The index mark answered is different.Display mode ratio is such as whether show according to the former form in affiliated form, refer to
Mark decimal digits when data show, whether show with percents.
Viewdata acquisition module 1202 is additionally operable to travel through the field configuration letter of each field in tabular views
Breath, is respectively processed the field configuration information of each field.
Achievement data acquisition module 1204, right with the index mark got for obtaining from index pond storage table
The index allocation information answered, and look into according to the report mark included by this index allocation information and index field
Ask achievement data.
Field type is original index field, represent show tabular views time, under this field, directly from
The achievement data obtaining respective field in corresponding form shows, without based on the index got
Data are further calculated.Storage table correspondence storage in index pond has index mark and index allocation information,
It is referred to as an index record in index pond storage table.In one embodiment, in index pond storage table
Bar index record is represented by as shown in Table 1, repeating no more here.
Achievement data acquisition module 1204 is right with the index mark got for getting from index pond storage table
The index allocation information answered, this index allocation information includes report mark and index field, according to this form mark
Know and may determine that the inquiry mode of report data, queried access parameter and query configuration information, thus according to it
Obtain report data;And just can navigate to achievement data concrete in form according to this index field, real
The inquiry of existing achievement data.
Report data refers to the data in form, and the inquiry mode of report data includes but not limited to that data base looks into
Inquiry mode or CGI inquiry mode.If inquiry mode is data base querying mode, then corresponding queried access
Parameter include but not limited to the reference address of data base, port numbers, database name, database user name and
Database user password etc..If inquiry mode is CGI inquiry mode, then corresponding queried access parameter is CGI
URL.
If inquiry mode is data base querying mode, then the query configuration information of report data includes but not limited to
Query statement, Data Source are tables of data or view.If inquiry mode is CGI inquiry mode, then form
The query configuration information of data can be CGI required parameter.
Tabular views display module 1206, for joining according to corresponding first field the achievement data inquired
Confidence breath shows, to generate tabular views.
Achievement data refers to data corresponding under index word section in form, and tabular views display module 1206 is being looked into
Ask after achievement data, such as inquire after index field is the achievement data under visit capacity, can be according to accordingly
The first field configuration information render the string being shown as in tabular views, by that analogy, all row are rendered
Show, be generated as tabular views.
In one embodiment, tabular views display module 1206 can be used for the achievement data inquired according to
Display mode included by corresponding first field configuration information shows, to generate tabular views.Such as
Display mode may include whether to show according to the former form in affiliated form, achievement data display time decimal
Figure place, whether show with percents.
Above-mentioned tabular views generating means 1200, by index pond storage table and two tables of tabular views allocation list
Realizing generating tabular views, wherein the storage of tabular views allocation list has the field configuration of each field to be shown
Information;Storage table in index pond then stores the index allocation information of the index field from each form, and leads to
Cross index mark and distinguish the index field of each form.When generating tabular views, traversal tabular views configuration
The field configuration information of each field of storage in table, obtains the finger wherein included by the first field configuration information
Mark mark, thus according to come obtain corresponding index allocation information from index pond storage table, thus refer to according to this
Mark configuration information shows after inquiring achievement data, generates tabular views.
As long as so depositing needing the display index allocation information in the index field of tabular views to add index pond
Storage table, it is possible to generate required tabular views according to tabular views allocation list.Deposited by change index pond
Storage table just can change the index field shown by tabular views, and tabular views realizes the lowest with maintenance cost.
As shown in figure 13, in one embodiment, this tabular views generating means 1200 also includes: index
Pond management module 1201, for showing the index set of fields of each form respectively;Receiving for showing
Index set of fields index field select instruction after, according to this from show index set of fields select to refer to
Marking-up section;Generating index allocation information, the index allocation information of generation includes index field and the selection selected
Index field belonging to the report mark of form;Index field indicator of distribution for selecting identifies, and will distribution
Index mark with generate index allocation information corresponding write index pond store table.
Specifically, management module 1201 in index pond can be used for the displayed page setting target field at each form
Select region, thus when user checks form, it is possible to show current in this index field selects region
The index set of fields that index field in form is constituted.
Index pond management module 1201 can be used for first showing index field all of in index set of fields not
Adding in index field area, user clicks on this index field of certain index state representation therein and is chosen,
The index field of this selection is never added index field area remove or hide, and show and adding index
In field area.Until after clicking on ACK button as user and triggering confirmation instruction, being displayed on adding referring to
All index fields in mark field area are as the index field selected.
Index allocation information includes report mark and index field, may determine that form number according to this report mark
According to inquiry mode, queried access parameter and query configuration information, thus according to obtain report data;
And just can navigate to achievement data concrete in form according to this index field, it is achieved the inquiry of achievement data.
Index pond management module 1201 can be used for automatically for the index field indicator of distribution mark selected, Ke Yicong
A certain initial value starts, and such as from the beginning of 10000, is incremented by 1 every time and distributes to one as new index mark
The index field of individual selection.Index mark is unique, and the identical index field from different forms will distribution
Different index marks.
Index mark write corresponding with the index allocation information the generated index pond of the index field selected is stored
Table.The wherein each item in the index allocation information of index mark and generation, can be respectively as index pond
A field value under each field in an index record in storage table.The content of specific targets pond storage table
Can be as shown in above-mentioned table one.
In the present embodiment, user index set of fields to each form can carry out selecting operation, choosing respectively
Select and want to add the index field that tabular views shows, distribute with automatic after generating corresponding index allocation information
Index mark correspondence write index pond storage table.Thus can give birth to quickly and easily according to user's request
Become the tabular views needed for user, improve operation ease.
In one embodiment, management module 1201 in index pond is additionally operable to show respectively the dimension word of each form
Duan Jihe;After the dimension field of the dimension set of fields received for showing selects instruction, according to this from exhibition
The dimension set of fields shown is selected dimension field and sets corresponding field value;According to selected dimension field
And corresponding field value dimension constraints;Show the finger that dimension constraints is corresponding in affiliated form
Mark set of fields.The index allocation information generated includes belonging to the index field of the index field of selection, selection
The report mark of form and the dimension constraints of composition;Achievement data acquisition module 1204 is additionally operable to from finger
Mark pond storage table obtains the index allocation information corresponding with the index mark got, and according to this index allocation
Report mark, index field and dimension constraints included by information inquire about achievement data.
Specifically, belonging to management module 1201 in index pond can be used for showing respectively at the displayed page of each form
The dimension set of fields of form.Specifically, when user checks form, can be in the displaying of current form
Page setup index field selects region, thus shows the dimension of current form in this index field selects region
Spend dimension field that is all of in set of fields or that specify.
Index pond management module 1201 can be used at the dimension field ambient display choice box shown, when user's point
Represent when hitting this choice box that the dimension field receiving the dimension set of fields for showing selects instruction, thus
According to the dimension field corresponding to the choice box that this dimension field selects instruction to choose as selected dimension word
Section.Option list can also be shown around the dimension field shown, if option list is sky, represent this
The dimension field shown is the most selected.
Set the field value corresponding with selected dimension field, can display around the dimension field shown
In option list, one field value option of selection is to set corresponding field value, or can also be in dimension field
Display input frame around, obtains the character inputted in input frame as the respective field value set.
Each dimension field has respective Classifying Sum function, selected one or more dimension fields with
And field value is by constituting the further constraint to report data accordingly, here by selected dimension field and phase
The constraint that the field value answered is constituted is referred to as dimension constraints.
As shown in figure 14, in one embodiment, this tabular views generating means 1200 also includes: calculate
Module 1203.Viewdata acquisition module 1202 is additionally operable to for including that field type is parameter field
Second field configuration information, obtains this calculating coupling index included by the second field configuration information mark.
Specifically, viewdata acquisition module 1202 is joined for the field traveling through each field in tabular views
Confidence ceases, and is respectively processed the field configuration information of each field.If field type is original index word
Section, represents when showing tabular views, under this field, directly obtains respective field from corresponding form
Achievement data show, further calculated without based on the achievement data got.And
For the second field configuration information that field type is parameter field included, represent and regard at display form
During figure, under this field, need to calculate further according to the achievement data of other field in form.This
In calculating coupling index mark included by the second field configuration information, refer to carry out calculate the index of institute's foundation
Index mark corresponding to data.
Computing module 1203 is for referring to calculating association according to the calculation included by the second field configuration information
Achievement data corresponding to mark mark calculates, it is thus achieved that result of calculation.Here calculation can be one
The function between achievement data corresponding to individual or multiple calculating coupling indexs mark, function here is permissible
The arbitrary function determined according to actual needs, as add and, make poor, make business, seek product etc..
Tabular views display module 1206 is additionally operable to join the achievement data inquired according to corresponding first field
Confidence breath shows, shows the result of calculation calculated according to corresponding second field configuration information,
To generate tabular views.Tabular views so will show achievement data and the calculating of original index field simultaneously
The result of calculation of index field, facilitates user to carry out various data analysis.
In one embodiment, viewdata acquisition module 1202 is additionally operable in each field configuration got
In information, by the first field configuration information arrangement that field type is original index field of including front, will
Including the second field configuration information arrangement that field type is parameter field rear.In the present embodiment,
Foundation original index field is needed when calculating and obtaining result of calculation in view of parameter field, here according to
Field type is ranked up, it is ensured that can directly obtain the data needed for calculating when calculating, and improves raw
Become the efficiency of tabular views.
As shown in figure 15, in one embodiment, this tabular views generating means 1200 also includes: form
View configuration module 1205, for showing index option list according to index pond storage table;Receive index choosing
After item selects instruction, selected index option from index option list according to this;The index allocation instruction received
After, generate the field configuration information that the index mark of selected index option is corresponding according to this;The field that will generate
Configuration information write tabular views allocation list.
Specifically, tabular views configuration module 1205 can be used for providing tabular views to set up trigger control, thus
When the operation that this tabular views is set up trigger control being detected, trigger tabular views and set up instruction.Then
Set up instruction according to the tabular views triggered, generate the tabular views configuration page, at this tabular views configuration page
Face is shown index option list.
It can be an option in a button or menu page that tabular views sets up trigger control, form
The functional interpretation word that can show " setting up tabular views " in trigger control set up by view.Index option
List includes some optional index options, in one of them index option correspondence index pond storage table
Bar index record, also corresponding index mark.
Tabular views configuration module 1205 can be used for receiving the index choosing acting on the tabular views configuration page
After item selects instruction, instruction is selected to select index option from index option list according to this index option.Choosing
Fixed index option corresponding unique index mark.
In one embodiment, every index record in index pond storage table can be shown as a line respectively
Data, referred to as one index option, and corresponding check box is set in every a line, the data often gone include
But it is not limited to report name corresponding to report mark, report mark, dimension constraints etc..
The index option chosen can be deleted or increase operation by user.User can select form to regard
Whether one or more field in figure shows.The index option chosen can be ranked up by user, this
Sample can be according to each field of this sortord display tabular views and corresponding word when generating tabular views
Segment value.User can increase the index option that field type is parameter field, and now user can input
Or index mark can be automatically generated.Preferably, the index mark of parameter field and original index field
The generating mode known is different, is so possible to prevent the index mark of two kinds of field types to clash.
For the index option of parameter field type, user needs to input calculation.User is all right
Set the display mode of each field in tabular views, be such as shown as percentage ratio, or be shown as corresponding
The index field former form in corresponding form.Display mode can also include decimal digits, title attribute
Deng.
In the present embodiment, user can the word of field in the tabular views that flexible configuration is to be shown according to demand
Section configuration information, it is not necessary to developer gets involved just can realize freely configuring of tabular views, reduces report
Table view realize cost and maintenance cost.
In one embodiment, achievement data acquisition module 1204 is additionally operable to obtain from index pond storage table and obtain
The index allocation information of the index mark correspondence got, and obtain date segment information;According to index allocation information
Included report mark, index field, dimension constraints and date segment information structure query argument;Root
According to query argument, using the inquiry mode corresponding with the report mark included by index allocation information, inquiry obtains
Obtain achievement data.
Storage table correspondence storage in index pond has index mark and index allocation information, in index pond storage table
Bar index record is represented by, as shown in above-mentioned table one, repeating no more here.Date segment information is used to determine
The information of the query context of achievement data, this date segment information can prestore, it is also possible to is user
Immediately input when generating tabular views.
Report mark included by index allocation information and index field can position the word of certain field in form
Segment value, dimension constraints and date segment information then can be used to filter out further the achievement data of needs,
Using such information for constructing query argument, this query argument just can be used to inquire about required achievement data.
The report mark that achievement data acquisition module 1204 can be used for included by Testing index configuration information is corresponding
Inquiry mode, if data base querying mode, then can utilize the reference address of configured in advance, port numbers,
The parameters such as database name, database user name and database user password access data base, thus according to
The query argument of structure obtains achievement data from corresponding data base querying.If CGI inquiry mode, then
The parameters such as the URL that can utilize the CGI of configured in advance, access corresponding server by CGI and look into
Ask and obtain achievement data.
In the present embodiment, when generating tabular views, acquisition can be inquired about refer to by compatible different inquiry mode
Mark data, go for the generation of the tabular views of the form of various Data Source, highly versatile.
With reference to Figure 16, by a specific embodiment, above-mentioned tabular views generating means 1200 is described below
The operation principle of modules.Wherein, index pond management module 1201 is for showing the dimension of each form respectively
Degree set of fields, after the dimension field of the dimension set of fields received for showing selects instruction, according to this
From the dimension set of fields shown, select dimension field and set corresponding field value;According to selected dimension
Field and corresponding field value dimension constraints, show that dimension constraints is corresponding in affiliated form
Index set of fields.
Index pond management module 1201 is additionally operable to receiving the index field for the index set of fields shown
After selecting instruction, selective goal field from the index set of fields shown according to this;Generate index allocation information,
The form mark of form belonging to index field that the index allocation information generated includes selecting, the index field of selection
The dimension constraints known and constitute;Index field indicator of distribution for selecting identifies, and the finger that will distribute
Mark mark write corresponding with the index allocation information generated index pond storage table.
Tabular views configuration module 1205, for showing index option list according to index pond storage table, receives
After index option selects instruction, selected index option from index option list according to this;The index received is joined
After putting instruction, generate the field configuration information that the index mark of selected index option is corresponding according to this, and will be raw
The field configuration information write tabular views allocation list become.
After viewdata acquisition module 1202 is used for receiving tabular views idsplay order, configure from tabular views
Table obtains the field configuration information of each field of tabular views to be shown;Each word that traversal gets
Section configuration information;For including the first field configuration information that field type is original index field, obtaining should
Index mark included by first field configuration information;For include that field type is parameter field
Two field configuration information, obtain this calculating coupling index included by the second field configuration information mark.
Achievement data acquisition module 1204 is corresponding with the index mark got for obtaining from index pond storage table
Index allocation information, and inquire about according to the report mark included by this index allocation information and index field
Achievement data.
Computing module 1203 is for referring to calculating association according to the calculation included by the second field configuration information
Achievement data corresponding to mark mark calculates, it is thus achieved that result of calculation.
Tabular views display module 1206 is used for the achievement data inquired according to corresponding first field configuration
Information shows, shows the result of calculation calculated according to corresponding second field configuration information,
To generate tabular views.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method,
Can be by computer program and complete to instruct relevant hardware, described program can be stored in a calculating
In machine read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.
Wherein, described storage medium can be magnetic disc, CD or read-only store-memory body (Read-Only Memory,
The non-volatile memory medium such as ROM), can be maybe random store-memory body (Random Access Memory,
RAM) etc..
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed,
But therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that, for this area
Those of ordinary skill for, without departing from the inventive concept of the premise, it is also possible to make some deformation and
Improving, these broadly fall into protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be with appended
Claim is as the criterion.