CN109949135A - High concurrent transaction request processing method, system, equipment and storage medium - Google Patents

High concurrent transaction request processing method, system, equipment and storage medium Download PDF

Info

Publication number
CN109949135A
CN109949135A CN201910211323.8A CN201910211323A CN109949135A CN 109949135 A CN109949135 A CN 109949135A CN 201910211323 A CN201910211323 A CN 201910211323A CN 109949135 A CN109949135 A CN 109949135A
Authority
CN
China
Prior art keywords
commodity
transaction request
inventory
transaction
high concurrent
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.)
Pending
Application number
CN201910211323.8A
Other languages
Chinese (zh)
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.)
Jiangsu Manyun Software Technology Co Ltd
Original Assignee
Jiangsu Manyun Software Technology 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 Jiangsu Manyun Software Technology Co Ltd filed Critical Jiangsu Manyun Software Technology Co Ltd
Priority to CN201910211323.8A priority Critical patent/CN109949135A/en
Publication of CN109949135A publication Critical patent/CN109949135A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of high concurrent transaction request processing method, system, equipment and storage mediums, this method comprises: receiving transaction request, obtain commodity sign information;Judge that the commodity that the transaction request is directed toward whether there is in preset hot spot commodity list, if it is, the transaction request is then distributed to the first business processing cluster, commodity stocks number in the first inventory database is reduced by it, otherwise the transaction request is distributed to the second business processing cluster, merchandising database in the second inventory database is reduced by it.By using the solution of the present invention, the type of merchandise that transaction request is directed toward is distinguished according to hot spot commodity list, hot spot commodity and general goods point are handled in different server clusters, and inventory is managed by different inventory databases respectively, to provide the transaction request processing scheme of high concurrent and High Availabitity.

Description

High concurrent transaction request processing method, system, equipment and storage medium
Technical field
The present invention relates to technical field of data processing more particularly to a kind of high concurrent transaction request processing method, system, set Standby and storage medium.
Background technique
The activity of killing of the second of commodity can attract a large amount of flows often with biggish discount or hot-sale products in a short time Into needing relationship trading system to meet high concurrent and High Availabitity.Often by general goods and fast sale in existing transaction system The transaction requests of hot spot commodity be placed in the same server cluster and handled, however in a short time due to hot item It has a large amount of transaction to occur, the service mechanism of general goods is not able to satisfy the transactional services demand of hot spot commodity.
Summary of the invention
For the problems of the prior art, the purpose of the present invention is to provide a kind of high concurrent transaction request processing method, System, equipment and storage medium handle hot spot commodity and general goods point in different server clusters, and library It deposits and is managed respectively by different inventory databases, to provide the transaction request processing scheme of high concurrent and High Availabitity.
The embodiment of the present invention provides a kind of high concurrent transaction request processing method, and described method includes following steps:
S100: receiving transaction request, obtains the commodity sign information in the transaction request;
S200: judge that the commodity that the transaction request is directed toward whether there is in preset heat according to the commodity sign information In point commodity list, if it is, continuing step S300, otherwise continue step S400;
S300: the transaction request is distributed to the first business processing cluster, the first business processing cluster configuration is The inventory of the commodity in first inventory database is reduced;
S400: the transaction request is distributed to the second business processing cluster, the second business processing cluster configuration is The inventory of the commodity in second inventory database is reduced.
Optionally, further include following steps after receiving transaction request in the step S100:
Identifying code checking request is sent to user, and receives the identifying code verification result of user's return, if user's checking Success, then obtain the commodity sign information in the transaction request, if user's checking fails, is not responding to the transaction and asks It asks, terminates current process.
Optionally, further include following steps between the step S100 and step S200:
Deduct the inventory for the commodity that the transaction request is directed toward in advance in inventory's caching;
After being spaced the default waiting time, judge whether user completes to pay;
If user completes payment, continue step S200;
If user does not complete payment, the inventory of the commodity is covered in inventory caching, and terminates current stream Journey.
Optionally, in inventory's caching, inventory's key of each commodity is split as multiple libraries according to preset splitting rule Deposit sub-key, each inventory's sub-key is directed toward at least one inventory of a commodity, the institute of each inventory's key sub-key direction in stock The summation of inventory is equal to the inventory of the commodity;
The inventory for deducting the commodity that the transaction request is directed toward in advance in inventory's caching, includes the following steps:
To the commodity that the transaction request is directed toward, poll obtains the corresponding inventory of the commodity from inventory's sub-key list Sub-key reduces the corresponding inventory of inventory's sub-key;
It is finished if the corresponding inventory of inventory's sub-key reduced is reduced, which is arranged from inventory's sub-key It is deleted in table.
Optionally, in the step S300, the transaction request is distributed to the first business processing cluster, including according to one The load balancing of cause property Hash, routes to the first business processing cluster for the transaction request based on Nginx.
Optionally, between the step S100 and S200, by the transaction request be distributed to the first business processing cluster it Afterwards, further include following steps:
The first business processing cluster obtains the transaction request corresponding to the filtering according to preset filter attribute The attribute value of attribute, judges whether the attribute value of the transaction request matches at least one preset current-limiting filtering condition, if so, The transaction request is not responded then, and terminate current process, otherwise continues step S200.
Optionally, the high concurrent transaction request processing method further includes following steps:
Transaction log is periodically obtained, the transaction history data of commodity is obtained from the transaction log;
According to the transaction history data of each commodity, judge whether the commodity match preset hot spot commodity identification Strategy;
If it is, the commodity sign information of the commodity is added in the hot spot commodity list, and by the commodity Inventory information migrate from second inventory database into first inventory database.
Optionally, in the step S300, the first business processing cluster configuration is using following steps to the first library The inventory of the commodity is reduced in deposit data library:
The first business processing cluster judges whether the inventory data of the commodity has moved to first inventory According to library;
If it is, the first business processing cluster is somebody's turn to do according to the transaction request in first inventory database The inventory of commodity is reduced;
Otherwise, the inventory information of the commodity is migrated from second inventory database to first inventory database In, and before migration is completed, the inventory of the commodity in second inventory database is reduced.
Optionally, after the commodity sign information by the commodity is added in the hot spot commodity list, further include Following steps:
The commodity isomeric data is stored in merchandise news caching by the commodity isomeric data for obtaining the commodity.
Optionally, display when the high concurrent transaction request processing method further includes the transaction page request for receiving user The step of transaction page, the display transaction page include the following steps:
Accelerated using static resource of the content distributing network to the transaction page;
According to the merchandise news caching in commodity isomeric data and preset dynamic resource template rendering generate described in The dynamic resource of transaction page.
Optionally, the high concurrent transaction request processing method further includes following steps:
The binlog log of the commodity information database is monitored, commodity isomery is periodically extracted from the binlog log Data, and be stored in the merchandise news caching;
It is described to render the dynamic resource for generating the transaction page, including based on described in Nginx and Lua service rendering generation The dynamic resource of transaction page.
The embodiment of the present invention also provides a kind of high concurrent transaction request processing system, asks applied to the high concurrent transaction Processing method is sought, the system comprises:
Transaction request receiving module obtains the commodity sign information in the transaction request for receiving transaction request;
Hot spot commodity judgment module, the commodity for judging that the transaction request is directed toward according to the commodity sign information are It is no to be present in preset hot spot commodity list;
Transaction request distribution module, the corresponding transaction request point of commodity for will be present in the hot spot commodity list It is sent to the first business processing cluster, and the corresponding transaction request of commodity that would not exist in the hot spot commodity list is distributed to Second business processing cluster, the first business processing cluster configuration are when receiving transaction request in the first inventory database The inventory of the commodity is reduced, and the second business processing cluster configuration is when receiving transaction request according to the transaction The inventory of the commodity in the second inventory database is reduced in request.
The embodiment of the present invention also provides a kind of high concurrent transaction request processing equipment, comprising:
Processor;
Memory, wherein being stored with the executable instruction of the processor;
Wherein, the processor is configured to execute the high concurrent transaction request via the executable instruction is executed The step of processing method.
The embodiment of the present invention also provides a kind of computer readable storage medium, and for storing program, described program is performed Described in Shi Shixian the step of high concurrent transaction request processing method.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
High concurrent transaction request processing method, system, equipment and storage medium provided by the present invention have the advantage that
The present invention solves the problems of the prior art, distinguishes the commodity class that transaction request is directed toward according to hot spot commodity list Type handles hot spot commodity and general goods point in different server clusters, and inventory is respectively by different libraries Deposit data library is managed, to provide the transaction request processing scheme of high concurrent and High Availabitity.
Detailed description of the invention
Upon reading the detailed description of non-limiting embodiments with reference to the following drawings, other feature of the invention, Objects and advantages will become more apparent upon.
Fig. 1 is the flow chart of the high concurrent transaction request processing method of one embodiment of the invention;
Fig. 2 is the structural schematic diagram of the high concurrent transaction request processing system of one embodiment of the invention;
Fig. 3 is the transaction request processing system for increasing identifying code verifying and the identification of hot spot commodity of one embodiment of the invention Structural schematic diagram;
Fig. 4 is the flow chart of the hot spot commodity identification of one embodiment of the invention;
Fig. 5 is the flow chart that the inventory of one embodiment of the invention deducts in advance;
Fig. 6 is the structural schematic diagram of the transaction request processing system after the stock buildup of one embodiment of the invention is deducted in advance;
Fig. 7 is the structural schematic diagram of page display portion in the transaction request processing system of one embodiment of the invention;
Fig. 8 is the schematic diagram of the high concurrent transaction request processing equipment of one embodiment of the invention;
Fig. 9 is the schematic diagram of the computer readable storage medium of one embodiment of the invention.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will more Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.
In addition, attached drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical attached drawing mark in figure Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place These functional entitys are realized in reason device device and/or microcontroller device.
As shown in Figure 1, the embodiment of the present invention provides a kind of high concurrent transaction request processing method, include the following steps:
S100: receiving transaction request, obtains the commodity sign information in the transaction request;
S200: judge that the commodity that the transaction request is directed toward whether there is in preset heat according to the commodity sign information In point commodity list, if it is, continuing step S300, otherwise continue step S400;
S300: the transaction request is distributed to the first business processing cluster, the first business processing cluster configuration is The inventory of the commodity in first inventory database is reduced;
S400: the transaction request is distributed to the second business processing cluster, the second business processing cluster configuration is The inventory of the commodity in second inventory database is reduced.
In user in the corresponding purchase button of click commodity in transaction page, transaction request is received, and pass through step Rapid S200 may determine that commodity whether there is in preset hot spot commodity list according to commodity sign information, that is, commodity ID, It whether is that hot spot commodity are assigned it in different business processing clusters and handled according to commodity, the transaction of hot spot commodity is asked It asks and is handled by the first business processing cluster, the transaction request of non-hot commodity is handled by the second business processing cluster, and hot spot The inventory data of commodity and non-hot commodity is respectively stored in the first inventory database and the second inventory database.To realize The isolation of the transactional services of hot spot commodity and non-hot commodity, the handling capacity for dividing table to promote inventory database by point library, thus Improve the high concurrent and High Availabitity of transaction request processing scheme.
As shown in Fig. 2, the embodiment of the present invention also provides a kind of high concurrent transaction request processing system, applied to the height Concurrent transaction request processing method, the system comprises:
Transaction request receiving module M100 obtains the commodity sign letter in the transaction request for receiving transaction request Breath;
Hot spot commodity judgment module M200, for judging the quotient of the transaction request direction according to the commodity sign information Product whether there is in preset hot spot commodity list;
Transaction request distribution module M300, the corresponding transaction of commodity for will be present in the hot spot commodity list are asked It asks and is distributed to the first business processing cluster M410, and the corresponding transaction of commodity that would not exist in the hot spot commodity list is asked It asks and is distributed to the second business processing cluster M510.
Wherein, to the first inventory database when the first business processing cluster M410 is configured to receive transaction request The inventory of the commodity is reduced in M420, root when the second business processing cluster M510 is configured to receive transaction request It is reduced according to inventory of the transaction request to the commodity in the second inventory database M520.
Therefore, transaction request processing system of the invention carries out hot spot commodity by the synergistic effect of above-mentioned modules Transactional services isolation and inventory data management with non-hot commodity are isolated, so that the height for improving transaction request processing system can With property and high concurrent.
As shown in figure 3, in this embodiment, in the transaction request processing system, transaction request receiving module M100 is also Including identifying code authentication module M110, the identifying code authentication module M110 in transaction request receiving module M100 for receiving After transaction request, identifying code checking request is sent to user, and receive the identifying code verification result of user's return, if user It is proved to be successful, then obtains the commodity sign information in the transaction request, if user's checking fails, be not responding to the transaction Request terminates current process.Wherein, the identifying code that identifying code checking request can be randomly generated either answer verifying is asked It asks.For the present invention by the authentication function of identifying code authentication module M110, can intercept the second kills continuously requesting and extend rear end for device Time window is handled, the handling capacity of transaction request processing system is improved.
As shown in figure 3, the transaction request processing system can also include that hot spot items list caches, arranged in hot spot commodity The commodity ID list of hot spot commodity is cached in table cache, hot spot commodity judgment module M200 is judging whether a commodity are heat When point commodity, hot spot items list is obtained from hot spot items list caching first, is then compared, if commodity ID can be found in hot spot items list, then the commodity are hot spot commodity, conversely, the commodity are common non-hot commodity. Hot spot items list caching periodically can pull hot spot items list from long-range Redis cluster.Redis is the use of an open source ANSI C language writes, support network, it is memory-based also can persistence log type, Key-Value database.
Hot spot items list can be periodically updated according to the real trade situation of commodity, and deletion is converted into non-hot quotient The commodity ID of product, the newly-increased commodity ID for being converted into hot spot commodity.Specifically, as shown in figure 4, in this embodiment, the height is simultaneously Sending out transaction request processing method further includes following steps:
S510: periodically obtaining transaction log, and the transaction history data of commodity is obtained from the transaction log;
S520: according to the transaction history data of each commodity, judge whether the commodity match preset hot spot quotient Product assert strategy;
S530: if it is, the commodity belong to hot spot commodity, the hot spot is added in the commodity sign information of the commodity In commodity list;
S540: the inventory information of the hot spot commodity is migrated from second inventory database to first inventory data In library.
Further, after step S540, it can also include S550: obtain the commodity isomeric data of the commodity, by institute Commodity isomeric data is stated to be stored in merchandise news caching.The isomeric data of commodity may include as belonging to product name, commodity The not high data of requirement of real-time such as shop title, SKU (Stock Keeping Unit, keeper unit) and inventory, Service statistic information etc..
In this embodiment, in the step S300, the first business processing cluster configuration is using following steps pair The inventory of the commodity is reduced in first inventory database:
The first business processing cluster judges whether the inventory data of the commodity has moved to first inventory According to library;
If it is, the first business processing cluster is somebody's turn to do according to the transaction request in first inventory database The inventory of commodity is reduced;
Otherwise, the inventory information of the commodity is migrated from second inventory database to first inventory database In, and before migration is completed, the inventory of the commodity in second inventory database is reduced.
As shown in figure 5, in this embodiment, before the physical holding of stock to commodity is deducted, can also increase and withhold The function of removing.Specifically, inventory's caching is added, is stored with the stockpile number of extensive stock in inventory's caching, periodically with first Inventory database and the second inventory database synchronize, and obtain newest inventory change data.As shown in fig. 6, the transaction Demand processing system further includes that inventory caches M130 and payment module M140, and inventory caches M130 and is used to carry out the inventory of commodity Pre- to deduct, payment module M140 is then used to judge whether user to complete payment within a limited period of time.
Further include following steps between the step S100 and step S200:
S110: the inventory for the commodity that the transaction request is directed toward is deducted in advance in inventory's caching;
S120: after being spaced the default waiting time, judging whether user completes to pay, this default waiting time is to leave use for It the time of family payment, can be set as needed, such as 15min, 5min etc.;
S130: if user completes payment, continue step S200;
S140: if user does not complete payment, the inventory of the commodity is covered in inventory caching, and terminates to work as Preceding process.
In practical applications, the inventory that the commodity that the transaction request is directed toward successfully are deducted in inventory's caching, sends delay Notification message middleware after message, message-oriented middleware judge whether user completes to pay by payment module M140.
In this embodiment, in inventory's caching, inventory's key key of each commodity is split according to preset splitting rule At least one inventory of a commodity, inventory's key are directed toward for multiple inventory's sub-key subkey, each inventory's sub-key subkey In stock sub-key be directed toward inventory summation be equal to the commodity inventory;
The inventory for deducting the commodity that the transaction request is directed toward in advance in inventory's caching, includes the following steps:
To the commodity that the transaction request is directed toward, poll obtains the corresponding inventory of the commodity from inventory's sub-key list Sub-key reduces the corresponding inventory of inventory's sub-key;
It is finished if the corresponding inventory of inventory's sub-key reduced is reduced, which is arranged from inventory's sub-key It is deleted in table.
Here by inventory's fragment in caching and commodity key is split into multiple commodity sub-keys, can be asked to avoid hot spot Topic improves the processing speed of inventory's caching.After user's actual delivery, physical holding of stock button can be just carried out in the database Subtract, divide table by a point library, and the queuing capability of Ali SQL can be introduced to promote the handling capacity of database, and can be with Commodity oversold cannot be prevented less than 0 by the way that inventory's field is arranged.
In this embodiment, in the step S300, the transaction request is distributed to the first business processing cluster, including According to the load balancing of consistency Hash, Nginx (high performance HTTP and reverse proxy service) is based on by the transaction request Route to the first business processing cluster.In consistency hash algorithm, each node has the ID being randomly assigned.Will in When appearance is mapped to node, consistency Hash operation is carried out using the keyword of content and the ID of node and obtains key assignments.Consistency Hash algorithm requires key assignments and node ID to be in same codomain.Simplest key assignments and ID can be it is one-dimensional, such as from 0000 To 9999 integer set, but not limited to this.When according to key assignments storage content, content will be stored in have and most connect with its key assignments On the node of close ID.Such as key assignments is 1001 content, having ID in system is 1000,1010,1100 node, which will It is mapped to 1000 nodes.
As shown in fig. 6, the transaction request processing system further includes current-limiting filtering module M120, M130 pairs is cached in inventory Before the inventory of commodity deduct in advance, also transaction request is screened using current-limiting filtering module.In this embodiment, institute It states between step S100 and S200, further includes following steps after the transaction request is distributed to the first business processing cluster:
The first business processing cluster obtains the transaction request corresponding to the filtering according to preset filter attribute The attribute value of attribute, judges whether the attribute value of the transaction request matches at least one preset current-limiting filtering condition, if so, The transaction request is not responded then, and terminate current process, otherwise continues step S200.
The strategy of current-limiting filtering can be set as needed, such as setting: request number of times current limliting, corresponding filter attribute are The request number of times of same user within the predetermined time;Request frequency current limliting, corresponding filter attribute are asking for same user Seek frequency;Blacklist current limliting, corresponding filter attribute are the ID or IP address of user, judge whether the ID of user or IP address deposit Be in blacklist etc..
As shown in fig. 7, transaction request processing system of the invention further includes page display portion, specifically, the page is shown Part include page request module M610, static resource module M620, dynamic resource module M630, merchandise news caching M640, Monitor module M650 and commodity information database M660.
In this embodiment, the high concurrent transaction request processing method further includes receiving the transaction page request of user When the step of showing transaction page, the display transaction page includes the following steps:
The page request module M610 receives the transaction page request of user, and user can pass through in shopping website The transaction page that specific column request enters the corresponding commodity of the column is clicked, that is, the transaction page for having initiated the column is asked It asks;
The static resource module M620 is carried out using the static resource of content distributing network (CDN) to the transaction page Accelerate;
The dynamic resource module M630 caches the commodity isomeric data and preset in M640 according to the merchandise news The rendering of dynamic resource template generates the dynamic resource of the transaction page.
The dynamic resource module M630, can be by real-times such as prices when obtaining the commodity isomeric data less than needs Very high data are come out by inquiring back-end server real-time query.
Heterogeneous data refers to the merchandise news that will be dispersed in each library, each table, and description is combined in Redis caching, side Just obtain, meanwhile, can by binlog (binlog be a binary format file, for recording user to database more New SQL statement information, for example, change database table and change content SQL statement can all be recorded in binlog) monitor library, The number of above- mentioned information in table, and update the data in caching.
In this embodiment, the high concurrent transaction request processing method further includes following steps:
The monitoring module M650 monitors the binlog log of the commodity information database M660, periodically from described Commodity isomeric data is extracted in binlog log, and is stored in the merchandise news caching M640;
The dynamic resource module M630 rendering generates the dynamic resource of the transaction page, including is based on Nginx and Lua (it is a small and exquisite scripting language, can be easily called by C/C++ code, the letter of C/C++ can also be called in turn Number) service the dynamic resource that rendering generates the transaction page.
The method that the front end portion of transaction page of the invention uses sound separation, static resource are accelerated by CDN, Yong Hujin Row repeats the second and only needs to click the second when killing and kill button, and answer or identifying code verifying are had when the second kills, and kills device to intercept the second and asks It asks and extends back-end processing time window.The rendering that Nginx can provide dynamic resource is shown, and can provide limit above-mentioned Flow through the function of filter transaction request.Therefore, transaction request is screened altogether in the embodiment twice, is once static resource Partial identifying code verifies screening, is once the current-limiting filtering screening of dynamic resource part, so that screening out the malice second kills request, Ensure the quick response to normal use user.
The transaction request processing system of the embodiment can further include configuration center, and configuration center can be to the reality The each strategy being related in example is applied to be configured and adjusted.Specifically, configuration center can match current-limiting filtering strategy It sets, hot spot commodity identification strategy can also be configured.
The embodiment of the present invention also provides a kind of high concurrent transaction request processing equipment, including processor;Memory, wherein depositing Contain the executable instruction of the processor;Wherein, the processor is configured to execute via the executable instruction is executed The step of described high concurrent transaction request processing method.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here Referred to as " circuit ", " module " or " platform ".
The electronic equipment 600 of this embodiment according to the present invention is described referring to Fig. 8.The electronics that Fig. 8 is shown Equipment 600 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in figure 8, electronic equipment 600 is showed in the form of universal computing device.The combination of electronic equipment 600 can wrap Include but be not limited to: at least one processing unit 610, at least one storage unit 620, connection different platform combination (including storage Unit 620 and processing unit 610) bus 630, display unit 640 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 610 Row, so that the processing unit 610 executes described in this specification above-mentioned electronic prescription circulation processing method part according to this The step of inventing various illustrative embodiments.For example, the processing unit 610 can execute step as shown in fig. 1.
The storage unit 620 may include the readable medium of volatile memory cell form, such as random access memory Unit (RAM) 6201 and/or cache memory unit 6202 can further include read-only memory unit (ROM) 6203.
The storage unit 620 can also include program/practical work with one group of (at least one) program module 6205 Tool 6204, such program module 6205 includes but is not limited to: operating system, one or more application program, other programs It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 630 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 600 communicate, and/or with make Any equipment (such as the router, modulation /demodulation that the electronic equipment 600 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/O) interface 650.Also, electronic equipment 600 can be with By network adapter 660 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 660 can be communicated by bus 630 with other modules of electronic equipment 600.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 600, including but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage platform etc..
The embodiment of the present invention also provides a kind of computer readable storage medium, and for storing program, described program is performed Described in Shi Shixian the step of high concurrent transaction request processing method.In some possible embodiments, of the invention each Aspect is also implemented as a kind of form of program product comprising program code, when described program product on the terminal device When operation, said program code is for making the terminal device execute this specification above-mentioned electronic prescription circulation processing method part Described according to the present invention various illustrative embodiments the step of.
Refering to what is shown in Fig. 9, describing the program product for realizing the above method of embodiment according to the present invention 800, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device, Such as it is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be with To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
In conclusion compared with prior art, high concurrent transaction request processing method provided by the present invention, is set system Standby and storage medium has the advantage that
The present invention solves the problems of the prior art, distinguishes the commodity class that transaction request is directed toward according to hot spot commodity list Type handles hot spot commodity and general goods point in different server clusters, and inventory is respectively by different libraries Deposit data library is managed, to provide the transaction request processing scheme of high concurrent and High Availabitity.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that Specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, exist Under the premise of not departing from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to of the invention Protection scope.

Claims (14)

1. a kind of high concurrent transaction request processing method, which comprises the steps of:
S100: receiving transaction request, obtains the commodity sign information in the transaction request;
S200: judge that the commodity that the transaction request is directed toward whether there is in preset hot spot quotient according to the commodity sign information In name of an article list, if it is, continuing step S300, otherwise continue step S400;
S300: being distributed to the first business processing cluster for the transaction request, and the first business processing cluster configuration is to the The inventory of the commodity is reduced in one inventory database;
S400: being distributed to the second business processing cluster for the transaction request, and the second business processing cluster configuration is to the The inventory of the commodity is reduced in two inventory databases.
2. high concurrent transaction request processing method according to claim 1, which is characterized in that in the step S100, connect Further include following steps after receiving transaction request:
Identifying code checking request is sent to user, and receives the identifying code verification result of user's return, if user's checking success, The commodity sign information in the transaction request is then obtained, if user's checking fails, is not responding to the transaction request, is terminated Current process.
3. high concurrent transaction request processing method according to claim 1, which is characterized in that the step S100 and step Further include following steps between S200:
Deduct the inventory for the commodity that the transaction request is directed toward in advance in inventory's caching;
After being spaced the default waiting time, judge whether user completes to pay;
If user completes payment, continue step S200;
If user does not complete payment, the inventory of the commodity is covered in inventory caching, and terminate current process.
4. high concurrent transaction request processing method according to claim 3, which is characterized in that in inventory's caching, often Inventory's key of a commodity is split as multiple inventory's sub-keys according to preset splitting rule, and each inventory's sub-key is directed toward a commodity extremely A few inventory, the inventory of the summation of the institute of each inventory's key inventory that sub-key is directed toward in stock equal to the commodity;
The inventory for deducting the commodity that the transaction request is directed toward in advance in inventory's caching, includes the following steps:
To the commodity that the transaction request is directed toward, poll obtains corresponding inventory's of the commodity from inventory's sub-key list Key reduces the corresponding inventory of inventory's sub-key;
It is finished if the corresponding inventory of inventory's sub-key reduced is reduced, by inventory's sub-key from inventory's sub-key list It deletes.
5. high concurrent transaction request processing method according to claim 1, which is characterized in that, will in the step S300 The transaction request is distributed to the first business processing cluster, including the load balancing according to consistency Hash, is based on Nginx for institute It states transaction request and routes to the first business processing cluster.
6. high concurrent transaction request processing method according to claim 1, which is characterized in that the step S100 and S200 Between, further include following steps after the transaction request is distributed to the first business processing cluster:
The first business processing cluster obtains the transaction request corresponding to the filter attribute according to preset filter attribute Attribute value, judge whether the attribute value of the transaction request matches at least one preset current-limiting filtering condition, if it is, not The transaction request is responded, and terminates current process, otherwise continues step S200.
7. high concurrent transaction request processing method according to claim 1, which is characterized in that further include following steps:
Transaction log is periodically obtained, the transaction history data of commodity is obtained from the transaction log;
According to the transaction history data of each commodity, judge whether the commodity match preset hot spot commodity and assert plan Slightly;
If it is, the commodity sign information of the commodity is added in the hot spot commodity list, and by the library of the commodity Information is deposited to migrate from second inventory database into first inventory database.
8. high concurrent transaction request processing method according to claim 7, which is characterized in that in the step S300, institute Stating the first business processing cluster configuration is to be reduced using inventory of the following steps to the commodity in the first inventory database:
The first business processing cluster judges whether the inventory data of the commodity has moved to first inventory database;
If it is, the first business processing cluster is according to the transaction request to the commodity in first inventory database Inventory reduced;
Otherwise, the inventory information of the commodity is migrated from second inventory database into first inventory database, And before migration is completed, the inventory of the commodity in second inventory database is reduced.
9. high concurrent transaction request processing method according to claim 7, which is characterized in that the quotient by the commodity Further include following steps after product identification information is added in the hot spot commodity list:
The commodity isomeric data is stored in merchandise news caching by the commodity isomeric data for obtaining the commodity.
10. high concurrent transaction request processing method according to claim 9, which is characterized in that further include receiving user Transaction page request when the step of showing transaction page, the display transaction page includes the following steps:
Accelerated using static resource of the content distributing network to the transaction page;
According in merchandise news caching commodity isomeric data and the rendering of preset dynamic resource template generate the transaction The dynamic resource of the page.
11. high concurrent transaction request processing method according to claim 10, which is characterized in that the method also includes such as Lower step:
The binlog log of the commodity information database is monitored, commodity isomery number is periodically extracted from the binlog log According to, and be stored in the merchandise news caching;
The rendering generates the dynamic resource of the transaction page, including generates the transaction based on Nginx and Lua service rendering The dynamic resource of the page.
12. a kind of high concurrent transaction request processing system, which is characterized in that be applied to described in any one of claims 1 to 11 High concurrent transaction request processing method, the system comprises:
Transaction request receiving module obtains the commodity sign information in the transaction request for receiving transaction request;
Whether hot spot commodity judgment module, the commodity for judging that the transaction request is directed toward according to the commodity sign information are deposited It is in preset hot spot commodity list;
Transaction request distribution module, the corresponding transaction request of commodity for will be present in the hot spot commodity list are distributed to First business processing cluster, and the corresponding transaction request of commodity that would not exist in the hot spot commodity list is distributed to second Business processing cluster, the first business processing cluster configuration are when receiving transaction request to the quotient in the first inventory database The inventory of product is reduced, and the second business processing cluster configuration is when receiving transaction request according to the transaction request The inventory of the commodity in second inventory database is reduced.
13. a kind of high concurrent transaction request processing equipment characterized by comprising
Processor;
Memory, wherein being stored with the executable instruction of the processor;
Wherein, the processor is configured to come any one of perform claim requirement 1 to 11 institute via the execution executable instruction The step of high concurrent transaction request processing method stated.
14. a kind of computer readable storage medium, for storing program, which is characterized in that described program is performed realization power Benefit require any one of 1 to 11 described in high concurrent transaction request processing method the step of.
CN201910211323.8A 2019-03-20 2019-03-20 High concurrent transaction request processing method, system, equipment and storage medium Pending CN109949135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910211323.8A CN109949135A (en) 2019-03-20 2019-03-20 High concurrent transaction request processing method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910211323.8A CN109949135A (en) 2019-03-20 2019-03-20 High concurrent transaction request processing method, system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109949135A true CN109949135A (en) 2019-06-28

Family

ID=67010934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910211323.8A Pending CN109949135A (en) 2019-03-20 2019-03-20 High concurrent transaction request processing method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109949135A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110378660A (en) * 2019-07-30 2019-10-25 北京字节跳动网络技术有限公司 Stock processing method, apparatus, electronic equipment and computer readable storage medium
CN110909978A (en) * 2019-10-15 2020-03-24 京东数字科技控股有限公司 Resource processing method, device, server and computer readable storage medium
CN111309740A (en) * 2020-01-16 2020-06-19 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
CN111796938A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 Cluster dynamic concurrency control method and device
CN112003920A (en) * 2020-08-18 2020-11-27 天津四立科技有限责任公司 Information sharing system
CN112015745A (en) * 2020-08-19 2020-12-01 北京达佳互联信息技术有限公司 Data management method and device
CN112069253A (en) * 2020-08-20 2020-12-11 上海钧正网络科技有限公司 Inventory item management method, system, terminal and storage medium suitable for multiple scenes
CN112418747A (en) * 2019-12-19 2021-02-26 上海哔哩哔哩科技有限公司 E-commerce hotspot commodity inventory deduction control method and system
CN112416314A (en) * 2020-01-21 2021-02-26 上海哔哩哔哩科技有限公司 Dynamic inventory management method and system
CN112751761A (en) * 2020-12-28 2021-05-04 中国农业银行股份有限公司 Transaction routing switching method, intermediate system and service processing system
CN112749174A (en) * 2019-10-30 2021-05-04 中国移动通信集团安徽有限公司 High-concurrency processing method and device, processing equipment and computer storage medium
CN113034247A (en) * 2021-04-30 2021-06-25 中国工商银行股份有限公司 E-commerce platform inventory processing method and device
CN113554199A (en) * 2020-04-23 2021-10-26 华晨宝马汽车有限公司 Computer-implemented method and apparatus for optimizing inventory of materials
CN113762857A (en) * 2020-11-24 2021-12-07 北京沃东天骏信息技术有限公司 Inventory deduction method, device, equipment and storage medium
CN113783799A (en) * 2020-06-09 2021-12-10 马上消费金融股份有限公司 Flow control method and device
CN114520808A (en) * 2020-11-19 2022-05-20 南京亚信软件有限公司 Request processing method and device, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294746A (en) * 2016-08-10 2017-01-04 中国银行股份有限公司 A kind of concurrent transaction data processing method and device
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN108269072A (en) * 2016-12-30 2018-07-10 深圳瀚德创客金融投资有限公司 For the transaction processing method and network node of block chain
CN108876521A (en) * 2018-06-04 2018-11-23 贵州数据宝网络科技有限公司 A kind of high concurrent data transacting system and method
CN108876602A (en) * 2017-05-10 2018-11-23 深圳前海佛罗米科技有限公司 Order system for tracking and method
CN108898482A (en) * 2018-07-09 2018-11-27 中国建设银行股份有限公司 The contracting method and device of multi-product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294746A (en) * 2016-08-10 2017-01-04 中国银行股份有限公司 A kind of concurrent transaction data processing method and device
CN106599018A (en) * 2016-10-20 2017-04-26 乐视控股(北京)有限公司 Inventory operation method and system
CN108269072A (en) * 2016-12-30 2018-07-10 深圳瀚德创客金融投资有限公司 For the transaction processing method and network node of block chain
CN108876602A (en) * 2017-05-10 2018-11-23 深圳前海佛罗米科技有限公司 Order system for tracking and method
CN108876521A (en) * 2018-06-04 2018-11-23 贵州数据宝网络科技有限公司 A kind of high concurrent data transacting system and method
CN108898482A (en) * 2018-07-09 2018-11-27 中国建设银行股份有限公司 The contracting method and device of multi-product

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JINGTANG: ""如何设计一个秒杀系统"", 《HTTP://JINTANG.ZONE/2018/11/15/如何设计一个秒杀系统.HTML》 *
季枫: ""淘宝大秒系统设计详解"", 《HTTPS://WWW.CNBLOGS.COM/JIFENG/P/5264268.HTML》 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110378660A (en) * 2019-07-30 2019-10-25 北京字节跳动网络技术有限公司 Stock processing method, apparatus, electronic equipment and computer readable storage medium
CN110909978A (en) * 2019-10-15 2020-03-24 京东数字科技控股有限公司 Resource processing method, device, server and computer readable storage medium
CN112749174B (en) * 2019-10-30 2024-05-10 中国移动通信集团安徽有限公司 High concurrency processing method, device, processing equipment and computer storage medium
CN112749174A (en) * 2019-10-30 2021-05-04 中国移动通信集团安徽有限公司 High-concurrency processing method and device, processing equipment and computer storage medium
CN112418747A (en) * 2019-12-19 2021-02-26 上海哔哩哔哩科技有限公司 E-commerce hotspot commodity inventory deduction control method and system
CN111309740A (en) * 2020-01-16 2020-06-19 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
CN111309740B (en) * 2020-01-16 2024-08-13 建信金融科技有限责任公司 Data processing method, device, equipment and storage medium
CN112416314A (en) * 2020-01-21 2021-02-26 上海哔哩哔哩科技有限公司 Dynamic inventory management method and system
CN113554199B (en) * 2020-04-23 2024-04-23 华晨宝马汽车有限公司 Computer-implemented method and apparatus for optimizing inventory of materials
CN113554199A (en) * 2020-04-23 2021-10-26 华晨宝马汽车有限公司 Computer-implemented method and apparatus for optimizing inventory of materials
CN113783799A (en) * 2020-06-09 2021-12-10 马上消费金融股份有限公司 Flow control method and device
CN111796938A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 Cluster dynamic concurrency control method and device
CN111796938B (en) * 2020-06-30 2024-05-17 中国工商银行股份有限公司 Cluster dynamic concurrency control method and device
CN112003920A (en) * 2020-08-18 2020-11-27 天津四立科技有限责任公司 Information sharing system
CN112015745A (en) * 2020-08-19 2020-12-01 北京达佳互联信息技术有限公司 Data management method and device
CN112015745B (en) * 2020-08-19 2024-05-17 北京达佳互联信息技术有限公司 Data management method and device
CN112069253A (en) * 2020-08-20 2020-12-11 上海钧正网络科技有限公司 Inventory item management method, system, terminal and storage medium suitable for multiple scenes
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
CN112751761A (en) * 2020-12-28 2021-05-04 中国农业银行股份有限公司 Transaction routing switching method, intermediate system and service processing system
CN113034247A (en) * 2021-04-30 2021-06-25 中国工商银行股份有限公司 E-commerce platform inventory processing method and device

Similar Documents

Publication Publication Date Title
CN109949135A (en) High concurrent transaction request processing method, system, equipment and storage medium
US7480934B2 (en) Multiple identity management in an electronic commerce site
US7487192B2 (en) Method for maintaining data in a distributed computing environment for processing transaction requests
CN113711536A (en) Extracting data from a blockchain network
US20020072980A1 (en) System, method, and program for managing electronic shopping carts
US10318987B2 (en) Managing cookie data
US20120324060A1 (en) Method of data collection among participating content providers in a distributed network
WO2011047474A1 (en) Systems and methods for social graph data analytics to determine connectivity within a community
US9626683B2 (en) Method and system for advanced messaging
EP2901302B1 (en) Session-server affinity for clients that lack session identifiers
US20200151656A1 (en) Information operation
WO2023056771A1 (en) Information processing method, apparatus and device, and computer readable storage medium
KR20140031416A (en) Item recommend system based on a collaborative filtering and method thereof, apparatus supporting the same
US7979470B2 (en) Data manipulation process method and system
US11061937B2 (en) Method and system for classifying user identifiers into similar segments
US20200195739A1 (en) Event Tracking and Notification Based on Sensed Data
US11294917B2 (en) Data attribution using frequent pattern analysis
WO2020253714A1 (en) Data sharing method and apparatus, device and computer readable storage medium
US8838796B2 (en) System and method for allocating online storage to computer users
CN110363638A (en) The method for processing business, device and electronic equipment of non-targeted user in financial business
JP2011070288A (en) Electronic mail distribution system in electronic commerce, and electronic mail distribution method in electronic commerce
CN109741140A (en) A kind of e-commerce system
US20050027605A1 (en) Method and system for shopping-cart identification
JP2001209701A (en) System, device and method for supporting merchandise sales and program recording medium
US8732035B2 (en) Competitive sales environment in a virtual world

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190628

RJ01 Rejection of invention patent application after publication