CN109561133A - Method for processing business, device, equipment and computer readable storage medium - Google Patents
Method for processing business, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109561133A CN109561133A CN201811237695.XA CN201811237695A CN109561133A CN 109561133 A CN109561133 A CN 109561133A CN 201811237695 A CN201811237695 A CN 201811237695A CN 109561133 A CN109561133 A CN 109561133A
- Authority
- CN
- China
- Prior art keywords
- channel
- thread
- service request
- business
- queue
- 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
- 238000000034 method Methods 0.000 title claims abstract description 66
- 238000012545 processing Methods 0.000 title claims abstract description 40
- 238000003860 storage Methods 0.000 title claims abstract description 27
- 230000008569 process Effects 0.000 claims description 12
- 230000002159 abnormal effect Effects 0.000 claims description 6
- 238000009826 distribution Methods 0.000 claims description 5
- 238000012163 sequencing technique Methods 0.000 claims description 3
- GOLXNESZZPUPJE-UHFFFAOYSA-N spiromesifen Chemical compound CC1=CC(C)=CC(C)=C1C(C(O1)=O)=C(OC(=O)CC(C)(C)C)C11CCCC1 GOLXNESZZPUPJE-UHFFFAOYSA-N 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 13
- 238000004590 computer program Methods 0.000 description 11
- 230000006872 improvement Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 6
- 238000007726 management method Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011017 operating method Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000013468 resource allocation Methods 0.000 description 1
- 239000010979 ruby Substances 0.000 description 1
- 229910001750 ruby Inorganic materials 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of method for processing business, device, equipment and computer readable storage mediums, it is the resource that each channel distributes the server according to the concurrent upper limit value this method comprises: concurrent upper limit value is arranged to each channel in the corresponding multiple support channels of server;Determine the current service request number of each channel;Judge whether the current service request number of each channel reaches the concurrent upper limit value, if so, refusing newest service request, if it is not, then handling newest service request.It solves the problems, such as to occupy other channels caused by the server resource of other channels when the existing service request as a channel explodes through the above scheme not available, corresponding resource, the technical effect of the unbroken technical effect of the business service of each channel can be assigned by having reached each channel of guarantee.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of method for processing business, device, equipment and computer can
Read storage medium.
Background technique
With the continuous development of Internet technology, business provider can provide business by multiple support channels for user.Example
Such as, a businessman can use multiple business platforms to provide product, and user is allowed to buy the quotient on different platforms
The product of family.
When existing business provider provides business for consumer, a certain business usually is provided in multiple support channels setting
Function, the business of multiple support channels are required to the service resources using business provider server.When the service request of some channel
When quantity explodes, the business that may result in business provider's server other channels is unavailable, thus leads to server service
Resource allocation is unbalanced.
In view of the above-mentioned problems, currently no effective solution has been proposed.
Summary of the invention
The purpose of the present invention is to provide a kind of method for processing business, device, equipment and computer readable storage medium, into
And it solves to occupy other canals caused by the server resource of other channels when the existing service request as a channel explodes
The not available problem in road thereby may be ensured that each channel can be assigned corresponding resource, reach the business for guaranteeing each channel
Service unbroken technical effect.
The present invention is to solve above-mentioned technical problem by following technical proposals:
According to an aspect of the invention, there is provided a kind of method for processing business, includes the following steps:
Concurrent upper limit value is arranged to each channel in the corresponding multiple support channels of server, is according to the concurrent upper limit value
Each channel distributes the resource of the server;
Determine the current service request number of each channel;
Judge whether the current service request number of each channel reaches the concurrent upper limit value, if so, refusing newest industry
Business request, if it is not, then handling newest service request.
In one embodiment, the service request includes: requestor information, channel mark and request content.
In one embodiment, the current service request number of each channel is according to the Thread Count of thread pool come really
It is fixed, the corresponding thread of a service request;The thread pool is for managing the thread.
In one embodiment, the thread pool is the thread pool for having boundary, is realized by the way of concurrent Map.
In one embodiment, include: to the management of thread in the thread pool
Maximum thread in one queue is set, multiple threads of the queue are arranged in the team according to sequencing
In column, and the thread in the queue is executed respectively;The corresponding business channel of one queue;
At the end of one or more threads in the queue, the thread of end is removed from the queue;When described
When the Thread Count being carrying out in queue is less than the maximum thread of the setting, allow to add new thread;When the queue
In the Thread Count that is carrying out when reaching the maximum thread of the setting, forbid that new thread is added.
In one embodiment, in the thread pool file line journey management by the way of blocking queue.
It is in one embodiment, described that carry out processing to newest service request include: newly-built to ask with the newest business
Corresponding first thread is sought, and the first thread is added in the thread pool.
In one embodiment, the service request further include: request time;So, the method for processing business is also
It include: the total business number of request for counting the first channel in first time interval, when total number of request is greater than first threshold, hair
Abnormal notification message out.
According to another aspect of the present invention, a kind of business processing device is provided, comprising:
Distribution module is set, for concurrent upper limit value, root to be arranged to each channel in the corresponding multiple support channels of server
It is the resource that each channel distributes the server according to the concurrent upper limit value;
Service request number determining module, for determining the current service request number of each channel;
Comparison process module, for judging whether the current service request number of each channel reaches the concurrent upper limit value,
If so, refusing newest service request, if it is not, then handling newest service request.
According to a further aspect of the invention, a kind of computer equipment, including memory and processor are provided, wherein
The processor is for the step of executing the above method.
According to a further aspect of the invention, a kind of computer readable storage medium is provided, computer is stored thereon with
Instruction, described instruction are performed the step of realizing the above method.
The positive effect of the present invention is that: service server increases con current control to each channel of the business of offer, makes
The number of concurrent for obtaining each channel can be pre-configured with, and server resource can also carry out in advance according to the number of concurrent that each channel configures
Distribution, occupies other canals caused by the server resource of other channels when can explode to avoid the service request as a channel
The not available problem in road.It thereby may be ensured that each channel can be assigned corresponding resource, reach the business for guaranteeing each channel
Service unbroken technical effect.
Detailed description of the invention
In order to illustrate more clearly of this specification one or more embodiment or technical solution in the prior art, below will
A brief introduction will be made to the drawings that need to be used in the embodiment or the description of the prior art, it should be apparent that, it is described below
Attached drawing is only some embodiments recorded in this specification, for those of ordinary skill in the art, is not paying creation
Property labour under the premise of, be also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of the embodiment for the method for processing business that this specification provides;
Fig. 2 is a kind of structural schematic diagram of the embodiment for the business processing device that this specification provides;
Fig. 3 is the structural schematic diagram of another embodiment for the business processing device that this specification provides;
Fig. 4 is the schematic configuration diagram according to the computer equipment of an exemplary embodiment of this specification.
Specific embodiment
This specification embodiment provides a kind of method for processing business, device, equipment and computer readable storage medium.
In order to make those skilled in the art more fully understand the technical solution in this specification, below in conjunction with this explanation
Attached drawing in book embodiment is clearly and completely described the technical solution in this specification embodiment, it is clear that described
Embodiment be only this specification a part of the embodiment, instead of all the embodiments.The embodiment of base in this manual,
Every other embodiment obtained by those of ordinary skill in the art without making creative efforts, all should belong to
The range of this specification protection.
Currently, usually being provided in multiple support channels setting a certain when existing business provider provides business for consumer
The function of business, the business of multiple support channels are required to the service resources using business provider server.When the industry of some channel
Business number of requests is when exploding, and the business that may result in business provider's server other channels is unavailable, thus causes to service
Device traffic resource assignment is unbalanced.
Based on this, service server increases con current control to each channel of the business of offer in this specification embodiment, so that
The number of concurrent of each channel can be pre-configured with, and server resource can also be divided in advance according to the number of concurrent that each channel configures
Match, other channels caused by the server resource of other channels are occupied when can explode to avoid the service request as a channel
Not available problem.
A kind of a kind of specific embodiment of method for processing business of this specification introduced below.Fig. 1 is that this specification provides
A kind of flow diagram of embodiment of method for processing business, present description provides the methods as described in embodiment or flow chart
Operating procedure, but based on routine or may include more or less operating procedure without creative labor.In embodiment
The step of enumerating sequence is only one of numerous step execution sequence mode, does not represent and unique executes sequence.In reality
In system or client production when executing, can execute according to embodiment or method shown in the drawings sequence or parallel hold
Row (such as environment of parallel processor or multiple threads).It is specific as shown in Figure 1, the method may include:
S102: concurrent upper limit value is arranged to each channel serviced in corresponding multiple support channels, according to the concurrent upper limit
Value is the resource that each channel distributes the server.
The server can correspond to multiple support channels, and each channel can receive service request.
The service request may include: requestor information, request channel mark (ID) and request content.Further,
The service request can also include: request time.
Channel ID and corresponding concurrent upper limit value can be preset to each channel in the multiple channel.
The channel ID can be used for the unique identification channel.The channel ID can be number, title etc..The channel
ID can be determined according to the service request.
The concurrent upper limit value of the channel can be used to indicate that the permitted maximum traffic request of the channel of same time
Number.The value of the concurrent upper limit value can be chosen according to the actual situation.
The server can be the resource that each channel distributes the server according to the concurrent upper limit value.At one
In embodiment, the server can according to the concurrent upper limit value of each channel the total concurrent upper limit value of all channels accounting
To distribute the resource of each channel.In general, the corresponding channel of higher concurrent upper limit value can distribute more server resource.
After the service server receives the service request of a channel, the channel ID of the channel can be determined, and obtain
The preset concurrent upper limit value of the channel.
S104: the current service request number of each channel is determined.
The service server can also obtain the current service request number of each channel.The current industry of each channel
Business number of request can be used to indicate that the service request number of each channel of current time.
The current service request number of each channel can be determined according to the Thread Count of thread pool.In general, an industry
Business request can correspond to a thread.The thread pool can be used for managing the thread.
The thread pool can be the thread pool on boundary.
In one embodiment, the thread pool can be realized by the way of concurrent Map.Specifically, it can adopt
It is realized with the ThreadPoolExecutor of the ConcurrentHashMap storage in JDK1.7.
The management of thread can specifically include in the thread pool: the maximum thread in one queue of setting, by this
Multiple threads of queue are arranged in the queue according to sequencing, and execute the thread in the queue respectively, when described
At the end of one or more threads in queue, the thread of end is removed from the queue;It is carrying out when in the queue
Thread Count be less than the setting maximum thread when, allow to add new thread;When the line being carrying out in the queue
When number of passes reaches the maximum thread of the setting, forbid that new thread is added.
The management of thread pool squadron thread can be by the way of blocking queue.
In the present embodiment, a queue can correspond to a business channel.So, the maximum thread of a queue
The maximum traffic number of request of the corresponding business channel of the queue can be equal to.The Thread Count being carrying out in one queue can be with table
Show the current service request number of the corresponding business channel of the queue.
S106: judging whether the current service request number of each channel reaches the concurrent upper limit value, if then refusing most
New service request, if it is not, then handling newest service request.
Can the current service request number of each channel whether reach the concurrent upper limit value of the channel.
When the comparison result of a channel, which is, is, the Thread Count being carrying out in queue corresponding with the channel reaches this
The maximum thread of queue, then it represents that do not have vacancy for executing new thread in queue corresponding with the channel.It indicates, institute
It states server and is pre-assigned to the resource of the channel and have been used, need to suspend and receive new service request, needed to wait for industry
After the completion of business request, then receive new service request.So, the server can refuse newest service request.For example, can be with
Issue service exception information.
When the comparison result of a channel is no, the Thread Count being carrying out in queue corresponding with the channel is not up to
The maximum thread of the queue, then it represents that have vacant position in queue corresponding with the channel for executing new thread.It indicates, institute
Server is stated to be pre-assigned to the resource of the channel there are also adaptable idling-resources.So, the server can be to institute
Newest service request is stated to be handled.Specifically, first thread corresponding with the newest service request can be created, and by institute
First thread is stated to be added in the thread pool.
In another embodiment, the method can also include: the total of each channel in statistics first time interval
Service request number issues abnormal notification message when the total business number of request is greater than first threshold.
The first time interval can be 1 hour, 10 hours or 24 hours etc., can be selected according to the actual situation
It is fixed.
The first threshold can be determined according to history service number of request.Specifically, the first threshold can be equal to
The presupposition multiple of the average value of service request number in second time interval in every first time interval.Second time interval
It can be the integral multiple of the first time interval.For example, first time interval can be 1 day, the second time interval can be 5
It, presupposition multiple can be 6, it is assumed that every 1 day service request number is respectively as follows: 6,9,12,15,9 in nearest 5 days, then first
Threshold value can be 6 times of above-mentioned 5 several average value, i.e., 61.2.So, when the total business number of request of a channel in one day is big
When 61.2, it is believed that the total business number of request of the channel increases exception, then the service server can issue abnormal logical
Know message.
When the service request number of a certain channel explodes, there are abnormal conditions for the possible business channel, by each canal
The service request number in road is counted, and whether the service request number that can monitor each channel is normal, when exception occurs in business channel
It when situation, can further be checked into the business service to the channel in time, thereby may be ensured that each channel provides stabilization
Business service.
It can be seen that in a kind of one or more embodiments of method for processing business of this specification, service server is to mentioning
Increase con current control for each channel of business, so that the number of concurrent of each channel can be pre-configured with, server resource can also root
It is allocated in advance according to the number of concurrent that each channel configures, occupies it when can explode to avoid the service request due to a channel
The not available problem of other channels caused by the server resource of his channel.It thereby may be ensured that each channel and can be assigned pair
The resource answered reaches the unbroken technical effect of business service for guaranteeing each channel.
On the other hand this specification also provides a kind of business processing device, Fig. 2 is the business processing dress that this specification provides
The structural schematic diagram for a kind of embodiment set, as shown in Fig. 2, the business processing device 200 may include: setting distribution module
202, service request number determining module 204 and comparison process module 206.
The setting distribution module 202 can be used for each channel setting in the corresponding multiple support channels of server simultaneously
Upper limit value is sent out, is the resource that each channel distributes the server according to the concurrent upper limit value.
The service request number determining module 204, is determined for the current service request number of each channel.
The comparison process module 206, can be used for judging whether the current service request number of each channel reaches described
Concurrent upper limit value, if so, refusing newest service request, if it is not, then handling newest service request.
Fig. 3 is the structural schematic diagram of another embodiment for the business processing device that this specification provides.As shown in figure 3,
In another embodiment, the business processing device 200 can also include: statistical module 208.The statistical module 208
It can be used for counting the total business number of request of each channel in first time interval.When the total business number of request is greater than the first threshold
When value, the statistical module 208 can issue abnormal notification message.
The above-mentioned method for processing business or device that this specification embodiment provides can be in computer equipments by processor
Corresponding program instruction is executed to realize, such as using the c++ language of windows operating system the end PC realize or other for example
It is realized using android, iOS system programming language in intelligent terminal, and the processing logic based on quantum computer is real
Now etc..As shown in figure 4, Fig. 4 is the schematic configuration diagram according to the computer equipment of an exemplary embodiment of this specification.Hard
Part level, the computer equipment may include processor, internal bus, transmission module and memory.The memory can wrap
Include memory and nonvolatile memory.Processor is from reading corresponding computer program into memory in nonvolatile memory
Then it runs, forms word string identification device on logic level.It will appreciated by the skilled person that knot shown in Fig. 4
Structure is only to illustrate, and does not cause to limit to the structure of above-mentioned computer equipment.For example, the computer equipment may also include ratio
More or less component shown in Fig. 4, such as can also include other processing hardware, such as GPU (Graphics
Processing Unit, image processor), or with the configuration different from shown in Fig. 4.Certainly, in addition to software realization mode
Except, other implementations, such as logical device or the mode of software and hardware combining etc. is not precluded in the application, that is to say, that
The executing subject of following process flow is not limited to each logic unit, is also possible to hardware or logical device.
Specifically, on the other hand this specification also provides a kind of computer equipment, including processor and memory, it is described to deposit
Reservoir stores the computer program instructions executed by the processor, and the processor is for executing embodiment institute in this specification
The step of stating method.
On the other hand this specification also provides a kind of computer readable storage medium, be stored thereon with computer instruction, institute
It states instruction and is performed the step of realizing embodiment the method in this specification.
In this specification embodiment, the processor may include central processing unit (CPU) or graphics processor
(GPU), naturally it is also possible to including other single-chip microcontroller, logic gates, integrated circuits with logic processing capability etc. or its
It is appropriately combined.Memory described in the embodiment of the present application can be for protecting stored memory device.In digital display circuit, energy
The equipment for saving binary data can be memory;In integrated circuits, one not physical form have store function
Circuit may be memory, such as RAM, FIFO;In systems, the storage equipment with physical form can also be named storage
Device etc..When realization, which can also be realized by the way of cloud storage, specific implementation, and this specification is not
Mistake limits.
It can be seen that this specification provide business processing device, equipment, the embodiment of computer readable storage medium with
Embodiment of the method in this specification is based on same innovation thinking, and therefore, the business processing device of this specification offer is set
The technical effect of embodiment of the method in specification may be implemented in standby, computer readable storage medium embodiment.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip.Moreover, nowadays, substitution manually makes IC chip, this programming is also used instead mostly " is patrolled
Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development,
And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present
Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also answer
This understands, it is only necessary to method flow slightly programming in logic and is programmed into integrated circuit with above-mentioned several hardware description languages,
The hardware circuit for realizing the logical method process can be readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing
The computer for the computer readable program code (such as software or firmware) that device and storage can be executed by (micro-) processor can
Read medium, logic gate, switch, specific integrated circuit (Application Specific Integrated Circuit,
ASIC), the form of programmable logic controller (PLC) and insertion microcontroller, the example of controller includes but is not limited to following microcontroller
Device: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320 are deposited
Memory controller is also implemented as a part of the control logic of memory.It is also known in the art that in addition to
Pure computer readable program code mode is realized other than controller, can be made completely by the way that method and step is carried out programming in logic
Controller is obtained to come in fact in the form of logic gate, switch, specific integrated circuit, programmable logic controller (PLC) and insertion microcontroller etc.
Existing identical function.Therefore this controller is considered a kind of hardware component, and to including for realizing various in it
The device of function can also be considered as the structure in hardware component.Or even, it can will be regarded for realizing the device of various functions
For either the software module of implementation method can be the structure in hardware component again.
Device, module or the unit that above-described embodiment illustrates can specifically be realized, Huo Zheyou by computer chip or entity
Product with certain function is realized.It is a kind of typically to realize that equipment is computer.Specifically, computer for example can be a
People's computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation
Any equipment in equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
Combination.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when specification.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, apparatus or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (device) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage, graphene stores or other
Magnetic storage device or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to herein
In define, computer-readable medium does not include temporary computer readable media (transitory media), such as the data of modulation
Signal and carrier wave.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that the embodiment of this specification can provide as method, apparatus or computer program production
Product.Therefore, complete hardware embodiment, complete software embodiment or implementation combining software and hardware aspects can be used in this specification
The form of example.Moreover, it wherein includes the computer of computer usable program code that this specification, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey
Sequence module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, programs, objects,
Component, data structure etc..This specification can also be practiced in a distributed computing environment, in these distributed computing environment
In, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module
It can be located in the local and remote computer storage media including storage equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device and
For server example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to side
The part of method embodiment illustrates.
The foregoing is merely the embodiments of this specification, are not limited to this specification.For art technology
For personnel, this specification can have various modifications and variations.It is all made any within the spirit and principle of this specification
Modification, equivalent replacement, improvement etc., should be included within scope of the claims.
Claims (11)
1. a kind of method for processing business, which comprises the steps of:
Concurrent upper limit value is arranged to each channel in the corresponding multiple support channels of server, is each according to the concurrent upper limit value
Channel distributes the resource of the server;
Determine the current service request number of each channel;
Judge whether the current service request number of each channel reaches the concurrent upper limit value, is asked if so, refusing newest business
It asks, if it is not, then handling newest service request.
2. the method according to claim 1, wherein the service request includes: requestor information, request channel
Mark and request content.
3. the method according to claim 1, wherein the current service request number of each channel is according to thread
The Thread Count in pond determines, the corresponding thread of a service request;The thread pool is for managing the thread.
4. according to the method described in claim 3, it is characterized in that, the thread pool is the thread pool for having boundary, using concurrent
The mode of Map is realized.
5. according to the method described in claim 3, it is characterized in that, including: to the management of thread in the thread pool
Maximum thread in one queue is set, multiple threads of the queue are arranged in the queue according to sequencing
In, and the thread in the queue is executed respectively;The corresponding business channel of one queue;
At the end of one or more threads in the queue, the thread of end is removed from the queue;When the queue
In the Thread Count that is carrying out when being less than the maximum thread of the setting, allow to add new thread;When in the queue just
When the Thread Count of execution reaches the maximum thread of the setting, forbid that new thread is added.
6. according to the method described in claim 5, it is characterized in that, the management of file line journey is using obstruction team in the thread pool
The mode of column.
7. according to the method described in claim 5, it is characterized in that, it is described to newest service request carry out processing include: newly-built
First thread corresponding with the newest service request, and the first thread is added in the thread pool.
8. the method according to claim 1, wherein the service request further include: request time;So, institute
State method further include: the total business number of request of each channel in statistics first time interval, when the total business number of request is greater than
When first threshold, abnormal notification message is issued.
9. a kind of business processing device characterized by comprising
Distribution module is set, for concurrent upper limit value to be arranged to each channel in the corresponding multiple support channels of server, according to institute
Stating concurrent upper limit value is the resource that each channel distributes the server;
Service request number determining module, for determining the current service request number of each channel;
Comparison process module, for judging whether the current service request number of each channel reaches the concurrent upper limit value, if so,
Then refuse newest service request, if it is not, then handling newest service request.
10. a kind of computer equipment, including memory and processor, wherein the processor requires 1 to 8 for perform claim
Any one of the method the step of.
11. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that described instruction is performed
The step of Shi Shixian any one of claims 1 to 8 the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811237695.XA CN109561133A (en) | 2018-10-23 | 2018-10-23 | Method for processing business, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811237695.XA CN109561133A (en) | 2018-10-23 | 2018-10-23 | Method for processing business, device, equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109561133A true CN109561133A (en) | 2019-04-02 |
Family
ID=65865102
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811237695.XA Pending CN109561133A (en) | 2018-10-23 | 2018-10-23 | Method for processing business, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109561133A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110018793A (en) * | 2019-04-11 | 2019-07-16 | 苏州浪潮智能科技有限公司 | A kind of host I O process control method, device, terminal and readable storage medium storing program for executing |
CN110336757A (en) * | 2019-05-27 | 2019-10-15 | 平安科技(深圳)有限公司 | Connection pool concurrency control method, device and computer readable storage medium |
CN111161085A (en) * | 2019-11-28 | 2020-05-15 | 泰康保险集团股份有限公司 | Service request processing method and device, electronic equipment and computer readable medium |
CN111800520A (en) * | 2020-09-08 | 2020-10-20 | 北京维数统计事务所有限公司 | Service processing method and device, electronic equipment and readable storage medium |
CN111913815A (en) * | 2020-07-12 | 2020-11-10 | 中信银行股份有限公司 | Call request processing method and device, electronic equipment and readable storage medium |
CN112989289A (en) * | 2019-12-02 | 2021-06-18 | 成都鼎桥通信技术有限公司 | Software license checking method and device, electronic equipment and readable storage medium |
CN113360277A (en) * | 2021-05-25 | 2021-09-07 | 网银在线(北京)科技有限公司 | Traffic control method and device for service request |
CN113487412A (en) * | 2021-07-07 | 2021-10-08 | 中国工商银行股份有限公司 | Multi-channel-based shared service isolation method and device |
WO2021217916A1 (en) * | 2020-04-28 | 2021-11-04 | 深圳壹账通智能科技有限公司 | Time series data segmentation construction method and apparatus, computer device, and storage medium |
CN113852663A (en) * | 2021-08-18 | 2021-12-28 | 北京达佳互联信息技术有限公司 | Network request processing method and device and network request processing system |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010047289A1 (en) * | 2000-04-14 | 2001-11-29 | Vacation. Com Corporation | System, method, and computer program product for administering a distribution channel for the promotion and sale of products and services |
CN102541659A (en) * | 2011-12-30 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN103516536A (en) * | 2012-06-26 | 2014-01-15 | 重庆新媒农信科技有限公司 | Server service request parallel processing method based on thread number limit and system thereof |
CN104090823A (en) * | 2014-06-09 | 2014-10-08 | 中国建设银行股份有限公司 | Flow control method and device for computer system |
CN104408656A (en) * | 2014-10-29 | 2015-03-11 | 中国建设银行股份有限公司 | Method and system for dynamic adjusting flow control threshold |
CN106371968A (en) * | 2016-08-23 | 2017-02-01 | 北京奇虎科技有限公司 | Method and apparatus for monitoring real-time computation |
CN106611023A (en) * | 2015-10-27 | 2017-05-03 | 北京国双科技有限公司 | Detection method and device for website access exception |
CN107766533A (en) * | 2017-10-27 | 2018-03-06 | 携程旅游网络技术(上海)有限公司 | Telephone traffic abnormal automatic testing method and system, storage medium, electronic equipment |
CN107872794A (en) * | 2016-09-26 | 2018-04-03 | 平安科技(深圳)有限公司 | Channel connection control method and device |
CN108022028A (en) * | 2016-11-01 | 2018-05-11 | 南京途牛科技有限公司 | A kind of method for processing resource and device |
-
2018
- 2018-10-23 CN CN201811237695.XA patent/CN109561133A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010047289A1 (en) * | 2000-04-14 | 2001-11-29 | Vacation. Com Corporation | System, method, and computer program product for administering a distribution channel for the promotion and sale of products and services |
CN102541659A (en) * | 2011-12-30 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method and device for processing of server service requests |
CN103516536A (en) * | 2012-06-26 | 2014-01-15 | 重庆新媒农信科技有限公司 | Server service request parallel processing method based on thread number limit and system thereof |
CN104090823A (en) * | 2014-06-09 | 2014-10-08 | 中国建设银行股份有限公司 | Flow control method and device for computer system |
CN104408656A (en) * | 2014-10-29 | 2015-03-11 | 中国建设银行股份有限公司 | Method and system for dynamic adjusting flow control threshold |
CN106611023A (en) * | 2015-10-27 | 2017-05-03 | 北京国双科技有限公司 | Detection method and device for website access exception |
CN106371968A (en) * | 2016-08-23 | 2017-02-01 | 北京奇虎科技有限公司 | Method and apparatus for monitoring real-time computation |
CN107872794A (en) * | 2016-09-26 | 2018-04-03 | 平安科技(深圳)有限公司 | Channel connection control method and device |
CN108022028A (en) * | 2016-11-01 | 2018-05-11 | 南京途牛科技有限公司 | A kind of method for processing resource and device |
CN107766533A (en) * | 2017-10-27 | 2018-03-06 | 携程旅游网络技术(上海)有限公司 | Telephone traffic abnormal automatic testing method and system, storage medium, electronic equipment |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110018793B (en) * | 2019-04-11 | 2022-07-22 | 苏州浪潮智能科技有限公司 | Host IO processing control method and device, terminal and readable storage medium |
CN110018793A (en) * | 2019-04-11 | 2019-07-16 | 苏州浪潮智能科技有限公司 | A kind of host I O process control method, device, terminal and readable storage medium storing program for executing |
CN110336757A (en) * | 2019-05-27 | 2019-10-15 | 平安科技(深圳)有限公司 | Connection pool concurrency control method, device and computer readable storage medium |
CN111161085A (en) * | 2019-11-28 | 2020-05-15 | 泰康保险集团股份有限公司 | Service request processing method and device, electronic equipment and computer readable medium |
CN111161085B (en) * | 2019-11-28 | 2023-08-22 | 泰康保险集团股份有限公司 | Service request processing method, device, electronic equipment and computer readable medium |
CN112989289A (en) * | 2019-12-02 | 2021-06-18 | 成都鼎桥通信技术有限公司 | Software license checking method and device, electronic equipment and readable storage medium |
CN112989289B (en) * | 2019-12-02 | 2023-04-25 | 成都鼎桥通信技术有限公司 | Software license checking method and device, electronic equipment and readable storage medium |
WO2021217916A1 (en) * | 2020-04-28 | 2021-11-04 | 深圳壹账通智能科技有限公司 | Time series data segmentation construction method and apparatus, computer device, and storage medium |
CN111913815A (en) * | 2020-07-12 | 2020-11-10 | 中信银行股份有限公司 | Call request processing method and device, electronic equipment and readable storage medium |
CN111800520A (en) * | 2020-09-08 | 2020-10-20 | 北京维数统计事务所有限公司 | Service processing method and device, electronic equipment and readable storage medium |
CN113360277A (en) * | 2021-05-25 | 2021-09-07 | 网银在线(北京)科技有限公司 | Traffic control method and device for service request |
CN113487412A (en) * | 2021-07-07 | 2021-10-08 | 中国工商银行股份有限公司 | Multi-channel-based shared service isolation method and device |
CN113852663A (en) * | 2021-08-18 | 2021-12-28 | 北京达佳互联信息技术有限公司 | Network request processing method and device and network request processing system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109561133A (en) | Method for processing business, device, equipment and computer readable storage medium | |
JP6793838B2 (en) | Blockchain-based data processing methods and equipment | |
CN107241288A (en) | The method and device of occupied resource is indicated under service integration scene | |
CN107577694A (en) | A kind of data processing method and equipment based on block chain | |
CN107679700A (en) | Business flow processing method, apparatus and server | |
CN109002949A (en) | A kind of method and device of air control strategy configuration and business air control | |
CN107368367B (en) | Resource allocation processing method and device and electronic equipment | |
CN109922298A (en) | Meeting room monitoring method and device | |
CN109739627B (en) | Task scheduling method, electronic device and medium | |
CN108449378A (en) | A kind of information-pushing method, device and equipment | |
CN116305298B (en) | Method and device for managing computing power resources, storage medium and electronic equipment | |
CN109947643A (en) | A kind of configuration method, device and the equipment of the experimental program based on A/B test | |
CN109003090A (en) | risk control method and device | |
CN110517095A (en) | A kind of method and device for launching advertisement | |
CN108536613A (en) | Data clearing method, device and server | |
CN112565210A (en) | CDN node recommendation method, system, electronic device and storage medium | |
CN105430031B (en) | A kind of share-car information transmitting methods and device | |
CN110083602A (en) | A kind of method and device of data storage and data processing based on hive table | |
CN108921375A (en) | A kind of data processing method and device | |
CN115049263A (en) | Construction method of distribution network | |
CN107527228A (en) | A kind of method and device for sending electronic ticket | |
CN110275782A (en) | Data processing method and device | |
CN108768871A (en) | Service traffics distribution method, device and equipment | |
CN108880854A (en) | A kind of method, device and equipment of service degradation | |
CN113344248A (en) | Order allocation method, device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190402 |