CN110245153A - Product data processing method, system, computer equipment and storage medium - Google Patents
Product data processing method, system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110245153A CN110245153A CN201910418420.4A CN201910418420A CN110245153A CN 110245153 A CN110245153 A CN 110245153A CN 201910418420 A CN201910418420 A CN 201910418420A CN 110245153 A CN110245153 A CN 110245153A
- Authority
- CN
- China
- Prior art keywords
- token
- product
- server
- amount
- request
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Information Transfer Between Computers (AREA)
Abstract
This application involves process optimization techniques, a kind of product data processing method, system, computer equipment and storage medium are provided.This method comprises: obtaining the request for product request for carrying applicant's mark, application number and product identification;Applicant is verified according to applicant's mark, after verification passes through, token acquisition request is sent to cache server;When there is token that is corresponding with product identification and being in idle condition in cache server, the token of cache server distribution is received;Cache server will be sent to according to the amount inquiry request of token and product identification generation;The product amount for receiving cache server feedback calculates product residue amount according to product amount and application number when product amount is greater than or equal to application number;Token is released order and is sent to cache server, the product amount in memory is updated to indicate cache server according to product residue amount, and discharges token.Product data treatment effeciency can be improved using this method.
Description
Technical field
This application involves technical field of data processing, more particularly to a kind of product data processing method, system, computer
Equipment and storage medium.
Background technique
With the continuous development of computer technology and Internet technology, business gradually develops on line Internet-based
Come, it is many convenient to bring to people's life.In order to facilitate business processing, operation system is gradually appeared, applicant can pass through
The product or business that the operation system application is provided by provider.
Currently, operation system is normally based on low frequency products application Scenario Design, do not consider that high frequency request for product (is such as robbed
Purchase) etc. special screnes support.Under high frequency request for product scene, operation system is requested according to the multiple request for product received
Product amount is obtained in serial slave database, reduces the response efficiency of request for product request.Especially asked in request for product
When seeking increasing number, system is likely to result in because request for product request can not be timely responded to due to delay machine, to further reduced
The response efficiency of request for product request, has that product data treatment effeciency is low.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of product that can be improved product data treatment effeciency
Data processing method, system, computer equipment and storage medium.
A kind of product data processing method, applied to the service server in service server cluster, which comprises
Obtain the request for product request for carrying applicant's mark, application number and product identification;
It identifies corresponding applicant's information according to the applicant to verify applicant, after verification passes through, by root
Cache server is sent to according to the token acquisition request that the product identification generates;
When there is token that is corresponding with the product identification and being in idle condition in the cache server, receive
The token of the cache server distribution;
Amount inquiry request is generated according to the token and the product identification, the amount inquiry request is sent to institute
State cache server;
The product amount for receiving the cache server feedback, when the product amount is greater than or equal to the application number
When, product residue amount is calculated according to the product amount and the application number;
Token is generated according to the product residue amount and the token to release order, and the token is released order transmission
To the cache server;The token, which releases order, is used to indicate the cache server according to the product residue amount more
The product amount in new memory, and discharge the token.
It is described in one of the embodiments, that the token acquisition request generated according to the product identification is sent to caching
After server, the method also includes:
When token that is corresponding with the product identification and being in idle condition is not present in the cache server, then
Wait the distribution of the token;
The token acquisition request sent, is used to indicate the cache server connecing according to the token acquisition request
Between time receiving, the token acquisition request is ranked up caching, to wait the distribution of the token;
The token is discharged and token acquisition is asked when the cache server releases order according to the token received
When the sequence ranking asked is equal to default ranking, the token of the cache server distribution is received.
In one of the embodiments, it is described the token is released order be sent to the cache server after, institute
State method further include:
Request for product request is forwarded to processing server;The request for product request of forwarding is used to indicate described
Processing server carries out request for product processing;
Successfully apply tying when receiving expression application of the processing server for request for product request feedback
When fruit, amount more new command is generated according to the product identification and the application number;
The amount more new command is sent to storage server;Amount more new command is used to indicate the storage server
According to product amount corresponding with the product identification in the application number more new database.
The cache server is the primary server in cache server cluster in one of the embodiments,;The side
Method further include:
Master-slave swap event is monitored in real time;The master-slave swap event refers to will be current in the cache server cluster
Primary server is switched to from server, the primary server after being switched;
When listening to the master-slave swap event, triggering generates authority acquiring request;
The authority acquiring request is sent to the primary server, when receive the permission of primary server distribution with
When card, the product amount of latest edition is obtained from the database of the storage server;
The product amount of the authority credentials and the latest edition is sent to the primary server, so that the master
The product amount of the latest edition is stored in memory by server based on the authority credentials.
A kind of product data processing method is applied to cache server, which comprises
The token acquisition request that service server is sent is received, and is existed according to the product identification in the token acquisition request
The token being in idle condition is inquired in memory;
When inquiring the token, the token is distributed to the service server;
Receive the amount inquiry request that the service server is sent;The token is carried in the amount inquiry request
With the product identification;
Inquire product amount corresponding with the product identification in memory based on the token, and by the production of inquiry
Product amount feeds back to the service server;
The token that the service server is sent is received to release order;The token release order carry the token and
The corresponding product residue amount of the product identification;
The product amount in memory is updated according to the product residue amount, and discharges the token.
In one of the embodiments, the method also includes:
When not inquiring the token, token acquisition is asked according to the receiving time of the token acquisition request
It asks and is ranked up caching;
When released order according to the token that receives discharge the token when, according to the sequence of the token acquisition request,
The token is distributed to sequence ranking and is equal to service server corresponding to the token acquisition request of default ranking.
Described in one of the embodiments, to distribute the token to the service server, the method is also
Include:
Occupancy processing is carried out to the token, and counts the occupancy duration of the token;
When the occupancy duration is greater than or equal to preset duration, then the token is discharged, and obtain according to the token
The token is distributed to sequence ranking and is equal to business service corresponding to the token acquisition request of default ranking by the sequence of request
Device.
A kind of product data processing system, the system comprises: service server and cache server;
The service server, for obtaining the request for product for carrying applicant's mark, application number and product identification
Request;Corresponding applicant's information is identified according to the applicant to verify applicant, it, will be according to institute after verification passes through
The token acquisition request for stating product identification generation is sent to the cache server;
The cache server, for according to the Directory Enquiries in memory of the product identification in the token acquisition request
In the token of idle state;When inquiring the token, the token is distributed to the service server;
The service server is also used to generate amount inquiry request according to the token and the product identification, by institute
It states amount inquiry request and is sent to the cache server;
The cache server is also used to inquire product corresponding with the product identification in memory based on the token
Amount, and the product amount of inquiry is fed back into the service server;
The service server is also used to when the product amount is greater than or equal to the application number, according to described
Product amount and the application number calculate product residue amount;Token is generated according to the product residue amount and the token
It releases order, the token is released order and is sent to the cache server;
The cache server, be also used to be released order according to the token in the product residue amount update memory
In the product amount, and discharge the token.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
The step of device realizes above-mentioned each product data processing method as described in the examples when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of above-mentioned each product data processing method as described in the examples is realized when row.
The said goods data processing method, system, computer equipment and storage medium, service server are getting carrying
When having the request for product request of applicant's mark, application number and product identification, school is carried out to applicant according to applicant's mark
It tests, the token being in idle condition is seized from cache server according to product identification after verification passes through, to realize product amount
Serially seize;When rob account for token after, amount inquiry request that service server will be generated according to the token and product identification
It is sent to cache server, cache server is based on the token and inquires the corresponding product amount of product identification in memory and feed back
To service server, to improve the operating efficiency of product amount;When product amount is greater than or equal to application number, business service
Device calculates product residue amount according to product amount and application number, and the token for carrying product residue amount and token is discharged
Instruction is sent to cache server, and cache server automatically updates the corresponding product amount in memory according to product residue amount,
And the token is discharged, corresponding business service is requested in order to be distributed the token automatically to other request for product to be responded
Device can be improved the response efficiency of request for product request, to further increase the operating efficiency of product amount so as to improve
Product data treatment effeciency.
Detailed description of the invention
Fig. 1 is the application scenario diagram of product data processing method in one embodiment;
Fig. 2 is the flow diagram of product data processing method in one embodiment;
Fig. 3 is the flow diagram of product data processing method in another embodiment;
Fig. 4 is the flow diagram of product data processing method in another embodiment;
Fig. 5 is the flow diagram of product data processing method in further embodiment;
Fig. 6 is the architecture diagram of product data processing system in one embodiment;
Fig. 7 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Product data processing method provided by the present application, can be applied in application environment as shown in Figure 1.Wherein, industry
Service server 102a in business server cluster 102 is communicated by network with cache server 104.Service server
102a get carry applicant mark, application number want and the request for product of product identification request when, according to applicant
It identifies corresponding applicant's information to verify applicant, the token acquisition request of product identification will be carried after verification passes through
It is sent to cache server 104, and there is order that is corresponding with product identification and being in idle condition in cache server 104
When board, the token that cache server 104 distributes is received, and then look into from cache server 104 according to the token and product identification
Product amount is ask, when product amount is greater than or equal to application number, it is remaining that product is calculated according to product amount and application number
Amount, and the token for carrying product residue amount and token is released order and is sent to cache server 104, so that caching clothes
Device 104 be engaged in based on the corresponding product amount in product residue amount update memory, and discharges the token.Service server 102a and
Cache server 104 can be realized with the server cluster of the either multiple server compositions of independent server.It can manage
Solution, service server cluster 102 may include multiple service servers, for example, service server 102a, service server 102b and
Service server 102c etc., each service server pass through network and are communicated with cache server 104.Service server collection
Each service server in group 102 may get request for product request, and when getting request for product request, root
The relevant operation that above-mentioned service server 102a is executed is executed according to accessed request for product request.
In one embodiment, as shown in Fig. 2, providing a kind of product data processing method, it is applied to Fig. 1 in this way
In service server 102a for be illustrated, comprising the following steps:
S202 obtains the request for product request for carrying applicant's mark, application number and product identification.
Wherein, applicant's mark is used for unique identification applicant, and it is such as public that applicant can be personal or collective, collective
Department, department or group etc..Application number refers to the product number of request application, for example requests product quantity or the request Shen of application
The stock number of equal value of product please.Product identification is used for unique identification product, and product can be financial product, such as bond,
It is also possible to commodity.By taking bond as an example, application number refers to the stock number of bond house's equivalence of request application.Stock number refers to money
The quantity in source, resource specifically can be fund, virtual red packet or electronics coupons etc..
Specifically, it is pre- to obtain applicant when detecting the default application trigger action of applicant's triggering for applicant's terminal
The corresponding applicant's mark of the application number and product identification and this application side of selection or pre- typing, identified according to applicant,
Apply for that number and product identification generate request for product request, and request for product request is sent to service server.
In one embodiment, the request for product request of generation is sent in service server cluster by applicant's terminal
One service server.
In one embodiment, the load that the request for product request of generation is sent in operation system by applicant's terminal is equal
Weigh server, is distributed request for product request to corresponding service server by load-balanced server.Specifically, load balancing
Request for product request is distributed one into service server cluster according to the load balancing parameter of pre-configuration by server
Service server.Load balancing parameter is the quantization parameter of load balancing, such as in the way of poll or each
The service server for receiving request for product request is chosen in the present load of service server from business server cluster.
S204 identifies corresponding applicant's information according to applicant and verifies to applicant, after verification passes through, by root
Cache server is sent to according to the token acquisition request that product identification generates.
Wherein, applicant's information includes applicant's account information and/or risk assessment grade.Applicant's account information includes
The current state and available volume of resources of applicant's account.The current state of applicant's account includes normal condition and abnormality,
For example applicant's account is in cancellation, typing blacklist or the states such as frozen, then determines current state for abnormality.
Risk assessment grade can be predicted and be fed back based on risk evaluation model trained in advance by risk evaluating system.Risk assessment
Grade such as A, B, C or D (or 1,2,3 or 4), grade successively reduces from front to back.Applicant's information may also include applicant
Essential information or risk assessment grade, by taking applicant is personal as an example, applicant's essential information may include the occupation of applicant, receive
Enter, age, gender, residence or marital status etc..Service server may be based on applicant's essential information prediction applicant's
Risk assessment grade.
Specifically, the request for product request that service server parsing receives, obtains applicant's mark, application number and production
Product mark.Service server according to applicant identify from local or other computer equipments obtain applicant's account information and/or
Risk assessment grade verifies applicant according to this application side's account information and/or risk assessment grade.When applicant's account
Family information checking passes through and/or the verification of risk assessment grade passes through, then determines that applicant's verification passes through, service server then basis
Product identification generates token acquisition request, and the token acquisition request is sent to cache server, to be asked according to token acquisition
It asks from cache server and seizes token that is corresponding with product identification and being in idle condition.Service server is believed according to applicant
The current state and available volume of resources for determining applicant's account are ceased, available volume of resources is compared with default stock number.It is default
Stock number can be determined according to by the specified application number of request for product request, for example be equal to application number.When applicant's account
For current state for normal condition and when available volume of resources is greater than default stock number, service server then determines applicant's information school
It tests and passes through.Service server inquires corresponding with product identification product risks evaluation grade, and by the risk assessment etc. of applicant
Grade is compared with the product risks evaluation grade.When the risk assessment grade of applicant is higher than product risks evaluation grade,
Then determine that the verification of risk assessment grade passes through.
In one embodiment, service server is inquired corresponding after getting request for product request according to product identification
Product Status, and when the Product Status inquired be can application status when, according to applicant mark applicant is verified.
In one embodiment, service server is corresponding current from local or other computer equipments inquiry product identification
Product amount and Product Status, and current production amount is compared with application number.It is greater than or waits in current production amount
In apply number and Product Status be can application status when, service server continues to execute the step of verifying to applicant.
Wherein, Product Status include can application status and can not application status, if current time is in validity period or the transaction period of product,
Then determine Product Status be can application status.By taking product is bond as an example, it is specified when issuing bond that the validity period of bond refers to
The bond time limit (period), transaction period such as non-festivals or holidays, non-date of record and non-date payable etc..Service server is logical as a result,
It crosses and tentatively judges whether current production amount is greater than application number, seize operation to determine whether to execute subsequent product amount,
It can be improved the response efficiency of request for product request.
In one embodiment, each service server in service server cluster may all receive applicant's end
The request for product request that end is sent.When receiving the request for product request of applicant's terminal transmission, receives request for product and ask
The service server asked identifies according to the applicant in request for product request and inquires corresponding applicant's information, according to applicant
Information verifies applicant, and when verification by after triggering generate and carry the token acquisition request of product identification, with from
The token that product identification is corresponding and is in idle condition is obtained in cache server.Request for product request is received as a result,
Service server can execute the above-mentioned operation for seizing token, and only rob account for the service server of token could be according to seizing
To token product amount corresponding to product identification is obtained from cache server.
S206 receives caching when there is token that is corresponding with product identification and being in idle condition in cache server
The token of server distribution.
Wherein, token is access cache server to obtain the voucher of the corresponding product amount of product identification, that is, is visited
It asks token, can be the character string being made of at least one of characters such as number, letter and symbol.
Specifically, cache server parses the token and obtains when receiving the token acquisition request of service server transmission
Request is taken to obtain product identification, according to the token that product identification is in idle condition in local search, and when inquiring token,
The token inquired is distributed to service server.Cache server is locally being pre-configured with corresponding order for each product identification
Board.The token status indicator corresponding with the token that cache server can be pre-configured according to product identification in local search, when this
When status indicator is free mark, which is determined as token that is inquiring according to product identification and being in idle condition,
Then the token is distributed to corresponding service server, and the status indicator of the token is updated to occupy mark.
S208 generates amount inquiry request according to token and product identification, amount inquiry request is sent to buffer service
Device.
Specifically, when receiving token of the cache server for the distribution of token acquisition request, show the business service
Device robs the permission for accounting for obtaining the corresponding product amount of product identification, then generates corresponding amount according to the token and product identification
Inquiry request, and the amount inquiry request is sent to cache server.The amount inquiry that cache server parsing receives is asked
It asks to obtain product identification and token, product amount corresponding with product identification is inquired based on the token in memory, and will inquiry
To product amount feed back to service server.
S210 receives the product amount of cache server feedback, when product amount is greater than or equal to application number, according to
Product amount and application number calculate product residue amount.
Wherein, product amount refers to the quantity of product stock number of equal value or product, can specifically refer to be applied
Product stock number of equal value, that is, the stock number that provider provides or the product of distribution is of equal value, such as bond amount (debt
The face amount total value of certificate);It may also mean that product quantity to be applied, such as the quantity of goods for sale.Product residue amount refers to
After rejecting by the specified application number of request for product request, the remaining product amount for application.
Specifically, service server receives the product amount that cache server is directed to amount inquiry request feedback, and should
The product amount application number specified with request for product request is compared.When product amount is greater than or equal to application number,
Service server subtracts application number from product amount and obtains corresponding product residue amount.
In one embodiment, when product amount is less than application number, service server is raw according to the token accounted for is robbed
It releases order at token, which is released order cache server in sending, to indicate that cache server discharges the token.Into
One step, service server fails to applicant's terminal feedback representation request for product and/or the insufficient prompt information of product amount.
Wherein, token release order in may also include product identification.
S212 generates token according to product residue amount and token and releases order, token is released order and is sent to caching
Server;Token, which releases order, is used to indicate cache server according to the product amount in product residue amount update memory, and
Discharge token.
Specifically, service server generates token according to the product residue amount of calculating and corresponding token and releases order,
And the token is released order and is sent to cache server.The token that cache server parsing receives releases order to obtain product
Remaining amount and token to be released determine product identification according to product residue amount and/or token, in local search and product
Corresponding product amount is identified, and product amount, that is, the product that will be inquired are inquired according to the update of product residue amount
Amount is updated to product residue amount.Cache server discharges the corresponding token of product identification, can also be by the corresponding shape of the token
State mark is updated to free mark.
Further, if cache server local cache needs to be responded and token corresponding with product identification acquisition is asked
When asking, cache server chooses the earliest token acquisition request of receiving time from token acquisition request to be responded, and will discharge
Token distribute to service server corresponding to selected token acquisition request, and occupancy processing is carried out to the token, with
So that the service server for being assigned to token executes above-mentioned relevant operation according to the token.It is understood that cache server
The token acquisition request of local cache, which can be, successively to be obtained and is sent by service server, is also possible to by service server
What one or more service servers in the service server cluster at place were sent.Thus, it can be achieved that multiple service servers
The corresponding product amount of product identification is seized in serial slave cache server.The said goods data processing method, business service
Device is identified when getting the request for product request for carrying applicant's mark, application number and product identification according to applicant
Applicant is verified, the token being in idle condition is seized from cache server according to product identification after verification passes through,
To realize serially seizing for product amount;When rob account for token after, service server will be generated according to the token and product identification
Amount inquiry request be sent to cache server, cache server is based on the token, and to inquire product identification in memory corresponding
Product amount simultaneously feeds back to service server, to improve the operating efficiency of product amount;When product amount is greater than or equal to application
When number, service server calculates product residue amount according to product amount and application number, and will carry product residue amount
It releases order with the token of token and is sent to cache server, cache server automatically updates in memory according to product residue amount
Corresponding product amount, and discharge the token, requested in order to be distributed the token automatically to other request for product to be responded
Corresponding service server can be improved the response effect of request for product request to further increase the operating efficiency of product amount
Rate, so as to improve product data treatment effeciency.
In one embodiment, after step S204, the said goods data processing method further include: when in cache server
There is no when token that is corresponding with product identification and being in idle condition, then the distribution of token is waited;The token acquisition of transmission is asked
It asks, is used to indicate cache server according to the receiving time of token acquisition request, token acquisition request is ranked up caching, with
Wait the distribution of token;Token and token acquisition request are discharged when cache server releases order according to the token received
When the ranking that sorts is equal to default ranking, the token of cache server distribution is received.
Wherein, receiving time refers to that cache server receives the time for the token acquisition request that service server is sent to.
The ranking that sorts is serial number of the token acquisition request in buffer queue.Default ranking refers to preset serial number, such as 1.
Specifically, it is not locally inquiring corresponding with product identification and is being in when according to the token acquisition request received
When the token of idle state, which is ranked up caching according to the receiving time of token acquisition request by cache server.Phase
Ying Di, before receiving cache server for the token of token acquisition request distribution, service server waits point of token
Match, that is, enters the wait state of token distribution.Further, cache server is receiving the business service for holding token
Device send token release order, and according to the token release order release occupied token when, according to the order of order buffer
The token of release is distributed to receiving time earliest or sequence ranking is near preceding token acquisition request by the sequence of board acquisition request
Corresponding service server.It is understood that after token acquisition request is buffered server orders caching, when caching takes
Business device releases order according to the token received discharges the token acquisition request of the token and the caching that are currently at occupied state
Sequence ranking when being equal to default ranking, it is right that cache server distributes the token of release to the token acquisition request institute to the caching
The service server answered.
In one embodiment, when do not inquire it is corresponding with the product identification in token acquisition request and in free time
When the token of state, cache server caches the token acquisition request to buffer queue.It is appreciated that when product identification is corresponding
Token when being in occupied state, one or more service servers are directed to the token that the product identification is sent by cache server
Acquisition request is cached each token acquisition request respectively to buffer queue according to the receiving time of token acquisition request.
In above-described embodiment, it will not rob the token acquisition request for accounting for token and be ranked up caching, and by the order of release
Board is sequentially allocated according to sequence to service server corresponding to corresponding token acquisition request, seizes effect to improve the serial of token
Rate, so that improving the serial of product amount seizes efficiency.
In one embodiment, token is released order after being sent to cache server, the said goods data processing side
Method further include: request for product request is forwarded to processing server;The request for product request of forwarding is used to indicate processing server
Carry out request for product processing;Successfully apply tying when receiving expression application of the processing server for request for product request feedback
When fruit, amount more new command is generated according to product identification and application number;Amount more new command is sent to storage server;Volume
Degree more new command is used to indicate storage server according to product amount corresponding with product identification in application number more new database.
Specifically, when the product amount for determining inquiry is greater than or equal to the specified application number of request for product request, industry
Request for product request is forwarded to processing server by business server.Processing server according to the request for product received request into
The processing of row request for product.By taking product is bond as an example, the request for product of execution is handled such as by stock number etc. in applicant's account
It transfers in the resource of application number to provider's account, it will thus provide the product or request for product voucher just provided feeds back to application
Side.When request for product is disposed, processing server triggering generates application result, and this application result is fed back to business clothes
Business device.When received application result is to apply successfully, the service server product identification specified according to request for product request
Amount more new command is generated with application number, and the amount more new command is sent to storage server.Storage server according to
Amount more new command inquires product amount corresponding with product identification in the database, and the product amount of inquiry is subtracted application number
Volume obtains product residue amount, and updates the product amount in database according to the product residue amount.
In one embodiment, when application result is application failure, service server is to applicant's terminal feedback representation
Apply for the prompt information of failure, and the token acquisition request generated according to product identification is sent to cache server.Work as reception
When being directed to the token of token acquisition request distribution to cache server, service server is postponed according to the token and product identification
It deposits and obtains the corresponding product amount of the product identification in server, by the specified application number of the product amount and request for product request
Volume sums to obtain product residue amount, updates the corresponding product amount in cache server memory according to the product residue amount,
And discharge the token held.As a result, when applying for failure, the memory of cache server is updated according to the application number of application failure
In product amount.
In one embodiment, storage server is updated when receiving amount more new command according to the amount received
Instruct the corresponding product amount in more new database.Storage server can product amount in the more new database of cover type, i.e.,
By product amount corresponding with product identification in database, it is surplus to be updated to the product calculated according to the product amount and application number
Remaining sum degree.Storage server can also be by the product residue amount of calculating and product identification corresponding record into database, as most
The product amount of new version.The product amount for having the corresponding each version of product identification is recorded in database as a result,.It can manage
Solution, storage server can will apply for number and product identification corresponding record into database according to amount more new command, to be formed
The request for product of persistent storage records.It may also include applicant's mark and application time etc. in request for product record.
In one embodiment, the amount received is updated instruction buffer in local, according to default week by storage server
Phase inquires product amount latest edition and corresponding with product identification from database, according to local cache and and product
The application number in corresponding each amount more new command is identified, and the product amount of inquiry calculates product residue amount, and root
The product amount of database is updated according to the product residue amount.
In one embodiment, the above-mentioned request for product processing executed by processing server according to request for product request can be by
Service server executes.Specifically, service server by token after releasing order and being sent to cache server, according to product
Application request carries out request for product processing, and obtains corresponding application result.When application result is to apply successfully, business service
Device generates amount more new command according to corresponding product identification and application number, and the amount more new command is sent to storage clothes
Business device.
In above-described embodiment, according to the product amount in application successfully application number more new database, by turnout
It spends persistence to update into database, can be avoided asking of causing the product amount in memory to be lost because of cache server failure
Topic.
In one embodiment, cache server is the primary server in cache server cluster;At the said goods data
Reason method further include: monitor master-slave swap event in real time;Master-slave swap event refers to the current master in cache server cluster
Server is switched to from server, the primary server after being switched;When listening to master-slave swap event, triggering generates permission
Acquisition request;Authority acquiring request is sent to primary server, when receiving the authority credentials of primary server distribution, from storage
The product amount of latest edition is obtained in the database of server;The product amount of authority credentials and latest edition is sent to master
Server, so that the product amount of latest edition is stored in memory by primary server based on authority credentials.
Wherein, cache server cluster include primary server and at least one from server.Master-slave swap event is
When referring to the current primary server delay machine in cache server cluster, which is switched to from clothes by automatic trigger
Business device, the primary server after being switched.It is appreciated that master-slave swap event is the slave server from caching server cluster
Middle selection target substitutes current primary server as the primary server after switching from server from server, and using the target.It is main
Server has access limit, only have from server can read right, the product amount of update is synchronized to from clothes by primary server
Business device.Authority credentials is specifically to can be token for characterizing the voucher for having the permission for restoring cache server internal storage data.
Specifically, the cache server in above-mentioned each embodiment is the primary server business clothes in cache server cluster
Business device monitors the operating status of primary server in cache server cluster in real time, triggers when listening to because of primary server delay machine
When master-slave swap event, triggering generates authority acquiring request, and the authority acquiring request is sent to the primary server after switching.
Primary server after switching chooses the earliest authority acquiring request of receiving time from the authority acquiring request received, and will be pre-
The authority credentials of configuration distributes service server corresponding to the authority acquiring request to selection.When receiving distribution permission extremely
When voucher, the service server of the authority credentials is received from the database of storage server, obtains each product identification respectively
The product amount of corresponding latest edition, and the product amount of the authority credentials and each latest edition is sent to the master after switching
Server.Primary server after switching verifies the authority credentials received, by each latest edition after verification passes through
Product amount is stored in memory, to restore the product amount in primary server memory.Further, primary server will be in memory
The corresponding product amount of each product identification is synchronized to respectively from server.
In one embodiment, each service server in service server cluster monitors cache server collection in real time
The master-slave swap event of group, and the primary server sending permission acquisition request after listening to master-slave swap event Backward handoff,
To seize authority credentials.
In above-described embodiment, when the product amount in memory is lost because of cache server delay machine, according to storage service
Product amount in device database automatically updates the product amount in the cache server after switching, in order to receive product again
Product amount can be quickly obtained when application request from memory, to improve product data treatment effeciency.By seize permission with
Card is to restore internal storage data, to guarantee the correctness of internal storage data.
In one embodiment, service server receives the business Shen corresponding with applicant's mark that applicant's terminal is sent
It please request, be requested to determine type of service and applicant's type according to business application.When type of service is differentiated service type,
The differentiated service process flow that service server is pre-configured according to applicant's type queries, and according to differentiated service processing stream
Journey requests to carry out business processing according to business application.When type of service is general service type, service server inquiry is prewired
The general service process flow set, and requested to carry out business processing according to business application according to the general service process flow.With
Product is for bond, differentiated service type such as inquires the price, reserves and changes to trusteeship, general service type such as product Shen
Please, applicant's type includes individual, to client public and of the same trade or business etc..Thereby, it is possible to support a plurality of types of applicants, and for not
The applicant of same type can provide corresponding business processing flow, improve business processing efficiency.
In one embodiment, the product report corresponding with product identification of service server receiving quotation server push
Valence determines application server list according to product identification, and is broadcasted the products quotation to application by socket long connection and taken
Each application server being engaged in device list.Wherein, application server list is by registering in communication network and having subscribed this
The set of the one or more application server composition of the corresponding products quotation of product identification, application server may include business clothes
Other servers in business device, cache server and storage server and operation system, such as query service device.Quotation clothes
Business device can predict products quotation by means of the Offer Model trained, and can also determine product report according to history conclusion of the business Resource Exchange amount
Valence.It is appreciated that any service server of the quotation server into service server cluster pushes products quotation, by the business
Server broadcasts products quotation to other application server.By taking product is bond as an example, quotation server debt can be estimated in
Value Data, the concluded price of bond level-one trade market and history concluded price calculate corresponding bond price quotation.Thereby, it is possible to
Applicant and provider provide real-time and high frequency two-way products quotation, to improve user experience, so as to improve product
Apply for exchange hand.
In one embodiment, when service server receives the modification data of management terminal transmission, modification is received
The service server of data inquires corresponding application server list, by the modification data broadcasting into application server list
Each application server.Each application server can be quickly shared latest data as a result,.
In one embodiment, as shown in figure 3, providing a kind of product data processing method, this method specifically include with
Lower step:
S302 obtains the request for product request for carrying applicant's mark, application number and product identification.
S304 identifies corresponding applicant's information according to applicant and verifies to applicant, after verification passes through, by root
Cache server is sent to according to the token acquisition request that product identification generates.
S306 is then waited when token that is corresponding with product identification and being in idle condition is not present in cache server
The distribution of token;The token acquisition request of transmission is used to indicate cache server according to the receiving time of token acquisition request, incites somebody to action
Token acquisition request is ranked up caching, to wait the distribution of token.
S308 discharges the row of token and token acquisition request when cache server releases order according to the token received
When sequence ranking is equal to default ranking, the token of cache server distribution is received, and the S312 that gos to step is continued to execute.
S310 receives caching when there is token that is corresponding with product identification and being in idle condition in cache server
The token of server distribution.
S312 generates amount inquiry request according to token and product identification, amount inquiry request is sent to buffer service
Device.
S314 receives the product amount of cache server feedback, when product amount is greater than or equal to application number, according to
Product amount and application number calculate product residue amount.
S316 generates token according to product residue amount and token and releases order, token is released order and is sent to caching
Server;Token, which releases order, is used to indicate cache server according to the product amount in product residue amount update memory, and
Discharge token.
In above-described embodiment, each service server in service server cluster is right when receiving request for product request
Applicant verifies, and to guarantee the safety of the validity and resource of request for product, will carry product mark when passed the verification
The token acquisition request of knowledge is sent to cache server, to seize the corresponding token of the product identification from cache server, robs
It accounts for the service server of token and then based on token-asking and updates the product amount in the memory of cache server, do not rob and account for
The service server of token then waits the distribution of token.It can be improved token and the serial of product amount seize efficiency, so as to
Enough improve product data treatment effeciency.
As shown in figure 4, in one embodiment, providing a kind of product data processing method, it is applied to Fig. 1 in this way
In cache server 104 for be illustrated, specifically includes the following steps:
402, the token acquisition request that service server is sent is received, and exist according to the product identification in token acquisition request
The token being in idle condition is inquired in memory.
Specifically, cache server receives the token acquisition request that service server is sent, and parsing token acquisition request obtains
To product identification, token that is corresponding with the product identification and being in idle condition is inquired in memory according to product identification.
404, when inquiring token, token is distributed to service server.
Specifically, when inquiring token that is corresponding with product identification and being in idle condition, cache server will be inquired
To token distribute to corresponding service server.
In one embodiment, the said goods data processing method further include: when not inquiring token, according to token
Token acquisition request is ranked up caching by the receiving time of acquisition request;Institute is discharged when releasing order according to the token received
When stating token, according to the sequence of token acquisition request, token is distributed to the token acquisition that sequence ranking is equal to default ranking and is asked
Seek corresponding service server.
Specifically, when not inquiring token that is corresponding with the product identification in token acquisition request and being in idle condition
When, which is ranked up caching according to the receiving time of token acquisition request by cache server, with etc. it is standby
The distribution of board.It releases order and root when receiving the token corresponding with product identification that the service server for holding token is sent
It is released order when discharging the corresponding token of the product identification according to the token, cache server is obtained according to each token of order buffer
The token of release is distributed to sequence ranking and is equal to business clothes corresponding to the token acquisition request of default ranking by the sequence of request
Business device.It is appreciated that cache server is chosen from the token acquisition request of order buffer and is connect when receiving the token of release
Earliest token acquisition request between time receiving, and distribute token to service server corresponding to the token acquisition request to selection.
In one embodiment, when not inquiring the token being in idle condition according to token acquisition request, caching
Server caches the token acquisition request to buffer queue according to receiving time.
In one embodiment, cache server receives one or more service servers hair in service server cluster
The token acquisition request sent, and above-mentioned token batch operation is executed for each token acquisition request.
406, receive the amount inquiry request that service server is sent;Token and product mark are carried in amount inquiry request
Know.
Specifically, cache server receives the amount inquiry request that service server is sent, and parsing amount inquiry request obtains
To token and product identification, token is verified according to product identification according to default verification mode.Default verification mode is such as
It is compared according to the target spoke that product identification inquiry is pre-configured, and by the token that parsing obtains with target spoke.Work as the two
When consistent, then determine that token verification passes through.
408, product amount corresponding with product identification is inquired based on token in memory, and the product amount of inquiry is anti-
It is fed to service server.
Specifically, when token verification passes through, cache server is inquired and the product mark in memory according to product identification
Know corresponding product amount, and the product amount inquired is fed back into corresponding service server.
410, it receives the token that service server is sent and releases order;Token, which releases order, carries token and product identification
Corresponding product residue amount.
Specifically, cache server reception is released order by the token that the service server for holding token generates and sends,
Parsing token releases order to obtain token to be released, and is calculated according to the corresponding product amount of product identification and application number
Obtained product residue amount.
412, the product amount in memory is updated according to product residue amount, and discharge token.
Specifically, the product residue amount and/or token that cache server is obtained according to parsing are inquired accordingly in memory
Product amount, the product amount inquired is updated according to the product residue amount in memory, and discharge the token.At one
In embodiment, token release order in also carry product identification.Including cache server is according to the obtained product identification of parsing
Middle inquiry product amount is deposited, and updates the product amount inquired according to product residue amount.
In one embodiment, token is distributed to service server, the said goods data processing method further include:
Occupancy processing is carried out to token, and counts the occupancy duration of token;When occupying duration more than or equal to preset duration, then discharge
Token, and according to the sequence of token acquisition request, token is distributed to sequence ranking to the token acquisition request for being equal to default ranking
Corresponding service server.
Wherein, occupying duration is the time span that token is in occupied state, that is, refers to and certainly distribute token to industry
The service server holds the time span of the token from when business server.Preset duration is preset time span, tool
Body can customize, such as 10 seconds, can also occupy duration calculation according to the corresponding multiple history of the token and obtain, such as to multiple
History occupies duration and is averaging to obtain preset duration.
Specifically, cache server obtains present system time when distributing the token inquired to service server
As the distribution time, and after distributing the token to the service server, occupancy processing is carried out to the token, that is, should
The state of token is labeled as occupied state or is updated to the status indicator of the token to occupy mark.Receiving the business service
Before the token of device release, cache server counts the occupancy duration of the token to distribute the time as initial time, and will unite
The occupancy duration of meter is compared with preset duration.When occupying duration more than or equal to preset duration, cache server is then sentenced
Surely the service server delay machine for holding the token discharges the token automatically, that is, the state of the token is labeled as idle shape
The status indicator of the token is updated to free mark, and the sequence of each token acquisition request according to order buffer by state, will
The token of release, which is distributed to sequence ranking, is equal to service server corresponding to the token acquisition request of default ranking.
In above-described embodiment, preset duration is reached after distributing token to service server and does not receive the business service
The token of device release, then determine the service server delay machine, then discharge the token automatically, can be avoided the order because of order buffer
Board acquisition request is excessive and causes to fall into a long wait, so as to cause cache server due to resource exhaustion delay machine, can guarantee to enable
The response efficiency of board acquisition request, so as to guarantee the treatment effeciency of product data.
As shown in figure 5, in one embodiment, provide a kind of product data processing method, this method specifically include with
Lower step:
S502, service server obtain the request for product request for carrying applicant's mark, application number and product identification.
S504, service server identify corresponding applicant's information according to applicant and verify to applicant, work as verification
By rear, the token acquisition request generated according to product identification is sent to cache server.
S506, cache server is inquired according to the product identification in token acquisition request in memory to be in idle condition
Token.
S508, when inquiring token, cache server distributes token to service server.
S510, service server generate amount inquiry request according to token and product identification, amount inquiry request are sent
To cache server.
S512, cache server are based on token and inquire product amount corresponding with product identification in memory, and will inquiry
Product amount feed back to service server.
S514, when product amount is greater than or equal to application number, service server is according to product amount and application number
Calculate product residue amount.
S516, service server generate token according to product residue amount and token and release order, token is released order
It is sent to cache server.
S518, cache server updates the product amount in memory according to product residue amount, and discharges token.
It should be understood that although each step in the flow chart of Fig. 2-5 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-5
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in Figure 1, providing a kind of product data processing system, which includes: business clothes
Business device cluster 102 and cache server 104;Wherein, service server cluster 102 includes service server 102a;
Service server 102a, for obtaining the request for product for carrying applicant's mark, application number and product identification
Request;Corresponding applicant's information is identified according to applicant to verify applicant, it, will be according to product mark after verification passes through
Know the token acquisition request generated and is sent to cache server 104;
Cache server 104 is in idle shape for inquiring in memory according to the product identification in token acquisition request
The token of state;When inquiring token, token is distributed to service server 102a;
Service server 102a is also used to generate amount inquiry request according to token and product identification, and amount inquiry is asked
It asks and is sent to cache server 104;
Cache server 104 is also used to inquire product amount corresponding with product identification in memory based on token, and will
The product amount of inquiry feeds back to service server 102a;
Service server 102a is also used to when product amount is greater than or equal to application number, according to product amount and Shen
It please number calculating product residue amount;Token is generated according to product residue amount and token to release order, and token is released order
It is sent to cache server 104;
Cache server 104, be also used to be released order according to token in product residue amount update memory in product
Amount, and discharge token.
In one embodiment, service server 102a, is also used to be not present in the cache server and product identification pair
Answer and be in idle condition token when, then wait the distribution of token;Cache server 104 is also used to obtain according to token and ask
Token acquisition request is ranked up caching by the receiving time asked, to wait the distribution of token;It is released when according to the token received
When putting instruction release token, according to the sequence of token acquisition request, token is distributed to sequence ranking to the order for being equal to default ranking
Service server corresponding to board acquisition request;Service server 102a is also used to when cache server 104 is according to receiving
When token releases order the sequence ranking for discharging token and token acquisition request equal to default ranking, cache server 104 is received
The token of distribution.
As shown in fig. 6, in one embodiment, the said goods data processing system further include: processing server 106 and deposit
Store up server 108;
Service server 102a is also used to request request for product to be forwarded to processing server 106;
Processing server 106, for carrying out request for product processing;
Service server 102a is also used to receive processing server 106 for the expression of request for product request feedback
When applying for successful application result, amount more new command is generated according to product identification and application number;Amount more new command is sent out
It send to storage server 108;
Storage server 108, for according to product amount corresponding with product identification in application number more new database.
In one embodiment, cache server 104 is the primary server in cache server cluster;Service server
102a is also used to monitor master-slave swap event in real time;Master-slave swap event refers to the current main clothes in cache server cluster
Business device is switched to from server, the primary server after being switched;When listening to master-slave swap event, triggering generates permission and obtains
Take request;Authority acquiring request is sent to primary server, when receiving the authority credentials of primary server distribution, is taken from storage
It is engaged in obtaining the product amount of latest edition in the database of device;The product amount of authority credentials and latest edition is sent to main clothes
Business device, so that the product amount of latest edition is stored in memory by primary server based on authority credentials.It is appreciated that slow
It is above-mentioned to execute using the primary server after switching as cache server 104 after depositing server cluster triggering master-slave swap event
The operation executed in one or more embodiments by cache server 104, for example token is distributed according to token acquisition request, according to
Amount inquiry request inquires product amount in memory, and is released order and the product amount updated in memory and released according to token
Put token.
In one embodiment, cache server 104 are also used to carry out occupancy processing to token, and count accounting for for token
Use duration;When occupying duration more than or equal to preset duration, then token is discharged, and according to the sequence of token acquisition request, it will
Token, which is distributed to sequence ranking, is equal to service server corresponding to the token acquisition request of default ranking.
In one embodiment, each service server in service server cluster is used in the production for getting user's triggering
Product application request when, according to request for product request applicant is verified, after verification passes through from cache server seize with
Token product identification correspondence and be in idle condition, and product amount is seized from cache server according to the token accounted for is robbed,
With according to rob the product amount accounted for and request for product request in application number, it is determined whether for the request for product request into
The corresponding request for product processing of row, and whether basis robs the product amount accounted for and applies for that number updates in cache server
Product amount.Cache server is also used to basis for storing the corresponding token of each product identification and product amount in memory
The token acquisition request that each service server is sent, token that is corresponding with product identification and being in idle condition is distributed to reception
Service server corresponding to time earliest token acquisition request, is also used to be fed back product amount according to amount inquiry request
To currently robbing the service server for accounting for token.
Further, processing server is used for when service server determines that product amount is greater than or equal to application number,
The request for product request that service server is sent is received, and is requested to carry out request for product processing according to request for product.It is appreciated that
Processing server is analogous to the central server of exchange.Storage server is used to request corresponding application knot in request for product
Fruit is when applying successfully, by the successful application number persistent storage of application into database, and according to application number in data
Corresponding product amount is updated in library.It is appreciated that product amount is stored in memory by cache server, in order to according to volume
Degree inquiry request quick search and can feed back corresponding product amount.Lead to memory because of failure or delay machine in cache server
In product amount when losing, product amount in the database can be stored according to storage server and restore cache server memory
In product amount, to guarantee the safety and reliability of product amount.
Specific about product data processing system limits the limit that may refer to above for product data processing method
Fixed, details are not described herein.
In one embodiment, a kind of computer equipment is provided, which can be service server or slow
Server is deposited, internal structure chart can be as shown in Figure 7.The computer equipment include by system bus connect processor,
Memory, network interface and database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The meter
The memory for calculating machine equipment includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operation system
System, computer program and database.The built-in storage is operating system and computer program in non-volatile memory medium
Operation provides environment.The database of the computer equipment is for storing applicant's information, alternatively, token corresponding to product identification
With product amount.The network interface of the computer equipment is used to communicate with external terminal by network connection.The computer journey
To realize a kind of product data processing method when sequence is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 7, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with
Computer program, the processor realize the step of the product data processing method in above-mentioned each embodiment when executing computer program
Suddenly.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes the step of product data processing method in above-mentioned each embodiment when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of product data processing method, applied to the service server in service server cluster, which comprises
Obtain the request for product request for carrying applicant's mark, application number and product identification;
Corresponding applicant's information is identified according to the applicant to verify applicant, it, will be according to institute after verification passes through
The token acquisition request for stating product identification generation is sent to cache server;
When there is token that is corresponding with the product identification and being in idle condition in the cache server, described in reception
The token of cache server distribution;
Amount inquiry request is generated according to the token and the product identification, the amount inquiry request is sent to described slow
Deposit server;
The product amount for receiving the cache server feedback, when the product amount is greater than or equal to the application number,
Product residue amount is calculated according to the product amount and the application number;
Token is generated according to the product residue amount and the token to release order, and the token is released order and is sent to institute
State cache server;The token, which releases order, is used to indicate the cache server according in product residue amount update
The product amount in depositing, and discharge the token.
2. the method according to claim 1, wherein described obtain the token generated according to the product identification
Request is sent to after cache server, the method also includes:
When token that is corresponding with the product identification and being in idle condition is not present in the cache server, then wait
The distribution of the token;
The token acquisition request sent, when being used to indicate reception of the cache server according to the token acquisition request
Between, the token acquisition request is ranked up caching, to wait the distribution of the token;
The token and the token acquisition request are discharged when the cache server releases order according to the token received
When the ranking that sorts is equal to default ranking, the token of the cache server distribution is received.
3. the method according to claim 1, wherein the described token releases order is sent to the caching
After server, the method also includes:
Request for product request is forwarded to processing server;The request for product request of forwarding is used to indicate the processing
Server carries out request for product processing;
When receiving expression application successful application result of the processing server for request for product request feedback,
Amount more new command is generated according to the product identification and the application number;
The amount more new command is sent to storage server;Amount more new command be used to indicate the storage server according to
Product amount corresponding with the product identification in the application number more new database.
4. according to the method described in claim 3, it is characterized in that, the cache server is the master in cache server cluster
Server;The method also includes:
Master-slave swap event is monitored in real time;The master-slave swap event refers to the current main clothes in the cache server cluster
Business device is switched to from server, the primary server after being switched;
When listening to the master-slave swap event, triggering generates authority acquiring request;
The authority acquiring request is sent to the primary server, when the authority credentials for receiving the primary server distribution
When, the product amount of latest edition is obtained from the database of the storage server;
The product amount of the authority credentials and the latest edition is sent to the primary server, so that the main service
The product amount of the latest edition is stored in memory by device based on the authority credentials.
5. a kind of product data processing method is applied to cache server, which comprises
The token acquisition request that service server is sent is received, and according to the product identification in the token acquisition request in memory
It is middle to inquire the token being in idle condition;
When inquiring the token, the token is distributed to the service server;
Receive the amount inquiry request that the service server is sent;The token and institute are carried in the amount inquiry request
State product identification;
Inquire product amount corresponding with the product identification in memory based on the token, and by the turnout of inquiry
Degree feeds back to the service server;
The token that the service server is sent is received to release order;The token, which releases order, carries the token and described
The corresponding product residue amount of product identification;
The product amount in memory is updated according to the product residue amount, and discharges the token.
6. according to the method described in claim 5, it is characterized in that, the method also includes:
When not inquiring the token, according to the token acquisition request receiving time by the token acquisition request into
Row order buffer;
When the token that basis receives, which releases order, discharges the token, according to the sequence of the token acquisition request, by institute
It states token and distributes to sequence ranking and be equal to service server corresponding to the token acquisition request of default ranking.
7. according to the method described in claim 6, it is characterized in that, it is described by the token distribute to the service server it
Afterwards, the method also includes:
Occupancy processing is carried out to the token, and counts the occupancy duration of the token;
When the occupancy duration is greater than or equal to preset duration, then the token is discharged, and according to the token acquisition request
Sequence, the token is distributed to sequence ranking and is equal to service server corresponding to the token acquisition request of default ranking.
8. a kind of product data processing system, which is characterized in that the system comprises: service server and cache server;
The service server, for obtaining the request for product request for carrying applicant's mark, application number and product identification;
Corresponding applicant's information is identified according to the applicant to verify applicant, it, will be according to the production after verification passes through
The token acquisition request that product mark generates is sent to the cache server;
The cache server is in sky for inquiring in memory according to the product identification in the token acquisition request
The token of not busy state;When inquiring the token, the token is distributed to the service server;
The service server is also used to generate amount inquiry request according to the token and the product identification, by the volume
Degree inquiry request is sent to the cache server;
The cache server is also used to inquire turnout corresponding with the product identification in memory based on the token
Degree, and the product amount of inquiry is fed back into the service server;
The service server is also used to when the product amount is greater than or equal to the application number, according to the product
Amount and the application number calculate product residue amount;Token release is generated according to the product residue amount and the token
Instruction, the token is released order and is sent to the cache server;
The cache server, be also used to be released order according to the token in the product residue amount update memory in
The product amount, and discharge the token.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910418420.4A CN110245153A (en) | 2019-05-20 | 2019-05-20 | Product data processing method, system, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910418420.4A CN110245153A (en) | 2019-05-20 | 2019-05-20 | Product data processing method, system, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110245153A true CN110245153A (en) | 2019-09-17 |
Family
ID=67884454
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910418420.4A Pending CN110245153A (en) | 2019-05-20 | 2019-05-20 | Product data processing method, system, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245153A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110852776A (en) * | 2019-09-24 | 2020-02-28 | 京东数字科技控股有限公司 | Task processing method and device, storage medium and electronic device |
CN111083058A (en) * | 2019-12-04 | 2020-04-28 | 百度在线网络技术(北京)有限公司 | Content distribution network service current limiting method and electronic equipment |
CN111159233A (en) * | 2019-12-18 | 2020-05-15 | 金蝶软件(中国)有限公司 | Distributed caching method, system, computer device and storage medium |
CN114219642A (en) * | 2021-12-21 | 2022-03-22 | 中国农业银行股份有限公司 | Quota resource batch processing method, device, equipment and storage medium |
CN114691729A (en) * | 2021-11-22 | 2022-07-01 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN115442432A (en) * | 2022-09-06 | 2022-12-06 | 上海浦东发展银行股份有限公司 | Control method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106411567A (en) * | 2016-08-30 | 2017-02-15 | 福建星网视易信息系统有限公司 | Method and device for automatically controlling the number of clients capable of being loaded by servers |
US20170357502A1 (en) * | 2016-06-10 | 2017-12-14 | OneTrust, LLC | Data processing systems and communications systems and methods for integrating privacy compliance systems with software development and agile tools for privacy design |
CN108769041A (en) * | 2018-06-06 | 2018-11-06 | 深圳壹账通智能科技有限公司 | Login method, system, computer equipment and storage medium |
CN108897615A (en) * | 2018-05-31 | 2018-11-27 | 康键信息技术(深圳)有限公司 | Second kills request processing method, application server cluster and storage medium |
CN109492019A (en) * | 2018-10-16 | 2019-03-19 | 平安科技(深圳)有限公司 | Service request response method, device, computer equipment and storage medium |
-
2019
- 2019-05-20 CN CN201910418420.4A patent/CN110245153A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170357502A1 (en) * | 2016-06-10 | 2017-12-14 | OneTrust, LLC | Data processing systems and communications systems and methods for integrating privacy compliance systems with software development and agile tools for privacy design |
CN106411567A (en) * | 2016-08-30 | 2017-02-15 | 福建星网视易信息系统有限公司 | Method and device for automatically controlling the number of clients capable of being loaded by servers |
CN108897615A (en) * | 2018-05-31 | 2018-11-27 | 康键信息技术(深圳)有限公司 | Second kills request processing method, application server cluster and storage medium |
CN108769041A (en) * | 2018-06-06 | 2018-11-06 | 深圳壹账通智能科技有限公司 | Login method, system, computer equipment and storage medium |
CN109492019A (en) * | 2018-10-16 | 2019-03-19 | 平安科技(深圳)有限公司 | Service request response method, device, computer equipment and storage medium |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110852776A (en) * | 2019-09-24 | 2020-02-28 | 京东数字科技控股有限公司 | Task processing method and device, storage medium and electronic device |
CN111083058A (en) * | 2019-12-04 | 2020-04-28 | 百度在线网络技术(北京)有限公司 | Content distribution network service current limiting method and electronic equipment |
CN111083058B (en) * | 2019-12-04 | 2024-03-01 | 百度在线网络技术(北京)有限公司 | Content distribution network service flow limiting method and electronic equipment |
CN111159233A (en) * | 2019-12-18 | 2020-05-15 | 金蝶软件(中国)有限公司 | Distributed caching method, system, computer device and storage medium |
CN111159233B (en) * | 2019-12-18 | 2024-03-08 | 金蝶软件(中国)有限公司 | Distributed caching method, system, computer equipment and storage medium |
CN114691729A (en) * | 2021-11-22 | 2022-07-01 | 北京达佳互联信息技术有限公司 | Data processing method and device, electronic equipment and storage medium |
CN114219642A (en) * | 2021-12-21 | 2022-03-22 | 中国农业银行股份有限公司 | Quota resource batch processing method, device, equipment and storage medium |
CN115442432A (en) * | 2022-09-06 | 2022-12-06 | 上海浦东发展银行股份有限公司 | Control method, device, equipment and storage medium |
CN115442432B (en) * | 2022-09-06 | 2024-06-07 | 上海浦东发展银行股份有限公司 | Control method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110245153A (en) | Product data processing method, system, computer equipment and storage medium | |
CN108764868B (en) | Block chain node proxy reconciliation method and block reconciliation proxy node | |
CN109614209B (en) | Task processing method, application server and system | |
US8433809B2 (en) | Method and system for providing a session involving a plurality of software applications | |
CN110708258B (en) | Flow control method, device, server and storage medium | |
CN109446448A (en) | Data processing method and system | |
CN102067565B (en) | System, sharing node, server, and method for content distribution | |
CN105096122A (en) | Fragmented transaction matching method and fragmented transaction matching device | |
CN110909978A (en) | Resource processing method, device, server and computer readable storage medium | |
CN109242665B (en) | Business rule multi-channel sharing method, device, equipment and storage medium | |
CN109981702A (en) | File storage method and system | |
CN109636165B (en) | Decentralized online customer service queuing scheduling method | |
CN110012050A (en) | Message Processing, storage method, apparatus and system | |
CN105978744B (en) | A kind of resource allocation methods, apparatus and system | |
CN110009320B (en) | Resource conversion method, device, system, storage medium and computer equipment | |
CN112669160B (en) | Data processing method and device, electronic equipment and storage medium | |
CN114244905A (en) | Data forwarding method and device, computer equipment and storage medium | |
CN111736953A (en) | Virtual resource delivery method and device, computer equipment and storage medium | |
CN114186925A (en) | Stock value calculation method, stock value calculation device, computer equipment and storage medium | |
CN114490051A (en) | Cloud resource allocation method and electronic equipment | |
CN111709728A (en) | Virtual resource splitting deduction replacing method and device, computer equipment and storage medium | |
CN110264290B (en) | Method and device for acquiring recommendation information and electronic equipment | |
CN117893116B (en) | Data processing method, device and system | |
CN110163731A (en) | Method for building up, system and the storage medium of the room of virtually bidding of intermediary sevices supermarket | |
CN112396266A (en) | Order distribution method, device, server and storage medium |
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 |