Detailed description of the invention
The embodiment of DETAILED DESCRIPTION The present application below, the example of described embodiment is shown in the drawings, wherein from start to finish identical orSimilar label represents same or similar element or has the element of identical or similar functions. Below by what be described with reference to the drawingsEmbodiment is exemplary, only for explaining the application, and can not be interpreted as the restriction to the application.
Describe according to the business diagnosis method and apparatus of the embodiment of the present application below with reference to accompanying drawing.
Fig. 1 is according to the flow chart of the business diagnosis method of an embodiment of the application.
As shown in Figure 1, according to the task analyzer of the embodiment of the present application, comprising:
S101, the service feature during according to business diagnosis, determines index set, index set comprises at least one index.
Wherein, the login of the such as execution in ecommerce shopping of business diagnosis, place an order, the operation such as payment.
Service feature is the context of business diagnosis, all information that can obtain in the time of a business diagnosis, for example user nameClaim class of subscriber, shopping classification, the type of merchandise, commodity price etc.
Index refers to calculative data cell in business diagnosis process, for example Payment Amount, product identification information, buyerIdentification information etc.
Each service feature can corresponding at least one index, and the service feature during therefore according to business diagnosis, can determine index set.Particularly, can be according to the service feature of setting up in advance and the corresponding relation of index set, the service feature pair while obtaining with business diagnosisThe index set of answering, wherein, corresponding relation is to determine after the use of service feature and index is added up.
Wherein, the corresponding relation of service feature and index set can be set up by the following method:
In business diagnosis process, carry out indicator-specific statistics based on specific service feature respectively, add up the process in business diagnosisIn, the access times of each index of use and the access times of certain service features, then according to the access times of each indexObtain the frequency of utilization (use of frequency of utilization=index A of index A time of each index with the access times of certain service featuresThe access times of number/specific service feature), and the index that frequency of utilization is greater than default threshold value is put into this certain service featuresIn corresponding index set, set up thus the corresponding relation of service feature and index set. For example, default threshold value can be made as 90%.
For example, as shown in table 1, for according to the list of the service feature of an embodiment of the application and index set corresponding relation.
Table 1
Service feature |
Index set |
A+B |
b,d,e,f |
C+B |
a,d,e,f |
C+D |
a,c |
For instance, in the time that Xiao Wang buys a pair of shoes, the process of business diagnosis is as follows:
First obtain the context of business diagnosis, all information that can obtain when this is analyzed, for example user's name, userClassification, shopping classification, the type of merchandise, commodity price etc.
Then business of assembling feature, particularly, definition that can be based on statistics dimension, according to the parameter of Xiao Wang input, obtains businessBe characterized as " buyer+shoes ", then can obtain index set " commodity price, commodity classification, user under this service featureMobile phone, user balance ".
S102, obtains the basic data of index, and basic data is merged to duplicate removal.
Wherein, basic data is the data for calculating to obtain index. Different indexs can be by different basic datasCalculate, certainly, wherein two or more indexs also can calculate by same basic data. Thereby, obtaining fingerIn target basic data, the basic data of repetition may be there is, duplicate removal need to be merged.
For instance, if for the service feature in table 1 " A+B ", corresponding index set comprises " b, d, e, f " fourIndividual index, and index b and index f need to calculate acquisition by basic data data1, index d is calculated and is obtained by basic data data2, index e is calculated and is obtained by basic data data3, therefore concerning service feature " A+B ", and the basis of its corresponding indexData obtain data1, data2, data3 after merging duplicate removal.
S103, concurrent invocation is preserved the system that merges the basic data after duplicate removal, obtains the basic data merging after duplicate removal.
In the application's a embodiment, the basic data merging after duplicate removal may be kept at respectively in different systems, therebyCan call the system that merges the basic data after duplicate removal of preserving by RPC, to obtain the base merging after duplicate removal from these systemsPlinth data.
For instance, if basic data data1, data2, data3 is stored in respectively system S1, in S2 and S3, can be alsoSend out calling system S1, S2 and S3, to obtain basic data data1, data2, data3. Thereby call the time of basic dataFor f (data1), f (data2), the maximum in f (data3).
S104, the basic data being combined after duplicate removal is carried out concurrent, obtains index and is kept at this locality.
For instance, to basic data data1, data2, data3 carries out concurrent, carries out simultaneously data1 is carried out toOne calculate to obtain index b, to data1 carry out second move to obtain index d, to data2 calculate to obtain index e,Data3 is calculated to obtain to the process of index f, thus according to the time of basic data parameter be g (b), g (d), g (e),Maximum in g (f).
S105, in the time of business diagnosis, preferentially obtains the index needing from this locality.
Thereby, with respect to just calling respectively correspondence in conventional art in the time that needs calculate corresponding index by basic data at every turnSystem obtain basic data, and calculate respectively corresponding index, by the multiple systems of concurrent invocation and concurrentCalculate the system call time in whole business diagnosis process is reduced to by f (data1)+f (data2)+f (data3)+f (data1)Maximum in f (data1), f (data2), f (data3), the index computing time in whole business diagnosis process byG (b)+g (d)+g (e)+g (f) is reduced to the maximum in g (b), g (d), g (e), g (f).
Certainly, in the time of business diagnosis, also need not in the time of local index, can call and store this not at local finger by RPCThe system of target basic data, to obtain corresponding basic data, and calculates to obtain this index according to basic data.
Thereby, the business diagnosis method of the embodiment of the present application, the service feature during according to business diagnosis, determines index set, and obtainsFetching mark is concentrated the basic data of index, and continues to merge after duplicate removal, and what concurrent invocation was preserved the basic data that merges after duplicate removal isSystem has obtained corresponding basic data, then to the basic data concurrent obtaining to obtain corresponding index, and be kept at thisGround, preferentially to obtain the index needing when the business diagnosis from this locality, thereby based on this to the statistics of service feature and index withAnd the layering of data calculating, optimize business diagnosis method, effectively reduce system call and stand-by period, thereby improved beSystem responding ability and business diagnosis efficiency.
In the application's embodiment, can be according to the service condition of service feature in business diagnosis process and the service condition of index moreThe access times of new business feature and the access times of index, thus be updated in the index that uses in this business diagnosis processFrequency of utilization, and the corresponding relation of New Set and service feature more. Thereby, carry out industry in the preferential index needing of obtaining from this localityAfter business is analyzed, also comprise the flow chart of the corresponding relation of renewal service feature as shown in Figure 2 and index set, as shown in Figure 2,The process of upgrading the corresponding relation of service feature and index set, comprising:
S201, obtains the index needing and carries out business diagnosis from this locality, by the access times increase of service feature once, and willThe access times increase of index once.
S202, according to the access times renewal service feature after service feature and index renewal and the corresponding relation of index set.
Particularly, the access times after upgrading according to service feature and the index access times after upgrading calculate and recalculate indexFrequency of utilization, if this frequency of utilization is greater than default threshold value A, keeps the corresponding relation of service feature and index set constant,If this frequency of utilization is less than default another threshold value B (threshold value B is less than or equal to threshold value A), by this index from industryIn index set corresponding to business feature, delete. For instance, threshold value A can be made as 90%, and threshold value B can be made as 50%.
Further, the frequency of utilization renewal process of index also can comprise the following steps:
S203 also needs not in the time of local index in the time of business diagnosis, while determining business diagnosis, uses not in local index,And by the access times increase of the index using once.
The index using in the time of business diagnosis comprises not in the time of local index, can first determine these indexs, for example,When business diagnosis, use index a, b, c, d, e, and local index comprises b, and d, e, f, can determine business diagnosisTime what use is not a and c in local index, and by the access times increase of index a and c once.
S204, according to the access times of index and the access times of service feature that use, obtains the frequency of utilization of the index using.
S205, in the time that frequency of utilization is greater than default threshold value, adds the index of use in the index set corresponding with service feature.
Thus, can real-time update service feature and the corresponding relation of index set, thus upgrade local index set, further carryThe high efficiency of business diagnosis, and index lower frequency of utilization is deleted from this locality, internal memory and resource saved.
Fig. 3 is the flow chart of the business diagnosis method of another embodiment of the application.
As shown in Figure 3, this business diagnosis method, comprising:
S301, obtains the statistics dimension of setting up in advance.
Wherein, statistics dimension is the standard for determining the service feature using when business diagnosis. For instance, set up and use in advanceThree statistics dimensions of purchase classification of the sex at family, user's login mode and user. User's service feature corresponding to sex canTo be man or female, user's service feature corresponding to login mode can be the login of PC (Personalcomputer) end or moveMoving client login, user's service feature corresponding to purchase classification can be clothes, footwear, food or washing product etc.
S302, the parameter of inputting during according to business diagnosis, determines the service feature in statistics dimension, so that true according to service featureSurely the index set that need to obtain, index set comprises at least one index.
Wherein, the login of the such as execution in ecommerce shopping of business diagnosis, place an order, the operation such as payment.
Service feature is the context of business diagnosis, all information that can obtain in the time of a business diagnosis, for example user nameClaim class of subscriber, shopping classification, the type of merchandise, commodity price etc.
The parameter of inputting can be according to business diagnosis time is determined the feature of business in corresponding statistics dimension, for example, and for above-mentioned userSex, user's login mode and three statistics dimensions of user's purchase classification, according to the definite service feature of parameter of inputCan be respectively female, PC end, boots.
Index refers to calculative data cell in business diagnosis process, for example Payment Amount, product identification information, buyerIdentification information etc.
Each service feature can corresponding at least one index, and the service feature during therefore according to business diagnosis, can determine index set.Particularly, can be according to the service feature of setting up in advance and the corresponding relation of index set, the service feature pair while obtaining with business diagnosisThe index set of answering, wherein, corresponding relation is to determine after the use of service feature and index is added up.
Wherein, the corresponding relation of service feature and index set can be set up by the following method:
In the process of business diagnosis, carry out indicator-specific statistics based on specific service feature respectively, add up the mistake in business diagnosisCheng Zhong, the access times of each index of use and the access times of certain service features, then according to the use of each index timeThe access times of number and certain service features obtain the frequency of utilization (use of frequency of utilization=index A of index A of each indexThe access times of number of times/specific service feature), and the index that frequency of utilization is greater than default threshold value is put into this specific transactions spyLevy in corresponding index set, set up thus the corresponding relation of service feature and index set. For instance, default threshold value can be made as90%。
For example, as shown in table 1, for according to the list of the service feature of an embodiment of the application and index set corresponding relation.
For instance, in the time that Xiao Wang buys a pair of shoes, the process of business diagnosis is as follows:
First obtain the context of business diagnosis, all information that can obtain when this is analyzed, for example user's name, userClassification, shopping classification, the type of merchandise, commodity price etc.
Then business of assembling feature, particularly, definition that can be based on statistics dimension, according to the parameter of Xiao Wang input, obtains businessBe characterized as " buyer+shoes ", then can obtain index set " commodity price, commodity classification, user under this service featureMobile phone, user balance ".
S303, obtains the basic data of index, and basic data is merged to duplicate removal.
Wherein, basic data is the data for calculating to obtain index. Different indexs can be by different basic datasCalculate, certainly, wherein two or more indexs also can calculate by same basic data. Thereby, obtaining fingerIn target basic data, the basic data of repetition may be there is, duplicate removal need to be merged.
For instance, if for the service feature in table 1 " A+B ", corresponding index set comprises " b, d, e, f " fourIndividual index, and index b and index f need to calculate acquisition by basic data data1, index d is calculated and is obtained by basic data data2, index e is calculated and is obtained by basic data data3, therefore concerning service feature " A+B ", and the basis of its corresponding indexData obtain data1, data2, data3 after merging duplicate removal.
S304, concurrent invocation is preserved the system that merges the basic data after duplicate removal, obtains the basic data merging after duplicate removal.
In the application's a embodiment, the basic data merging after duplicate removal may be kept at respectively in different systems, therebyCan call the system that merges the basic data after duplicate removal of preserving by RPC, to obtain the base merging after duplicate removal from these systemsPlinth data.
For instance, if basic data data1, data2, data3 is stored in respectively system S1, in S2 and S3, can be alsoSend out calling system S1, S2 and S3, to obtain basic data data1, data2, data3. Thereby call the time of basic dataFor f (data1), f (data2), the maximum in f (data3).
S305, the basic data being combined after duplicate removal is carried out concurrent, obtains index and is kept at this locality.
For instance, to basic data data1, data2, data3 carries out concurrent, carries out simultaneously data1 is carried out toOne calculate to obtain index b, to data1 carry out second move to obtain index d, to data2 calculate to obtain index e,Data3 is calculated to obtain to the process of index f, thus according to the time of basic data parameter be g (b), g (d), g (e),Maximum in g (f).
S306, in the time of business diagnosis, preferentially obtains the index needing from this locality.
Thereby, with respect to just calling respectively correspondence in conventional art in the time that needs calculate corresponding index by basic data at every turnSystem obtain basic data, and calculate respectively corresponding index, by the multiple systems of concurrent invocation and concurrentCalculate the system call time in whole business diagnosis process is reduced to by f (data1)+f (data2)+f (data3)+f (data1)Maximum in f (data1), f (data2), f (data3), the index computing time in whole business diagnosis process byG (b)+g (d)+g (e)+g (f) is reduced to the maximum in g (b), g (d), g (e), g (f).
Certainly, in the time of business diagnosis, also need not in the time of local index, can call and store this not at local finger by RPCThe system of target basic data, to obtain corresponding basic data, and calculates to obtain this index according to basic data.
The business diagnosis method of the embodiment of the present application, the parameter of inputting during according to business diagnosis is determined the statistics dimension of setting up in advanceOn service feature, to determine the index set that need to obtain, thereby can be more accurately the index needing in business diagnosis be preservedTo local, further reduce system call and stand-by period, improve system responses ability and business diagnosis efficiency.
In order to realize above-described embodiment, the application also proposes a kind of task analyzer.
Fig. 4 is according to the structural representation of the task analyzer of an embodiment of the application.
As shown in Figure 4, according to the task analyzer of the embodiment of the present application, comprising: the first determination module 10, acquisition module20, calling module 30, computing module 40 and business diagnosis module 50.
Particularly, the service feature of the first determination module 10 when according to business diagnosis, determines index set, and index set comprisesAt least one index. Wherein, the login of the such as execution in ecommerce shopping of business diagnosis, place an order, the operation such as payment.Service feature is the context of business diagnosis, all information that can obtain in the time of a business diagnosis, and for example user's name,Class of subscriber, shopping classification, the type of merchandise, commodity price etc. Index refers to calculative data in business diagnosis processUnit, such as Payment Amount, product identification information, buyer's identification information etc.
Each service feature can corresponding at least one index, service feature when therefore the first determination module 10 is according to business diagnosis,Can determine index set. The first determination module 10 specifically for: according in advance set up service feature and the corresponding relation of index set,Index set corresponding to service feature while obtaining with business diagnosis, wherein, corresponding relation is according to making service feature and indexWith what determine after adding up.
Wherein, the corresponding relation of service feature and index set can be set up by the following method:
In the process of business diagnosis, carry out indicator-specific statistics based on specific service feature respectively, add up the mistake in business diagnosisCheng Zhong, the access times of each index of use and the access times of certain service features, then according to the use of each index timeThe access times of number and certain service features obtain the frequency of utilization (use of frequency of utilization=index A of index A of each indexThe access times of number of times/specific service feature), and the index that frequency of utilization is greater than default threshold value is put into this specific transactions spyLevy in corresponding index set, set up thus the corresponding relation of service feature and index set. For instance, default threshold value can be made as90%。
For example, as shown in table 1, for according to the list of the service feature of an embodiment of the application and index set corresponding relation.
For instance, in the time that Xiao Wang buys a pair of shoes, the process of business diagnosis is as follows:
First obtain the context of business diagnosis, all information that can obtain when this is analyzed, for example user's name, userClassification, shopping classification, the type of merchandise, commodity price etc.
Then business of assembling feature, particularly, definition that can be based on statistics dimension, according to the parameter of Xiao Wang input, obtains businessBe characterized as " buyer+shoes ", then can obtain index set " commodity price, commodity classification, user under this service featureMobile phone, user balance ".
Acquisition module 20, for obtaining the basic data of index, merges duplicate removal to basic data. Wherein, basic data isFor calculating to obtain the data of index. Different indexs can calculate by different basic datas, certainly, and whereinTwo or more indexs also can calculate by same basic data. Thereby, in the basic data of obtaining index, mayThere is the basic data repeating, need to merge duplicate removal.
For instance, if for the service feature in table 1 " A+B ", corresponding index set comprises " b, d, e, f " fourIndividual index, and index b and index f need to calculate acquisition by basic data data1, index d is calculated and is obtained by basic data data2, index e is calculated and is obtained by basic data data3, therefore concerning service feature " A+B ", and the basis of its corresponding indexData obtain data1, data2, data3 after merging duplicate removal.
Calling module 30 is preserved the system that merges the basic data after duplicate removal for concurrent invocation, obtain the basis merging after duplicate removalData. In the application's a embodiment, the basic data merging after duplicate removal may be kept at respectively in different systems, because ofAnd calling module 30 can call the system that merges the basic data after duplicate removal of preserving by RPC, to obtain and to close from these systemsAnd basic data after duplicate removal.
For instance, if basic data data1, data2, data3 is stored in respectively system S1, in S2 and S3, can be alsoSend out calling system S1, S2 and S3, to obtain basic data data1, data2, data3. Thereby call the time of basic dataFor f (data1), f (data2), the maximum in f (data3).
Computing module 40 carries out concurrent for the basic data being combined after duplicate removal, obtains index and is kept at this locality. LiftExample, computing module 40 is to basic data data1, data2, data3 carries out concurrent, carries out data1 simultaneouslyCarry out first calculating to obtain index b, data1 being carried out second moving to obtain index d, data2 being calculated to obtainIndex e, data3 is calculated to obtain the process of index f, thus according to the time of basic data parameter be g (b),Maximum in g (d), g (e), g (f).
Business diagnosis module 50, for when the business diagnosis, is preferentially obtained the index needing from this locality.
Thereby, with respect to just calling respectively correspondence in conventional art in the time that needs calculate corresponding index by basic data at every turnSystem obtain basic data, and calculate respectively corresponding index, by the multiple systems of concurrent invocation and concurrentCalculate the system call time in whole business diagnosis process is reduced to by f (data1)+f (data2)+f (data3)+f (data1)Maximum in f (data1), f (data2), f (data3), the index computing time in whole business diagnosis process byG (b)+g (d)+g (e)+g (f) is reduced to the maximum in g (b), g (d), g (e), g (f).
Certainly, in the time of business diagnosis, also need not in the time of local index, calling module 30 can by RPC call storage this notIn the system of the basic data of local index, to obtain corresponding basic data, and calculate to obtain according to basic dataThis index.
The task analyzer of the embodiment of the present application, the service feature during according to business diagnosis, determines index set, and obtains indexConcentrate the basic data of index, and continue to merge after duplicate removal, the system that concurrent invocation is preserved the basic data after merging duplicate removal obtainsGet corresponding basic data, then to the basic data concurrent obtaining to obtain corresponding index, and be kept at this locality, withIn the time of business diagnosis, preferentially obtain the index needing from this locality, thereby based on this statistics and data to service feature and indexLayering calculate, optimized business diagnosis method, effectively reduced system call and stand-by period, thereby improved system responsesAbility and business diagnosis efficiency.
In another embodiment of the application, as shown in Figure 5, task analyzer also can enter one on the basis shown in Fig. 4Step comprises: number of times statistical module 60, the second determination module 70, INDEX MANAGEMENT module 80.
Particularly, number of times statistical module 60 is for after preferentially obtaining the index needing, by the use of service feature from this localityNumber of times increase once, and by the access times increase of index once.
Thereby, the access times meter after the access times after INDEX MANAGEMENT module 80 can be upgraded according to service feature and index are upgradedThe frequency of utilization of index is recalculated in calculation, if this frequency of utilization is greater than default threshold value A, keeps service feature and index setCorresponding relation constant, if this frequency of utilization is less than default another threshold value B (threshold value B is less than or equal to threshold value A),This index is deleted from the index set corresponding with service feature. For instance, threshold value A can be made as 90%, and threshold value B canBe made as 50%.
The second determination module 70 when also needing not in local index when the business diagnosis, uses not while determining business diagnosisIn local index.
Number of times statistical module 60 also for by use index access times increase once.
The index using in the time of business diagnosis comprises that, or not the time of local index, first the second determination module 70 can determine thisA little indexs for example, have been used index a in the time of business diagnosis, b, and c, d, e, and local index comprises b, and d, e, f,What can determine business diagnosis time, use is not a and c in local index, and number of times statistical module 60 is by the use of index a and cNumber of times increase once.
INDEX MANAGEMENT module 80, for according to the access times of index and the access times of service feature that use, obtains usingThe frequency of utilization of index, and in the time that frequency of utilization is greater than default threshold value, the index of use is added to the finger corresponding with service featureMark is concentrated.
Thus, can real-time update service feature and the corresponding relation of index set, thus upgrade local index set, further carryThe high efficiency of business diagnosis, and index lower frequency of utilization is deleted from this locality, internal memory and resource saved.
In another embodiment of the application, as shown in Figure 5, task analyzer also can further comprise: the 3rd determines mouldPiece 90, the three determination modules 90 are for obtaining in advance the statistics dimension of setting up, and the parameter of inputting during according to business diagnosis, reallySurely add up the service feature in dimension, to determine the index set that need to obtain according to service feature. Wherein, statistics dimension is for usingThe standard of the service feature using in the time determining business diagnosis. For instance, set up in advance user's sex, user's login sideThree statistics dimensions of purchase classification of formula and user. User's service feature corresponding to sex can be man or female, user's loginService feature corresponding to mode can be the login of PC end or mobile client login, user's business spy corresponding to purchase classificationLevying can be clothes, footwear, food or washing product etc. And the parameter of inputting can be according to business diagnosis time determines that business is at corresponding systemFeature in meter dimension, for example, for sex, user's login mode and three statistics of user's purchase classification of above-mentioned userDimension, can be respectively female, PC end, boots according to the definite service feature of parameter of input.
Thereby can more accurately the index needing in business diagnosis be saved to this locality, further reduce system call and waitTime, system responses ability and business diagnosis efficiency are improved.
It should be noted that, in the application's description, term " first ", " second " etc. are only for describing object, and can not manageSeparate as instruction or hint relative importance. In addition,, in the application's description, except as otherwise noted, the implication of " multiple " is twoIndividual or more than two.
Any process of otherwise describing in flow chart or at this or method are described and can be understood to, represent to comprise one orMore for realizing module, fragment or the part of code of executable instruction of step of specific logical function or process, andThe scope of the application's preferred embodiment comprises other realization, wherein can, not according to order shown or that discuss, comprise rootBy the mode of basic while or by contrary order, carry out function according to related function, this should be by the application's embodiment instituteBelonging to those skilled in the art understands.
The each several part that should be appreciated that the application can be realized with hardware, software, firmware or their combination. In above-mentioned enforcementIn mode, multiple steps or method can be with being stored in software or the firmware carried out in memory and by suitable instruction execution systemRealize. For example, if realized with hardware, with the same in another embodiment, available following technology well known in the artIn any one or their combination realize: the discrete of logic gates having for data-signal being realized to logic function patrolledCollect circuit, there is the special IC of suitable combinational logic gate circuit, programmable gate array (PGA), field-programmableGate array (FPGA) etc.
Those skilled in the art are appreciated that realizing all or part of step that above-described embodiment method carries is canComplete to carry out the hardware that instruction is relevant by program, described program can be stored in a kind of computer-readable recording medium, shouldProgram, in the time carrying out, comprises step of embodiment of the method one or a combination set of.
In addition, the each functional unit in each embodiment of the application can be integrated in a processing module, can be also eachThe independent physics in unit exists, and also can be integrated in a module two or more unit. Above-mentioned integrated module is both passableAdopt the form of hardware to realize, also can adopt the form of software function module to realize. If described integrated module is with software meritForm that can module realizes and as production marketing independently or while using, also can be stored in embodied on computer readable storage JieIn matter.
The above-mentioned storage medium of mentioning can be read-only storage, disk or CD etc.
In the description of this description, reference term " embodiment ", " some embodiment ", " example ", " concrete example ",Or specific features, structure, material or feature that the description of " some examples " etc. means to describe in conjunction with this embodiment or example compriseIn at least one embodiment or example of the application. In this manual, to the schematic statement of the above-mentioned term definiteness that differsIdentical embodiment or example. And, specific features, structure, material or the feature of description can any one orIn multiple embodiment or example with suitable mode combination.
Although illustrated and described the application's embodiment above, be understandable that, above-described embodiment is exemplary,Can not be interpreted as the restriction to the application, those of ordinary skill in the art can enter above-described embodiment in the application's scopeRow variation, amendment, replacement and modification.