Embodiment 1
As previously mentioned, the application system of Internet service needs to be migrated according to different needs, for example, being to application
Application program or hardware device in system carry out upgrade maintenance etc., require the function that original application system provides moving to mesh
It marks in application system.When carrying out application system migration, can target application system reach desired effect, be in migration work
The importance of concern.In practical applications, Internet service generally is carried by more hardware devices, for example, there are 1000 clothes
Be engaged in device equipment processing line on user service request, if necessary to one of this 1000 server apparatus application program into
Row upgrading.One of part server application program can be upgraded in batches, to realize to using system migration
Test, still, if target application system is unable to reach desired effect, it is possible to make troubles (ratio for user on line
Such as, there is mistake etc. in processing business request).So can by target application system it is online under to original application system processing
The service request crossed is handled again, the place requested by comparison target application system and original application system identical services
Reason is as a result, realize the test to application system migration.If there is the business of user on 1000 server apparatus processing lines to ask
It asks, for one day (24 hours), this 1000 server apparatus can handle 200,000,000 service requests, this 200,000,000 service request packets
Different types of business (business source difference, type of service difference etc.) is included, however, for lower test application system migration online
Property server apparatus, no matter from cost consideration, or from resource utilization consider, same number has been impossible to, if only
This 200,000,000 service requests are handled with 10 server apparatus, often consume the extra 24 hours time, which results in migrations
Property test efficiency it is lower;If choosing a part from 200,000,000 service requests to be handled, although can be no more than on the time
24 hours, but it is possible that miss some types of business, service coverage face is reduced, to influence migration test
Accuracy.In order to improve the efficiency of migration test under the premise of ensuring the accuracy of migration test, the present embodiment provides
A kind of test method of application system migration.The idiographic flow schematic diagram of this method is as shown in Figure 1, include the following steps:
Step 11, the processed service request of original application system is obtained.
For step 11, the processed service request of original application system and processing result are often stored in
In business diary, by obtaining business diary, so that it may get the processed service request of original application system.For example, meeting
Wired upper log, the processing result for saving service request on line and to business on line can be come by different interfaces
Obtain the log for saving business on different types of line.
Step 12, service request is clustered, forms at least two cluster set, the service request tool in cluster set
There is similar property.
Cluster, refers to the process of that the set by physics or abstract object is divided into the multiple set being made of similar object.
By clustering the set that cluster set generated is a group objects, these objects cluster the phase each other of the object in gathering with same
Seemingly, different with the object in other cluster set.
It follows that the process of cluster, practical is exactly that the object with similar quality is formed to a cluster set.At this
In embodiment, the process of cluster, a cluster set will be formed with the service request of similar property by referring to.
For service request, the service feature wherein included with cluster correlation, can as the foundation clustered,
So can first filter out the noise number for including in service request after obtaining the processed service request of original application system
According to (i.e. the service feature unrelated with cluster), for example, the remark information that user adds in service request, the time letter of service request
Breath, for remark information due to being user oneself addition, temporal information is that system is generated according to the current time for receiving service request
, cluster result is not influenced, so filtering out noise data, computing resource can be not only saved in cluster process,
More importantly there is not interference to the accuracy of cluster.
For step 12, there can be following sub-steps:
Sub-step 121, the service feature progress feature extraction with cluster correlation to including in service request.
The service feature for including in service request, there are some unique identifications, for example, business serial number (must be unique
), user identifier (each user has unique mark).These unique identifications be also have similar quality (although such as business
Serial number is different, but belongs to identical services type), but if clustered using unique identification, cluster certainly will be will affect
As a result (identical services, if on the time differ it is more, business serial number also can be mutually far short of what is expected), it is therefore desirable to cluster correlation
Service feature carry out feature extraction.
The service feature progress feature extraction with cluster correlation to including in service request, may include following at least one
Kind:
To the operational feature extraction character string digit with cluster correlation for including in service request;
To the type feature extraction alphabet with cluster correlation for including in service request;
To the positive negativity of numerical characteristics extraction with cluster correlation for including in service request.
Specifically,
Operational feature may include: business serial number, user identifier etc., and generally, business serial number is according to business kind
Class, the current time for receiving service request etc., the character string generated by application system, the character string are unique, so, with
Character string of business serial number itself obviously will affect cluster result as the foundation of cluster;Likewise, each user is corresponding
User identifier is also that uniquely, the foundation using character string of user identifier itself as cluster obviously also will affect cluster result.
So the digit of character string can be extracted for type feature, the foundation as cluster.
Type feature may include: service condition, type of service, business source etc., and generally, type of service, business are come
Source etc., is all preset, changeless code name, and service condition is the label that application system is generated according to performance.Such as:
Payment transaction 010001, transferred account service 010002;The end PC business pc, mobile terminal service mobile;It initializes I, success S, lose
Lose F etc..These character strings all can serve as the foundation of cluster.So alphabet can be extracted for operational feature.
Numerical characteristics may include: the quantity in service request, and generally, the quantity in service request is asked according to business
What the quantity in asking generated, such as 10 (supplementing 10 game moneys with money), -2 (consumption 2) etc..These character strings itself are as cluster
Foundation be nonsensical, but represented positive negativity is meaningful, so, for numerical characteristics, can extract just
Negativity.For example 0,1,2 respectively indicate 0, negative, positive number.
Sub-step 122 determines the cluster centre of specified quantity.
Before starting to service request cluster, at least two cluster centres can be first determined, so as to by service request
It is clustered, forms at least two cluster set.
The cluster centre for determining specified quantity may include:
According to the service feature with cluster correlation for including in service request, specified quantity cluster centre is determined;Or
According to processing capacity of the target application system within the unit time, specified quantity cluster centre is determined.
Specifically,
The meaning of cluster is to cluster the service request with similar property, forms cluster and gathers, and business
It is including in request that the foundation whether with similar property is exactly distinguished with cluster correlation service feature, it is possible to root
According to these service features, to determine the cluster centre of specified quantity.For example, can be according to the business flowing water in operational feature
Number, user identifier, service condition, type of service, business source in type feature, the positive negativity of numerical characteristics is combined,
Determine the cluster centre of specified quantity.
During test application system migration, the time limit (1 day, 1 week) of a test is had, in order to limited
In time, cover service coverage face wide as far as possible, target application system can be calculated according to the following equation in the unit time
Interior processing capacity:
K=n/t × T;Wherein, n indicates the n service request that the processing of target application system is completed, and t indicates target application system
The time-consuming of n service request is completed in system processing, and T represents the time limit of test;K indicates target application system in T time section most
Big processing quantity.
For example, 1 server apparatus 1 second, 1000 service requests have been handled, then the server apparatus was at 24 hours
Interior maximum processing quantity are as follows: 1000/1 × 24 × 60 × 60=8640000 (item)
Sub-step 123 clusters service request according to feature extraction result at a distance from cluster centre.
The poly- of number of executions is defined after having obtained feature extraction after executing sub-step 121 as a result, executing sub-step 122
Class center, so that it may according to feature extraction result at a distance from cluster centre, service request cluster.
According to feature extraction result at a distance from cluster centre, service request is clustered, may include:
The alphabet extracted is calculated at a distance from cluster centre using Hamming distance;
The character string digit extracted and positive negativity are calculated at a distance from cluster centre using standard Euclidean distance;
According to calculated at a distance from cluster centre, the service request is clustered.
Specifically, Hamming distance refers to the character that a character string is transformed into replacement required for another character string
Number.Such as:
Hamming distance between 010001 and 010002 is 1;
Hamming distance between 4007 and 3008 is 2.
The by the agency of in sub-step 121, type of service, business source etc. in type feature, are all preset, fixed
Constant code name, service condition are the labels that application system is generated according to performance.Such as: payment transaction 010001 is transferred accounts
Business 010002;The end PC business pc, mobile terminal service mobile;Initialize I, success S, failure F etc..These type features are all
It is fixed and invariable, it is possible to which the alphabet extracted is calculated at a distance from cluster centre by Hamming distance.
Calculating the alphabet extracted using Hamming distance can calculate at a distance from cluster centre according to following formula:
M1=(x1x2x3…xn), M2=(y1y2y3…yn), define calculating formula of similarity:
Wherein xk, ykRespectively indicate M1And M2In k-th of component or be 1 or be 0,For mould two plus operation, M1With M2
One of them is the feature for the cluster centre determined.
For example, can determine that the type of service of cluster centre is payment transaction 010001, the service class of a certain service request
Type is transferred account service 010002, then n=6;x1=x3=x4=x5=0, x2=x6=1;y1=y3=y4=y5=0, y2=1, y6
=2, sim=1-1/6=0.83.
The same by the agency of in sub-step 121, business serial number, user identifier in operational feature, extracts character string
Digit.The quantity in service request in numerical characteristics, extracts positive negativity.Service request can be represented due to extracting result
Property, it is possible to by standard European distance calculate the character string digit that extracts and positive negativity and cluster centre away from
From.
Two 1 (x of n-dimensional vector11, x12…x1n) and 2 (x21, x22…x2n) between standardization Euclidean distance formula:
Wherein, SkFor the standard deviation of component k, such as k=1, S1For x11With x21Standard deviation.
Finally, being clustered at a distance from cluster centre to service request according to calculated.
It specifically, can be according to calculated at a distance from cluster centre and preset distance threshold, to service request
It is clustered.
Step 12 clusters service request, makes according to the service feature with cluster correlation for including in service request
Service request with similar quality forms a cluster set.In practical applications, different business scenarios can be formed
Several cluster set.
Step 13, a certain number of service requests are chosen respectively from each cluster set, select from each cluster set
Total number of the quantity of the service request taken less than the service request that each cluster set includes.
Each cluster set all has different property, and step 13 is the meaning of the selection mode of service request,
On the one hand, the result of selection covers a variety of different properties, misses caused by solving after there is arbitrarily choosing a part
The service request of property.On the other hand, under the premise of meeting the requirement for covering a variety of different properties, the quantity selected becomes
It is few, it solves the problems, such as all to choose the substantial amounts occurred;So the service request selected by executing step 13, both may be used
To meet the requirement for covering a variety of different properties, there is the demand that can satisfy less service request quantity.
Step 14, it is handled, is realized to using system migration using service request of the target application system to selection
Test.
After target application system handles the service request of selection, obtained processing result can be with primal system
After handling the service request of selection, obtained processing result is compared, to realize the survey to application system migration
Examination.The purpose of test, can not only know target application system whether meet migration after the needs of;Target system can also be tested out
The problem of system.For example, target application system have the defects that it is certain, so that it may utilize method provided in this embodiment, test out
The specific location of defect;Application program in target application system has upgrading, so that it may method provided in this embodiment is utilized,
Whether the application program after testing out upgrading meets the expectation for upgrading.
This method provided using embodiment 1 is obtaining original application system in the test process of application system migration
It unites after processed service request, first service request is clustered, form at least two cluster set with similar quality,
The total number for choosing the service request for including less than each cluster set from each cluster set again, is finally answered using target
It is handled with service request of the system to selection, realizes the test to application system migration.How to choose service request is
The key of testing efficiency is improved, in this application, the service request selected using cluster meets covering wide as far as possible
Face requires, and meets the demand for reducing test quantity.On the one hand, it avoids and all processes whole service requests, and only locate
Manage a part of service request, the promotion of bring testing efficiency;On the other hand, business of different nature can as often as possible be covered
Request improves the accuracy of application system migration test.
It should be noted that the executing subject of each step of 1 providing method of embodiment may each be same equipment, or
Each step of person, this method can also be by distinct devices as executing subject.For example, the executing subject of step 11 and step 12 can
Think equipment 1, the executing subject of step 12 and step 13 can be equipment 2;For another example, the executing subject of step 11 can be to set
Standby 1, the executing subject of step 12 to step 14 can be equipment 2;Etc..
Embodiment 2
Based on identical inventive concept, embodiment 2 provides a kind of test device of application system migration, is used for.Such as
Shown in Fig. 2, which includes:
Acquiring unit 21 can be used for obtaining the processed service request of original application system;
Cluster cell 22 can be used for clustering the service request, form at least two cluster set, described poly-
Service request in class set has similar property;
Selection unit 23 can be used for choosing a certain number of service requests respectively from each cluster set, from each
Total number of the quantity for the service request chosen in cluster set less than the service request that each cluster set includes;
Test cell 24 can be used for handling using service request of the target application system to selection, realizes and corresponds to
With the test of system migration.
In one embodiment, cluster cell 22 can be used for:
The service feature progress feature extraction with cluster correlation to including in the service request;
Determine the cluster centre of specified quantity;
According to feature extraction result at a distance from cluster centre, the service request is clustered.
In one embodiment, cluster cell 22 can be used for executing following at least one operations:
To the operational feature extraction character string digit with cluster correlation for including in the service request;
To the type feature extraction alphabet with cluster correlation for including in the service request;
To the positive negativity of numerical characteristics extraction with cluster correlation for including in the service request.
In one embodiment, cluster cell 22 can be used for:
The alphabet extracted is calculated at a distance from cluster centre using Hamming distance comparison algorithm;
The character string digit that extracts and positive negativity and cluster centre are calculated using standard Euclidean distance comparison algorithm
Distance;
According to calculated at a distance from cluster centre, the service request is clustered.
In one embodiment, cluster cell 22 can be used for:
According to the service feature with cluster correlation for including in the service request, specified quantity cluster centre is determined;Or
According to processing capacity of the target application system within the unit time, specified quantity cluster centre is determined.
The device provided using embodiment 2 is obtaining original application system in the test process of application system migration
It unites after processed service request, first service request is clustered, form at least two cluster set with similar quality,
The total number for choosing the service request for including less than each cluster set from each cluster set again, is finally answered using target
It is handled with service request of the system to selection, realizes the test to application system migration.How to choose service request is
The key of testing efficiency is improved, in this application, the service request selected using cluster meets covering wide as far as possible
Face requires, and meets the demand for reducing test quantity.On the one hand, it avoids and all processes whole service requests, and only locate
Manage a part of service request, the promotion of bring testing efficiency;On the other hand, business of different nature can as often as possible be covered
Request improves the accuracy of application system migration test.
Embodiment 3
Based on identical inventive concept, embodiment 3 provides a kind of test method of application program migration, for improving
The testing efficiency of application program migration.The schematic diagram of this method is as shown in figure 3, include the following steps:
Step 31, the processed N number of service request of original application system is obtained.
Step 32, the characteristic information unrelated with cluster for including in N number of service request is deleted.
Step 33, to including to do feature extraction with the characteristic information of cluster correlation in N number of service request.
Step 34, it according to the service feature with cluster correlation for including in N number of service request, determines in specified quantity cluster
The heart.
Step 35, using Hamming distance and standard Euclidean distance, feature extraction result is calculated at a distance from cluster centre.
Step 36, according to calculated at a distance from cluster centre, N number of service request is clustered, forms M cluster
Set.
Step 37, from each cluster set of M cluster set, 1 service request is chosen respectively, is amounted to and is chosen M
Service request, M < N.
Step 38, processing result is obtained after handling using target application system M service request, with primal system
Processing result is obtained after handling M service request, is compared, realizes the test to application system migration.
This method provided using embodiment 3 is obtaining original application system in the test process of application system migration
It unites after processed N number of service request, first N number of service request is clustered, form the M cluster sets with similar quality
It closes, then from each cluster set, chooses 1 cluster set, amount to M service request.Finally using target application system to M
A service request is handled, and realizes the test to application system migration.How to choose service request is to improve testing efficiency
Key, in the present embodiment, from each cluster set in choose 1 service request, that is, meet covering surface wide as far as possible
It is required that and meeting the demand for reducing test quantity.On the one hand, it avoids and all processes whole service requests, and only handle
A part of service request, the promotion of bring testing efficiency;On the other hand, business of different nature can be as often as possible covered to ask
It asks, improves the accuracy of application system migration test.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.