Summary of the invention
Fundamental purpose of the present invention is to provide a kind of customization index disposal route based on analytical database and device, unifies problem difficult in maintenance to solve in prior art to customization index.
To achieve these goals, according to an aspect of the present invention, a kind of customization index disposal route based on analytical database is provided.
Customization index disposal route based on analytical database according to the present invention comprises: determine the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index; Customize index according to waiting and wait to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index; And according to establishment instruction create in analytical database wait customize index.
Further, after determining the satellite information waiting to customize index and treat customization index, to generate according to the satellite information waiting to customize index and wait to customize index and before waiting to customize the corresponding establishment instruction of index, the method also comprises: create allocation list, wherein, allocation list is for storing the satellite information waiting to customize index and wait to customize index; Customize index by waiting and wait that the satellite information customizing index is stored to allocation list, customize index according to waiting and treat that the satellite information generation of customization index creates instruction accordingly and comprises: receive query statement, wherein, query statement is be used to indicate the instruction inquired about in allocation list and wait to customize index and wait the satellite information customizing index; In allocation list, the satellite information waiting to customize index and wait to customize index is inquired about according to query statement; And treat customization index according to what inquire and wait that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index.
Further, in analytical database, create customization index according to establishment instruction to comprise: customize index according to waiting and treat that the satellite information of customization index creates instruction accordingly and determines to create the respective rule treating customization index, wherein, respective rule comprises the index group of specifying customization index to store in analytical database; And wait to customize the respective rule of index and create according to creating in analytical database and wait to customize index.
Further, after creating in analytical database according to establishment instruction and treating customization index, the method also comprises: receive and add instruction, and wherein, adding instruction is be used to indicate the instruction of customization index added and need to add; The customization index that needs add is determined according to adding instruction; Receive update instruction, wherein, update instruction is the instruction of the customization index be used to indicate in the customization index replacement analysis database that adds as required; And according to the customization index in update instruction replacement analysis database.
Further, comprise according to the customization index in update instruction replacement analysis database: the customization index judging whether to have stored needs interpolation in analytical database; If stored the customization index needing to add in analytical database, upgrade needing the customization index of adding; And if do not store in analytical database need add customization index, by need add customization index be stored in analytical database.
To achieve these goals, according to a further aspect in the invention, a kind of customization index treating apparatus based on analytical database is provided.
Customization index treating apparatus based on analytical database according to the present invention comprises: the first determining unit, for determining the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index; Generation unit, for customizing index according to waiting and wait to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index; And first creating unit, wait to customize index for creating in analytical database according to establishment instruction.
Further, this device also comprises: the second creating unit, and for creating allocation list, wherein, allocation list is for storing the satellite information waiting to customize index and wait to customize index; Storage unit, for customizing index by waiting and waiting that the satellite information customizing index is stored to allocation list, generation unit also comprises: receiver module, for receiving query statement, wherein, query statement is be used to indicate the instruction inquired about in allocation list and wait to customize index and wait the satellite information customizing index; Enquiry module, for inquiring about the satellite information waiting to customize index and wait to customize index in allocation list according to query statement; And generation module, for treating customization index according to what inquire and wait that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index.
Further, first creating unit comprises: determination module, for customizing index according to waiting and treat that the satellite information of customization index creates instruction accordingly and determines to create the respective rule waiting to customize index, wherein, respective rule comprises the index group of specifying customization index to store in analytical database; And creation module, for waiting to customize the respective rule of index and create according to creating in analytical database and wait to customize index.
Further, this device also comprises: the first receiving element, and for receiving interpolation instruction, wherein, adding instruction is be used to indicate the instruction added and need the customization index of adding; Second determining unit, for determining according to adding instruction the customization index that needs add; Second receiving element, for receiving update instruction, wherein, update instruction is the instruction of the customization index be used to indicate in the customization index replacement analysis database that adds as required; And updating block, for according to the customization index in update instruction replacement analysis database.
Further, updating block comprises: judge module, for judging whether to have stored in analytical database the customization index needing to add; Update module, for having stored the customization index needing to add in analytical database, upgrades needing the customization index of adding; And memory module, for not storing the customization index needing to add in analytical database, be stored to needing the customization index of adding in analytical database.
By the present invention, adopt following steps: determine the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index; Customize index according to waiting and wait to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index; And according to establishment instruction create in analytical database wait customize index.By the present invention, create in analytical database and wait to customize index, thus can unify to safeguard to customization index, solve in prior art and problem difficult in maintenance is unified to customization index.
Embodiment
It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.Below with reference to the accompanying drawings and describe the present invention in detail in conjunction with the embodiments.
The application's scheme is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the embodiment of the application's part, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
It should be noted that, term " first ", " second " etc. in the instructions of the application and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged, in the appropriate case so that the embodiment of the application described herein.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Fig. 1 is the process flow diagram of the customization index disposal route based on analytical database according to a first embodiment of the present invention.As shown in Figure 1, the method comprises following step S101 to step S103:
Step S101, determines the satellite information waiting to customize index and wait to customize index.
Determine the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, wait to customize the satellite information of index comprise wait to customize index definition expression formula, this treats information such as the customization Customs Assigned Number of index, the title of this customization index etc.
Step S102, customizes index according to waiting and waits to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index.
Customize index according to waiting and wait to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index.Particularly, according to SQL query statement, inquire the above-mentioned satellite information waiting to customize index and wait to customize index determined.The MDX being spliced into user-defined counter according to the information inquired creates statement, namely creates instruction.
Such as, determine and treat that customization index is valid order validorders, this wait customize index specific definition for ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]), the MDX generating user-defined counter according to information such as the specific definitions of validorders and validorders creates statement and is:
CREATE MEMBER CURRENTCUBE. [Measures]. and [ValidOrders] AS ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]), VISIBLE=1, DISPLAY_FOLDER='Customization';
It should be noted that, [Measures] above. what [ValidOrders] represented is the title waiting to customize index, AS ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]) what represent is the specific definition waiting to customize index, can be the correlation calculation result of the arbitrary function supported in MDX language, last Customization represent this wait to customize index leave the position of index group in.
Step S103, creates according to establishment instruction and waits to customize index in analytical database.
Create in analytical database according to establishment instruction and wait to customize index.Create automatically in analytical database according to the establishment statement (establishment instruction) of above-mentioned generation and wait to customize index.
Particularly, in analytical database, create customization index according to establishment instruction to comprise: customize index according to waiting and treat that the satellite information of customization index creates instruction accordingly and determines to create the respective rule treating customization index, wherein, respective rule comprises the index group of specifying customization index to store in analytical database; And wait to customize the respective rule of index and create according to creating in analytical database and wait to customize index.
Such as, determine and treat that customization index is valid order validorders, this wait customize index specific definition for ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]), the MDX generating user-defined counter according to information such as the specific definitions of validorders and validorders creates statement and is:
CREATE MEMBER CURRENTCUBE. [Measures]. and [ValidOrders] AS ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]), VISIBLE=1, DISPLAY_FOLDER='Customization';
The respective rule that customization index determined to treat in statement is created according to above-mentioned MDX.Such as, [Measures] above. what [ValidOrders] represented is the title waiting to customize index, AS ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]) what represent is the specific definition waiting to customize index, can be the correlation calculation result of the arbitrary function supported in MDX language, last Customization represent this treat customization index leave the respective rule such as the position of index group in.Respective rule according to creating validorders creates validorders in analytical database.
Preferably, in order to realize adding customization index of intelligence, the embodiment of the present invention provide based in the customization index disposal route of analytical database, according to establishment instruction create in analytical database treat customization index after, the method also comprises: receive and add instruction, wherein, adding instruction is be used to indicate the instruction added and need the customization index of adding; The customization index that needs add is determined according to adding instruction; Receive update instruction, wherein, update instruction is the instruction of the customization index be used to indicate in the customization index replacement analysis database that adds as required; And according to the customization index in update instruction replacement analysis database.
If user needs newly to add customization index, adding instruction by receiving, determining the customization index needing to add; According to the customization index that these needs add, the customization index in analytical database is upgraded.Thus achieve intelligence customization index is added.
Preferably, comprise according to the customization index in update instruction replacement analysis database: the customization index judging whether to have stored needs interpolation in analytical database; If stored the customization index needing to add in analytical database, upgrade needing the customization index of adding; And if do not store in analytical database need add customization index, by need add customization index be stored in analytical database.
By whether having stored the customization index needing to add in discriminatory analysis database, different schemes has been selected to upgrade the customization index in analytical database.If stored the customization index needing to add in analytical database, upgrade needing the customization index of adding; If do not store the customization index needing to add in analytical database, will the customization index of adding be needed to be stored in analytical database, the customization index being about to need to add be inserted in analytical database.Ensure that adding the customization index needing to add in analytical database.
The customization index disposal route based on analytical database that the embodiment of the present invention provides, by determining the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index; Customize index according to waiting and wait to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index; And according to establishment instruction create in analytical database wait customize index, create in analytical database wait customize index, thus can to customization index unify safeguard, solve in prior art to customization index unify problem difficult in maintenance.
Fig. 2 is the process flow diagram of the customization index disposal route based on analytical database according to a second embodiment of the present invention.Fig. 2 can as a kind of preferred implementation embodiment illustrated in fig. 1.As shown in Figure 2, the method comprises following step S201 to step S208:
Step S201, determines the satellite information waiting to customize index and wait to customize index, and wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index.
This step, with step S101, repeats no more here.
Step S202, creates allocation list.
Create allocation list, wherein, allocation list is for storing the satellite information waiting to customize index and wait to customize index.At least store in this allocation list and wait to customize index name, Customs Assigned Number, treat the information such as customization index definition expression formula.
Step S203, customizes index by waiting and waits that the satellite information customizing index is stored to allocation list.
By creating allocation list, customizing index by waiting and waiting to customize in the satellite information stored configuration table of index.
Step S204, customizes index according to waiting and waits to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index.
This step, with step S102, repeats no more here.
Step S205, receives query statement.
Receive query statement, wherein, query statement is be used to indicate the instruction inquired about in allocation list and wait to customize index and wait the satellite information customizing index.
Step S206, inquires about the satellite information waiting to customize index and wait to customize index in allocation list according to query statement.
Step S207, treats customization index according to what inquire and waits that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index.
Treat customization index according to what inquire in allocation list and wait that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index.
Such as, what inquire in allocation list treats that customization index is valid order validorders, this wait customize index specific definition for ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]), the MDX generating user-defined counter according to information such as the specific definitions of validorders and validorders creates statement and is:
CREATE MEMBER CURRENTCUBE. [Measures]. and [ValidOrders] AS ([ECommerce]. [OrderStatus]. [paying], [Measures]. [TotalOrders]), VISIBLE=1, DISPLAY_FOLDER='Customization'
Step S208, creates according to establishment instruction and waits to customize index in analytical database.
This step, with step S103, repeats no more here.
The customization index disposal route based on analytical database that the embodiment of the present invention provides, by determining the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index; Create allocation list, wherein, allocation list is for storing the satellite information waiting to customize index and wait to customize index; Customize index by waiting and wait that the satellite information customizing index is stored to allocation list, customize index according to waiting and wait that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index; Receive query statement, wherein, query statement is be used to indicate the instruction inquired about in allocation list and wait to customize index and wait the satellite information customizing index; In allocation list, the satellite information waiting to customize index and wait to customize index is inquired about according to query statement; Treat customization index according to what inquire and wait that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index; Create in analytical database according to establishment instruction and wait to customize index, create in analytical database and wait to customize index, thus can unify to safeguard to customization index, solve in prior art and problem difficult in maintenance is unified to customization index.
It should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
The embodiment of the present invention additionally provides a kind of customization index treating apparatus based on analytical database, it should be noted that, the customization index treating apparatus based on analytical database of the embodiment of the present invention may be used for performing that the embodiment of the present invention provides for the customization index disposal route based on analytical database.Below the customization index treating apparatus based on analytical database that the embodiment of the present invention provides is introduced.
Fig. 3 is the schematic diagram of the customization index treating apparatus based on analytical database according to the embodiment of the present invention.As shown in Figure 3, this device comprises: the first determining unit 10, generation unit 20 and the first creating unit 30.
First determining unit 10, for determining the satellite information waiting to customize index and wait to customize index, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index.
Preferably, this first creating unit comprises: determination module, for customizing index according to waiting and treat that the satellite information of customization index creates instruction accordingly and determines to create the respective rule waiting to customize index, wherein, respective rule comprises the index group of specifying customization index to store in analytical database; And creation module, for waiting to customize the respective rule of index and create according to creating in analytical database and wait to customize index.
Generation unit 20, for customizing index according to waiting and wait to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index.
First creating unit 30, waits to customize index for creating in analytical database according to establishment instruction.
The customization index disposal route based on analytical database that the embodiment of the present invention provides, the satellite information waiting to customize index and wait to customize index is determined by the first determining unit 10, wherein, wait that customizing index is the user-defined counter needing to create, satellite information comprises the definition expression formula waiting to customize index; Generation unit 20 customizes index according to waiting and waits to customize the satellite information generation of index and wait to customize the corresponding establishment instruction of index; And first creating unit 30 according to establishment instruction create in analytical database wait customize index, create in analytical database and wait to customize index, thus can unify to safeguard to customization index, solve in prior art and problem difficult in maintenance is unified to customization index.
Preferably, the embodiment of the present invention provide based in the customization index treating apparatus of analytical database, this device also comprises: the second creating unit, and for creating allocation list, wherein, allocation list is waited to customize index and wait to customize the satellite information of index for storing; Storage unit, for customizing index by waiting and waiting that the satellite information customizing index is stored to allocation list, generation unit also comprises: receiver module, for receiving query statement, wherein, query statement is be used to indicate the instruction inquired about in allocation list and wait to customize index and wait the satellite information customizing index; Enquiry module, for inquiring about the satellite information waiting to customize index and wait to customize index in allocation list according to query statement; And generation module, for treating customization index according to what inquire and wait that the satellite information customizing index generates and waits to customize the corresponding establishment instruction of index.
Preferably, the embodiment of the present invention provide based in the customization index treating apparatus of analytical database, this device also comprises: the first receiving element, and for receiving interpolation instruction, wherein, adding instruction is be used to indicate the instruction of customization index added and need to add; Second determining unit, for determining according to adding instruction the customization index that needs add; Second receiving element, for receiving update instruction, wherein, update instruction is the instruction of the customization index be used to indicate in the customization index replacement analysis database that adds as required; And updating block, for according to the customization index in update instruction replacement analysis database.Preferably, this updating block also comprises: judge module, for judging whether to have stored in analytical database the customization index needing to add; Update module, for having stored the customization index needing to add in analytical database, upgrades needing the customization index of adding; And memory module, for not storing the customization index needing to add in analytical database, be stored to needing the customization index of adding in analytical database.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed client, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprises all or part of step of some instructions in order to make a computer equipment (can be personal computer, server or the network equipment etc.) perform method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.