CN108897615A - Second kills request processing method, application server cluster and storage medium - Google Patents

Second kills request processing method, application server cluster and storage medium Download PDF

Info

Publication number
CN108897615A
CN108897615A CN201810547915.2A CN201810547915A CN108897615A CN 108897615 A CN108897615 A CN 108897615A CN 201810547915 A CN201810547915 A CN 201810547915A CN 108897615 A CN108897615 A CN 108897615A
Authority
CN
China
Prior art keywords
request
kills
inventory
cache
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810547915.2A
Other languages
Chinese (zh)
Other versions
CN108897615B (en
Inventor
陈仁义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kang Keyi Information Technology (shenzhen) Co Ltd
Original Assignee
Kang Keyi Information Technology (shenzhen) Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kang Keyi Information Technology (shenzhen) Co Ltd filed Critical Kang Keyi Information Technology (shenzhen) Co Ltd
Priority to CN201810547915.2A priority Critical patent/CN108897615B/en
Publication of CN108897615A publication Critical patent/CN108897615A/en
Application granted granted Critical
Publication of CN108897615B publication Critical patent/CN108897615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention provides a kind of second and kills request processing method, and this method includes:The corresponding virtual inventory of every cache server is determined respectively;The second for receiving user's submission kills request, shares the multiple servers in the server cluster by load balancing;The specifying information that the second kills request is read, request is killed to the second and carries out qualification testing;When qualification testing success, request the virtual inventory of corresponding cache server to be reduced to killing with this second, and generation kills the corresponding default token information of request with the second, this is preset token information and is saved into default level cache;And receive user and be directed to the transaction request for killing request submission by the second of qualification testing, the real-time token information is verified, when token verification passes through, the true inventory in database is reduced, the second kills success.The present invention also provides a kind of application server cluster and storage mediums.Using the present invention, can be improved the second kills request treatment effeciency.

Description

Second kills request processing method, application server cluster and storage medium
Technical field
The present invention relates to technical field of data processing more particularly to a kind of second to kill request processing method, application server collection Group and computer readable storage medium.
Background technique
In electric business field, in order to attract user often to carry out some activities, such as:Second kills activity.The second activity of killing is just It is that some commodity are released with lower price, the quantity of these commodity is limited, and needs user the progress second to kill panic buying, to attract User.It however, the flow that activity starts moment is very big, and is all to request identical resource, therefore will cause serious number According to library concurrent reading and writing conflict and resource lock request collision.
Summary of the invention
In view of the foregoing, the present invention provide a kind of second kill request processing method, application server cluster and computer can Storage medium is read, main purpose is that improving the second kills request treatment effeciency.
To achieve the above object, the present invention provides a kind of second and kills request processing method, and this method includes:
S1, the inventory that the second kills commodity is evenly distributed to the clothes of more cachings in cache server cluster according to preset rules Business device, and the corresponding virtual inventory of every cache server is determined respectively;
S2, reception gateway server kill request by the second that equally loaded distributes, wherein when gateway server reaches default When quarter, user is received by a plurality of second that client is submitted and kills request;
S3, read every second and kill the specifying information of request, according to preset proof rule, every second is killed request into Row qualification testing;
S4, when the qualification testing that the second kills request passes through, to killing the void for requesting corresponding cache server with this second Quasi- inventory reduces, and is generated according to user's membership information and kill the corresponding default token information of request with the second, this is preset Token information is saved into default level cache;And
S5, the transaction request that user kills request submission for the second by qualification testing is received, according to the transaction request Real-time token information is generated, the real-time token information is verified, when the real-time token information verification passes through, logarithm It is reduced according to the true inventory in library, the second kills success.
In addition, the present invention also provides a kind of application server clusters, which is characterized in that the application server cluster includes more Platform application server, the server include:Memory, processor, being stored on the memory can be on the processor The second of operation kills request handler, and the second kills when request handler is executed by the processor, it can be achieved that as described above Second kills the arbitrary steps in request processing method.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium It include killing request handler the second in storage medium, the second kills when request handler is executed by processor, it can be achieved that as above The second kills the arbitrary steps in request processing method.
Second proposed by the present invention kills request processing method, application server cluster and computer readable storage medium, passes through The inventory for killing commodity to the second carries out inventory's hash, and the inventory after hash is saved to each caching into cache server cluster On server, the second is killed by every server of the request distribution into server cluster by load balancing using gateway server, And the second is killed into request and is loaded into corresponding cache server, disperse the second and killed request, improves the responding ability of system;Pass through Request is killed to the second and carries out qualification testing, invalidation request is filtered out, slows down the pressure of system core service;Building level cache, L2 cache, server successively obtain corresponding information from L2 cache, level cache, database, improve the second and kill at request Manage efficiency.
Detailed description of the invention
Fig. 1 is the flow chart for the second of the invention killing request processing method preferred embodiment;
Fig. 2 is the application environment schematic diagram of application server cluster preferred embodiment of the present invention;
Fig. 3 is the schematic diagram of the preferred embodiment of application server in Fig. 2;
Fig. 4 is the program module schematic diagram that the second kills request handler in Fig. 3.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
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 second and kills request processing method.Shown in referring to Fig.1, for the second of the invention kill request processing method compared with The flow chart of good embodiment.This method can be executed by a device, which can be by software and or hardware realization.
In the present embodiment, it includes step S1-S5 that the second, which kills request processing method,:
S1, the inventory that the second kills commodity is evenly distributed to the clothes of more cachings in cache server cluster according to preset rules Business device, and the corresponding virtual inventory of every cache server is determined respectively;
Predefine a cache server cluster, wherein it include m platform cache server in the cache server cluster, Also, using cache server cluster as level cache.
It is carrying out before the second kills activity, can predefine the second that the second kills in activity kills commodity and goods number, inventory, activity The information such as play, above- mentioned information save in the database.Assuming that the second kills in activity comprising a kind of commodity, read from database The physical holding of stock of the commodity is 10000, and according to two (00-99) after Customs Assigned Number, commodity stocks is divided into 100 parts, every part Comprising 100 inventories, according to hash algorithm, this 100 parts of inventories are evenly distributed to the caching clothes of the m platform in cache server cluster It is engaged on device.
It should be noted that inventory of the distribution on each cache server into cache server cluster is actual library The inventory for depositing, but being actually stored on each cache server is virtual inventory.In the case of generally asking, virtual inventory is bigger In physical holding of stock, can be configured according to operator needs.Then, determine that every cache server is corresponding virtual respectively Inventory, and by virtual inventory information preservation into level-one inventory.
Assuming that the inventory that the second kills the commodity i in activity is 10000, then, key of the commodity i in every cache server (key) it is respectively defined as:itemstock:r:i:00~itemstock:r:i:99, wherein itemstock is resource prefix (inventory), r are to kill movable play number the second, and i is the second to kill movable goods number, and " 00 "-" 99 " are two after Customs Assigned Number, The value (value) of the corresponding storage of each key is 100.That is, the second kills different plays and/or different commodity in activity, Corresponding key all can be different.
It is understood that the quantity of cache server determines this cache server cluster in cache server cluster Digestion power, if the handling capacity of separate unit cache server be 20,000 TPS, the handling capacity of m platform cache server is 2m Ten thousand TPS, therefore, in the present embodiment, the value of m need to kill the concurrency in activity and determine by estimating the second.
S2, reception gateway server kill request by the second that equally loaded distributes, wherein when gateway server reaches default When quarter, user is received by a plurality of second that client is submitted and kills request;
Wherein, at the time of the predetermined time is that the second activity of killing starts.When the second activity of killing starts, gateway server, which receives, to be used Request is killed by the second that client is submitted in family, and the second, which kills in request, includes:Customs Assigned Number, merchandise news, favor information etc..It can manage Solution, at the time of the second kills beginning, can receive a large amount of seconds simultaneously kills request, for example, 10000 seconds kill request, it need to be by this 10000 seconds kill every application server of the request distribution into application server cluster and are handled.
In the present embodiment, 10000 seconds are killed request and are respectively allocated to often by gateway server according to DNS polling mechanism One application server.Wherein, gateway server application is F5 physical machine.Assuming that four application servers form application service Device cluster, IP address is respectively 172.28.20.1,172.28.20.2,172.28.20.3,172.28.20.4, when user requests When access, gateway server by the order of round-robin scheduling IP address, will by 172.28.20.1,172.28.20.2, 172.28.20.3 request is killed with the second of first user of the sequential answering of 172.28.20.4, the second of next user kills request will The sequential answering as postrotational 172.28.20.2,172.28.20.3,172.28.20.4 and 172.20.20.1, rotation Process will continue, and successfully realize DNS load balancing.
After the second that application server receives gateway server distribution kills request, the user carried in request is killed according to the second and is compiled Second is killed request and is loaded into cache server corresponding with Customs Assigned Number information by number information.For example, the second kills the use carried in request Latter two in the number information of family are " 52 ", determine in cache server cluster in the key information of inventory that two are after Customs Assigned Number The second is killed request and is loaded into the cache server by the cache server of " 52 ", for the void on subsequent acquisition cache server Quasi- inventory information.
Second is killed request and is distributed every application server into application server cluster by load balancing by above-mentioned steps On, and cache server cluster is utilized, the concurrent several seconds is killed into request and effectively guides the difference in cache server cluster On cache server, the problem for avoiding individual server concurrent capability limited realizes that the dispersion second kills the effect of request, promotes system The responding ability of system.
S3, read every second and kill the specifying information of request, according to preset proof rule, every second is killed request into Row qualification testing;
It is understood that in order to reduce the consumption of application server cluster performance, when the physical holding of stock of commodity is " 0 " When, the second for receiving user's transmission kills request, directly returns to the information sold out.Specifically, which includes:
Judge in default L2 cache with the presence or absence of default inventory's mark;
When identifying in the L2 cache there are the default inventory, the first warning information is generated;
When default inventory mark is not present in the L2 cache, judge in the level cache with the presence or absence of institute State default inventory's mark;
When identifying in the level cache there are the default inventory, the first warning information is generated, and this is preset into library Mark is deposited to save into the L2 cache;
When default inventory mark is not present in the level cache, it is equal by load that the multiple second is killed into request Weighing apparatus shares more application servers in the application server cluster.
Wherein, the memory that L2 cache is every application server in application server cluster is preset, inventory's mark is preset For " not in stock "/" inventory 0 ".Successively " not in stock "/" inventory 0 " is read according to the sequence of L2 cache, level cache Inventory's mark illustrates commodity when there is inventory's mark of " not in stock "/" inventory 0 " in L2 cache/level cache It sells and is over, generate the first warning information and feed back to the second and kill the corresponding client of request, for example, " commodity that you rush to purchase have been sold It is complete ".
It should be noted that when inventory's mark and level-one that " not in stock "/" inventory 0 " is not present in L2 cache are slow When depositing the middle inventory's mark that there is " not in stock "/" inventory 0 ", while generating the first warning information, also the inventory is identified It places into L2 cache, reads " not in stock "/" inventory 0 " when the reception second kills request convenient for next time directly from L2 cache Inventory mark, discharge invalidation request, relieving system pressure, meanwhile, effectively prevent commodity oversold phenomenon.
It should be noted that the timeliness of the data saved in L2 cache is than the timeliness of the data saved in level cache It is short.But application server is much larger than the speed read from level cache from the speed that L2 cache reads data.Therefore, by one Inventory's mark of " not in stock "/" inventory 0 " stored in grade caching is stored in L2 cache, and subsequent reading " nothing can be improved The speed of inventory "/" inventory 0 " inventory mark, quickly discharges invalidation request, improves the stability of system.
It is understood that the participation second, which kills movable commodity stocks and just sells, to be over, institute later within more than ten seconds time It is all invalidation request that second, which kills request, and each second kills request one verification step of every execution and all needs to consume server Can, and be invalid check, it is therefore desirable to intercept subsequent most requests.
In the present embodiment, by often receive a second kill request all go in L2 cache/level cache to obtain it is default Inventory's mark, stops the flow of subsequent check step, plays the role of protection system.In other embodiments, in generation " no library Deposit " after/inventory of " inventory 0 " mark, the channel that user submits the second to kill request is directly closed, user can not submit the second to kill and ask It asks, reduces the quantity of invalidation request to the maximum extent.
When there is no the inventories of " not in stock "/" inventory 0 " to identify in level cache, L2 cache, expression commodity are also It has not been robbed, it is effective tentatively to have illustrated that the second received kills request, it is also necessary to which partial invalidity is filtered out by user's qualification testing Request is only handled effective request.Specifically, described " according to preset proof rule, every second is killed request into The step of row qualification testing " includes:
It reads a verify data, including validation problem and default answer at random from default L2 cache, is tested described Card problem is sent to the second and kills the corresponding client of request, and receives the answer data of user's input, by the answer data It is compared with the default answer;
When the answer data and the inconsistent default answer, the second warning information is generated, returns and executes previous step Suddenly;Or
When the answer data is consistent with the default answer, request is killed according to the second and generates user's membership information, And user's membership information is inquired from the level cache, when user's membership information is not present in the level cache, User's qualification verifies successfully, and user's membership information is saved into level cache, alternatively, existing when in the level cache When user's membership information, third warning information is generated.
It should be noted that reading preset quantity (example from preset identifying code library when the operation activation second killing activity Such as, 10000) verify data save into L2 cache, the different application server in application server cluster is corresponding Verify data in L2 cache is not necessarily identical.Each verify data includes validation problem and default answer.
By taking the application server A in application server cluster as an example, receive gateway server distribution second kill request after, When commodity have not been robbed also, application server A transfers a verify data at random from L2 cache, by the verify data Validation problem, which is sent to, kills the corresponding client of request with the second, meanwhile, the resource prefix in request is killed according to this second, commodity are compiled Number, play number, Customs Assigned Number generate key, the default answer of this verify data is saved to level cache according to the parameter of key In.
After receiving the answer data that user is inputted by client, obtained from level cache according to the parameter of key default Answer, and compared with answer data:When answer is inconsistent according to case and default answer, generates the second warning information and feed back The corresponding client of request, such as " identifying code mistake " are killed to the second.Then, it re-reads a verify data and executes verifying Code check step.
The purpose of the step is, by the verify data being introduced into identifying code library, is not increasing the identification artificially identified On the basis of rate, the further difficulty for increasing machine recognition is effective to stop machine request to the pressure of system.
After through verifying code check, obtains the above-mentioned resource prefix killed in request according to the second, goods number, play and compile Number, Customs Assigned Number generate key as user's membership information, user's membership information is determined.Specifically, from level cache Middle inquiry user's membership information, if user's membership information is not present in level cache, then it is assumed that active user does not join The second of the commodity, the play was added to kill activity, that is to say, that active user has participation and participates in qualification, meanwhile, this is requested The user's membership information determined is saved into level cache.When, there are when user's membership information, being said in the level cache Bright active user participated in the commodity, the second of the play kills activity, generate third warning information and feed back to the second kill request pair The client answered, such as " time cannot repeat second kill the commodity, not having the second kills qualification ".
It is understood that in order to prevent single user's excess panic buying the second kill commodity, to be stored in the use in level cache Prefixed time interval is arranged in family membership information, and (prefixed time interval is consistent with the effective time that user pays, for example, 15 points Clock) effective time, effective time kills the time that commodity in activity have been rushed to purchase much larger than the second, then, user thinks to rush to purchase the second again When killing commodity, user's qualification testing can not be passed through.In addition, being used if user's qualification testing passes through and after subsequent authentication passes through Family selection does not pay or does not pay within a preset time interval, then ordering system can close list after prefixed time interval, The corresponding participation record of user's membership information is discharged from level cache simultaneously.That is, user is after 15 min The second that this commodity still can be participated in again kills, on condition that this commodity is also in stock.
Above-mentioned steps have further filtered out invalidation request, have solved single user brush by verifying to user's qualification Single problem, slows down system pressure.
S4, when the qualification testing that the second kills request passes through, to killing the void for requesting corresponding cache server with this second Quasi- inventory reduces, and is generated according to user's membership information and kill the corresponding default token information of request with the second, this is preset Token information is saved into default level cache;
When the second, which kills the corresponding user of request, to be had the second and kill qualification, the second is obtained according to latter two of Customs Assigned Number and kills and asks The virtual inventory on corresponding cache server is sought, virtual inventory is carried out once to reduce operation.Then, it is provided according to above-mentioned user Lattice information generates default token information corresponding with user's membership information, kills for example, killing the second for including in request according to this second Activity SN a, second kill movable play number r, and the second kills movable goods number i, Customs Assigned Number u, token, that is, token of generation For:a:r:i:Then this is preset token information and saved into level cache by u.
It is understood that similarly with user's qualification, if user's final choice does not pay or in preset time It is not paid in interval, then ordering system can close list after prefixed time interval, simultaneously, it is also desirable to discharge from level cache Fall the second and kills the corresponding default token information of request.Therefore, it is also desirable to which to default token time, one prefixed time interval is set Effective time, for example, 15 minutes.
It should be noted that can just provide token when virtual inventory is not zero, realizes to let pass to obtain and go to participate in reduce very The qualification of real inventory controls.It is negative after once reducing operation to virtual inventory progress, due to void when virtual inventory is zero Quasi- inventory is greater than true inventory and illustrates that the true inventory of commodity is also inadequate when empty Kuku deposits inadequate, token granting failure, raw It at the first warning information and feeds back to the second and kills the corresponding client of request, for example, " current commodity has been sold out ".
Further, the consumption requested to system performance is killed in order to reduce the subsequent second, generates and saves default inventory's mark Know in (" not in stock "/" inventory 0 ") to the level cache.
S5, the transaction request that user kills request submission for the second by qualification testing is received, according to the transaction request Real-time token information is generated, the real-time token information is verified, when the real-time token information verification passes through, logarithm It is reduced according to the true inventory in library, the second kills success.
User is by that can carry out subsequent payment operation in the preset time after qualification testing.It receives user and is based on the second The transaction request that request is submitted is killed, includes in transaction request:Second kills activity SN a, and the second kills movable play number r, and the second kills work Dynamic goods number i, Customs Assigned Number u etc. information, it is raw according to the information and preset token create-rule for including in transaction request At the real-time token information of the transaction request.Specifically, the step of described " verifying to the real-time token information " includes:
Obtaining the second from the level cache kills the corresponding default token information of request, when not depositing in the level cache In the default token information, determine that the implementation token information is invalid;
When in the level cache there are when the default token information, judge the real-time token information whether with it is described Default token information is consistent;
If inconsistent, determine that the real-time token information is invalid, prompts token verification failure;Or
If consistent, determine that the real-time token information is effective, token is prompted to verify successfully.
When the default token information being not present in level cache, illustrates that the default token information has been released, that is, exceed The effective time limit of payment.When implement token information it is consistent with default token information when, illustrate current transaction request accordingly second It kills request and has passed through above-mentioned user's qualification testing, for effectively request.
The purpose of the step is, it is consistent according to the parameter for including in request to assemble combination when link downstream request Key come the token that is needed when obtaining under user single, since prevent from verifying around system, direct request to core link.
After token verifies successfully, the true inventory of commodity need to be reduced, when commodity in database true inventory not When being zero, true inventory reduces successfully the then second and kills success, and transaction can just succeed, and so far, transaction is completed, when true inventory is because of certain When reason is reduced unsuccessfully, default token information can fail, and after prefixed time interval (for example, 15 minutes), user will have again The standby second kills qualification.
It should be noted that being after once reducing operation to true inventory progress when the true inventory of commodity is zero Negative illustrates that the true inventory of commodity is inadequate, can not trade, and generates the first warning information and feeds back to the transaction request pair The client answered, for example, " current commodity has been sold out ".
Further, the consumption requested to system performance is killed in order to reduce the subsequent second, generates and saves default inventory's mark Know in (" not in stock "/" inventory 0 ") to the level cache.
In this step, by the check token when user places an order and pays, the request of invalid token is filtered out, prevents from getting around Link request.
The second that above-described embodiment proposes kills request processing method, and the inventory by killing commodity to the second carries out inventory's hash, will Inventory after hash saves on each cache server into cache server cluster, passes through load using gateway server Second is killed every application server of the request distribution into application server cluster by equilibrium, and the second is killed request and is loaded into accordingly In cache server, the second is dispersed and has killed request, improved the responding ability of system;Qualification testing is carried out by killing request to the second, Invalidation request is filtered out, the pressure of system core service is slowed down;Level cache, L2 cache are constructed, server is successively from two Grade caching, level cache obtain corresponding information in database, improve the second and kill request treatment effeciency.
The present invention also provides a kind of application server clusters.It is application server cluster 1 of the present invention referring to shown in Fig. 2 Application environment schematic diagram.
It in the present embodiment, include more application servers 2 in application server cluster 1, the application server 2 receives The second that gateway server 4 distributes kills request, wherein the gateway server is used to receive user and passes through the number that client 5 is sent Kill request according to request, such as second, the application server 2 carries out data transmission with cache server cluster 3, for example, storage and It reads, the application server 2 carries out data transmission with client 5, for example, receive the identifying code that user inputs, or to visitor Feed back warning information etc. in family end 5.
Wherein, every cache server 31 is used as level cache, the application server in the cache server cluster 3 2 memory is as L2 cache.
It is the schematic diagram of the preferred embodiment of application server 2 in Fig. 2 referring to shown in Fig. 3.
In the present embodiment, application server 2 can be rack-mount server, blade server, tower server or Cabinet-type server.
The application server 2 includes memory 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 memory etc.), magnetic storage, disk, CD etc..Memory 11 It can be the internal storage unit of the application server 2, such as the hard disk of the application server 2 in some embodiments.It deposits Reservoir 11 is also possible to the External memory equipment of the application server 2, such as the application server 2 in further embodiments The plug-in type hard disk of upper outfit, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) block, flash card (Flash Card) etc..Further, memory 11 can also have been deposited both the inside including the application server 2 Storage unit also includes External memory equipment.
Memory 11 can be not only used for the application software and Various types of data that storage is installed on the application server 2, such as Second kills request handler 10 etc., can be also 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 11 Code or processing data, such as second kill request handler 10 etc..
Communication bus 13 is for realizing the connection communication between these components.
Network interface 14 optionally may include standard wireline interface and wireless interface (such as WI-FI interface), be commonly used in Communication connection is established between the application server 2 and other electronic equipments.
Fig. 3 illustrates only the application server 2 with component 11-14, it will be appreciated by persons skilled in the art that Fig. 3 The structure shown does not constitute the restriction of application server 2, may include than illustrating less perhaps more components or group Close certain components or different component layouts.
Optionally, which can also include user interface, and user interface may include display (Display), input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface, Wireless interface.
Optionally, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch control type LCD and show Device and Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED) touch device etc..Wherein, display It is properly termed as display screen or display unit, for being shown in the information handled in application server 2 and for showing visualization User interface.
In the embodiment of application server 2 shown in Fig. 3, as being deposited in a kind of memory 11 of computer storage medium The storage second kills the program code of request handler 10, real when the execution second of processor 12 kills the program code of request handler 10 Existing following steps:
A1, it is cached according to more that the inventory that the second kills commodity is evenly distributed in cache server cluster 3 by preset rules Server 31, and the corresponding virtual inventory of every cache server 31 is determined respectively;
Predefine a cache server cluster 3, wherein include m platform cache server in the cache server cluster 3 31, also, it regard cache server cluster 3 as level cache.
It is carrying out before the second kills activity, can predefine the second that the second kills in activity kills commodity and goods number, inventory, activity Information, the above- mentioned information such as play be stored in database (not identified in figure).Assuming that it includes a kind of commodity in activity that the second, which kills, from The physical holding of stock that the commodity are read in database is 10000, and according to two (00-99) after Customs Assigned Number, commodity stocks is divided It is 100 parts, this 100 parts of inventories are evenly distributed to cache server cluster 3 according to hash algorithm comprising 100 inventories by every part In m platform cache server 31 on.
It should be noted that inventory of the distribution on each cache server 31 into cache server cluster 3 is real Border inventory, but the inventory being actually stored on each cache server 31 is virtual inventory.In the case of generally asking, virtual library It deposits slightly larger than physical holding of stock, can be configured according to operator needs.Then, determine that every cache server 31 is right respectively The virtual inventory answered, and by virtual inventory information preservation into level-one inventory.
Assuming that the inventory that the second kills the commodity i in activity is 10000, then, key of the commodity i in every cache server 31 (key) it is respectively defined as:itemstock:r:i:00~itemstock:r:i:99, wherein itemstock is resource prefix (inventory), r are to kill movable play number the second, and i is the second to kill movable goods number, and " 00 "-" 99 " are two after Customs Assigned Number, The value (value) of the corresponding storage of each key is 100.That is, the second kills different plays and/or different commodity in activity, Corresponding key all can be different.
It is understood that the quantity of cache server 31 determines this cache server in cache server cluster 3 The digestion power of cluster 3, if the handling capacity of separate unit cache server 31 is 20,000 TPS, m platform cache server is handled up Amount is ten thousand TPS of 2m, and therefore, in the present embodiment, the value of m need to kill the concurrency in activity and determine by estimating the second.
A2, reception gateway server 4 kill request by the second that equally loaded distributes, wherein gateway server 4 reaches default When the moment, user is received by a plurality of second that client 5 is submitted and kills request;
Wherein, at the time of the predetermined time is that the second activity of killing starts.When the second activity of killing starts, gateway server 4 is received User kills request by the second that client 5 is submitted, and the second, which kills in request, includes:Customs Assigned Number, merchandise news, favor information etc..It can With understanding, at the time of the second kills beginning, can receive a large amount of seconds simultaneously kills request, for example, 10000 seconds kill request, need by This 10000 seconds kill every application server 2 of the request distribution into application server cluster 1 and are handled.
In the present embodiment, 10000 seconds are killed request and are respectively allocated to often by gateway server 4 according to DNS polling mechanism One application server 2.Wherein, the application of 4/ gateway server 4 of gateway server is F5 physical machine.Assuming that four application services Device 2 form application server cluster 1, IP address be respectively 172.28.20.1,172.28.20.2,172.28.20.3, 172.28.20.4, when user requests access to, gateway server 4, will be by by the order of round-robin scheduling IP address 172.28.20.1, the second of first user of sequential answering of 172.28.20.2,172.28.20.3 and 172.28.20.4, which kill, asks Ask, the second of next user kill request will with postrotational 172.28.20.2,172.28.20.3,172.28.20.4 and 172.20.20.1 such sequential answering, rotary course will continue, and successfully realize DNS load balancing.
After the second that application server 2 receives the distribution of gateway server 4 kills request, the user carried in request is killed according to the second Second is killed request and is loaded into cache server corresponding with Customs Assigned Number information by number information.It is carried in request for example, the second kills Latter two in Customs Assigned Number information are " 52 ", are determined in cache server cluster 3 in the key information of inventory two after Customs Assigned Number Position is the cache server 31 of " 52 ", which is killed request and is loaded into the cache server 31, for subsequent acquisition buffer service Virtual inventory information on device 31.
Second is killed request and is distributed every application server into application server cluster 1 by load balancing by above-mentioned steps On 2, and cache server cluster 3 is utilized, the concurrent several seconds is killed into request and is effectively guided in cache server cluster 3 not With the problem on cache server 31, avoiding individual server concurrent capability limited, realizes that the dispersion second kills the effect of request, mention The responding ability of the system of liter.
A3, read every second and kill the specifying information of request, according to preset proof rule, every second is killed request into Row qualification testing;
It is understood that in order to reduce the consumption of 1 performance of application server cluster, when the physical holding of stock of commodity is " 0 " When, the second for receiving user's transmission kills request, directly returns to the information sold out.Specifically, which includes:
Judge in default L2 cache with the presence or absence of default inventory's mark;
When identifying in the L2 cache there are the default inventory, the first warning information is generated;
When default inventory mark is not present in the L2 cache, judge in the level cache with the presence or absence of institute State default inventory's mark;
When identifying in the level cache there are the default inventory, the first warning information is generated, and this is preset into library Mark is deposited to save into the L2 cache;
When default inventory mark is not present in the level cache, it is equal by load that the multiple second is killed into request Weighing apparatus shares more application servers 2 in the application server cluster 1.
Wherein, the memory that L2 cache is every application server 2 in application server cluster 1 is preset, inventory's mark is preset Knowing is " not in stock "/" inventory 0 ".Successively " not in stock "/" inventory 0 " is read according to the sequence of L2 cache, level cache Inventory mark, when in L2 cache/level cache exist " not in stock "/" inventory 0 " inventory mark when, illustrate commodity It is over through selling, generates the first warning information and feed back to the second and kill the corresponding client 5 of request, for example, " commodity that you rush to purchase are It sells out ".
It should be noted that when inventory's mark and level-one that " not in stock "/" inventory 0 " is not present in L2 cache are slow When depositing the middle inventory's mark that there is " not in stock "/" inventory 0 ", while generating the first warning information, also the inventory is identified It places into L2 cache, reads " not in stock "/" inventory 0 " when the reception second kills request convenient for next time directly from L2 cache Inventory mark, discharge invalidation request, relieving system pressure, meanwhile, effectively prevent commodity oversold phenomenon.
It should be noted that the timeliness of the data saved in L2 cache is than the timeliness of the data saved in level cache It is short.But application server 2 is much larger than the speed read from level cache from the speed that L2 cache reads data.Therefore, will " not in stock " stored in level cache/" inventory 0 " inventory mark is stored in L2 cache, and subsequent reading can be improved The speed of inventory's mark of " not in stock "/" inventory 0 ", quickly discharges invalidation request, improves the stability of system.
When there is no the inventories of " not in stock "/" inventory 0 " to identify in level cache, L2 cache, expression commodity are also It has not been robbed, it is effective tentatively to have illustrated that the second received kills request, it is also necessary to which partial invalidity is filtered out by user's qualification testing Request is only handled effective request.
It should be noted that reading preset quantity (example from preset identifying code library when the operation activation second killing activity Such as, 10000) verify data save into L2 cache, different application server 2 in application server cluster 1 is corresponding L2 cache in verify data it is not necessarily identical.Each verify data includes validation problem and default answer.
By taking the application server A in application server cluster 1 as an example, the second for receiving the distribution of gateway server 4 kills request Afterwards, when commodity have not been robbed also, application server A transfers a verify data at random from L2 cache, by the verifying number According to validation problem be sent to and kill the corresponding client 5 of request with the second, meanwhile, killed according to this second resource prefix in request, Goods number, play number, Customs Assigned Number generate key, are saved the default answer of this verify data to one according to the parameter of key In grade caching.
After receiving the answer data that user is inputted by client 5, is obtained from level cache according to the parameter of key in advance If answer, and compared with answer data:When answer is inconsistent according to case and default answer, the second warning information of generation is simultaneously anti- Being fed to the second kills the corresponding client 5 of request, such as " identifying code mistake ".Then, it re-reads a verify data and executes Identifying code verification step.
The purpose of the step is, by the verify data being introduced into identifying code library, is not increasing the identification artificially identified On the basis of rate, the further difficulty for increasing machine recognition is effective to stop machine request to the pressure of system.
After through verifying code check, obtains the above-mentioned resource prefix killed in request according to the second, goods number, play and compile Number, Customs Assigned Number generate key as user's membership information, user's membership information is determined.Specifically, from level cache Middle inquiry user's membership information, if user's membership information is not present in level cache, then it is assumed that active user does not join The second of the commodity, the play was added to kill activity, that is to say, that active user has participation and participates in qualification, meanwhile, this is requested The user's membership information determined is saved into level cache.When, there are when user's membership information, being said in the level cache Bright active user participated in the commodity, the second of the play kills activity, generate third warning information and feed back to the second kill request pair The client 5 answered, such as " time cannot repeat second kill the commodity, not having the second kills qualification ".
It is understood that in order to prevent single user's excess panic buying the second kill commodity, to be stored in the use in level cache Prefixed time interval is arranged in family membership information, and (prefixed time interval is consistent with the effective time that user pays, for example, 15 points Clock) effective time, effective time kills the time that commodity in activity have been rushed to purchase much larger than the second, then, user thinks to rush to purchase the second again When killing commodity, user's qualification testing can not be passed through.In addition, being used if user's qualification testing passes through and after subsequent authentication passes through Family selection does not pay or does not pay within a preset time interval, then ordering system can close list after prefixed time interval, The corresponding participation record of user's membership information is discharged from level cache simultaneously.That is, user is after 15 min The second that this commodity still can be participated in again kills, on condition that this commodity is also in stock.
Above-mentioned steps have further filtered out invalidation request, have solved single user brush by verifying to user's qualification Single problem, slows down system pressure.
A4, when the qualification testing that the second kills request passes through, to killing the void for requesting corresponding cache server with this second Quasi- inventory reduces, and is generated according to user's membership information and kill the corresponding default token information of request with the second, this is preset Token information is saved into default level cache;
When the second, which kills the corresponding user of request, to be had the second and kill qualification, the second is obtained according to latter two of Customs Assigned Number and kills and asks The virtual inventory on corresponding cache server 31 is sought, virtual inventory is carried out once to reduce operation.Then, according to above-mentioned user Membership information generates default token information corresponding with user's membership information, for example, killing the second for including in request according to this second Activity SN a is killed, the second kills movable play number r, and the second kills movable goods number i, and the token of Customs Assigned Number u, generation are Token is:a:r:i:Then this is preset token information and saved into level cache by u.
It is understood that similarly with user's qualification, if user's final choice does not pay or in preset time It is not paid in interval, then ordering system can close list after prefixed time interval, simultaneously, it is also desirable to discharge from level cache Fall the second and kills the corresponding default token information of request.Therefore, it is also desirable to which to default token time, one prefixed time interval is set Effective time, for example, 15 minutes.
It should be noted that can just provide token when virtual inventory is not zero, realizes to let pass to obtain and go to participate in reduce very The qualification of real inventory controls.It is negative after once reducing operation to virtual inventory progress, due to void when virtual inventory is zero Quasi- inventory is greater than true inventory and illustrates that the true inventory of commodity is also inadequate when empty Kuku deposits inadequate, token granting failure, raw It at the first warning information and feeds back to the second and kills the corresponding client 5 of request, for example, " current commodity has been sold out ".
Further, the consumption requested to system performance is killed in order to reduce the subsequent second, generates and saves default inventory's mark Know in (" not in stock "/" inventory 0 ") to the level cache.
A5, the transaction request that user kills request submission for the second by qualification testing is received, according to the transaction request Real-time token information is generated, the real-time token information is verified, when the real-time token information verification passes through, logarithm It is reduced according to the true inventory in library, the second kills success.
User is by that can carry out subsequent payment operation in the preset time after qualification testing.It receives user and is based on the second The transaction request that request is submitted is killed, includes in transaction request:Second kills activity SN a, and the second kills movable play number r, and the second kills work Dynamic goods number i, Customs Assigned Number u etc. information, it is raw according to the information and preset token create-rule for including in transaction request At the real-time token information of the transaction request.
Specifically, obtaining the second from the level cache kills the corresponding default token information of request, in level cache not There are when the default token information, illustrating that the default token information has been released, that is, have exceeded the effective time limit of payment.Work as reality Apply token information it is consistent with default token information when, illustrating current transaction request, accordingly the second kills request and has passed through above-mentioned user money Lattice verifying, for effectively request.
The purpose of the step is, it is consistent according to the parameter for including in request to assemble combination when link downstream request Key come the token that is needed when obtaining under user single, since prevent from verifying around system, direct request to core link.
After token verifies successfully, the true inventory of commodity need to be reduced, when commodity in database true inventory not When being zero, true inventory reduces successfully the then second and kills success, and transaction can just succeed, and so far, transaction is completed, when true inventory is because of certain When reason is reduced unsuccessfully, default token information can fail, and after prefixed time interval (for example, 15 minutes), user will have again The standby second kills qualification.
It should be noted that being after once reducing operation to true inventory progress when the true inventory of commodity is zero Negative illustrates that the true inventory of commodity is inadequate, can not trade, and generates the first warning information and feeds back to the transaction request pair The client 5 answered, for example, " current commodity has been sold out ".
Further, the consumption requested to system performance is killed in order to reduce the subsequent second, generates and saves default inventory's mark Know in (" not in stock "/" inventory 0 ") to the level cache.
In this step, by the check token when user places an order and pays, the request of invalid token is filtered out, prevents from getting around Link request.
The application server 2 in application server cluster 1 that above-described embodiment proposes, by the second is killed the inventories of commodity into Row inventory hash, the inventory after hash is saved on each cache server into cache server cluster, gateway is utilized Second is killed every application server of the request distribution into application server cluster by load balancing by server, and the second is killed and is asked It asks and is loaded into corresponding cache server, dispersed the second and killed request, improved the responding ability of system;By killing request to the second Qualification testing is carried out, invalidation request is filtered out, slows down the pressure of system core service;Construct level cache, L2 cache, clothes Business device successively obtains corresponding information from L2 cache, level cache, database, and improving the second kills request treatment effeciency.
Optionally, in other examples, the second, which kills request handler 10, can also be divided into one or more Module, one or more module are stored in memory 11, and (the present embodiment is processor by one or more processors 12) performed, to complete the present invention, the so-called module of the present invention is the series of computation machine program for referring to complete specific function Instruction segment.For example, referring to shown in Fig. 4, the module diagram of request handler 10 is killed for the second in Fig. 3, in the embodiment, the second is killed Request handler 10 can be divided into inventory's Hash module 110, request distribution module 120, qualification testing module 130, enable Board provides module 140 and token correction verification module 150, and the functions or operations step that the module 110-150 is realized is and above Similar, and will not be described here in detail, illustratively, such as wherein:
Inventory's Hash module 110, for the inventory that the second kills commodity to be evenly distributed to cache server according to preset rules More cache servers in cluster, and the corresponding virtual inventory of every cache server is determined respectively;
Distribution module 120 is requested, request is killed by the second that equally loaded distributes for receiving gateway server, wherein net When closing server arrival predetermined time, user is received by a plurality of second that client is submitted and kills request;
Qualification testing module 130 kills the specifying information of request for reading every second, right according to preset proof rule Every second kills request and carries out qualification testing;
Token provides module 140, corresponding to request is killed with the second when qualification testing for killing request when the second passes through The virtual inventory of cache server reduced, and generated according to user's membership information and kill the corresponding default order of request with the second This is preset token information and saved into default level cache by board information;And
Token correction verification module 150 kills the transaction request that request is submitted for the second by qualification testing for receiving user, Real-time token information is generated according to the transaction request, the real-time token information is verified, when the real-time token is believed When breath verification passes through, the true inventory in database is reduced, the second kills success.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium, the computer readable storage medium In include the second killing request handler 10, the second, which kills, realizes following operation when request handler 10 is executed by processor:
A1, the inventory that the second kills commodity is evenly distributed to the clothes of more cachings in cache server cluster according to preset rules Business device, and the corresponding virtual inventory of every cache server is determined respectively;
A2, reception gateway server kill request by the second that equally loaded distributes, wherein when gateway server reaches default When quarter, user is received by a plurality of second that client is submitted and kills requester;
A3, read every second and kill the specifying information of request, according to preset proof rule, every second is killed request into Row qualification testing;
A4, when the qualification testing that the second kills request passes through, to killing the void for requesting corresponding cache server with this second Quasi- inventory reduces, and is generated according to user's membership information and kill the corresponding default token information of request with the second, this is preset Token information is saved into default level cache;And
A5, the transaction request that user kills request submission for the second by qualification testing is received, according to the transaction request Real-time token information is generated, the real-time token information is verified, when the real-time token information verification passes through, logarithm It is reduced according to the true inventory in library, the second kills success.
The specific embodiment of the computer readable storage medium of the present invention kills the specific of request processing method with the above-mentioned second Embodiment is roughly the same, and details are not described herein.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, device of element, article or method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of second kills request processing method, it is applied to application server cluster, which is characterized in that this method includes:
S1, more buffer services being evenly distributed to the inventory that the second kills commodity according to preset rules in cache server cluster Device, and the corresponding virtual inventory of every cache server is determined respectively;
S2, reception gateway server kill request by the second that equally loaded distributes, wherein gateway server reaches predetermined time When, user, which is received, by a plurality of second that client is submitted kills request;
The specifying information that S3, every second of reading kill request kills request to every second and provides according to preset proof rule Lattice verifying;
S4, when the qualification testing that the second kills request passes through, to killing the virtual library for requesting corresponding cache server with this second It deposits into row to reduce, and is generated according to user's membership information and kill the corresponding default token information of request with the second, this is preset into token Information preservation is into default level cache;And
S5, the transaction request that user kills request submission for the second by qualification testing is received, is generated according to the transaction request Real-time token information verifies the real-time token information, when the real-time token information verification passes through, to database In true inventory reduce, the second kills success.
2. the second as described in claim 1 kills request processing method, which is characterized in that this method includes:
When the second killing request qualification testing failure, qualification testing failure is prompted;And
When the real-time token information verification failure, token verification failure is prompted.
3. the second as claimed in claim 2 kills request processing method, which is characterized in that described in the cache server cluster is used as Level cache, the memory of every server is as L2 cache, before step S3, this method in the application server cluster Further include:
Judge in the L2 cache with the presence or absence of default inventory's mark;
When identifying in the L2 cache there are the default inventory, the first warning information is generated;
When default inventory mark is not present in the L2 cache, judge in the level cache with the presence or absence of described pre- If inventory identifies;
When identifying in the level cache there are the default inventory, the first warning information is generated, and this is preset into inventory's mark Know and saves into the L2 cache;Or
When default inventory mark is not present in the level cache, a plurality of second is killed into request and passes through load balancing point Spread out the multiple servers in the server cluster.
4. the second as described in any one of claims 1 to 3 kills request processing method, which is characterized in that the step S4 is also Including:
When the virtual inventory is zero, the first warning information is generated, generates and saves default inventory and identify to the level-one and delay In depositing.
5. the second as claimed in claim 4 kills request processing method, which is characterized in that the step S5 further includes:
When the true inventory is zero, the first warning information is generated, generates and saves default inventory and identify to the level-one and delay In depositing.
6. the second as claimed in claim 5 kills request processing method, which is characterized in that described " right according to preset proof rule Every second kill request carry out qualification testing " the step of include:
It reads a verify data, including validation problem and default answer at random from default L2 cache, the verifying is asked Topic is sent to the second and kills the corresponding client of request, and receives the answer data of user's input, by the answer data and institute Default answer is stated to be compared;
When the answer data and the inconsistent default answer, the second warning information is generated, returns and executes previous step;Or Person
When the answer data is consistent with the default answer, request is killed according to the second and generates user's membership information, and from User's membership information is inquired in the level cache, when user's membership information is not present in the level cache, user Qualification verifies successfully, and user's membership information is saved into level cache, alternatively, when there are the use in the level cache When the membership information of family, third warning information is generated.
7. the second as claimed in claim 6 kills request processing method, which is characterized in that it is described " to the real-time token information into Row verification " the step of include:
Obtaining the second from the level cache kills the corresponding default token information of request, when institute is not present in the level cache When stating default token information, determine that the implementation token information is invalid;
When in the level cache there are when the default token information, judge the real-time token information whether with it is described default Token information is consistent;
If inconsistent, determine that the real-time token information is invalid, prompts token verification failure;Or
If consistent, determine that the real-time token information is effective, token is prompted to verify successfully.
8. a kind of application server cluster, which is characterized in that the application server cluster includes more application servers, the clothes Business device include:Memory, processor, being stored with the second that can be run on the processor on the memory kills request processing journey Sequence, the second kill when request handler is executed by the processor, it can be achieved that following steps:
A1, more buffer services being evenly distributed to the inventory that the second kills commodity according to preset rules in cache server cluster Device, and the corresponding virtual inventory of every cache server is determined respectively;
A2, reception gateway server kill request by the second that equally loaded distributes, wherein gateway server reaches predetermined time When, user, which is received, by a plurality of second that client is submitted kills request;
The specifying information that A3, every second of reading kill request kills request to every second and provides according to preset proof rule Lattice verifying;
A4, when the qualification testing that the second kills request passes through, to killing the virtual library for requesting corresponding cache server with this second It deposits into row to reduce, and is generated according to user's membership information and kill the corresponding default token information of request with the second, this is preset into token Information preservation is into default level cache;And
A5, the transaction request that user kills request submission for the second by qualification testing is received, is generated according to the transaction request Real-time token information verifies the real-time token information, when the real-time token information verification passes through, to database In true inventory reduce, the second kills success.
9. application server cluster according to claim 8, which is characterized in that it is described that the second kills request handler When processor executes, it can also be achieved following steps:
When the second killing request qualification testing failure, qualification testing failure is prompted;And
When the real-time token information verification failure, token verification failure is prompted.
10. a kind of computer readable storage medium, which is characterized in that include the second killing request in the computer readable storage medium Processing routine, the second kill when request handler is executed by processor, it can be achieved that such as any one of claim 1 to 7 institute The step of second stated kills request processing method.
CN201810547915.2A 2018-05-31 2018-05-31 Second killing request processing method, application server cluster and storage medium Active CN108897615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810547915.2A CN108897615B (en) 2018-05-31 2018-05-31 Second killing request processing method, application server cluster and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810547915.2A CN108897615B (en) 2018-05-31 2018-05-31 Second killing request processing method, application server cluster and storage medium

Publications (2)

Publication Number Publication Date
CN108897615A true CN108897615A (en) 2018-11-27
CN108897615B CN108897615B (en) 2023-06-13

Family

ID=64343425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810547915.2A Active CN108897615B (en) 2018-05-31 2018-05-31 Second killing request processing method, application server cluster and storage medium

Country Status (1)

Country Link
CN (1) CN108897615B (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245153A (en) * 2019-05-20 2019-09-17 平安银行股份有限公司 Product data processing method, system, computer equipment and storage medium
CN110909978A (en) * 2019-10-15 2020-03-24 京东数字科技控股有限公司 Resource processing method, device, server and computer readable storage medium
CN111091405A (en) * 2019-09-12 2020-05-01 达疆网络科技(上海)有限公司 Implementation scheme for solving high concurrency of killing and promoting second
CN111260272A (en) * 2019-12-02 2020-06-09 泰康保险集团股份有限公司 Method, device, equipment and storage medium for responding to user request based on inventory
CN111435346A (en) * 2019-01-14 2020-07-21 阿里巴巴集团控股有限公司 Offline data processing method, device and equipment
CN111506445A (en) * 2020-04-21 2020-08-07 北京思特奇信息技术股份有限公司 Method and system for preventing repeated malicious ordering of commodities based on REDIS cache
CN111752957A (en) * 2019-03-28 2020-10-09 苏宁易购集团股份有限公司 Sale locking method and system based on caching
CN111782391A (en) * 2020-06-29 2020-10-16 北京达佳互联信息技术有限公司 Resource allocation method, device, electronic equipment and storage medium
CN111930786A (en) * 2020-08-14 2020-11-13 中国工商银行股份有限公司 Resource acquisition request processing system, method and device
CN112132662A (en) * 2020-09-28 2020-12-25 广州立白企业集团有限公司 Commodity second killing method and device, computer equipment and storage medium
CN112153158A (en) * 2020-09-29 2020-12-29 中国银行股份有限公司 Information processing method and device
CN112184326A (en) * 2020-10-14 2021-01-05 深圳市欢太科技有限公司 Method for processing high-concurrency killing activity, high-concurrency system, terminal and computer-readable storage medium
CN112511316A (en) * 2020-12-08 2021-03-16 深圳依时货拉拉科技有限公司 Single sign-on access method and device, computer equipment and readable storage medium
CN112669058A (en) * 2020-12-21 2021-04-16 上海多维度网络科技股份有限公司 Data processing method and device for application program, storage medium and electronic device
CN113315825A (en) * 2021-05-24 2021-08-27 康键信息技术(深圳)有限公司 Distributed request processing method, device, equipment and storage medium
CN113435931A (en) * 2021-06-29 2021-09-24 未鲲(上海)科技服务有限公司 Service data processing method and device, computer equipment and storage medium
CN113537852A (en) * 2020-04-14 2021-10-22 成都鼎桥通信技术有限公司 Second killing processing method and system
CN113762857A (en) * 2020-11-24 2021-12-07 北京沃东天骏信息技术有限公司 Inventory deduction method, device, equipment and storage medium
CN114445200A (en) * 2022-04-08 2022-05-06 中国光大银行股份有限公司 Second killing activity processing method and device
CN114520808A (en) * 2020-11-19 2022-05-20 南京亚信软件有限公司 Request processing method and device, electronic equipment and computer readable storage medium
CN115826875A (en) * 2023-01-05 2023-03-21 摩尔线程智能科技(北京)有限责任公司 Cache data invalidation verification method, device and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105940422A (en) * 2014-01-30 2016-09-14 苹果公司 Tokenizing authorizations
CN106170016A (en) * 2016-07-28 2016-11-30 深圳市创梦天地科技有限公司 A kind of method and system processing high concurrent data requests
CN106331772A (en) * 2015-06-17 2017-01-11 阿里巴巴集团控股有限公司 Data verification method and apparatus and smart television system
CN106997546A (en) * 2016-01-26 2017-08-01 中国移动通信集团安徽有限公司 A kind of order processing method and device
CN107220878A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 Transaction processing system, second kill order processing method and apparatus
WO2017201969A1 (en) * 2016-05-25 2017-11-30 乐视控股(北京)有限公司 Verification method and verification system for merchandise inventory

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105940422A (en) * 2014-01-30 2016-09-14 苹果公司 Tokenizing authorizations
CN106331772A (en) * 2015-06-17 2017-01-11 阿里巴巴集团控股有限公司 Data verification method and apparatus and smart television system
CN106997546A (en) * 2016-01-26 2017-08-01 中国移动通信集团安徽有限公司 A kind of order processing method and device
WO2017201969A1 (en) * 2016-05-25 2017-11-30 乐视控股(北京)有限公司 Verification method and verification system for merchandise inventory
CN106170016A (en) * 2016-07-28 2016-11-30 深圳市创梦天地科技有限公司 A kind of method and system processing high concurrent data requests
CN107220878A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 Transaction processing system, second kill order processing method and apparatus

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111435346A (en) * 2019-01-14 2020-07-21 阿里巴巴集团控股有限公司 Offline data processing method, device and equipment
CN111435346B (en) * 2019-01-14 2023-12-19 阿里巴巴集团控股有限公司 Offline data processing method, device and equipment
CN111752957A (en) * 2019-03-28 2020-10-09 苏宁易购集团股份有限公司 Sale locking method and system based on caching
CN111752957B (en) * 2019-03-28 2022-11-11 苏宁易购集团股份有限公司 Sale locking method and system based on caching
CN110245153A (en) * 2019-05-20 2019-09-17 平安银行股份有限公司 Product data processing method, system, computer equipment and storage medium
CN111091405A (en) * 2019-09-12 2020-05-01 达疆网络科技(上海)有限公司 Implementation scheme for solving high concurrency of killing and promoting second
CN111091405B (en) * 2019-09-12 2023-08-08 达疆网络科技(上海)有限公司 Implementation scheme for solving high concurrency of second killing promotion
CN110909978A (en) * 2019-10-15 2020-03-24 京东数字科技控股有限公司 Resource processing method, device, server and computer readable storage medium
CN111260272A (en) * 2019-12-02 2020-06-09 泰康保险集团股份有限公司 Method, device, equipment and storage medium for responding to user request based on inventory
CN113537852A (en) * 2020-04-14 2021-10-22 成都鼎桥通信技术有限公司 Second killing processing method and system
CN111506445A (en) * 2020-04-21 2020-08-07 北京思特奇信息技术股份有限公司 Method and system for preventing repeated malicious ordering of commodities based on REDIS cache
CN111782391A (en) * 2020-06-29 2020-10-16 北京达佳互联信息技术有限公司 Resource allocation method, device, electronic equipment and storage medium
CN111930786A (en) * 2020-08-14 2020-11-13 中国工商银行股份有限公司 Resource acquisition request processing system, method and device
CN111930786B (en) * 2020-08-14 2023-09-26 中国工商银行股份有限公司 Resource acquisition request processing system, method and device
CN112132662B (en) * 2020-09-28 2023-06-20 广州立白企业集团有限公司 Commodity second killing method and device, computer equipment and storage medium
CN112132662A (en) * 2020-09-28 2020-12-25 广州立白企业集团有限公司 Commodity second killing method and device, computer equipment and storage medium
CN112153158B (en) * 2020-09-29 2022-10-18 中国银行股份有限公司 Information processing method and device
CN112153158A (en) * 2020-09-29 2020-12-29 中国银行股份有限公司 Information processing method and device
CN112184326A (en) * 2020-10-14 2021-01-05 深圳市欢太科技有限公司 Method for processing high-concurrency killing activity, high-concurrency system, terminal and computer-readable storage medium
CN114520808A (en) * 2020-11-19 2022-05-20 南京亚信软件有限公司 Request processing method and device, electronic equipment and computer readable storage medium
CN113762857A (en) * 2020-11-24 2021-12-07 北京沃东天骏信息技术有限公司 Inventory deduction method, device, equipment and storage medium
CN112511316A (en) * 2020-12-08 2021-03-16 深圳依时货拉拉科技有限公司 Single sign-on access method and device, computer equipment and readable storage medium
CN112669058A (en) * 2020-12-21 2021-04-16 上海多维度网络科技股份有限公司 Data processing method and device for application program, storage medium and electronic device
CN113315825A (en) * 2021-05-24 2021-08-27 康键信息技术(深圳)有限公司 Distributed request processing method, device, equipment and storage medium
CN113435931A (en) * 2021-06-29 2021-09-24 未鲲(上海)科技服务有限公司 Service data processing method and device, computer equipment and storage medium
CN113435931B (en) * 2021-06-29 2024-06-11 广州喜淘信息科技有限公司 Service data processing method, device, computer equipment and storage medium
CN114445200A (en) * 2022-04-08 2022-05-06 中国光大银行股份有限公司 Second killing activity processing method and device
CN115826875A (en) * 2023-01-05 2023-03-21 摩尔线程智能科技(北京)有限责任公司 Cache data invalidation verification method, device and system
CN115826875B (en) * 2023-01-05 2023-04-28 摩尔线程智能科技(北京)有限责任公司 Cache data invalidation verification method, device and system

Also Published As

Publication number Publication date
CN108897615B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN108897615A (en) Second kills request processing method, application server cluster and storage medium
US10603584B2 (en) Dynamic resource allocation for gaming applications
CN108596623B (en) Block chain consensus achieving method
CN107332902B (en) The user of online customer service system asks distribution method, device and computing device
US20190287100A1 (en) Method for managing token based on heterogeneous blockchain networks, and token management server using the same
CN104966214B (en) A kind of exchange method and device of electronic ticket
CN104737132B (en) For the message queue in on-demand service environment based on the resource-sharing bidded
US9147170B2 (en) Methods and systems for reducing burst usage of a networked computer system
US8719131B1 (en) Allocating financial risk and reward in a multi-tenant environment
CN109584082A (en) Settlement of insurance claim method, electronic device and storage medium based on block chain
CN108111554B (en) Control method and device for access queue
CN106997546A (en) A kind of order processing method and device
CN105740958A (en) Beautifying appointment system, terminal and beautifying appointment method
CN107018091A (en) The dispatching method and device of resource request
CN110362409A (en) Based on a plurality of types of resource allocation methods, device, equipment and storage medium
CN108429783A (en) Electronic device, configuration file method for pushing and storage medium
CN107959891A (en) A kind of live broadcast system
CN110990486A (en) Block link evidence issuing and storing method and device based on network data interaction
CN108681481A (en) The processing method and processing device of service request
CN107527222A (en) Information processing method and apparatus and system
CN106713388A (en) Emergent business processing method and device
US10678192B1 (en) Optimization of production systems
CN110413918A (en) Data transmission method for uplink, device, equipment and storage medium
CN109684547A (en) Method and apparatus for handling information
CN108112268A (en) Management and the relevant load balancer of automatic expanded set

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant