Invention content
The present invention provides a kind of gray scale dissemination method, device and the computer readable storage medium of application, main purposeIt is to realize by legacy version software to the graceful upgrade between new version software.
To achieve the above object, the present invention also provides a kind of gray scale dissemination method of application, this method includes:
When receiving the access request of client transmission, the corresponding user information of the access request is determined;
The first current shunting rule is obtained from caching, and judges whether the user information advises with first shuntingThen match;
If the user information shunts rule match with described first, it is determined that the corresponding gray scale function of the access requestModule, and user request is guided to gray scale service cluster corresponding with the gray scale function module and is handled;
According to the visit capacity of the gray scale function module of the access request more new record;
When the online time of the gray scale service module reaches preset duration, the visit capacity of statistics is obtained;
According to the mapping relations between preset visit capacity and gray scales, the corresponding gray scale ratio of visit capacity obtained is determinedExample, and according to gray scales adjustment the first shunting rule.
Optionally, described when receiving the access request of client transmission, determine the corresponding user of the access requestBefore the step of information, the method further includes step:
Test is generated according to the gray scale function module and invites link, and invites link to be issued to client the testEnd;
When receiving the response message that client is received and sent based on the test invitation chain, obtained from the response messageThe user information of acquisition is added to gray scale white list, and is matched according to described by the configuration information and user information for taking user terminalConfidence breath judges whether the user terminal meets test condition;
If so, the corresponding software upgrading packet of the gray scale function module to be sent to the response message for meeting test conditionCorresponding user terminal.
Optionally, the user information is user name, and described first shunts rule for gray scale white list, described in the judgementUser information whether with it is described first shunting rule match the step of include:
Judge whether institute's user name is located in gray scale white list, wherein if having the user name in the gray scale white list,Then judge that the user information shunts rule match with described first, if there is no the user name in the gray scale white list,Judge that the user information is mismatched with the first shunting rule.
Optionally, it is described judge the user information whether with it is described first shunting rule match the step of after, it is describedMethod further includes step:
If the user information is mismatched with the first shunting rule, user request is guided to the clientCorresponding formal service cluster is held to be handled.
Optionally, the mapping relations according between preset visit capacity and gray scales determine the visit capacity obtainedCorresponding gray scales, and according to the gray scales adjust it is described first shunting rule step after, the method is also wrappedInclude step:
When receiving shunting Policy Updates instruction, the second shunting rule is obtained according to shunting Policy Updates instruction,The second shunting rule and the first shunting rule in caching are compared and analyzed, in determination the second shunting ruleIncrement information;
It is according to the increment information that the first shunting Policy Updates in caching are regular for second shunting.
In addition, to achieve the above object, the present invention also provides a kind of gray scale distributing device of application, which includes storageDevice and processor are stored with the gray scale release process that can be run on the processor, the gray scale publication in the memoryProgram realizes following steps when being executed by the processor:
When receiving the access request of client transmission, the corresponding user information of the access request is determined;
The first current shunting rule is obtained from caching, and judges whether the user information advises with first shuntingThen match;
If the user information shunts rule match with described first, it is determined that the corresponding gray scale function of the access requestModule, and user request is guided to gray scale service cluster corresponding with the gray scale function module and is handled;
According to the visit capacity of the gray scale function module of the access request more new record;
When the online time of the gray scale service module reaches preset duration, the visit capacity of statistics is obtained;
According to the mapping relations between preset visit capacity and gray scales, the corresponding gray scale ratio of visit capacity obtained is determinedExample, and according to gray scales adjustment the first shunting rule.
Optionally, the gray scale release process can also be executed by the processor, ought receive client hair describedWhen the access request sent, before the step of determining the access request corresponding user information, following steps are also realized:
Test is generated according to the gray scale function module and invites link, and invites link to be issued to client the testEnd;
When receiving the response message that client is received and sent based on the test invitation chain, obtained from the response messageThe user information of acquisition is added to gray scale white list, and is matched according to described by the configuration information and user information for taking user terminalConfidence breath judges whether the user terminal meets test condition;
If so, the corresponding software upgrading packet of the gray scale function module to be sent to the response message for meeting test conditionCorresponding user terminal.
Optionally, the gray scale release process can also be executed by the processor, to judge the user information describedAfter the step of whether shunting rule match with described first, following steps are also realized:
If the user information is mismatched with the first shunting rule, user request is guided to the clientCorresponding formal service cluster is held to be handled.
Optionally, the gray scale release process can also be executed by the processor, with described according to preset visit capacityMapping relations between gray scales determine the corresponding gray scales of visit capacity obtained, and according to the gray scales tuneAfter the step of the whole first shunting rule, following steps are also realized:
When receiving shunting Policy Updates instruction, the second shunting rule is obtained according to shunting Policy Updates instruction,The second shunting rule and the first shunting rule in caching are compared and analyzed, in determination the second shunting ruleIncrement information;
It is according to the increment information that the first shunting Policy Updates in caching are regular for second shunting.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage mediumGray scale release process is stored on storage medium, the gray scale release process can be executed by one or more processor, with realityThe step of gray scale dissemination method now applied as described above.
Gray scale dissemination method, device and the computer readable storage medium of application proposed by the present invention, when receiving targetWhen the access request that the client of application is sent, the corresponding user information of access request is determined;Current is obtained from cachingOne shunting rule, and judge user information whether with first shunting rule match;If user information and the first shunting rule match,It then determines the corresponding gray scale function module of access request, and user's request is guided to gray scale corresponding with gray scale function module and is takenBusiness cluster is handled;According to the visit capacity of the gray scale service of access request more new record;When gray scale service module is when reaching the standard gradeWhen length reaches preset duration, the visit capacity of statistics is obtained;According to the mapping relations between preset visit capacity and gray scales, reallySurely the corresponding gray scales of visit capacity obtained, and according to gray scales adjustment the first shunting rule.It is arranged in the present invention programHave dedicated for supporting the gray scale service cluster of gray scale function module, the user's request for meeting shunting rule is diverted to gray scale clothesBusiness cluster is handled, while being counted to the visit capacity of gray scale function module according to access request, when gray scale function moduleIt reaches the standard grade after a period of time, gray scales is adjusted according to the visit capacity of statistics, then adjust first point according to gray scalesStream rule realizes smooth transition of the software by legacy version to new version in such a manner.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of gray scale dissemination method of application.Shown in referring to Fig.1, answered for what one embodiment of the invention providedThe flow diagram of gray scale dissemination method.This method can be executed by device, which can be by software and/or hardPart is realized.
In the present embodiment, the gray scale dissemination method of application includes:
Step S10 determines the corresponding user's letter of the access request when receiving the access request of client transmissionBreath.
When application has new function to reach the standard grade, developer develops the grayscale version of the application after upgrading, the wherein gray scaleInclude gray scale function module in the application software of version, which can be some in the application by legacy versionThe function module that updating functional modules obtain, or the new function module for the application and development.Also, it is ash in server-sideThe application of degree version is deployed with test environment, i.e. gray scale service cluster, is deployed with formal environments for the application of official release, i.e., justFormula service cluster.
Wherein, about user obtain grayscale version client mode can there are many, for example, by server-side to clientThe user class of all users at end counts, and the high user of screening user class will have gray scale work(as target userThe grayscale version application of energy module is sent in the terminal of these target users, and local update is carried out to software by user, orHot update is carried out when application starts.Alternatively, in other embodiments, link selector is invited by being tested to client pushThe target user of test condition is closed, and these users are added in gray scale white list.Specifically, according to the gray scale function mouldBlock generates test and invites link, and invites link to be issued to client the test;It is based on the survey when receiving clientWhen the response message for asking chain to receive and send that tentatively invites, the configuration information and user information of user terminal are obtained from the response message,The user information of acquisition is added to gray scale white list, and judges whether the user terminal meets survey according to the configuration informationStrip part;If so, the corresponding software upgrading packet of the gray scale function module to be sent to the response message for meeting test conditionCorresponding user terminal.
Whether step S20 obtains current first shunting rule from caching, and judge the user information with described theOne shunting rule match.
Step S30, if the user information shunts rule match with described first, it is determined that the access request is correspondingGray scale function module, and user request is guided at gray scale service cluster corresponding with the gray scale function moduleReason.
It is pre-configured with the first shunting rule, the first shunting rule is for asking water conservancy diversion to correct service cluster user.It is each gray scale in server-side it may be mentioned that can include multiple gray scale function modules in the grayscale version of an applicationFunction module is provided with corresponding gray scale service cluster, if user information and the first shunting rule match, it is determined that access requestCorresponding gray scale function module, and by user's request be guided to the corresponding gray scale service cluster of gray scale function module of determination intoRow processing.And the corresponding target user of each gray scale function module can be different.
In addition, in the present embodiment, the setting method of gray scale cluster is as follows:Gray scales are arranged in tester, according to settingGray scales original service cluster is split as formal service cluster and gray scale service cluster.For example, original service clusterIn have 20 servers, it is assumed that the gray scales of user setting be 20%, then filter out 4 servers in primary service clusterServer as gray scale cluster.Other servers provide clothes as formal service cluster, for the intended application of official releaseBusiness.Wherein, gray scales are shared in total number of users of the intended application using the number of users of the application of grayscale versionRatio.
Optionally, in one embodiment, user information is user name, and the first shunting rule is gray scale white list, judges to useFamily information whether with first shunting rule match the step of include:Judge whether institute's user name is located in gray scale white list, whereinIf having user name in gray scale white list, user information and the first shunting rule match are judged, if not used in gray scale white listName in an account book then judges that user information is mismatched with the first shunting rule.
Alternatively, in another embodiment, the first shunting rule is IP address white list, user information is to be wrapped in access requestThe client ip address contained.Judge whether the client ip address for including in access request is located in IP address white list, if so,User information and the first shunting rule match are judged, otherwise, it is determined that user information is mismatched with the first shunting rule.
Optionally, a gray scale function module can correspond to one or more the first shunting rule, when the first shuntingWhen rule has multiple, multiple rules can be integrated, user's request is shunted.For example, when the first shunting rule has multiple,Shunting rule is carried out one by one it is matched, when user information meets multiple first shuntings rules, judgement user information and the simultaneouslyOne shunting rule match.
Step S40, according to the visit capacity of the gray scale function module of the access request more new record.
Step S50 obtains the visit capacity of statistics when the online time of the gray scale service module reaches preset duration.
Step S60 determines that the visit capacity obtained corresponds to according to the mapping relations between preset visit capacity and gray scalesGray scales, and according to the gray scales adjustment it is described first shunting rule.
Specifically, tester can pre-set the mapping relations between visit capacity and gray scales, visit capacity withIt can be proportional between gray scales.Within this period that gray scale function module is reached the standard grade, if to gray scale function moduleVisit capacity is more, then illustrates that user is good for the feedback of gray scale function module, can open and be used to more usersThe application of grayscale version.At this point, new gray scales are determined according to the mapping relations between preset visit capacity and gray scales,And then according to gray scales adjustment the first shunting rule, more users request is diverted to gray scale service cluster.If for example,First shunting rule is gray scale white list, then increases the user in gray scale white list.In this way, if user feedback oneIt is directly in preferable state, then gray scales constantly raise, and up to all users of client or have more than predetermined threshold valueAfter the application for upgrading to grayscale version per family, then whole users can be guided to gray scale service cluster, the final gray scaleFormal application of the application of version as new version realizes the graceful upgrade for being applied to new version application by legacy version, avoidsOccur need upgrade after again rollback the phenomenon that.When there is new user to download the software again, then new version can be mounted directlyFormal application.
If within this period that gray scale function module is reached the standard grade, user is less to the visit capacity of gray scale function module, then may be usedTo keep current gray scales or reduction gray scales, and visit capacity is exported to tester, by tester to ashDegree function module is adjusted, and is solved the problem in software or is made weight after the adjustment that some can improve user experienceNew publication.
Moreover, it is judged that after the step of whether user information shunts rule match with described first, if the userInformation is mismatched with the first shunting rule, then user request is guided to the corresponding formal services set of the clientGroup is handled.
Optionally, as an implementation, the present invention also supports to carry out hot update to the first shunting rule in caching,Being normally carried out for shunting is not interrupted.Specifically, when receiving shunting Policy Updates instruction, referred to according to the shunting Policy UpdatesIt enables and obtains the second shunting rule, the second shunting rule and the first shunting rule in caching are compared and analyzed, with trueIncrement information in the fixed second shunting rule;It is institute that first in caching, which is shunted Policy Updates, according to the increment informationState the second shunting rule.
The gray scale dissemination method for the application that the present embodiment proposes, when the access that the client for receiving intended application is sent is askedWhen asking, the corresponding user information of access request is determined;The first current shunting rule is obtained from caching, and judges user informationWhether with first shunting rule match;If user information and the first shunting rule match, it is determined that the corresponding gray scale of access requestFunction module, and user's request is guided to gray scale service cluster corresponding with gray scale function module and is handled;According to accessAsk the visit capacity of the gray scale service of more new record;When the online time of gray scale service module reaches preset duration, system is obtainedThe visit capacity of meter;According to the mapping relations between preset visit capacity and gray scales, the corresponding ash of visit capacity obtained is determinedDegree ratio, and according to gray scales adjustment the first shunting rule.It is provided in the present invention program dedicated for supporting gray scale functionThe user's request for meeting shunting rule is diverted to gray scale service cluster and handled by the gray scale service cluster of module, while rootThe visit capacity of gray scale function module is counted according to access request, after gray scale function module reaches the standard grade a period of time, according to systemThe visit capacity of meter is adjusted gray scales, then according to gray scales adjustment the first shunting rule, in such a mannerRealize smooth transition of the software by legacy version to new version.
The present invention also provides a kind of gray scale distributing devices of application.With reference to shown in Fig. 2, provided for one embodiment of the inventionThe internal structure schematic diagram of the gray scale distributing device of application.
In the present embodiment, the gray scale distributing device 1 of application can be PC (Personal Computer, PC),Can also be the terminal devices such as smart mobile phone, tablet computer, pocket computer.The gray scale distributing device 1 of the application includes at leastMemory 11, processor 12, communication bus 13 and network interface 14.
Wherein, memory 11 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,Hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), magnetic storage, disk, CD etc..Memory 11Can be the internal storage unit of the gray scale distributing device 1 of application, such as the gray scale publication dress of the application in some embodimentsSet 1 hard disk.Memory 11 can also be the External memory equipment of the gray scale distributing device 1 of application in further embodiments,Such as the plug-in type hard disk being equipped on the gray scale distributing device 1 of application, intelligent memory card (Smart Media Card, SMC), peaceDigital (Secure Digital, SD) blocks, flash card (Flash Card) etc..Further, memory 11 can also be wrapped bothThe internal storage unit for including the gray scale distributing device 1 of application also includes External memory equipment.Memory 11 can be not only used for depositingStorage is installed on the application software and Various types of data of the gray scale distributing device 1 of application, such as the code etc. of gray scale release process 01, alsoIt can be used for temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11Code or processing data, such as execute gray scale release process 01 etc..
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 may include optionally standard wireline interface and wireless interface (such as WI-FI interface), be commonly used inCommunication connection is established between the device 1 and other electronic equipments.
Optionally, which can also include user interface, and user interface may include display (Display), inputUnit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It is optionalGround, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED(Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriateReferred to as display screen or display unit, for be shown in the information handled in the gray scale distributing device 1 of application and for show canDepending on the user interface of change.
Fig. 2 illustrates only the gray scale distributing device 1 of the application with component 11-14 and gray scale release process 01, abilityField technique personnel, can be with it is understood that the structure shown in Fig. 1 does not constitute the restriction to the gray scale distributing device 1 of applicationIncluding either combining certain components or different components arrangement than illustrating less either more components.
Optionally, which can also include touch sensor.What the touch sensor was provided touches for userThe region for touching operation is known as touch area.In addition, touch sensor described here can be resistive touch sensor, capacitanceFormula touch sensor etc..Moreover, the touch sensor not only includes the touch sensor of contact, proximity may also compriseTouch sensor etc..In addition, the touch sensor can be single sensor, or multiple sensings of array arrangementDevice.The area of the display of the device 1 can be identical as the area of the touch sensor, can also be different.Optionally, it will showShow that device is arranged with touch sensor stacking, to form touch display screen.The device 1 is based on touch display screen detecting user and touchesThe touch control operation of hair.
Optionally, which can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, soundFrequency circuit, WiFi module etc..Wherein, sensor such as optical sensor, motion sensor and other sensors.Specifically, lightSensor may include ambient light sensor and proximity sensor, wherein if the device 1 is mobile terminal, ambient light sensor canThe brightness of display screen is adjusted according to the light and shade of ambient light, proximity sensor can be closed when mobile terminal is moved in one's earDisplay screen and/or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generallyThree axis) acceleration size, size and the direction of gravity are can detect that when static, can be used to identify the application of mobile terminal posture(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;Certainly, mobile terminal can also configure the other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor,This is repeated no more.
In 1 embodiment of device shown in Fig. 2, gray scale release process 01 is stored in memory 11;Processor 12 executesFollowing steps are realized when the gray scale release process 01 stored in memory 11:
When receiving the access request of client transmission, the corresponding user information of the access request is determined;
The first current shunting rule is obtained from caching, and judges whether the user information advises with first shuntingThen match;
If the user information shunts rule match with described first, it is determined that the corresponding gray scale function of the access requestModule, and user request is guided to gray scale service cluster corresponding with the gray scale function module and is handled;
According to the visit capacity of the gray scale function module of the access request more new record;
When the online time of the gray scale service module reaches preset duration, the visit capacity of statistics is obtained;
According to the mapping relations between preset visit capacity and gray scales, the corresponding gray scale ratio of visit capacity obtained is determinedExample, and according to gray scales adjustment the first shunting rule.
When application has new function to reach the standard grade, developer develops the grayscale version of the application after upgrading, the wherein gray scaleInclude gray scale function module in the application software of version, which can be some in the application by legacy versionThe function module that updating functional modules obtain, or the new function module for the application and development.Also, it is ash in server-sideThe application of degree version is deployed with test environment, i.e. gray scale service cluster, is deployed with formal environments for the application of official release, i.e., justFormula service cluster.
Wherein, about user obtain grayscale version client mode can there are many, for example, by server-side to clientThe user class of all users at end counts, and the high user of screening user class will have gray scale work(as target userThe grayscale version application of energy module is sent in the terminal of these target users, and local update is carried out to software by user, orHot update is carried out when application starts.Alternatively, in other embodiments, link selector is invited by being tested to client pushThe target user of test condition is closed, and these users are added in gray scale white list.Specifically, according to the gray scale function mouldBlock generates test and invites link, and invites link to be issued to client the test;It is based on the survey when receiving clientWhen the response message for asking chain to receive and send that tentatively invites, the configuration information and user information of user terminal are obtained from the response message,The user information of acquisition is added to gray scale white list, and judges whether the user terminal meets survey according to the configuration informationStrip part;If so, the corresponding software upgrading packet of the gray scale function module to be sent to the response message for meeting test conditionCorresponding user terminal.
It is pre-configured with the first shunting rule, the first shunting rule is for asking water conservancy diversion to correct service cluster user.It is each gray scale in server-side it may be mentioned that can include multiple gray scale function modules in the grayscale version of an applicationFunction module is provided with corresponding gray scale service cluster, if user information and the first shunting rule match, it is determined that access requestCorresponding gray scale function module, and by user's request be guided to the corresponding gray scale service cluster of gray scale function module of determination intoRow processing.And the corresponding target user of each gray scale function module can be different.
In addition, in the present embodiment, the setting method of gray scale cluster is as follows:Gray scales are arranged in tester, according to settingGray scales original service cluster is split as formal service cluster and gray scale service cluster.For example, original service clusterIn have 20 servers, it is assumed that the gray scales of user setting be 20%, then filter out 4 servers in primary service clusterServer as gray scale cluster.Other servers provide clothes as formal service cluster, for the intended application of official releaseBusiness.Wherein, gray scales are shared in total number of users of the intended application using the number of users of the application of grayscale versionRatio.
Optionally, in one embodiment, user information is user name, and the first shunting rule is gray scale white list, judges to useFamily information whether with first shunting rule match the step of include:Judge whether institute's user name is located in gray scale white list, whereinIf having user name in gray scale white list, user information and the first shunting rule match are judged, if not used in gray scale white listName in an account book then judges that user information is mismatched with the first shunting rule.
Alternatively, in another embodiment, the first shunting rule is IP address white list, user information is to be wrapped in access requestThe client ip address contained.Judge whether the client ip address for including in access request is located in IP address white list, if so,User information and the first shunting rule match are judged, otherwise, it is determined that user information is mismatched with the first shunting rule.
Optionally, a gray scale function module can correspond to one or more the first shunting rule, when the first shuntingWhen rule has multiple, multiple rules can be integrated, user's request is shunted.For example, when the first shunting rule has multiple,Shunting rule is carried out one by one it is matched, when user information meets multiple first shuntings rules, judgement user information and the simultaneouslyOne shunting rule match.
Specifically, tester can pre-set the mapping relations between visit capacity and gray scales, visit capacity withIt can be proportional between gray scales.Within this period that gray scale function module is reached the standard grade, if to gray scale function moduleVisit capacity is more, then illustrates that user is good for the feedback of gray scale function module, can open and be used to more usersThe application of grayscale version.At this point, new gray scales are determined according to the mapping relations between preset visit capacity and gray scales,And then according to gray scales adjustment the first shunting rule, more users request is diverted to gray scale service cluster.If for example,First shunting rule is gray scale white list, then increases the user in gray scale white list.In this way, if user feedback oneIt is directly in preferable state, then gray scales constantly raise, and up to all users of client or have more than predetermined threshold valueAfter the application for upgrading to grayscale version per family, then whole users can be guided to gray scale service cluster, the final gray scaleFormal application of the application of version as new version realizes the graceful upgrade for being applied to new version application by legacy version, avoidsOccur need upgrade after again rollback the phenomenon that.When there is new user to download the software again, then new version can be mounted directlyFormal application.
If within this period that gray scale function module is reached the standard grade, user is less to the visit capacity of gray scale function module, then may be usedTo keep current gray scales or reduction gray scales, and visit capacity is exported to tester, by tester to ashDegree function module is adjusted, and is solved the problem in software or is made weight after the adjustment that some can improve user experienceNew publication.
Moreover, it is judged that after the step of whether user information shunts rule match with described first, if the userInformation is mismatched with the first shunting rule, then user request is guided to the corresponding formal services set of the clientGroup is handled.
Optionally, as an implementation, the present invention also supports to carry out hot update to the first shunting rule in caching,Being normally carried out for shunting is not interrupted.Specifically, when receiving shunting Policy Updates instruction, referred to according to the shunting Policy UpdatesIt enables and obtains the second shunting rule, the second shunting rule and the first shunting rule in caching are compared and analyzed, with trueIncrement information in the fixed second shunting rule;It is institute that first in caching, which is shunted Policy Updates, according to the increment informationState the second shunting rule.
The gray scale distributing device for the application that the present embodiment proposes, when the access that the client for receiving intended application is sent is askedWhen asking, the corresponding user information of access request is determined;The first current shunting rule is obtained from caching, and judges user informationWhether with first shunting rule match;If user information and the first shunting rule match, it is determined that the corresponding gray scale of access requestFunction module, and user's request is guided to gray scale service cluster corresponding with gray scale function module and is handled;According to accessAsk the visit capacity of the gray scale service of more new record;When the online time of gray scale service module reaches preset duration, system is obtainedThe visit capacity of meter;According to the mapping relations between preset visit capacity and gray scales, the corresponding ash of visit capacity obtained is determinedDegree ratio, and according to gray scales adjustment the first shunting rule.It is provided in the present invention program dedicated for supporting gray scale functionThe user's request for meeting shunting rule is diverted to gray scale service cluster and handled by the gray scale service cluster of module, while rootThe visit capacity of gray scale function module is counted according to access request, after gray scale function module reaches the standard grade a period of time, according to systemThe visit capacity of meter is adjusted gray scales, then according to gray scales adjustment the first shunting rule, in such a mannerRealize smooth transition of the software by legacy version to new version.
Optionally, in other examples, gray scale release process can also be divided into one or more module, and oneA or multiple modules are stored in memory 11, and are held by one or more processors (the present embodiment is by processor 12)For row to complete the present invention, the so-called module of the present invention is the series of computation machine program instruction section for referring to complete specific function,For describing implementation procedure of the gray scale release process in the gray scale distributing device of application.
Shown in Fig. 3, for the gray scale release process in gray scale distributing device one embodiment of the invention appliedProgram module schematic diagram, in the embodiment, gray scale release process can be divided into data obtaining module 10, rule match module20, request water conservancy diversion module 30, acess control module 40 and Policy Updates module 50, illustratively:
Data obtaining module 10 is used for:When receiving the access request of client transmission, the access request pair is determinedThe user information answered;
Rule match module 20 is used for:The first current shunting rule is obtained from caching, and judges the user informationWhether with it is described first shunting rule match;
Request water conservancy diversion module 30 is used for:If the user information shunts rule match with described first, it is determined that the visitIt asks request corresponding gray scale function module, and user request is guided to gray scale corresponding with the gray scale function module and is takenBusiness cluster is handled;
Acess control module 40 is used for:According to the access of the gray scale function module of the access request more new recordAmount;
And when the online time of the gray scale service module reaches preset duration, obtain the visit capacity of statistics;
Policy Updates module 50 is used for:According to the mapping relations between preset visit capacity and gray scales, determines and obtainThe corresponding gray scales of visit capacity, and according to the gray scales adjustment it is described first shunting rule.
Above- mentioned information acquisition module 10, rule match module 20, request water conservancy diversion module 30, acess control module 40 and ruleThe program modules such as update module 50 are performed realized functions or operations step and are substantially the same with above-described embodiment, herein notIt repeats again.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage mediumOn be stored with gray scale release process, the gray scale release process can be executed by one or more processors, to realize following operation:
When receiving the access request of client transmission, the corresponding user information of the access request is determined;
The first current shunting rule is obtained from caching, and judges whether the user information advises with first shuntingThen match;
If the user information shunts rule match with described first, it is determined that the corresponding gray scale function of the access requestModule, and user request is guided to gray scale service cluster corresponding with the gray scale function module and is handled;
According to the visit capacity of the gray scale function module of the access request more new record;
When the online time of the gray scale service module reaches preset duration, the visit capacity of statistics is obtained;
According to the mapping relations between preset visit capacity and gray scales, the corresponding gray scale ratio of visit capacity obtained is determinedExample, and according to gray scales adjustment the first shunting rule.Computer readable storage medium specific embodiment party of the present inventionEach embodiment of gray scale distributing device and method of formula and above application is essentially identical, does not make tired state herein.
It should be noted that the embodiments of the present invention are for illustration only, can not represent the quality of embodiment.AndThe terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packetProcess, device, article or the method for including a series of elements include not only those elements, but also include being not explicitly listedOther element, or further include for this process, device, article or the intrinsic element of method.Do not limiting moreIn the case of, the element that is limited by sentence "including a ...", it is not excluded that in the process including the element, device, articleOr there is also other identical elements in method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment sideMethod can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many casesThe former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior artGoing out the part of contribution can be expressed in the form of software products, which is stored in one as described aboveIn storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone,Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hairEquivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skillsArt field, is included within the scope of the present invention.