CN106407021A - Queue-based business request processing method - Google Patents
Queue-based business request processing method Download PDFInfo
- Publication number
- CN106407021A CN106407021A CN201610515671.0A CN201610515671A CN106407021A CN 106407021 A CN106407021 A CN 106407021A CN 201610515671 A CN201610515671 A CN 201610515671A CN 106407021 A CN106407021 A CN 106407021A
- Authority
- CN
- China
- Prior art keywords
- service request
- queue
- data
- action type
- normal
- 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
- 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/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Abstract
The invention discloses a queue-based business request processing method. The method comprises the steps of receiving and making a response to a business request triggered by a user, and obtaining business request data; adding the business request data to data tables of a database; adding the business request data to normal queues of preset operation types and preset priorities; regularly processing the normal queues in the operation types by applying a server, wherein the normal queues are processed from high to low according to the preset priorities; when the processing of the normal queues fails, adding the business request data in the queues to the tails of restart queues; regularly processing the business request data of the restart queues in the operation types by applying the server; and when the processing of the business request fails and the executive frequency does not exceed a preset value, adding the business request data to the tails of the restart queues of the operation types again. According to the queue-based business request processing method, the efficiency of a data interaction process and the user experience are improved.
Description
Technical field
The present invention relates to field of computer technology, particularly to a kind of service request processing method based on queue.
Background technology
With the development of computer networking technology, in the work entertainment of people and daily life, all can't do without client
Figure, client can allow user intuitively be operated, and issue and oneself want the task or obtain issued oneself to want to obtain
Data, and mode of operation or operating result can be got in real time.The request of client operation is ultimately sent to application service
Device is processed, and client and server are during carrying out data interaction it will usually be related to multiple action types, Mei Zhongcao
Include multiple business as type, each business may relate to batch data and processes.In prior art, often through similar to serial
Mode process, first send a service request to application server, after completing this service request, retransmit next business
Request, but some service request are not necessary in data exchange process, and particularly one service request is related to large quantities of
During amount data processing, user generally requires to wait longer time to obtain operating result, so whole data interaction flow path efficiency
Too low, lead to Consumer's Experience poor.
Content of the invention
In view of the above problems, the present invention provide a kind of overcome the problems referred to above or solve the above problems at least in part one
Plant the service request processing method based on queue.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of service request processing method based on queue, including:
Receive and respond the service request of user's triggering, obtain service request data;Described service request data includes using
Family ID, action type, the priority in action type and the data operating this service needed;
Add the service request data belonging to predetermined registration operation type in the tables of data of data base;The field of described tables of data
Including quene state, execution number of times, ID, action type, priority and operation desired data;
After service request data is successfully added to data base, adds described service request data and preset to predetermined registration operation type
The normal queue of priority, is processed so that application server takes out service request data from normal queue;
Normal queue in each action type of application server Timing Processing, the normal queue in every kind of action type presses pre-
Setting priority is processed from high to low;Service request data in queue is then added to by normal queue's processing failure restarts team
Row afterbody, for application server from restart queue take out service request data processed;
The service request data of queue is restarted in each action type of application server Timing Processing;Service request processing failure
And execute number of times and then restart queue tail by what this service request data was re-added to described action type not less than preset value,
For application server from restart queue take out service request data processed.
Preferably, also included based on the service request processing method of queue:
Reception is added to data base's faulting instruction, determines service request failure.
Preferably, also included based on the service request processing method of queue:
Process normal queue or restart in queue service request before, judge whether described service request is cancelled;As
Fruit is cancelled, deletes the service request in queue, exits process.
Preferably, also included based on the service request processing method of queue:
After application server processes restart the service request failure in queue, if execution number of times exceedes preset value, delete team
Service request in row, exits process.
Preferably, add belong to the service request data of predetermined registration operation type in the tables of data of data base when, described number
According to the ID in table, action type, priority and operation desired data respectively from ID, the operation class of service request data
Type, the priority in action type and the data acquisition operating this service needed.
Preferably, after described service request data is successfully added to data base, add described service request data to operation
The normal queue of type pre-set priority, is processed so that application server takes out service request data from normal queue,
Further include:
After service request data is successfully added to data base, adds described service request data and this service request data exists
Unique mark in the described tables of data of data base to the normal queue of action type pre-set priority, for application server from
Take out service request data in normal queue to be processed.
Preferably, when often processing a normal queue or restarting the service request in queue, the described tables of data of data base
In execution time field increase 1.
Preferably, described predetermined registration operation type is configured by configuration file;It is not belonging to the business of predetermined registration operation type
Request is not added to data base.
Preferably, described pre-set priority is the priority according to the significance level setting of business in action type, numerical value
Big priority is high, preferential execution.
Preferably, described quene state include etc. pending, be carrying out, restart, cancelling, running succeeded and executing mistake
Lose;After service request data is added in the described tables of data of data base, modification quene state be etc. pending;Application server
When processing normal queue or restarting the service request data in queue, modification quene state is to be carrying out;At application server
Reason normal queue or restart in queue service request data failure after, modification quene state be restart;After service request is cancelled,
Modification quene state is to cancel.
Preferably, application server timing processes normal queue in the way of thread is concurrent and restarts queue;Wherein normal
The timing of queue is pressed action type and is arranged, and timing arrives, and the normal queue under same action type presses default preferential
Level execution.
The service request processing method based on queue of the present invention, receives and responds the service request of user's triggering, obtains
Service request data including ID, action type, the priority in action type and the data operating this service needed;
Further service request data is added in the tables of data of data base, thus storing to service request data, and according to
Process the progress corresponding quene state of more new service request and execution number of times, thus indicating that application server is carried out to service request
Process;Add described service request data to the normal queue of predetermined registration operation type pre-set priority, for application server from
Take out service request data in normal queue to be processed, be easy to enter the different business under same action type by significance level
Row is treated with a certain discrimination, the high business priority treatment of significance level;By the service request data in queue after normal queue's processing failure
It is added to and restarts queue tail, so that application server takes out service request data and processed from restarting queue, and restart
Service request in queue does not set priority level, it then follows first in first out, and application server energy root after once executing unsuccessfully
According to timing again to restarting execution service request in queue, thus improving the success rate of service request;To service request
Execution number of times is any limitation as, and can prevent the unlimited execution of service request, takies resource and affects the execution of other service request
Efficiency;To predetermined registration operation type pre-set priority just add unique mark in the tables of data of data base for the service request data
Often queue, is easy to when going to this service request, can quickly navigate to this data in data base, in data base
This data is modified;Application server timing processes normal queue in the way of thread is concurrent and restarts queue, can improve
Processing speed, accelerates execution efficiency, improves Consumer's Experience.
In sum, service request is no longer directly sent in sequence to application server and carries out serial process by the present invention, and
It is that the service request belonging to predetermined registration operation type in multiple service request is put into corresponding action type by service priority
In normal queue, processed so that application server takes out service request data from normal queue;Normal queue is processed to be lost
Lose, the service request data in queue is added to and restarts queue tail, so that application server is from restarting queue taking-up industry
Business request data is processed;In data exchange process without waiting for application server the service request to predetermined registration operation type
Feedback, thus improve the efficiency of data exchange process, improve Consumer's Experience.
Described above is only the general introduction of technical solution of the present invention, in order to more clearly understand the technology handss of the present invention
Section, thus can be practiced according to the content of description, and in order to allow the above and other objects, features and advantages of the present invention
Can become apparent, be exemplified below the specific embodiment of the present invention.
According to the detailed description to the specific embodiment of the invention below in conjunction with accompanying drawing, those skilled in the art will be brighter
The above-mentioned and other purpose of the present invention, advantages and features.
Brief description
Fig. 1 is the main flow chart of the inventive method;
Fig. 2 is the flow chart of the interpolation queue of the inventive method;
Fig. 3 is the flow chart of the process normal queue of the inventive method;
Fig. 4 is the process flow chart of restarting queue of the inventive method;
Fig. 5 is the schematic diagram of the interpolation template transfer queue of the inventive method.
Specific embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
It should be noted that the executive agent of the method for present embodiment is terminal, described terminal is mobile phone, flat board electricity
The equipment such as brain, palm PC PDA, notebook or desktop computer, it is, of course, also possible to have the equipment of identity function, this reality for other
Mode of applying is not any limitation as.
Referring to Fig. 1, a kind of method of code issue of the present invention, comprise the steps:
Step 101:Receive and respond the service request of user's triggering, obtain service request data;
Specifically, described service request data includes ID, action type, the priority in action type and operation
The data of this service needed.
It will be appreciated that user's triggering service request can be carried out, such as in several ways:By click client
The interaction triggering element at end, or click on the interaction triggering element of client on the touchscreen, present embodiment is not limited to this
System.
Step 102:Add the service request data belonging to predetermined registration operation type in the tables of data of data base;
Specifically, described predetermined registration operation type is configured by configuration file;It is not belonging to the business of predetermined registration operation type
Request is not added to data base.
The field of described tables of data includes quene state, execution number of times, ID, action type, priority and operation institute
Need data.ID in tables of data, action type, priority and operation desired data field are respectively from service request data
ID, action type, the priority in action type and the data acquisition operating this service needed.Service request data adds
After being added to the tables of data of data base, described quene state field be etc. pending, described execution number of times be 0.
Step 103:After service request data is successfully added to data base, add described service request data to predetermined registration operation
The normal queue of type pre-set priority, is processed so that application server takes out service request data from normal queue;
Specifically, as one kind preferably, this step further includes:
After described service request data is successfully added to data base, add described service request data and this service request number
According to the normal queue of the unique mark in the described tables of data of data base to action type pre-set priority, for application service
Device takes out service request data from normal queue and is processed.Specifically, described service request data and this service request number
It is assembled into new service request data according to the unique mark in the described tables of data of data base and put into normal queue.
Specifically, unique mark in the described tables of data of data base for the described service request data can be regarded as tables of data
From increasing ID, tables of data often increases a record, described from increasing ID increasing 1.Add the tables of data in data base for the service request data
In unique mark to the normal queue of predetermined registration operation type pre-set priority, be easy to when going to this service request, can
Quickly navigate to this data in data base, this data in data base is modified.
Specifically, described pre-set priority is the priority according to the significance level setting of business in action type, numerical value
Big priority is high, preferential execution.It will be appreciated that for the ease of belonging to the high business of the significance level of same action type first
Execution, in present embodiment, can be different preferential according to the significance level setting of business by the business belonging to same action type
The normal queue of level, pre-set priority data is bigger, and priority is higher, more preferentially executes.
Step 104:Normal queue in each action type of application server Timing Processing, normal in every kind of action type
Queue is processed from high to low by pre-set priority;Service request data in queue is then added by normal queue's processing failure
To restarting queue tail, so that application server takes out service request data and processed from restarting queue;
Specifically, during the service request of process normal queue, the corresponding service request number in the described tables of data of data base
According to quene state field be revised as being carrying out, and execute time field increase 1.
It will be appreciated that normal queue processes success or failure all will delete corresponding service request from this normal queue
Or service request is labeled as processed, no longer execute this service request in normal queue, that is, the business in normal queue please
Seek Exactly-once.Further, normal queue processes successfully modification quene state is to run succeeded, normal queue's processing failure
Modification quene state is to restart.
Specifically, the service request data in queue is then added to and restarts institute in queue tail by normal queue's processing failure
The service request data stated includes the unique mark in tables of data.
Step 105:The service request data of queue is restarted in each action type of application server Timing Processing;Service request
Processing failure and execute number of times then this service request data is re-added to restarting of described action type not less than preset value
Queue tail, for application server from restart queue take out service request data processed.
Specifically, when processing the service request restarting queue, the corresponding service request number in the described tables of data of data base
According to quene state field be revised as being carrying out, and execute time field increase 1.
It will be appreciated that after restarting queue processing failure, if the execution number of times of corresponding service request is not less than default
Value, then service request data restart queue tail by be re-added to described action type, after arriving for timing, application
Server from restart queue take out service request data processed again, that is, restarting the service request in queue can execute
Repeatedly.Further, restart queue processing and successfully change quene state for running succeeded, restart queue processing failure and execute secondary
Number is to restart not less than preset value modification quene state, restarts queue processing failure and execution number of times exceedes preset value modification queue
State is to execute failure.
Specifically, the service request restarted in queue does not have priority, and the principle according to first in first out is processed.
To sum up it will be understood that, all service request of all operations type share an above-mentioned data in data base
Table, in table a record represents a service request, and specifically, batch data processes and belongs to a service request.Certainly,
Can be every kind of action type all service request in data base share an above-mentioned tables of data, in table record generation
One service request of table, present embodiment is not any limitation as to this.But it should be noted that, normal queue and restart phase in queue
Same service request corresponds to same Zhang Shangshu tables of data.
Further, the service request processing method based on queue also includes reception and is added to data base's faulting instruction, really
Determine service request failure.Specifically, in execution step 102 " interpolation belongs to the service request data of predetermined registration operation type to number
According in the tables of data in storehouse " after step, if adding unsuccessfully, interpolation result is shown on the client end interface of terminal.
Further, the service request processing method based on queue also includes processing normal queue or restarts the industry in queue
Before business request, judge whether described service request is cancelled;If cancelling, deleting the service request in queue, exiting place
Reason.Specifically, step 104, before processing business request, judges that the cancel key of corresponding service request in redis whether there is,
If cancel key exists, show that user has cancelled this service request, no longer processed;Likewise, step 105 is being processed
Before service request, judge that the cancel key of corresponding service request in redis whether there is, if cancel key exists, show user
Cancel this service request, no longer processed.It is of course also possible to by judging whether quene state is that cancellation judges
Whether service request is cancelled.
Further, the service request processing method based on queue also includes application server processes and restarts the industry in queue
After business is asked unsuccessfully, if execution number of times exceedes preset value, delete the service request in queue, exit process.
Further, application server timing processes normal queue in the way of thread is concurrent and restarts queue;Wherein just
The timing of often queue is pressed action type and is arranged, and timing arrives, and the normal queue under same action type presses default excellent
First level execution.The timing restarting queue is also arranged by action type, and same action type only comprises one and restarts queue.
In the embodiment based on the service request processing method of queue for the present invention, can receive and respond the industry of user's triggering
Business request, acquisition includes ID, action type, the priority in action type and operates the industry of the data of this service needed
Business request data;Further service request data is added in the tables of data of data base, thus carrying out to service request data
Storage, and according to processing the progress corresponding quene state of more new service request and execution number of times, thus indicating application server pair
Service request is processed;Add described service request data to the normal queue of predetermined registration operation type pre-set priority, for
Application server takes out service request data from normal queue and is processed, and is easy to the different business under same action type
Treated with a certain discrimination by significance level, the high business priority treatment of significance level;By in queue after normal queue's processing failure
Service request data is added to restarts queue tail, for application server from restart queue take out service request data carry out
Process, and the service request restarted in queue does not set priority level, it then follows first in first out, and apply after once execute unsuccessfully
Server can be according to timing again to restarting execution service request in queue, thus improving the success rate of service request;Right
The execution number of times of service request is any limitation as, and can prevent the unlimited execution of service request, takies resource and affects other business
The execution efficiency of request;Add unique mark in the tables of data of data base for the service request data to preset to predetermined registration operation type
The normal queue of priority, is easy to when going to this service request, can quickly navigate to this data in data base, right
This data in data base is modified;Application server timing processes normal queue in the way of thread is concurrent and restarts team
Row, can improve processing speed, accelerate execution efficiency, improve Consumer's Experience.
Be the code dissemination method of the embodiment of the present invention is illustrated must become apparent from clearer, below to the present embodiment be based on team
The service request processing method of row divides interpolation queue, process normal queue and process to restart queue and be described in detail.
, referring to Fig. 2, the present embodiment is taking carry out batch operation to domain name as a example for the flow chart of the interpolation queue of the inventive method
Illustrate, specifically include following steps:
Step 201:Select to need the business under domain name, action type and the action type of operation.
Specifically, can be operated in the client of the terminal such as management platform domain name page, user selects to need to grasp
Business under the domain name (domain name can be multiple) made, action type and action type simultaneously clicks on submission.With domain name operation
Related action type include template transfer ownership, proceed in batches, continue to pay dues in batches, batch setting DNS etc..Every kind of action type includes many
Individual business, such as template transfer ownership action type can include the template transfer and management platform domain name page concluded the business template transfer ownership and
Other.
Step 202:Data is assembled with fixing form according to the priority of ID, action type, business.
Specifically, ID can be the ID carrying out unique distribution after a service request after User logs in.Described user
ID, the data of action type, the priority (priority in action type) of business and this service needed of operation are with fixation
Form is assembled into service request data.
Step 203:Call queue to add interface and add service request data to data base and normal queue.
Specifically, described queue is added the parameter of interface and is included described ID, action type, excellent in action type
First level and the data operating this service needed.
Specifically, when user executes the operations of type such as batch proceeds to, template is transferred ownership on interface, interface root is added in queue
According to action type, distribution of services is given different queues, that is, all operations type is all distributed by same interface, interface root
Business is added to different queue by the difference according to action type.
Step 204:Judge whether action type is predetermined registration operation type.
Specifically, described predetermined registration operation type is configured by configuration file;It is not belonging to the business of predetermined registration operation type
Request is not added to data base.Judge whether the action type that described queue is added in interface is included in configuration file, if
Do not comprise, go to step 208, add unsuccessfully in interface display;If comprised, go to step 205.
Step 205:Add service request data to data base.
Specifically, add the service request data belonging to predetermined registration operation type in the tables of data of data base.Described data
The field of table includes quene state, execution number of times, ID, action type, priority and operation desired data.In tables of data
ID, action type, priority and operation desired data field respectively from the ID of service request data, action type,
Priority in action type and the data acquisition operating this service needed.Service request data is added to the data of data base
After table, described quene state field be etc. pending, described execution number of times be 0.
Step 206:Judge whether data is successfully added to data base.
Specifically, if added to failed database, go to step 208, add unsuccessfully in interface display;If added to number
According to Kucheng's work(, go to step 207.
Step 207:By unique mark in the tables of data of data base for the service request data together with service request data
It is added to the normal queue of action type pre-set priority.
Specifically, unique mark in the described tables of data of data base for the described service request data can be regarded as tables of data
From increasing ID, tables of data often increases a record, described from increasing ID increasing 1.Add the tables of data in data base for the service request data
In unique mark to the normal queue of predetermined registration operation type pre-set priority, be easy to when going to this service request, can
Quickly navigate to this data in data base, this data in data base is modified.
Specifically, described pre-set priority is the priority according to the significance level setting of business in action type, numerical value
Big priority is high, preferential execution.It will be appreciated that for the ease of belonging to the high business of the significance level of same action type first
Execution, in present embodiment, can be different preferential according to the significance level setting of business by the business belonging to same action type
The normal queue of level, pre-set priority data is bigger, and priority is higher, more preferentially executes.
In the present embodiment, each action type has 5 priority, such as template transfer, and the template transfer of transaction is preferential
Level is 5, and the template transfer of the management platform domain name page is 3, and why difference is because that the transfer concluded the business is from seller to priority
Transfer ownership buyer, be the transfer before different user, significance level is higher, so priority degree can be higher, and manage flat
The platform domain name supervising page is the transfer between the different templates of user oneself, is all same user so priority can be more
Low.There are 5 queues because the difference of queue priority result in every kind of action type, be the team that priority 5 arrives priority 1 respectively
Row, such as 4 domain names of batch operation carry out template transfer, and priority is 3, are first added to queue database and are then added to template transfer
In template transfers ownership the queue that priority is 3, in queue, now there is the data latency execution of 4 template transfers, add template mistake
Family queue is as shown in Figure 5.
Further, add successful execution 208, page display is added successfully;Add unsuccessfully also execution step 208, the page
Display is added unsuccessfully.
Step 208:Result is added in page display.
The inventive method execution normal queue flow chart referring to Fig. 3, in the present embodiment, the normal team of application server
Every kind of action type of row is gone to execute timed task script by default time interval, and timed task script passes through the line of go program
Cheng Bingfa goes to execute the service request of normal queue, and in each queue, action type has corresponding timing script to go to execute, often
Secondary timed task runs and is all processed to the low order of priority by from priority height.
Specifically include following steps:
Step 301:Timing arrives, and obtains the service request data in normal queue, same operation class by action type
Normal queue in type is according to priority processed from big to small.
Step 302:Judge that queue cancel key whether there is.
Specifically, judge that the cancel key of corresponding service request in redis whether there is, if cancel key exists, show to use
This service request has been cancelled at family, is no longer processed;If cancel key does not exist, go to step 303.
Step 303:In the tables of data of modification data base, the quene state of this service request data is to be carrying out, and executes
Number of times increases 1.
Step 304:The execution corresponding service request of action type.
Step 305:Judge whether the normal queue of corresponding service request runs succeeded.
Specifically, run succeeded and go to step 306;Execute and unsuccessfully go to step 307.
Step 306:In the tables of data of modification data base, the quene state of this service request data is to run succeeded.
Step 307:In the tables of data of modification data base, the quene state of this service request data is to restart.
Step 308:Service request data is added to and restarts queue tail, wait the timing script execution restarting queue.
The execution of the inventive method restarts the flow chart of queue referring to Fig. 4, in the present embodiment, every kind of behaviour of application server
The queue of restarting making type is gone to execute timed task script by default time interval, and timed task script passes through the line of go program
The mode of Cheng Bingfa goes to execute the request task restarting in queue.Specifically include following steps:
Step 401:Timing arrives, and obtains, by action type, the service request data restarted in queue.
Step 402:Judge that queue cancel key whether there is.
Specifically, judge that the cancel key of corresponding service request in redis whether there is, if cancel key exists, show to use
This service request has been cancelled at family, is no longer processed;If cancel key does not exist, go to step 403.
Step 403:In the tables of data of modification data base, the quene state of this service request data is to be carrying out, and executes
Number of times increases 1.
Step 404:The execution corresponding service request of action type.
Step 405:Judge corresponding service request restarts whether queue runs succeeded.
Specifically, run succeeded and go to step 406;Execute and unsuccessfully go to step 407.
Step 406:In the tables of data of modification data base, the quene state of this service request data is to run succeeded.
Step 407:Judge to execute whether number of times exceeds preset value.
Specifically, no longer processed if exceeded;If without departing from execution step 408.
Step 408:In the tables of data of modification data base, the quene state of this service request data is to restart.
Step 409:Service request data is added to restarts queue tail, and process completes.
Described above is only the general introduction of technical solution of the present invention, in order to more clearly understand the technology handss of the present invention
Section, thus can be practiced according to the content of description, and in order to allow the above and other objects, features and advantages of the present invention
Can become apparent, be exemplified below the specific embodiment of the present invention.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement made etc., should be included within the scope of the present invention.
Claims (10)
1. a kind of service request processing method based on queue is it is characterised in that include:
Receive and respond the service request of user's triggering, obtain service request data;Described service request data include ID,
Action type, the priority in action type and the data operating this service needed;
Add the service request data belonging to predetermined registration operation type in the tables of data of data base;The field of described tables of data includes
Quene state, execution number of times, ID, action type, priority and operation desired data;
After service request data is successfully added to data base, add described service request data to action type pre-set priority
Normal queue, is processed so that application server takes out service request data from normal queue;
Normal queue in each action type of application server Timing Processing, the normal queue in every kind of action type presses default excellent
First level is processed from high to low;Service request data in queue is then added to by normal queue's processing failure restarts rear of queue
Portion, for application server from restart queue take out service request data processed;
The service request data of queue is restarted in each action type of application server Timing Processing;Service request processing failure and holding
Places number then restarts queue tail by what this service request data was re-added to described action type not less than preset value, for
Application server from restart queue take out service request data processed.
2. the service request processing method based on queue according to claim 1 is it is characterised in that also include:
Process normal queue or restart in queue service request before, judge whether described service request is cancelled;If
Cancel, delete the service request in queue, exit process.
3. the service request processing method based on queue according to claim 1 is it is characterised in that also include:
After application server processes restart the service request failure in queue, if execution number of times exceedes preset value, delete in queue
Service request, exit process.
4. the service request processing method based on queue according to claim 1 it is characterised in that:
Add belong to the service request data of predetermined registration operation type in the tables of data of data base when, the user in described tables of data
ID, action type, priority and operation desired data respectively from the ID of service request data, action type, in operation class
Priority in type and the data acquisition operating this service needed.
5. the service request processing method based on queue according to claim 1 is it is characterised in that described service request number
According to being successfully added to after data base, add described service request data to the normal queue of action type pre-set priority, for
Application server takes out service request data from normal queue and is processed, and further includes:
After service request data is successfully added to data base, add described service request data and this service request data in data
Unique mark in the described tables of data in storehouse to the normal queue of action type pre-set priority, so that application server is from normal
Take out service request data in queue to be processed.
6. the service request processing method based on queue according to claim 1 it is characterised in that:Often process one subnormal
Queue or when restarting the service request in queue, the execution time field in the described tables of data of data base increases 1.
7. the service request processing method based on queue according to claim 1 it is characterised in that:
Described predetermined registration operation type is configured by configuration file.
8. the service request processing method based on queue according to claim 1 it is characterised in that:
Described pre-set priority is the priority according to the significance level setting of business in action type, the big priority of numerical value
Height, preferential execution.
9. the service request processing method based on queue according to claim 1 it is characterised in that:
Described quene state include etc. pending, be carrying out, restart, cancelling, running succeeded and executing failure;Service request number
After being added in the described tables of data of data base, modification quene state be etc. pending;Application server processes normal queue
Or when restarting the service request data in queue, modification quene state is to be carrying out;Application server processes normal queue or
After restarting the service request data failure in queue, modification quene state is to restart;After service request is cancelled, change quene state
For cancelling.
10. the service request processing method based on queue according to claim 1 it is characterised in that:
Application server timing processes normal queue in the way of thread is concurrent and restarts queue;Wherein the timing of normal queue when
Between by action type setting, timing arrives, and default priority execution is pressed by the normal queue under same action type.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610515671.0A CN106407021A (en) | 2016-07-01 | 2016-07-01 | Queue-based business request processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610515671.0A CN106407021A (en) | 2016-07-01 | 2016-07-01 | Queue-based business request processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106407021A true CN106407021A (en) | 2017-02-15 |
Family
ID=58006022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610515671.0A Pending CN106407021A (en) | 2016-07-01 | 2016-07-01 | Queue-based business request processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106407021A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106851014A (en) * | 2017-03-10 | 2017-06-13 | 广东欧珀移动通信有限公司 | Adjust method, device and the terminal of broadcast message queue |
CN107239487A (en) * | 2017-04-19 | 2017-10-10 | 腾讯科技(深圳)有限公司 | Business data processing method and device |
CN107273225A (en) * | 2017-06-16 | 2017-10-20 | 深圳易嘉恩科技有限公司 | High concurrent competition for orders function realizing method based on message queue |
CN107329858A (en) * | 2017-07-10 | 2017-11-07 | 上海哎媲媲网络技术有限公司 | A kind of Quick fault-tolerance processing method of data write-in Redis failures |
CN109039751A (en) * | 2018-08-14 | 2018-12-18 | 深圳壹账通智能科技有限公司 | Configure method, apparatus, computer equipment and the storage medium of routing |
CN109104336A (en) * | 2018-09-27 | 2018-12-28 | 平安普惠企业管理有限公司 | Service request processing method, device, computer equipment and storage medium |
CN110348242A (en) * | 2017-06-12 | 2019-10-18 | 腾讯科技(深圳)有限公司 | Service request processing method and device |
CN110740103A (en) * | 2019-09-02 | 2020-01-31 | 深圳壹账通智能科技有限公司 | Service request processing method and device, computer equipment and storage medium |
CN112162842A (en) * | 2020-10-13 | 2021-01-01 | 北京百度网讯科技有限公司 | Method, device, electronic equipment and readable storage medium for canceling request |
CN112349361A (en) * | 2021-01-08 | 2021-02-09 | 浙江太美医疗科技股份有限公司 | Execution scheduling method, system and readable medium for clinical trial data processing task |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090216718A1 (en) * | 2008-02-25 | 2009-08-27 | Parag Agrawal | System for Query Scheduling to Maximize Work Sharing |
CN103856392A (en) * | 2013-06-26 | 2014-06-11 | 携程计算机技术(上海)有限公司 | Message push method, outgoing server using message push method and outgoing server system |
CN104346215A (en) * | 2013-08-07 | 2015-02-11 | 中兴通讯股份有限公司 | Task scheduling service system and method |
CN104601491A (en) * | 2014-12-31 | 2015-05-06 | 微梦创科网络科技(中国)有限公司 | Distributed queue processing method and system |
CN105512244A (en) * | 2015-11-30 | 2016-04-20 | 北京京东尚科信息技术有限公司 | Database transaction processing method and device based on message queue |
-
2016
- 2016-07-01 CN CN201610515671.0A patent/CN106407021A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090216718A1 (en) * | 2008-02-25 | 2009-08-27 | Parag Agrawal | System for Query Scheduling to Maximize Work Sharing |
CN103856392A (en) * | 2013-06-26 | 2014-06-11 | 携程计算机技术(上海)有限公司 | Message push method, outgoing server using message push method and outgoing server system |
CN104346215A (en) * | 2013-08-07 | 2015-02-11 | 中兴通讯股份有限公司 | Task scheduling service system and method |
CN104601491A (en) * | 2014-12-31 | 2015-05-06 | 微梦创科网络科技(中国)有限公司 | Distributed queue processing method and system |
CN105512244A (en) * | 2015-11-30 | 2016-04-20 | 北京京东尚科信息技术有限公司 | Database transaction processing method and device based on message queue |
Non-Patent Citations (1)
Title |
---|
郑增威: "《操作系统原理及实验》", 31 August 2007, 浙江大学出版社 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106851014A (en) * | 2017-03-10 | 2017-06-13 | 广东欧珀移动通信有限公司 | Adjust method, device and the terminal of broadcast message queue |
CN107239487A (en) * | 2017-04-19 | 2017-10-10 | 腾讯科技(深圳)有限公司 | Business data processing method and device |
CN107239487B (en) * | 2017-04-19 | 2018-09-11 | 腾讯科技(深圳)有限公司 | Business data processing method and device |
CN110348242A (en) * | 2017-06-12 | 2019-10-18 | 腾讯科技(深圳)有限公司 | Service request processing method and device |
CN107273225A (en) * | 2017-06-16 | 2017-10-20 | 深圳易嘉恩科技有限公司 | High concurrent competition for orders function realizing method based on message queue |
CN107329858A (en) * | 2017-07-10 | 2017-11-07 | 上海哎媲媲网络技术有限公司 | A kind of Quick fault-tolerance processing method of data write-in Redis failures |
CN109039751A (en) * | 2018-08-14 | 2018-12-18 | 深圳壹账通智能科技有限公司 | Configure method, apparatus, computer equipment and the storage medium of routing |
CN109104336A (en) * | 2018-09-27 | 2018-12-28 | 平安普惠企业管理有限公司 | Service request processing method, device, computer equipment and storage medium |
CN109104336B (en) * | 2018-09-27 | 2022-08-05 | 平安普惠企业管理有限公司 | Service request processing method and device, computer equipment and storage medium |
CN110740103A (en) * | 2019-09-02 | 2020-01-31 | 深圳壹账通智能科技有限公司 | Service request processing method and device, computer equipment and storage medium |
CN112162842A (en) * | 2020-10-13 | 2021-01-01 | 北京百度网讯科技有限公司 | Method, device, electronic equipment and readable storage medium for canceling request |
CN112349361A (en) * | 2021-01-08 | 2021-02-09 | 浙江太美医疗科技股份有限公司 | Execution scheduling method, system and readable medium for clinical trial data processing task |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106407021A (en) | Queue-based business request processing method | |
CN107729139B (en) | Method and device for concurrently acquiring resources | |
US20120254221A1 (en) | Systems and methods for performing record actions in a multi-tenant database and application system | |
CN110825535B (en) | Job scheduling method and system | |
CN109862101B (en) | Cross-platform application starting method and device, computer equipment and storage medium | |
CN108182111A (en) | Task scheduling system, method and apparatus | |
CN111078436B (en) | Data processing method, device, equipment and storage medium | |
CN107105009A (en) | Job scheduling method and device based on Kubernetes system docking workflow engines | |
CN110458468A (en) | A kind of task processing method, device, electronic equipment and storage medium | |
CN111090532B (en) | Application service calling method, device, electronic equipment and computer storage medium | |
CN106034113A (en) | Data processing method and data processing device | |
CN109766172A (en) | A kind of asynchronous task scheduling method and device | |
CN108616668B (en) | Method for monitoring dialing task, electronic device and computer readable storage medium | |
CN106034120A (en) | Method for multiple processes to access trusted application and system thereof | |
CN103699533A (en) | Method and system for acquiring WEB updating information | |
CN114125050A (en) | Message scheduling method, device, equipment and storage medium | |
CN108874523A (en) | A kind of programmed method based on the AI and promise of children education control asynchronous function sequence | |
CN106933932B (en) | Data processing method and device and application server | |
CN110389976A (en) | A kind of dispatching method and device of multi-interface data | |
CN107045452B (en) | Virtual machine scheduling method and device | |
CN116880990A (en) | Task execution method, device, electronic equipment and computer readable storage medium | |
CN108521524B (en) | Agent collaborative task management method and device, computer equipment and storage medium | |
CN116303276A (en) | Method for realizing file export by spring batch nested script | |
US20150120607A1 (en) | System and method for customer event email consolidation and delivery | |
US11573548B2 (en) | Information processing apparatus, control method, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170215 |