CN103916411B - The processing method and processing device of hypertext transfer protocol requests time-out - Google Patents
The processing method and processing device of hypertext transfer protocol requests time-out Download PDFInfo
- Publication number
- CN103916411B CN103916411B CN201210591684.8A CN201210591684A CN103916411B CN 103916411 B CN103916411 B CN 103916411B CN 201210591684 A CN201210591684 A CN 201210591684A CN 103916411 B CN103916411 B CN 103916411B
- Authority
- CN
- China
- Prior art keywords
- http request
- request object
- time
- destroyed
- http
- 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.)
- Active
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a kind of processing method and processing device of hypertext transfer protocol requests time-out, belong to network technique field.Method includes:The second HTTP request is sent to the reception server, and is detected every preset time and whether there is the HTTP request object in timeout mode in the HTTP request object prestored;If there is the HTTP request object in timeout mode, then using the HTTP request object in timeout mode as HTTP request object to be destroyed, and HTTP request object to be destroyed is destroyed.Described device includes:Sending module, detection module and destruction module.The present invention while HTTP request is sent to the HTTP request object in timeout mode by destroying, so that the processing of HTTP request time-out has more real-time, and realize the asynchronous process of HTTP request time-out, for synchronization process mode compared with HTTP request time-out, the wasting of resources can be reduced.
Description
Technical field
The present invention relates to network technique field, the processing method of more particularly to a kind of hypertext transfer protocol requests time-out and
Device.
Background technology
With the rapid development of Internet technology, HTTP(Hypertext Transfer Protocol, Hyper text transfer
Agreement)With its it is simple and quick, flexible the characteristics of be widely used in the communication between server and server.When request services
When device simulation browser sends HTTP request to the reception server acquisition data, if HTTP request number is more than system and distributed most
HTTP request number during Datong District, then the situation of HTTP request time-out occurs, and in this case, HTTP request object will not be certainly
Marketing is ruined.When the HTTP request number in timeout mode is equal to the maximum HTTP request number simultaneously of system distribution, request service
Device will be unable to continue simulation browser transmission HTTP request, cause follow-up business processing to be constantly in status of fail.In order to protect
Card request server can normally send HTTP request, how the HTTP request in timeout mode is handled, become
One key issue.
In the prior art, request server is initializing HTTP request object, sets up time-out time and processing HTTP please
After the maximum number asked, meeting simulation browser sends HTTP request to the reception server and obtains data in a synchronous manner, works as discovery
A certain HTTP request time-out, this HTTP request object could be destroyed after the result of the reception server return is received.
During the present invention is realized, inventor has found that prior art at least has problems with:
Because obtaining the data of the reception server using the method for synchronization, each simulation browser of request server is caused to send
During HTTP request, after the reception server processing HTTP request will be waited until, itself associative operation can be just performed, so depositing
The phenomenon of the HTTP request object in timeout mode not in time is destroyed in request server, causes CPU(Central
Processing Unit, CPU)The significant wastage of resource.
The content of the invention
In order to solve problem of the prior art, the embodiments of the invention provide a kind of hypertext transfer protocol requests time-out
Processing method and processing device.The technical scheme is as follows:
On the one hand, there is provided a kind of processing method of hypertext transfer protocol requests time-out, methods described include:
The second HTTP request, and the HTTP request object prestored every preset time detection are sent to the reception server
In whether there is in timeout mode HTTP request object, the HTTP request object prestored be sent first
The HTTP request object of the HTTP request object of HTTP request and second HTTP request;
If there is the HTTP request object in timeout mode, then by the HTTP request object in timeout mode
As HTTP request object to be destroyed, and destroy the HTTP request object to be destroyed.
Further, after second HTTP request of transmission to the reception server, methods described
Also include:
If the data corresponding with first HTTP request that the reception server returns are received, by described in
The HTTP request object of first HTTP request destroys the HTTP request to be destroyed as HTTP request object to be destroyed
Object;
Or if receiving the data corresponding with second HTTP request that the reception server returns,
Using the HTTP request object of second HTTP request as HTTP request object to be destroyed, and destroy described to be destroyed
HTTP request object.
Further, before second HTTP request of transmission to the reception server, methods described
Also include:
Generate the HTTP request object of first HTTP request and the HTTP request object of second HTTP request;
Expired time corresponding to the HTTP request object of storage generation and the HTTP request object of the generation;
It whether there is in the HTTP request object prestored every preset time detection in timeout mode
HTTP request object, including:
Whether the expired time every the HTTP request object that preset time detection prestores is less than current time;If
It is, it is determined that the HTTP request object in timeout mode be present, and expired time is less than to the HTTP request pair of current time
As the HTTP request object in timeout mode.
Further, the mistake corresponding to HTTP request object and the HTTP request object of the generation that the storage generates
Time phase, including:
Expired time corresponding to the HTTP request object of generation and the HTTP request object of the generation is stored to super
When manager;
Whether the expired time of the HTTP request object prestored every preset time detection is less than current time,
Including:
Every preset time detect the HTTP request object prestored in the overtime manager expired time whether
Less than current time.
Further, it is described will be expired corresponding to the HTTP request object of generation and the HTTP request object of the generation
When time is stored to overtime manager, in addition to:
The unique mark corresponding to the HTTP request object of the generation is stored in the overtime manager;
The destruction HTTP request object to be destroyed, including:
Destroyed according to the unique mark of the HTTP request object to be destroyed to be destroyed in the overtime manager
HTTP request object.
On the other hand, there is provided a kind of processing assembling device of hypertext transfer protocol requests time-out, described device include:
Sending module, for sending the second HTTP request to the reception server;
Detection module, it whether there is for being detected every preset time in the HTTP request object prestored in time-out
The HTTP request object of state, the HTTP request object prestored are that the first HTTP that the sending module has been sent please
The request object for second HTTP request that the HTTP request object asked and the sending module are sent;
Module is destroyed, if detecting the presence of the HTTP request object in timeout mode for the detection module,
Using the HTTP request object in timeout mode as HTTP request object to be destroyed, and destroy described to be destroyed
HTTP request object.
Further, the destruction module, if being additionally operable to receive, the reception server returns and described first
The corresponding data of HTTP request, then using the HTTP request object of first HTTP request as HTTP request pair to be destroyed
As, and destroy the HTTP request object to be destroyed;
Or the destruction module, if it is returning with the 2nd HTTP to be additionally operable to receive the reception server
Ask corresponding data, then using the HTTP request object of second HTTP request as HTTP request object to be destroyed,
And destroy the HTTP request object to be destroyed.
Further, described device also includes:
Generation module, the HTTP request object of the first HTTP request sent for generating the sending module and described the
The HTTP request object of two HTTP requests;
Memory module, for storing the HTTP request object of the generation module generation and the HTTP request pair of the generation
As corresponding expired time;
The detection module, specifically for the HTTP request pair prestored every the preset time detection memory module
Whether the expired time of elephant is less than current time;If it is, determine the HTTP request object in timeout mode be present, and will
Expired time is less than the HTTP request object of current time as the HTTP request object in timeout mode.
Further, the memory module, specifically for the HTTP of the HTTP request object of generation and the generation is asked
The expired time corresponding to object is asked to store to overtime manager;
The detection module, please specifically for detecting the HTTP prestored in the overtime manager every preset time
Ask whether the expired time of object is less than current time.
Further, the memory module, it is additionally operable to store the HTTP request of the generation in the overtime manager
Unique mark corresponding to object;
The destruction module is described super specifically for being destroyed according to the unique mark of the HTTP request object to be destroyed
When manager in HTTP request object to be destroyed.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
The present invention by being destroyed while HTTP request is sent to the HTTP request object in timeout mode, from
And the processing of HTTP request time-out is had more real-time, and the asynchronous process of HTTP request time-out is realized, surpass compared with HTTP request
When synchronization process mode for, the wasting of resources can be reduced.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the process flow figure for the hypertext transfer protocol requests time-out that the embodiment of the present invention one provides;
Fig. 2 is the process flow figure for the hypertext transfer protocol requests time-out that the embodiment of the present invention two provides;
Fig. 3 is that a kind of structure of the processing unit for hypertext transfer protocol requests time-out that the embodiment of the present invention three provides is shown
It is intended to;
Fig. 4 is that a kind of structure of the processing unit for hypertext transfer protocol requests time-out that the embodiment of the present invention four provides is shown
It is intended to.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one
The embodiment of the present invention one provides a kind of processing method of hypertext transfer protocol requests time-out, referring to Fig. 1, method
Flow includes:
Step 101:The second HTTP request, and the HTTP prestored every preset time detection are sent to the reception server
Ask to whether there is the HTTP request object in timeout mode in object;If there is the HTTP request pair in timeout mode
As then performing step 102;
Wherein, the HTTP request object prestored is the HTTP request object and second of the first HTTP request sent
The HTTP request object of HTTP request;
Further, after sending the second HTTP request to the reception server, this method also includes:
If the data corresponding with the first HTTP request of the reception server return are received, by the first HTTP request
HTTP request object as HTTP request object to be destroyed, and destroy HTTP request object to be destroyed;
Or if the data corresponding with the second HTTP request of the reception server return are received, by second
The HTTP request object of HTTP request destroys HTTP request object to be destroyed as HTTP request object to be destroyed.
Further, before sending the second HTTP request to the reception server, this method also includes:
Generate the HTTP request object of the first HTTP request and the HTTP request object of the second HTTP request;
Expired time corresponding to the HTTP request object of storage generation and the HTTP request object of generation;
Please every whether there is the HTTP in timeout mode in the HTTP request object that preset time detection prestores
Object is sought, is included but is not limited to:
Whether the expired time every the HTTP request object that preset time detection prestores is less than current time;If
It is, it is determined that the HTTP request object in timeout mode be present, and expired time is less than to the HTTP request pair of current time
As the HTTP request object in timeout mode.
Further, the HTTP request object of generation and the expired time corresponding to the HTTP request object of generation are stored,
Including but not limited to:
Expired time corresponding to the HTTP request object of generation and the HTTP request object of generation is stored to time-out and managed
Manage device;
Whether the expired time every the HTTP request object that preset time detection prestores is less than current time, including
But it is not limited to:
Whether the expired time that the HTTP request object prestored in overtime manager is detected every preset time is less than
Current time.
Step 102:Using the HTTP request object in timeout mode as HTTP request object to be destroyed, and destroy and treat
The HTTP request object of destruction.
Further, the expired time corresponding to the HTTP request object of generation and the HTTP request object of generation is stored
During to overtime manager, in addition to:
The unique mark corresponding to the HTTP request object of generation is stored in overtime manager;
HTTP request object to be destroyed is destroyed, is included but is not limited to:
HTTP request to be destroyed in overtime manager is destroyed according to the unique mark of HTTP request object to be destroyed
Object.
The present embodiment provide method, by while HTTP request is sent to the HTTP request pair in timeout mode
As or successfully obtain the HTTP request objects of HTTP request of data and destroyed so that the processing of HTTP request time-out has more
Real-time, and the asynchronous process of HTTP request time-out is realized, for the synchronization process mode compared with HTTP request time-out, it can reduce
The wasting of resources.
Embodiment two
The embodiments of the invention provide a kind of hypertext transfer protocol requests time-out processing method, for convenience of description,
The content of the present embodiment combination above-described embodiment one, HTTP request is sent with request server A, the reception server B receives HTTP
Exemplified by request, the processing mode of hypertext transfer protocol requests time-out is carried out that explanation is explained in detail.Referring to Fig. 2, method stream
Journey includes:
Step 201:Request server A generates the HTTP request object of the first HTTP request and the HTTP of the second HTTP request
Ask object;
For the step, before request server A sends HTTP request to the reception server B, for the ease of sending and
The HTTP request is initialized, request server A can generate the HTTP request object of the HTTP request.Wherein, the first HTTP request
The HTTP request object HTTP request object of HTTP request that has sent for request server A, and first HTTP request
The number of HTTP request object can be one or more;The HTTP request object of second HTTP request is that request server A is currently treated
The HTTP request object of the HTTP request of transmission.
Step 202:Corresponding to the HTTP request object of request server A storage generations, the HTTP request object of generation
Unique mark corresponding to expired time and the HTTP request object of generation;
Specifically, request server A is after HTTP request object is generated, HTTP request object that can be to generation, generation
HTTP request object corresponding to expired time and generation HTTP request object corresponding to unique mark stored.Close
The HTTP request pair of HTTP request object in storage generation, the expired time corresponding to the HTTP request object of generation and generation
As the specific implementation of corresponding unique mark, include but is not limited to:
Please by the expired time corresponding to the HTTP request object of generation, the HTTP request object generated and the HTTP of generation
The unique mark corresponding to object is asked to store to overtime manager.
Wherein, overtime manager includes dictionary object, and dictionary object is made up of key and value, and the key in dictionary object is used
To identify the unique mark corresponding to the HTTP request object of generation, the value in dictionary object is used for storing the HTTP request of generation
Expired time corresponding to object and the HTTP request object of generation.
Further, request server A, can be accordingly to the generation when generating the HTTP request object of HTTP request
HTTP request object sets time-out time, to calculate the expired time corresponding to the HTTP request object each generated.For example, please
It is 25 seconds to ask server A to set time-out time to the HTTP request object being currently generated, i.e. the HTTP request for each generating
Its time-to-live of object is 25 seconds.Certainly, the size of time-out time, can also be other numerical value in addition to above-mentioned numerical value, for example,
30 seconds etc., the present embodiment was not especially limited to the size of time-out time.In the HTTP request object institute that calculating each generates
During corresponding expired time, the HTTP request object time-out time being currently generated and the HTTP request object being currently generated are stored
To expired time of the current time sum as the HTTP request object being currently generated of overtime manager.For example, to work as previous existence
Into HTTP request object time-out time be 25 seconds, the storage of the HTTP request object that is currently generated to the current of overtime manager
Time be 13 points 05 minutes be example, then the expired time of the HTTP request object being currently generated for 13 points 0 25 seconds 05 minutes.Counting
Calculate after finishing the expired time of the HTTP request object being currently generated, just by the HTTP request object being currently generated it is expired when
Between be stored in overtime manager.
It should be noted that request server A is in the HTTP request object of storage generation, the HTTP request object institute of generation
After unique mark corresponding to corresponding expired time and the HTTP request object of generation, it can be sent to the reception server B
HTTP request, and send the first HTTP request time prior to send the second HTTP request time, i.e. request server A to
Before the reception server B sends the second HTTP request, what its storage in overtime manager generated according to the first HTTP request
Corresponding to expired time and the first HTTP request object corresponding to first HTTP request object, the first HTTP request object only
One mark, and in the expired time and the first HTTP corresponding to the first HTTP request object of storage, the first HTTP request object
After unique mark corresponding to request object the first HTTP request is have sent to the reception server B.
Step 203:Request server A sends the second HTTP request to the reception server B, and pre- every preset time detection
It whether there is the HTTP request object in timeout mode in the HTTP request object first stored, if there is in timeout mode
HTTP request object, then perform step 204;If receiving the data of the reception server B returns, step 205 is performed;
For the step, the specific implementation that request server A sends the second HTTP request to the reception server B includes
But it is not limited to:Sent after second HTTP request is packed to the reception server B, side of the present embodiment to the second HTTP request of transmission
Formula limits without specific.
Further, detect to whether there is in the HTTP request object prestored every preset time and be in timeout mode
HTTP request object, include but is not limited to:
Whether the expired time every the HTTP request object that preset time detection prestores is less than current time;If
It is, it is determined that the HTTP request object in timeout mode be present, and expired time is less than to the HTTP request pair of current time
As the HTTP request object in timeout mode.
Further, whether it is less than currently every the expired time for the HTTP request object that preset time detection prestores
Time, including:
Whether the expired time that the HTTP request object prestored in overtime manager is detected every preset time is less than
Current time.
Wherein, the size of preset time concretely 5 seconds, certainly, the size of preset time, can be with addition to above-mentioned numerical value
For other numerical value, for example, 10 seconds etc., the present embodiment is not especially limited to this.The HTTP request object prestored includes
The HTTP request object of first HTTP request and the HTTP request object of the second HTTP request;The HTTP request of first HTTP request
Object is the HTTP request object for one or more HTTP request that request server A has been sent;The HTTP of second HTTP request please
Seek HTTP request object of the object for the current HTTP requests to be sent of request server A.
Below with a specific example to detecting the HTTP request prestored in overtime manager every preset time
The process that whether there is the HTTP request object in timeout mode in object is described in detail.
For example, request server A is every the HTTP request object prestored in 5 seconds just automatic detection time-out manager
Whether expired time is less than current time, it is assumed that a certain HTTP request object M's being stored in advance in overtime manager is expired
Time be 13 points 05 minutes, then if when 13 points of 06 minutes request server A perform detections operate, detect in overtime manager
Expired time is that 13 points of HTTP request object M of 05 minutes are still present, then request server A judges the HTTP prestored
Request object M is in timeout mode.
Further, this can be in by request server A after the HTTP request object in timeout mode is detected
The HTTP request object of timeout mode destroys the mistake of the HTTP request object to be destroyed as HTTP request object to be destroyed
Journey step 204 as described below.
Step 204:Using the HTTP request object in timeout mode as HTTP request object to be destroyed, and destroy and treat
The HTTP request object of destruction;
Wherein, HTTP request object to be destroyed is destroyed, is included but is not limited to:
HTTP request to be destroyed in overtime manager is destroyed according to the unique mark of HTTP request object to be destroyed
Object.
On destroying the specific implementation of the HTTP request object to be destroyed in overtime manager, including it is but unlimited
In:It will be removed in the dictionary object of HTTP request object to be destroyed in overtime manager, and by the HTTP to be destroyed with this
The relevant information of object is asked all to be destroyed, the present embodiment is to destroying the HTTP request object to be destroyed in overtime manager
Mode limits without specific.
Further, the second HTTP request is sent to the reception server B in request server A, second HTTP request is not
Before time-out, request server A may receive the reception server B return the data corresponding with the first HTTP request or with
The corresponding data of second HTTP request;Then request server A receive the reception server B return with the first HTTP request phase
After corresponding data or the data corresponding with the second HTTP request, in order to save storage resource and obtain more data, this
The method that embodiment provides also includes the process that request server A destroys HTTP request object corresponding to returned data, refers to
Following step 205.
Step 205:If the data of the reception server B returns are received, by HTTP request corresponding with the data
HTTP request object destroys HTTP request object to be destroyed as HTTP request object to be destroyed;
Wherein, the data of return can be data corresponding to the first HTTP request, or the second HTTP request is corresponding
Data, the present embodiment is not especially limited to this.The data no matter returned are corresponding with which HTTP request, in order to save with
Memory space shared by the HTTP request object of the corresponding HTTP request of the data of return, the method that the present embodiment provides is also
Including using the HTTP request object of HTTP request corresponding with the data of return as HTTP request object to be destroyed, and to it
The step of being destroyed.
The mode of HTTP request object to be destroyed is destroyed, is included but is not limited to:
HTTP request to be destroyed in overtime manager is destroyed according to the unique mark of HTTP request object to be destroyed
Object.
On destroying the specific implementation of the HTTP request object to be destroyed in overtime manager, including it is but unlimited
In:It will be removed in the dictionary object of HTTP request object to be destroyed in overtime manager, and by the HTTP to be destroyed with this
The relevant information of object is asked all to be destroyed, the present embodiment is to destroying the HTTP request object to be destroyed in overtime manager
Mode limits without specific.
The present embodiment provide method, by while HTTP request is sent to the HTTP request pair in timeout mode
As or successfully obtain the HTTP request objects of HTTP request of data and destroyed so that the processing of HTTP request time-out has more
Real-time, and the asynchronous process of HTTP request time-out is realized, for the synchronization process mode compared with HTTP request time-out, it can reduce
The wasting of resources.
Embodiment three
The embodiments of the invention provide a kind of processing unit of hypertext transfer protocol requests time-out, for performing above-mentioned reality
The method that example and embodiment two provide is applied, referring to Fig. 3, the device includes:
Sending module 31, for sending the second HTTP request to the reception server;
Detection module 32, it whether there is for being detected every preset time in the HTTP request object prestored in super
When state HTTP request object, the HTTP request object prestored is the first HTTP request that has sent of sending module 31
The request object for the second HTTP request that HTTP request object and sending module 31 are sent;
Module 33 is destroyed, if detecting the presence of the HTTP request object in timeout mode for detection module 32,
Using the HTTP request object in timeout mode as HTTP request object to be destroyed, and destroy HTTP request pair to be destroyed
As.
Further, destroy module 33, if be additionally operable to receive the reception server return with the first HTTP request phase
Corresponding data, then using the HTTP request object of the first HTTP request as HTTP request object to be destroyed, and destroy and treat pin
The HTTP request object ruined;
Or module 33 is destroyed, if being additionally operable to receive the corresponding with the second HTTP request of the reception server return
Data, then using the HTTP request object of the second HTTP request as HTTP request object to be destroyed, and destroy to be destroyed
HTTP request object.
Further, also include referring to Fig. 4, the device:
Generation module 34, the HTTP request object and second of the first HTTP request for generating the transmission of sending module 31
The HTTP request object of HTTP request;
Memory module 35, for storing the HTTP request object of the generation of generation module 34 and the HTTP request object institute of generation
Corresponding expired time;
Detection module 32, for every the expired of the HTTP request object that prestores of preset time detection memory module 35
Whether the time is less than current time;If it is, determine the HTTP request object in timeout mode be present, and by expired time
Less than current time HTTP request object as in timeout mode HTTP request object.
Further, memory module 35, for the HTTP request object institute of the HTTP request object of generation and generation is right
The expired time answered is stored to overtime manager;
Detection module 32, for detecting the mistake of the HTTP request object prestored in overtime manager every preset time
Whether time phase is less than current time.
Further, memory module 35, it is additionally operable to store in overtime manager corresponding to the HTTP request object of generation
Unique mark;
Module 33 is destroyed, is treated for being destroyed according to the unique mark of HTTP request object to be destroyed in overtime manager
The HTTP request object of destruction.
In summary, device provided in an embodiment of the present invention, by while HTTP request is sent in overtime shape
The HTTP request object of state successfully obtains the HTTP request objects of HTTP request of data and destroyed, so that HTTP request
The processing of time-out has more real-time, and realizes the asynchronous process of HTTP request time-out, compared with the synchronization process of HTTP request time-out
For mode, the wasting of resources can be reduced.
It should be noted that:The processing unit for the hypertext transfer protocol requests time-out that above-described embodiment provides is super in processing
During text transfer protocol request timed out, only with the division progress of above-mentioned each functional module for example, in practical application, Ke Yigen
Above-mentioned function distribution is completed by different functional modules according to needs, i.e., the internal structure of device is divided into different functions
Module, to complete all or part of function described above.In addition, the hypertext transfer protocol requests that above-described embodiment provides
The processing method embodiment of the processing unit of time-out and hypertext transfer protocol requests time-out belongs to same design, and it is implemented
Process refers to embodiment of the method, repeats no more here.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment
To complete, by program the hardware of correlation can also be instructed to complete, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.
Claims (8)
1. a kind of processing method of hypertext transfer protocol requests time-out, it is characterised in that methods described includes:
Request server sends the second HTTP request to the reception server, and pre- every preset time detection
It whether there is the HTTP request object in timeout mode in the HTTP request object first stored, the HTTP prestored please
It is the HTTP request object of the first HTTP request and current second HTTP request to be sent sent to seek object
HTTP request object;
If there is the HTTP request object in timeout mode, then the request server by described in timeout mode
HTTP request object destroys the HTTP request object to be destroyed as HTTP request object to be destroyed;
Before the request server sends the second HTTP request to the reception server, methods described is also wrapped
Include:Generate the HTTP request object of first HTTP request and the HTTP request object of second HTTP request;Storage life
Into HTTP request object and the generation HTTP request object corresponding to expired time, the expired time is the life
Into HTTP request object time-out time and the generation the storage of HTTP request object to overtime manager current time
Sum;
Whether there is the HTTP in timeout mode in the HTTP request object prestored every preset time detection please
Object is sought, including:The request server is every the expired time of HTTP request object that preset time detection prestores
It is no to be less than current time;If it is, the request server determines the HTTP request object in timeout mode be present, and will
Expired time is less than the HTTP request object of current time as the HTTP request object in timeout mode.
2. according to the method for claim 1, it is characterised in that described to send the second Hyper text transfer association to the reception server
After discussing HTTP request, methods described also includes:
If the data corresponding with first HTTP request that the reception server returns are received, by described first
The HTTP request object of HTTP request destroys the HTTP request pair to be destroyed as HTTP request object to be destroyed
As;
Or if the data corresponding with second HTTP request that the reception server returns are received, by institute
The HTTP request object of the second HTTP request is stated as HTTP request object to be destroyed, and destroys the HTTP to be destroyed and asks
Seek object.
3. according to the method for claim 1, it is characterised in that the HTTP request object of the storage generation and the generation
HTTP request object corresponding to expired time, including:
Expired time corresponding to the HTTP request object of generation and the HTTP request object of the generation is stored to time-out and managed
Manage device;
Whether the expired time of the HTTP request object prestored every preset time detection is less than current time, wraps
Include:
Whether the expired time that the HTTP request object prestored in the overtime manager is detected every preset time is less than
Current time.
4. according to the method for claim 3, it is characterised in that described by the HTTP request object of generation and the generation
When expired time corresponding to HTTP request object is stored to overtime manager, in addition to:
The unique mark corresponding to the HTTP request object of the generation is stored in the overtime manager;
The destruction HTTP request object to be destroyed, including:
HTTP to be destroyed in the overtime manager is destroyed according to the unique mark of the HTTP request object to be destroyed
Ask object.
5. a kind of processing unit of hypertext transfer protocol requests time-out, it is characterised in that described device includes:
Sending module, for sending the second HTTP request to the reception server;
Detection module, timeout mode is in for detecting to whether there is in the HTTP request object prestored every preset time
HTTP request object, the HTTP request object prestored is the first HTTP request for having sent of the sending module
The request object of HTTP request object and current second HTTP request to be sent of the sending module;
Module is destroyed, if the HTTP request object in timeout mode is detected the presence of for the detection module, by institute
The HTTP request object in timeout mode is stated as HTTP request object to be destroyed, and destroys the HTTP to be destroyed and asks
Seek object;
Wherein, described device also includes:
Generation module, the HTTP request object and described second of the first HTTP request sent for generating the sending module
The HTTP request object of HTTP request;
Memory module, for storing the HTTP request object of the generation module generation and the HTTP request object institute of the generation
Corresponding expired time, the expired time are the time-out time of the HTTP request object of the generation and the HTTP of the generation
Object storage is asked to the current time sum of overtime manager;
The detection module, specifically for detecting the HTTP request object that the memory module prestores every preset time
Whether expired time is less than current time;If it is, determine the HTTP request object in timeout mode be present, and will be expired
Time is less than the HTTP request object of current time as the HTTP request object in timeout mode.
6. device according to claim 5, it is characterised in that the destruction module, if being additionally operable to receive described connect
The data corresponding with first HTTP request that server returns are received, then by the HTTP request pair of first HTTP request
As HTTP request object to be destroyed, and destroy the HTTP request object to be destroyed;
Or the destruction module, if it is returning with second HTTP request to be additionally operable to receive the reception server
Corresponding data, then using the HTTP request object of second HTTP request as HTTP request object to be destroyed, and sell
Ruin the HTTP request object to be destroyed.
7. device according to claim 5, it is characterised in that the memory module, specifically for the HTTP of generation is asked
Object and the expired time corresponding to the HTTP request object of the generation is asked to store to overtime manager;
The detection module, specifically for detecting the HTTP request pair prestored in the overtime manager every preset time
Whether the expired time of elephant is less than current time.
8. device according to claim 7, it is characterised in that the memory module, be additionally operable in the overtime manager
Unique mark corresponding to the HTTP request object of the middle storage generation;
The destruction module, managed specifically for destroying the time-out according to the unique mark of the HTTP request object to be destroyed
Manage the HTTP request object to be destroyed in device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210591684.8A CN103916411B (en) | 2012-12-31 | 2012-12-31 | The processing method and processing device of hypertext transfer protocol requests time-out |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210591684.8A CN103916411B (en) | 2012-12-31 | 2012-12-31 | The processing method and processing device of hypertext transfer protocol requests time-out |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103916411A CN103916411A (en) | 2014-07-09 |
CN103916411B true CN103916411B (en) | 2018-02-02 |
Family
ID=51041818
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210591684.8A Active CN103916411B (en) | 2012-12-31 | 2012-12-31 | The processing method and processing device of hypertext transfer protocol requests time-out |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103916411B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648565B (en) * | 2015-10-30 | 2020-06-05 | 北京国双科技有限公司 | Request sending method and device |
CN107493307A (en) * | 2016-06-12 | 2017-12-19 | 创盛视联数码科技(北京)有限公司 | A kind of HTTP request time-out management method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101106535A (en) * | 2007-08-14 | 2008-01-16 | 华为技术有限公司 | A method, server and system for heartbeat mechanism |
CN101562530A (en) * | 2009-05-15 | 2009-10-21 | 中兴通讯股份有限公司 | Transmission method and player for point-to-point mobile streaming media |
CN101980482A (en) * | 2010-11-17 | 2011-02-23 | 广东威创视讯科技股份有限公司 | Method for monitoring network connection and system thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4144882B2 (en) * | 2004-05-14 | 2008-09-03 | インターナショナル・ビジネス・マシーンズ・コーポレーション | Information processing apparatus, information system, proxy processing method, program, and recording medium |
-
2012
- 2012-12-31 CN CN201210591684.8A patent/CN103916411B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101106535A (en) * | 2007-08-14 | 2008-01-16 | 华为技术有限公司 | A method, server and system for heartbeat mechanism |
CN101562530A (en) * | 2009-05-15 | 2009-10-21 | 中兴通讯股份有限公司 | Transmission method and player for point-to-point mobile streaming media |
CN101980482A (en) * | 2010-11-17 | 2011-02-23 | 广东威创视讯科技股份有限公司 | Method for monitoring network connection and system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN103916411A (en) | 2014-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020258912A1 (en) | Blockchain consensus method, device and system | |
CN104184832B (en) | Data submission method and device in network application | |
US20040267878A1 (en) | Method, system and program product for providing a status of a transaction with an application on a server | |
US9749354B1 (en) | Establishing and transferring connections | |
CN108134830A (en) | Load balancing method, system, device and storage medium based on message queue | |
CN110111095B (en) | Payment transaction weight judging method and payment system | |
CN103051647B (en) | Method, equipment and system that a kind of session realizes | |
CN110020043B (en) | Page crawling method, device, storage medium and processor | |
JP2008071359A (en) | Method and device for server load sharing based on foreign port distribution | |
TW201712581A (en) | Method, apparatus and system for preventing cross-site request forgery | |
CN109254854A (en) | Asynchronous invoking method, computer installation and storage medium | |
CN109325068B (en) | Data exchange method and device | |
CN105978938A (en) | Service processing equipment service status determining method and scheduling equipment | |
CN110619022B (en) | Node detection method, device, equipment and storage medium based on block chain network | |
CN103916411B (en) | The processing method and processing device of hypertext transfer protocol requests time-out | |
CN113098935B (en) | Session keeping method, device and storage medium | |
CN104216739B (en) | A kind of download process method and device, terminal | |
CN107786594A (en) | Service request processing method and device | |
CN104009961A (en) | PPPoE session ID distribution method and equipment thereof | |
CN111225038B (en) | Server access method and device | |
CN111416851A (en) | Method for session synchronization among multiple load balancers and load balancer | |
US20140047014A1 (en) | Network access system | |
CN113746794B (en) | Account processing method and device, electronic equipment and computer storage medium | |
CN111416852A (en) | Method for session synchronization among multiple load balancers and load balancer | |
CN111163123A (en) | Service request processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP02 | Change in the address of a patent holder | ||
CP02 | Change in the address of a patent holder |
Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080 Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd. Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building block A room 602 Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd. |