CN108200152A - For the optimization leading method and device of net purchase system - Google Patents
For the optimization leading method and device of net purchase system Download PDFInfo
- Publication number
- CN108200152A CN108200152A CN201711475712.9A CN201711475712A CN108200152A CN 108200152 A CN108200152 A CN 108200152A CN 201711475712 A CN201711475712 A CN 201711475712A CN 108200152 A CN108200152 A CN 108200152A
- Authority
- CN
- China
- Prior art keywords
- access request
- queue
- request queue
- quick
- main
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- 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/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Abstract
The present invention proposes a kind of optimization leading method for net purchase system, includes the following steps:The main access request queue of access request and quick access request queue are created, and the initialization to realize main access request queue and quick access request queue is emptied to main access request queue and quick access request queue;It receives client and sends out the access request of booking, and estimate the resource quantity of access request occupancy;Obtain the total resources occupied when current main access request queue performs, if the total resources that current main access request queue occupies when performing is more than preset main access request queue thresholds length, and access request occupy resource quantity be less than preset access thresholds when, the access request is inserted into the tail of the queue of quick access request queue, and otherwise the access request is inserted into the tail of the queue of main access request queue;And access request is obtained from the team of main access request queue head and team's head of quick access request queue respectively according to order.
Description
Technical field
The present invention relates to computer network field more particularly to a kind of optimization leading methods and dress for net purchase system
It puts.
Background technology
With the fast development of Internet technology, internet has become the essential part of people's life.User can
With according to oneself need access all kinds of websites.Especially all kinds of popular net purchase websites, for example, concert or ball match admission ticket it is online
Website and popular route bus ticket or ticket pre-sale website during festivals or holidays are sold, is often in a large number of users for a long time
The pressure state of access.Such website operator needs constantly to expand the load that Website server can carry, and avoids website
Server is paralysed due to excessive visit capacity.
At present, website custody platform is generally set up by multiple servers in such website operator for net purchase.It is each
Website or its mirror image are arranged, respectively in one or more service.User by client (such as Chrome, Firefox or
All kinds of web browsers such as IE) send access request will first reach router, then distributed each access request by router
To corresponding net purchase website.Still by taking internet ticket selling website as an example, when a large amount of access requests pour in, not only for the hot topic ticket
The access of (such as popular concert, the preferable seat in visual angle of ball match or film or hot travel route bus ticket or train ticket) due to
Router is busy and causes response slow, and other the non-thermal admission tickets for belonging to the website same router (such as are commonly drilled
Sing the admission ticket of meeting, ball match or film or common line bus ticket or train ticket), response speed also will appear apparent decline.
One more typical example is the ddos attack for such website.At this point, it is used with the website attacked same
The general Websites of router are involved and can not normally be logged in, and expand the coverage of ddos attack, increase website fortune
Seek the loss of quotient.
Invention content
Present invention aims to solve the deficiencies of the prior art, and provides a kind of a kind of optimization leading method for net purchase system and
Device can obtain a large amount of access and pour in the case of the ticket reselling website of popular ticket, shorten the effect of website response time.
To achieve these goals, the present invention uses following technical solution
First, the present invention proposes a kind of optimization leading method for net purchase system, includes the following steps:It creates to access and ask
The main access request queue and quick access request queue asked, and main access request queue and quick access request queue are emptied
To realize the initialization of main access request queue and quick access request queue;The access request that client sends out booking is received,
And estimate the resource quantity of access request occupancy;The total resources occupied when current main access request queue performs is obtained, if working as
The total resources that preceding main access request queue occupies when performing is more than preset main access request queue thresholds length, and accesses and ask
When the resource quantity of occupancy being asked to be less than preset access thresholds, the access request is inserted into the team of quick access request queue
Tail, otherwise the access request be inserted into the tail of the queue of main access request queue;And according to order respectively from main access request team
Team's head of row and team's head of quick access request queue obtain access request.
The present invention an embodiment of the method in, receive access request after, detect the access request data whether
Normally, and abnormal access request is abandoned.
In the embodiment of the method for the present invention, the total resources occupied when quick access request queue performs is more than
Preset quick access request queue thresholds and the occupancy total resources of main access request queue are less than main access request queue threshold
During value, the tail of the queue positioned at quick access request queue and the access request beyond preset quick access request queue thresholds part
It is suggested and is inserted into the tail of the queue of main access request queue.
In the embodiment of the method for the present invention, it is net that access request, which is assigned to the current visit capacity in accessed website,
Stand and its each mirror image in visit capacity reckling, wherein the current visit capacity in accessed website is in website and its each mirror image
The minimum value of visit capacity.
In the embodiment of the method for the present invention, after access request is inserted into the tail of the queue of quick access request queue,
Quick access request queue is sorted according to the current visit capacity in website is accessed.
In the embodiment of the method for the present invention, the total resources occupied when quick access request queue performs is more than
During preset quick access request queue thresholds length, improve main access request queue thresholds length and/or reduce access thresholds.
Further, in the above method embodiment of the present invention, when access request queue quick in preset time period
During for empty queue, reduce main access request queue thresholds length and/or improve access thresholds.
In the embodiment of the method for the present invention, the total resources occupied when main access request queue performs is more than in advance
If main access request queue thresholds length when, in main access request queue occupy resource quantity be less than access thresholds access please
Seek the tail of the queue for being suggested and being inserted into quick access request queue.
Secondly, the present invention also proposes a kind of optimization delivery apparatus for net purchase system, including following module:Initialize mould
Block, for creating the main access request queue of access request and quick access request queue, and to main access request queue and soon
Fast access request queue empties the initialization to realize main access request queue and quick access request queue;Module is estimated, is used
The access request of booking is sent out, and estimate the resource quantity of access request occupancy in receiving client;It joins the team module, for obtaining
The total resources that current main access request queue occupies when performing, if the resource that current main access request queue occupies when performing is total
Amount is more than preset main access request queue thresholds length, and the resource quantity that access request occupies is less than preset access thresholds
When, the access request is inserted into the tail of the queue of quick access request queue, and otherwise the access request is inserted into main access request
The tail of the queue of queue;And go out group module, for according to order respectively from the team of main access request queue head and quick access request
Team's head of queue obtains access request.
In the device embodiment of the present invention, after receiving access request, estimate module and detect the access request
Whether data are normal, and abandon abnormal access request.
In the device embodiment of the present invention, the total resources occupied when quick access request queue performs is more than
Preset quick access request queue thresholds and the occupancy total resources of main access request queue are less than main access request queue threshold
During value, module of joining the team will be positioned at the tail of the queue of quick access request queue and beyond preset quick access request queue thresholds part
Access request propose and be inserted into the tail of the queue of main access request queue.
In the device embodiment of the present invention, access request is assigned to the current visit in accessed website by module of joining the team
The amount of asking is the reckling of visit capacity in website and its each mirror image, wherein the current visit capacity in accessed website is website and its each
The minimum value of visit capacity in a mirror image.
In the device embodiment of the present invention, when joining the team, access request is inserted into quick access request queue by module
Tail of the queue after, module of joining the team sorts quick access request queue according to accessing the current visit capacity in website.
In the device embodiment of the present invention, the total resources occupied when quick access request queue performs is more than
During preset quick access request queue thresholds length, improve main access request queue thresholds length and/or reduce access thresholds.
Further, in the above device embodiment of the present invention, when access request queue quick in preset time period
During for empty queue, reduce main access request queue thresholds length and/or improve access thresholds.
In the device embodiment of the present invention, the total resources occupied when main access request queue performs is more than in advance
If main access request queue thresholds length when, module of joining the team will in main access request queue occupy resource quantity be less than access threshold
The access request of value proposes and is inserted into the tail of the queue of quick access request queue.
Finally, the invention also discloses a kind of computer readable storage mediums, are stored thereon with computer instruction, the instruction
It is realized when being executed by processor such as the step of any one of aforementioned the method.
Beneficial effects of the present invention are:Pass through the main access request queue and quickly visit constructed respectively and maintenance access is asked
Ask request queue so that the access request of current non-popular net purchase website can be responded as early as possible, so as to shorten net purchase website
The Whole Response time.
Description of the drawings
Fig. 1 show the method flow diagram of the optimization leading method disclosed in this invention for net purchase system;
Fig. 2 show the side that the specific deterministic process whether access request is inserted into quick access request queue is judged in Fig. 1
Method flow chart;
The access request that Fig. 3 is shown in main access request queue in one embodiment of the invention is inserted into quick access
The schematic diagram of request queue;
Fig. 4 show the state change schematic diagram of main access request queue in another embodiment of the present invention;
Fig. 5 show the method flow diagram that the access request in quick access request queue is transferred in Fig. 4;
Fig. 6 show the state that access request in one embodiment of the invention is inserted into after quick access request queue
Change schematic diagram;
Fig. 7 show main access request queue thresholds adjustment schematic diagram in one embodiment of the invention;
Fig. 8 show the function structure chart of the optimization delivery apparatus disclosed in this invention for net purchase system.
Specific embodiment
The technique effect of the design of the present invention, concrete structure and generation is carried out below with reference to embodiment and attached drawing clear
Chu, complete description, to be completely understood by the purpose of the present invention, scheme and effect.It should be noted that in situation about not conflicting
Under, the feature in embodiment and embodiment in the application can be combined with each other.The identical attached drawing mark used everywhere in attached drawing
Note indicates the same or similar part.For convenience of discussion, illustrated herein using internet ticket selling website as embodiment, this field skill
Technical solution can be applied to other kinds of net purchase website by art personnel according to embodiment described herein.
With reference to method flow diagram shown in FIG. 1, in one embodiment of the invention, the optimization for net purchase system is dredged
Method includes the following steps:The main access request queue of access request and quick access request queue are created, and please to main access
It asks queue and quick access request queue empties initialization to realize main access request queue and quick access request queue;It connects
It receives client and sends out the access request of booking, and estimate the resource quantity of access request occupancy;Obtain current main access request team
The total resources that row occupy when performing, if the total resources that current main access request queue occupies when performing is more than preset main visit
Ask request queue threshold length, and when the resource quantity that occupies of access request is less than preset access thresholds, the access request
The tail of the queue of quick access request queue is inserted into, otherwise the access request is inserted into the tail of the queue of main access request queue;And
According to order access request is obtained from the team of main access request queue head and team's head of quick access request queue respectively.For example,
Main access request queue thresholds length can be initialized as 500, that is, the current access request quantity of accessed website is 500.At this point,
Submethod flow chart shown in Fig. 2 is can refer to, when the access request total amount of main access request queue is less than 500, is newly obtained
The tail of the queue that access request will be directly inserted into main access request queue.All access requests in main access request queue are according to elder generation
It is performed successively into the sequence first gone out.When the access request total amount of main access request queue is greater than or equal to 500, the visit that newly obtains
Ask that request will be pretreated, to detect the access request amount that the access request accesses website, if the access request is visited
It asks that the access request amount of website is less, is then inserted into the tail of the queue priority processing of quick access request queue;Otherwise it is inserted into master
The tail of the queue of access request queue, is handled according to regular turn.Due to the less website of visit capacity and the larger website of visit capacity
Access request is not in same queue, therefore alleviates ticketing of the ticket reselling website of some popular ticket to other non-thermal admission tickets
The influence of website.
However, it is inaccurate according only to the current accessed amount of accessed website with judging whether the website overheats.It is such to sell
Ticket website, the ticket reselling website of especially popular ticket can be configured with multiple mirror images on one or more server, so as to simultaneously
Respond the access request of multiple client.Therefore, in one embodiment of the invention, accessing the current visit capacity in website is
The minimum value of visit capacity in website and its each mirror image.Further, in the above embodiment of the present invention, access request is divided
It is fitted on the reckling that the current visit capacity in accessed website is visit capacity in website and its each mirror image so that website and its each
Mirror image can be with the access request of equally loaded client, so as to shorten the Whole Response time of the website.
It (is accessed in figure with reference to main access request queue shown in Fig. 3 and quick access request quene state change schematic diagram
Numerical value in the grid of request right side is the access request amount that the access request accesses website, as holding for the measurement access request
The resource quantity occupied during row), in one embodiment of the invention, when the occupancy total resources of main access request queue is more than
During preset main access request queue thresholds, the resource quantity occupied when access request performs in main access request queue is less than money
The access request of source threshold value is suggested and is inserted into the tail of the queue of quick access request queue.Specifically, as shown in Figure 3, if this
When main access request queue thresholds be 250, and the occupancy total resources of main access request queue be 259.If preset resource threshold
Value is 20, then access request (" customer end A ", " client i.e. in figure that resource quantity is less than threshold value are occupied in main access request queue
End C " and " client H " corresponding access request) it will be extracted from main access request queue, it is inserted into quick access request
The tail of the queue of queue so that the less access request of the resource quantity that occupies can be held in time when being performed in main access request queue
Row.
On the contrary, with reference to the state change schematic diagram of main access request queue in another embodiment shown in Fig. 4, when quick
The length of access request queue is more than preset quick access request queue thresholds and the occupancy resource of main access request queue is total
When amount is less than main access request queue thresholds, access request execution efficiency will be less than main access request in quick access request queue
Queue.In order to improve the overall execution efficiency of access request, with reference to submethod flow chart shown in fig. 5, quick visit can will be located at
Ask the tail of the queue of request queue and beyond access request (i.e. " the f visitors in Fig. 4 of preset quick access request queue thresholds part
Family end " and " g clients ") it proposes and is inserted into the tail of the queue of main access request queue.
The schematic diagram of quick access request queue is inserted into reference to access request shown in fig. 6, in the implementation of the present invention
In example, after access request is inserted into the tail of the queue of quick access request queue, quick access request queue is held according to access request
The resource quantity sequence occupied during row.Numerical value in figure on the right side of access request in grid is that the access request accesses net when performing
(similarly, " 5 " of a clients represent that the access amount of asking clearly that the access request accesses website is 5), to make to the access request amount stood
For the resource quantity occupied when weighing the execution of the access request.As shown in FIG., new f clients access the access of website
The clear amount of asking is 7.At this time since the occupancy total resources of main access request queue is more than main access request queue thresholds, f visitors
The tail of the queue that the access at family end will first be inserted into quick access request queue, then again to quick access request queue order.Cause
The front that the less access request of resource quantity will be come quick access request queue is occupied during to perform, so these are accessed
Request can be performed as early as possible.Further, since quick access request queue be maintained as it is orderly, so new access request
The correct position of quick access request queue can be inserted into the shorter time (in fact, the time complexity of the operation is to work as
The logarithm of preceding queue length).
With reference to the adjusting thresholds flow chart of main access request queue shown in Fig. 7, in one embodiment of the invention, when
When the total resources that quick access request queue occupies when performing is more than preset quick access request queue thresholds length, at this time
Access request execution efficiency in quick access request queue will decline, even equal to or less than main access request queue.In order to
The access request for ensureing to be assigned in quick access request queue can be performed preferentially, and raising is needed to be inserted into quick access request
The threshold of queue.In the present embodiment, main access request queue thresholds length, which is enhanced, (can improve to current main access request team
The total resources or higher that row occupy when performing), reduce the access request for being assigned to quick access request queue.Alternatively,
Be inserted into quick access request queue threshold can also (such as resource threshold be set as current value by reducing resource threshold
80%) mode improves so that access request is more difficult to be assigned to quick access request queue.
However, in the above embodiment of the present invention, when the threshold for being inserted into quick access request queue is excessively improved
Afterwards so that when quick access request queue remains empty queue for a long time, need appropriately to reduce being inserted into quick access request team
The threshold of row.Therefore, as the improvement of above-described embodiment, when access request team quick in preset time period (such as 10 minutes)
When being classified as empty queue, reducing main access request queue thresholds length, (such as main access request queue thresholds length adjustment is current
The 80% of value) and/or improve resource threshold (such as resource threshold is updated to 2 times of current value) so that access request is easier to point
It is fitted on quick access request queue.
In order to be further reduced the influence of the ticket reselling website of popular ticket to the ticket reselling website of other cash fare, the present invention's
In one embodiment, after receiving access request, detect whether the access request data is normal, and abandon abnormal access and ask
It asks.Specifically, the background data base of ticket reselling website can be under the premise of ticket have been sold out, terrestrial reference corresponding to the access request of such ticket
It is denoted as exception.After above-mentioned label is detected, ticket reselling website directly denied access can ask and return to abnormal prompt (such as when pre-
When estimating such access request, ticket reselling website is by the direct prompting for returning to ticket and having sold out).
With reference to function structure chart shown in Fig. 8, in one embodiment of the invention, the optimization for net purchase system is dredged
Device includes following module:Initialization module, for creating the main access request queue of access request and quick access request team
Row, and main access request queue and quick access request queue are emptied to realize main access request queue and quick access request
The initialization of queue;Module is estimated, for receiving the access request that client is sent out, and estimates the number of resources of access request occupancy
Amount;It joins the team module, for obtaining the total resources occupied when current main access request queue performs, if current main access request team
The total resources that row occupy when performing is more than preset main access request queue thresholds length, and the number of resources that access request occupies
When amount is less than preset access thresholds, the access request is inserted into the tail of the queue of quick access request queue, otherwise the access
Request is inserted into the tail of the queue of main access request queue;And go out group module, for according to order respectively from main access request queue
Team head and quick access request queue team head obtain access request.For example, main access request queue thresholds length can be initial
500 are turned to, that is, the current access request quantity of accessed website is 500.At this point, when the access request of main access request queue is total
When amount is less than 500, the access request newly obtained is directly inserted into the tail of the queue of main access request queue by module of joining the team.Main access please
All access requests in queue is asked to be performed successively according to the sequence of first in first out.When the access request of main access request queue is total
When amount is greater than or equal to 500, estimates module and pretreatment is performed to the access request newly obtained, visited with detecting the access request
Ask the access request amount of website, if the access request amount that the access request accesses website is less, module of joining the team is inserted
Enter the tail of the queue priority processing to quick access request queue;Otherwise module of joining the team inserts it into the team of main access request queue
Tail is handled according to regular turn.Since the access request of the less website of the visit capacity website larger with visit capacity is not same
In one queue, therefore alleviate the influence of the ticket reselling website of some popular ticket to the ticket reselling website of other non-thermal admission tickets.
However, it is inaccurate according only to the current accessed amount of accessed website with judging whether the website overheats.It is such to sell
Ticket website, the ticket reselling website of especially popular ticket can be configured with multiple mirror images on one or more server, so as to simultaneously
Respond the access request of multiple client.Therefore, in one embodiment of the invention, accessing the current visit capacity in website is
The minimum value of visit capacity in website and its each mirror image.Further, in the above embodiment of the present invention, access request is divided
It is fitted on the reckling that the current visit capacity in accessed website is visit capacity in website and its each mirror image so that website and its each
Mirror image can be with the access request of equally loaded client, so as to shorten the Whole Response time of the website.
It (is accessed in figure with reference to main access request queue shown in Fig. 3 and quick access request quene state change schematic diagram
Numerical value in the grid of request right side is the access request amount that the access request accesses website, as holding for the measurement access request
The resource quantity occupied during row), in one embodiment of the invention, when the occupancy total resources of main access request queue is more than
During preset main access request queue thresholds, module of joining the team will the resource that occupy when access request performs in main access request queue
The access request that quantity is less than resource threshold proposes and is inserted into the tail of the queue of quick access request queue.Specifically, such as institute in Fig. 3
Show, if main access request queue thresholds are 250 at this time, and the occupancy total resources of main access request queue is 259.It is if preset
Resource threshold is 20, then module of joining the team will occupy resource quantity and (scheme less than the access request of threshold value in main access request queue
In " customer end A ", " client C " and " client H " corresponding access request) will be extracted from main access request queue,
It is inserted into the tail of the queue of quick access request queue so that the resource quantity that occupies less visit when being performed in main access request queue
Ask that request can be performed in time.
On the contrary, with reference to the state change schematic diagram of main access request queue in another embodiment shown in Fig. 4, when quick
The length of access request queue is more than preset quick access request queue thresholds and the occupancy resource of main access request queue is total
When amount is less than main access request queue thresholds, access request execution efficiency will be less than main access request in quick access request queue
Queue.In order to improve the overall execution efficiency of access request, positioned at the tail of the queue of quick access request queue and can will exceed default
Quick access request queue thresholds part access request (i.e. " f clients " and " g clients " in Fig. 4) propose and be inserted into
To the tail of the queue of main access request queue.
The schematic diagram of quick access request queue is inserted into reference to access request shown in fig. 6, in the implementation of the present invention
In example, after access request is inserted into the tail of the queue of quick access request queue, quick access request queue is held according to access request
The resource quantity sequence occupied during row.Numerical value in figure on the right side of access request in grid is that the access request accesses net when performing
(similarly, " 5 " of a clients represent that the access amount of asking clearly that the access request accesses website is 5), to make to the access request amount stood
For the resource quantity occupied when weighing the execution of the access request.As shown in FIG., new f clients access the access of website
The clear amount of asking is 7.At this time since the occupancy total resources of main access request queue is more than main access request queue thresholds, f visitors
The tail of the queue that the access at family end will first be inserted into quick access request queue, then again to quick access request queue order.Cause
The front that the less access request of resource quantity will be come quick access request queue is occupied during to perform, so these are accessed
Request can be performed as early as possible.Further, since quick access request queue be maintained as it is orderly, so new access request
The correct position of quick access request queue can be inserted into the shorter time (in fact, the time complexity of the operation is to work as
The logarithm of preceding queue length).
In one embodiment of the invention, the total resources occupied when quick access request queue performs is more than default
Quick access request queue thresholds length when, at this time the access request execution efficiency in quick access request queue will decline,
Even equal to or less than main access request queue.In order to ensure that the access request being assigned in quick access request queue can be excellent
It first carries out, needs to improve the threshold for being inserted into quick access request queue.In the present embodiment, main access request queue thresholds are long
Degree is enhanced and (can improve to current main access request queue the total resources occupied when performing or higher), and reduction is assigned to quick
The access request of access request queue.Alternatively, being inserted into the threshold of quick access request queue can also be provided by reducing
The mode of source threshold value (such as resource threshold is set as the 80% of current value) improves so that access request is more difficult to be assigned to quick visit
Ask request queue.
However, in the above embodiment of the present invention, when the threshold for being inserted into quick access request queue is excessively improved
Afterwards so that when quick access request queue remains empty queue for a long time, need appropriately to reduce being inserted into quick access request team
The threshold of row.Therefore, as the improvement of above-described embodiment, when access request team quick in preset time period (such as 10 minutes)
When being classified as empty queue, reducing main access request queue thresholds length, (such as main access request queue thresholds length adjustment is current
The 80% of value) and/or improve resource threshold (such as resource threshold is updated to 2 times of current value) so that access request is easier to point
It is fitted on quick access request queue.
In order to be further reduced the influence of the ticket reselling website of popular ticket to the ticket reselling website of other cash fare, the present invention's
In one embodiment, after receiving access request, whether estimating module, to can detect the access request data normal, and abandons exception
Access request.Specifically, the background data base of ticket reselling website can be under the premise of ticket have been sold out, to the access request of such ticket
Correspondingly labeled as abnormal.After estimating module and detecting above-mentioned label, ticket reselling website directly denied access can be asked and be returned
Abnormal prompt (such as when estimating such access request, ticket reselling website by the direct prompting for returning to ticket and having sold out).
Although description of the invention is quite detailed and especially several embodiments are described, it is not
Any of these details or embodiment or any specific embodiments are intended to be limited to, but it is by reference to appended that should be considered as
Claim considers that the prior art provides the possibility explanation of broad sense for these claims, so as to effectively cover the present invention
Preset range.In addition, with the foreseeable embodiment of inventor, present invention is described above, its purpose is to be provided with
Description, and those unsubstantiality changes to the present invention still unforeseen at present can still represent the equivalent modifications of the present invention.
Claims (10)
1. a kind of optimization leading method for net purchase system, which is characterized in that include the following steps:
The main access request queue of access request and quick access request queue are created, and to main access request queue and quick visit
Ask that request queue empties the initialization to realize main access request queue and quick access request queue;
The access request that client is sent out is received, and estimates the resource quantity of access request occupancy;
The total resources occupied when current main access request queue performs is obtained, if current main access request queue occupies when performing
Total resources be more than preset main access request queue thresholds, and access request occupy resource quantity be less than preset access
During threshold value, the access request is inserted into the tail of the queue of quick access request queue, and otherwise the access request is inserted into main access
The tail of the queue of request queue;And
According to order access request is obtained from the team of main access request queue head and team's head of quick access request queue respectively.
2. method according to claim 1, which is characterized in that after receiving access request, detect the data of the access request
It is whether normal, and abandon abnormal access request.
3. method according to claim 1, which is characterized in that the total resources occupied when quick access request queue performs
It is less than main access request team more than preset quick access request queue thresholds and the occupancy total resources of main access request queue
During row threshold value, the tail of the queue positioned at quick access request queue and the access beyond preset quick access request queue thresholds part
Request is suggested and is inserted into the tail of the queue of main access request queue.
4. method according to claim 1, which is characterized in that access request is assigned to the current visit capacity in accessed website
It is the reckling of visit capacity in website and its each mirror image, wherein the current visit capacity in accessed website is website and its each mirror
The minimum value of visit capacity as in.
5. method according to claim 1, which is characterized in that the total resources occupied when main access request queue performs is big
Access of the resource quantity less than access thresholds is occupied when preset main access request queue thresholds, in main access request queue please
Seek the tail of the queue for being suggested and being inserted into quick access request queue.
6. method according to claim 1, which is characterized in that when access request is inserted into the tail of the queue of quick access request queue
Afterwards, quick access request queue is sorted according to the current visit capacity in website is accessed.
7. method according to claim 1, which is characterized in that the total resources occupied when quick access request queue performs
During more than preset quick access request queue thresholds, improve main access request queue thresholds and/or reduce access thresholds.
8. method according to claim 1, which is characterized in that when access request queue quick in preset time period is empty team
During row, reduce main access request queue thresholds length and/or improve access thresholds.
9. a kind of optimization delivery apparatus for net purchase system, which is characterized in that including following module:
Initialization module, for creating the main access request queue of access request and quick access request queue, and to main access
Request queue and quick access request queue empty the initialization to realize main access request queue and quick access request queue;
Module is estimated, for receiving the access request that client is sent out, and estimates the resource quantity of access request occupancy;
It joins the team module, for obtaining the total resources occupied when current main access request queue performs, if current main access request
The total resources that queue occupies when performing is more than preset main access request queue thresholds, and the resource quantity that access request occupies
During less than preset access thresholds, the access request is inserted into the tail of the queue of quick access request queue, and the otherwise access please
Seek the tail of the queue for being inserted into main access request queue;And
Go out group module, for being obtained respectively from the team of main access request queue head and team's head of quick access request queue according to order
Take access request.
10. a kind of computer readable storage medium, is stored thereon with computer instruction, it is characterised in that the instruction is held by processor
It is realized during row such as the step of method described in any item of the claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711475712.9A CN108200152B (en) | 2017-12-29 | 2017-12-29 | Optimized dredging method and device for online shopping system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711475712.9A CN108200152B (en) | 2017-12-29 | 2017-12-29 | Optimized dredging method and device for online shopping system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108200152A true CN108200152A (en) | 2018-06-22 |
CN108200152B CN108200152B (en) | 2021-05-25 |
Family
ID=62586150
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711475712.9A Active CN108200152B (en) | 2017-12-29 | 2017-12-29 | Optimized dredging method and device for online shopping system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108200152B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108270693A (en) * | 2017-12-29 | 2018-07-10 | 珠海国芯云科技有限公司 | The adaptive optimization leading method and device of website visiting |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120084165A1 (en) * | 2003-12-16 | 2012-04-05 | Ticketmaster | Systems and methods for queuing access to network resources |
CN104202261A (en) * | 2014-08-27 | 2014-12-10 | 华为技术有限公司 | Service request processing method and device |
CN106470169A (en) * | 2015-08-19 | 2017-03-01 | 阿里巴巴集团控股有限公司 | A kind of service request method of adjustment and equipment |
CN107018175A (en) * | 2017-01-11 | 2017-08-04 | 杨立群 | The dispatching method and device of mobile cloud computing platform |
-
2017
- 2017-12-29 CN CN201711475712.9A patent/CN108200152B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120084165A1 (en) * | 2003-12-16 | 2012-04-05 | Ticketmaster | Systems and methods for queuing access to network resources |
CN104202261A (en) * | 2014-08-27 | 2014-12-10 | 华为技术有限公司 | Service request processing method and device |
CN106470169A (en) * | 2015-08-19 | 2017-03-01 | 阿里巴巴集团控股有限公司 | A kind of service request method of adjustment and equipment |
CN107018175A (en) * | 2017-01-11 | 2017-08-04 | 杨立群 | The dispatching method and device of mobile cloud computing platform |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108270693A (en) * | 2017-12-29 | 2018-07-10 | 珠海国芯云科技有限公司 | The adaptive optimization leading method and device of website visiting |
Also Published As
Publication number | Publication date |
---|---|
CN108200152B (en) | 2021-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103716251B (en) | For the load-balancing method and equipment of content distributing network | |
CN110163474A (en) | A kind of method and apparatus of task distribution | |
WO2020077260A1 (en) | Dynamic pricing of insurance policies for shared goods | |
JP6087847B2 (en) | Method and system for providing a session requiring multiple software applications | |
CN109240830A (en) | Application intelligence request management based on server health and client-side information | |
CN109165093A (en) | A kind of calculate node cluster elasticity distribution system and method | |
CN107832329A (en) | Page resource acquisition methods and terminal device | |
WO2020211455A1 (en) | Data processing system and method | |
CN108259603A (en) | A kind of load-balancing method and device | |
CN103620522A (en) | Stochastic management of power consumption by computer systems | |
CN108268965A (en) | For resource allocation, for the vehicles scheduling method and its device | |
CN107026758A (en) | For the information processing method of CDN processing business and updates, information processing system and server | |
CN106164888A (en) | The sequencing schemes of network and storage I/O request for minimizing interference between live load free time and live load | |
US11533163B2 (en) | Mining method and device based on blockchain, and computer readable storage medium | |
CN105681426A (en) | Heterogeneous system | |
CN108200152A (en) | For the optimization leading method and device of net purchase system | |
CN110336874A (en) | A kind of method, apparatus, server and the storage medium of access service | |
CN106874371A (en) | A kind of data processing method and device | |
CN114443212A (en) | Thermal migration management method, device, equipment and storage medium | |
CN111905362A (en) | Game guild loading method and server | |
CN108063733A (en) | The dynamic dispatching method and device of website visiting request | |
CN114331446B (en) | Method, device, equipment and medium for realizing out-of-chain service of block chain | |
CN109936575A (en) | Page access method, apparatus, storage medium and processor | |
US10067778B2 (en) | Management system, recording medium and method for managing virtual machines | |
CN111865558A (en) | Service data processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |