CN110311975A - A kind of data request processing method and device - Google Patents
A kind of data request processing method and device Download PDFInfo
- Publication number
- CN110311975A CN110311975A CN201910574217.6A CN201910574217A CN110311975A CN 110311975 A CN110311975 A CN 110311975A CN 201910574217 A CN201910574217 A CN 201910574217A CN 110311975 A CN110311975 A CN 110311975A
- Authority
- CN
- China
- Prior art keywords
- data
- request
- sent
- client
- storage server
- 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/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the present application provides a kind of data request processing method and device, belong to field of computer technology, the method is applied to Reverse Proxy, which comprises receives the request of data that client is sent, the request of data carries the Data Identification of data to be obtained;Judge locally whether be stored with corresponding first data of the Data Identification;If first data have been locally stored, first data are sent to the client.Using the application, the treatment effeciency of request of data can be improved.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of data request processing method and device.
Background technique
When user wants to obtain target data, user can be in client executing search operation, so that the client of user
It holds to Reverse Proxy and sends request of data, wherein target data can be the video data of a certain video, request of data
The data parameters of target data can be carried, data parameters can be Data Identification.Reverse Proxy can receive
To after request of data, which is forwarded to the storage server for being stored with target data.Storage server can basis
The corresponding relationship of pre-stored Data Identification and data determines the corresponding target data of the Data Identification of target data.Then,
Target data can be sent to Reverse Proxy by storage server, and target data is sent to by Reverse Proxy again
The client of user.
However, when the request of data that storage server is presently processing is excessive or storage server operation irregularity,
Storage server can not determine that the corresponding target data of a certain request of data, storage server can return within the default response time
Error message is to Reverse Proxy, and then, Reverse Proxy can send preset search to client and unsuccessfully disappear
Breath, to prompt user that can not obtain target data.Therefore, the request of data being presently processing when storage server is excessive, or
When person's storage server operation irregularity, Reverse Proxy sends target data without normal direction client, data request processing
Low efficiency.
Summary of the invention
The embodiment of the present application is designed to provide a kind of data request processing method and device, to improve request of data
Treatment effeciency.Specific technical solution is as follows:
In a first aspect, providing a kind of data request processing method, the method is applied to Reverse Proxy, described
Reverse Proxy and storage server communicate to connect, and the reverse-proxy caching has in the storage server
Partial data, which comprises
The request of data that client is sent is received, the request of data carries the Data Identification of data to be obtained;
Judge locally whether be stored with corresponding first data of the Data Identification;
If first data have been locally stored, first data are sent to the client.
Optionally, the method also includes:
If local not stored first data send the request of data to the storage server;
When receiving the second data that the storage server is sent, second data are sent to the client
End, and second data are being locally stored.
Optionally, if described be locally stored first data, first data are sent to the client
End includes:
It, will if receiving the busy-message that the storage server is sent and first data being locally stored
First data are sent to the client, and the busy-message is for indicating that the storage server can not handle data and ask
It asks.
Optionally, described first data are sent to the client to include:
Obtain the storage duration of first data;
If first data are sent to the visitor less than preset storage duration threshold value by the duration that stored
Family end;
If the duration that stored sends the number to the storage server greater than preset storage duration threshold value
According to request;
When receiving the error message for being used to indicate data request processing failure that the storage server is sent, by institute
It states the first data and is sent to the client.
Optionally, the method also includes:
According to the preset update cycle, the redundant data for meeting default treatment conditions, the default treatment conditions packet are determined
It includes request number of times in preset time period and is lower than default request number of times threshold value;
Delete the redundant data.
Second aspect provides a kind of data request processing device, and described device is applied to Reverse Proxy, described
Reverse Proxy and storage server communicate to connect, and the reverse-proxy caching has in the storage server
Partial data, described device include:
Receiving module, for receiving the request of data of client transmission, the request of data carries data to be obtained
Data Identification;
Judgment module, for judging locally whether be stored with corresponding first data of the Data Identification;
First sending module, for first data being sent to described when first data have been locally stored
Client.
Optionally, described device further include:
Second sending module, described in when local not stored first data, Xiang Suoshu storage server is sent
Request of data;
Third sending module, for when receiving the second data that the storage server is sent, described second to be counted
According to being sent to the client, and second data are being locally stored.
Optionally, first sending module includes:
First sending submodule, for that ought receive the busy-message of the storage server transmission and be locally stored
When first data, first data are sent to the client, the busy-message is for indicating the storage clothes
Business device can not handle request of data.
Optionally, first sending module includes:
Acquisition submodule, for obtaining the storage duration of first data;
Second sending submodule, for when it is described stored duration less than preset storage duration threshold value when, by described the
One data are sent to the client;
Third sending submodule, for when it is described stored duration greater than preset storage duration threshold value when, Xiang Suoshu is deposited
It stores up server and sends the request of data;
Second sending submodule is also used to when receiving that the storage server sends for indicating request of data
When the error message of processing failure, first data are sent to the client.
Optionally, described device further include:
Determining module, it is described pre- for determining the redundant data for meeting default treatment conditions according to the preset update cycle
If treatment conditions include in preset time period request number of times be lower than default request number of times threshold value;
Removing module, for deleting the redundant data.
The third aspect provides a kind of Reverse Proxy, including processor, communication interface, memory and communication are always
Line, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any data request processing method institute
The method and step stated.
Fourth aspect provides a kind of computer readable storage medium, is stored in the computer readable storage medium
Computer program, the computer program realize method described in any data request processing method when being executed by processor
Step.
A kind of data request processing method and device provided by the embodiments of the present application is applied to Reverse Proxy.Instead
It can receive the request of data that client is sent to proxy server, request of data carries the Data Identification of data to be obtained;
Judge locally whether be stored with corresponding first data of Data Identification;If the first data have been locally stored, by the first data
It is sent to client.Due to can store data to be obtained in Reverse Proxy, data to be obtained can be directly transmitted
Therefore it can be improved the treatment effeciency of request of data to client.
Certainly, implement the application any product or method it is not absolutely required to and meanwhile reach all the above excellent
Point.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described.
Fig. 1 is a kind of flow chart of data request processing method provided by the embodiments of the present application;
Fig. 2 is a kind of flow chart of data request processing method provided by the embodiments of the present application;
Fig. 3 is a kind of flow chart of data request processing method provided by the embodiments of the present application;
Fig. 4 is a kind of flow chart of data request processing method provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of data request processing device provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of Reverse Proxy provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description.
The embodiment of the present application provides a kind of data request processing method, and this method is applied to Reverse Proxy, instead
It can be Nginx server to proxy server.Reverse Proxy and storage server communicate to connect, reverse proxy service
The partial data that can be cached in storage server in device, facilitates for ease of description, will store in Reverse Proxy
Data be known as historical data.In the embodiment of the present application, historical data can be Reverse Proxy and respond each client
Request of data has been sent to the data of relative client.For the ease of management, can also be stored in Reverse Proxy
The corresponding relationship of historical data and Data Identification.
In the embodiment of the present application, reverse proxy can be made by way of carrying out logic expansion to Reverse Proxy
Server has the function of storing data.It, can be by the data in Reverse Proxy in a kind of feasible implementation
It is stored in redis database.
As shown in Figure 1, the concrete processing procedure of data request processing method provided by the embodiments of the present application includes:
Step 101, the request of data that client is sent is received.
Wherein, request of data can carry the data parameters of data to be obtained, data parameters such as Data Identification.Wait obtain
Access is also possible to the audio data of a certain audio according to the video data that can be a certain video, data to be obtained.
In an implementation, when user wants to obtain a certain data, user can be in client executing search operation, to use
The client at family sends request of data to Reverse Proxy.Then, Reverse Proxy can receive client transmission
Request of data, obtain request of data carry data to be obtained Data Identification.
In a kind of feasible implementation, http (hypertext transfer is can be generated in client
Protocol, hypertext transfer protocol) request form request of data, the header of http request may include cached parameters, super
When the data parameters such as time.Wherein, cached parameters are used to indicate the relevant informations of data to be obtained, for example, cached parameters can be with
It is the Data Identification of data to be obtained or the version information of data to be obtained, time-out time is for indicating that http request waits request
The high latency of response, time-out time such as 1s.Reverse Proxy can obtain after receiving http request
The Data Identification for the data to be obtained that http request carries.
Step 102, judge locally whether be stored with corresponding first data of Data Identification.
In an implementation, Reverse Proxy can be in the corresponding relationship of the historical data and Data Identification that are locally stored
In, the Data Identification of data to be obtained is searched, it, will if finding the Data Identification of data to be obtained in the corresponding relationship
The corresponding historical data of the Data Identification determines that the Data Identification that data to be obtained are locally stored is corresponding as the first data
First data.
If not finding the Data Identification in the corresponding relationship, the data of local not stored data to be obtained are determined
Corresponding first data are identified, the treatment process of Reverse Proxy is subsequent to will do it detailed description.
Step 103, if the first data have been locally stored, the first data are sent to client.
In an implementation, if the first data have been locally stored, the first data can be sent to visitor by Reverse Proxy
Family end.
It can store the history number for having been sent to each client in the embodiment of the present application, in Reverse Proxy
According to.Reverse Proxy can obtain the data mark that request of data carries after the request of data for receiving client transmission
Know, then, judges locally whether be stored with corresponding first data of the Data Identification, if there is the first data, then by first
Data are sent to client.The embodiment of the present application passes through the caching function of extension Reverse Proxy, so that reverse proxy takes
Business device directly can obtain corresponding first number of request of data from local when receiving the request of data of request identical data
According to, then the first data are sent to client.Storage server is avoided as a result, need to handle all Reverse Proxies connect
The request of data received, can reduce the load pressure of storage server at possibly the problem of can not timely responding to all request of data
Power improves the treatment effeciency of request of data.
Optionally, as shown in Fig. 2, if Reverse Proxy locally not stored first data, server can execute
Following steps:
Step 201, if local not stored first data, request of data is sent to storage server.
Wherein, it is stored with data to be obtained needed for user in storage server, is also stored with data in storage server
With the corresponding relationship of Data Identification.
In an implementation, if request of data can be sent to and deposit by local not stored first data, Reverse Proxy
Store up server.
Step 202, when receiving the second data that storage server is sent, the second data are sent to client, and
The second data are locally stored.
In an implementation, storage server can be after the request of data for receiving Reverse Proxy transmission, according to number
According to the corresponding relationship with Data Identification, corresponding second data of the Data Identification of data to be obtained are determined, then the second data are sent out
It send to Reverse Proxy.
At this point, Reverse Proxy can receive the second data of storage server transmission, and then, reverse proxy clothes
Second data can be sent to client by business device, and the second data are being locally stored.
In a kind of feasible implementation, the default response time can store in storage server, when presetting response
Between such as 1s.If the request of data that storage server is presently processing is excessive or storage server operation irregularity, deposit
When corresponding second data of the Data Identification of data to be obtained can not be determined within the default response time by storing up server, storage service
Device can return to error message to Reverse Proxy.
Reverse Proxy can send preset search failed message to client after receiving error message,
To prompt user data to obtain failure.
In the embodiment of the present application, Reverse Proxy is in the Data Identification of local not stored data to be obtained corresponding the
When one data (data i.e. to be obtained), request of data is sent to storage server, then, receives storage server is determined the
Two data, then the second data are sent to client.Reverse Proxy is in local not stored data to be obtained as a result,
Data to be obtained are just obtained by storage server, the caching function of Reverse Proxy is can make full use of, avoids and deposit
Storage server needs to handle the request of data that all Reverse Proxies receive, and possibly can not timely respond to total data and ask
The problem of asking can be improved the treatment effeciency of request of data, reduce the load pressure of storage server, and reduce storage server
Maintenance cost.
Optionally, the request of data being presently processing when storage server is excessive or storage server operation irregularity
When, storage server can send busy-message to Reverse Proxy.After receiving busy-message, Reverse Proxy
The working condition that can determine storage server is that can not handle request of data, in this case, if being locally stored first
First data can be sent to client by data, Reverse Proxy.
In the embodiment of the present application, when the first data have been locally stored in determination, deposited if Reverse Proxy receives
The busy-message that server is sent is stored up, then the first data directly can be sent to client by Reverse Proxy, as a result, can
It enough avoids storage server from needing to handle the request of data that all Reverse Proxies receive, possibly can not timely respond to institute
There is the problem of request of data, the load pressure of storage server can be reduced, improves the treatment effeciency of request of data.
Optionally, the storage duration threshold value of historical data can be previously provided in Reverse Proxy.If local
The first data are stored with, Reverse Proxy can be according to storage duration threshold value, it is determined whether the first data are sent to visitor
Family end, as shown in figure 3, concrete processing procedure includes:
Step 301, the storage duration for obtaining the first data.
In an implementation, Reverse Proxy can obtain the first data after the first data have been locally stored in determination
Duration is stored, then, Reverse Proxy can compare the duration of storage of the first data and storage duration threshold value
Compared with.
If step 302 has stored duration less than preset storage duration threshold value, the first data are sent to client
End.
In an implementation, if having stored duration less than preset storage duration threshold value, Reverse Proxy can be incited somebody to action
First data are sent to client.
For example, storage duration threshold value is 48 hours, the duration of storage of the first data is 24 hours, Reverse Proxy
Duration will be stored 24 hours and storage is compared for duration threshold value 48 hours, when determining that having stored duration is less than preset storage
Long threshold value, then the first data can be sent to client by Reverse Proxy.
Optionally, if having stored duration greater than preset storage duration threshold value, the specific place of Reverse Proxy
Reason process includes:
Step 1 sends request of data to storage server.
Step 2, when receive storage server transmission for indicate data request processing failure error message when, will
First data are sent to client.
In an implementation, when the error message to fail for indicating data request processing for receiving storage server transmission
When, the first data are sent to client.
In a kind of feasible implementation, by the request of data of http request form be sent to storage server it
Before, Reverse Proxy can store the target data parameter that http request header includes, and target data parameter for example caches
Parameter, time-out time.
Storage server can obtain the target data parameter that http request header includes after receiving http request,
When storage server, which determines, can not determine data to be obtained in the default response time, storage server be can be generated comprising target
The error message of data parameters, then the error message is sent to Reverse Proxy.
The target data parameter that the available error message of Reverse Proxy includes, and with the number of targets that is locally stored
It is compared according to parameter, if identical, the first data being locally stored can be sent to client by Reverse Proxy.
If it is not the same, then Reverse Proxy can send preset search failed message to client, to prompt user data
Obtain failure.
Step 3, when receive storage server transmission the second data when, the second data are sent to client, delete
First data, and the second data are being locally stored.
In an implementation, storage server can be after the request of data for receiving Reverse Proxy transmission, according to number
According to the corresponding relationship with Data Identification, corresponding second data of the Data Identification of data to be obtained are determined, then the second data are sent out
It send to Reverse Proxy.
At this point, Reverse Proxy can receive the second data of storage server transmission, and then, reverse proxy clothes
Second data can be sent to client by business device, delete the first data being locally stored, and the second data are being locally stored.
In the embodiment of the present application, when the duration of storage of the first data is greater than storage duration threshold value, reverse proxy service
Device can send request of data to storage server, to update the be locally stored when storage server sends the second data
One data, and the second data are sent to client;Meanwhile Reverse Proxy can also send expression in storage server
When the error message of data request processing failure, the first data are sent to client.When storage server can not timely respond to
When request of data, search failed message is sent to client with Reverse Proxy in the prior art, to prompt user data
Acquisition is unsuccessfully compared, and in the embodiment of the present application, the first data can be sent to client by Reverse Proxy, make client
It no longer shows preset search failure page, but shows the first data, can be improved user experience.
Optionally, due to the limited storage space of Reverse Proxy, Reverse Proxy can be with periodic cleaning sheet
The historical data of ground storage, as shown in figure 4, concrete processing procedure includes:
Step 401, according to the preset update cycle, determine the redundant data for meeting default treatment conditions.
Wherein, the update cycle can be previously provided in Reverse Proxy, the update cycle such as 30 days.Reverse proxy
Default treatment conditions can also be previously provided in server, default treatment conditions can be request number of times in the update cycle and be lower than
Default request number of times threshold value, default treatment conditions are also possible to the memory space occupied and are greater than default memory space threshold value.
In an implementation, Reverse Proxy can according to the preset update cycle, in the historical data being locally stored,
The historical data for meeting default treatment conditions is determined, as redundant data.
For example, default request number of times threshold value is 5, Reverse Proxy can after current run time reaches 30 days,
In the historical data being locally stored, the historical data using request number of times less than 5 is as redundant data.
Step 402 deletes redundant data.
In the embodiment of the present application, Reverse Proxy determines the redundancy for meeting default treatment conditions according to the update cycle
Then data delete redundant data, enable Reverse Proxy in limited memory space, and cache user more feels emerging
The data of interest.Consequently facilitating directly determining data to be obtained from local, and data to be obtained are sent to client, avoid and deposit
Storage server needs to handle the request of data that all Reverse Proxies receive, and possibly can not timely respond to partial data and ask
The problem of asking can reduce the load pressure of storage server, improve the treatment effeciency of request of data.
The embodiment of the present application also provides a kind of data request processing device, described device is applied to reverse proxy service
Device, the Reverse Proxy and storage server communicate to connect, and the reverse-proxy caching has the storage to take
The partial data being engaged in device, as shown in figure 5, described device includes:
Receiving module 510, for receiving the request of data of client transmission, the request of data carries data to be obtained
Data Identification;
Judgment module 520, for judging locally whether be stored with corresponding first data of the Data Identification;
First sending module 530, for when first data have been locally stored, first data to be sent to institute
State client.
Optionally, described device further include:
Second sending module, described in when local not stored first data, Xiang Suoshu storage server is sent
Request of data;
Third sending module, for when receiving the second data that the storage server is sent, described second to be counted
According to being sent to the client, and second data are being locally stored.
Optionally, first sending module includes:
First sending submodule, for that ought receive the busy-message of the storage server transmission and be locally stored
When first data, first data are sent to the client, the busy-message is for indicating the storage clothes
Business device can not handle request of data.
Optionally, first sending module includes:
Acquisition submodule, for obtaining the storage duration of first data;
Second sending submodule, for when it is described stored duration less than preset storage duration threshold value when, by described the
One data are sent to the client;
Third sending submodule, for when it is described stored duration greater than preset storage duration threshold value when, Xiang Suoshu is deposited
It stores up server and sends the request of data;
Second sending submodule is also used to when receiving that the storage server sends for indicating request of data
When the error message of processing failure, first data are sent to the client.
Optionally, described device further include:
Determining module, it is described pre- for determining the redundant data for meeting default treatment conditions according to the preset update cycle
If treatment conditions include in preset time period request number of times be lower than default request number of times threshold value;
Removing module, for deleting the redundant data.
A kind of data request processing device provided by the embodiments of the present application is applied to Reverse Proxy.Reverse proxy
Server can receive the request of data of client transmission, and request of data carries the Data Identification of data to be obtained;Judgement is originally
Whether ground is stored with corresponding first data of Data Identification;If the first data have been locally stored, the first data are sent to
Client.Due to can store data to be obtained in Reverse Proxy, data to be obtained can be sent directly to client
End, therefore, can be improved the treatment effeciency of request of data.
The embodiment of the present application also provides a kind of Reverse Proxies, as shown in fig. 6, connecing including processor 601, communication
Mouth 602, memory 603 and communication bus 604, wherein processor 601, communication interface 602, memory 603 pass through communication bus
604 complete mutual communication,
Memory 603, for storing computer program;
Processor 601 when for executing the program stored on memory 603, realizes following steps:
The request of data that client is sent is received, the request of data carries the Data Identification of data to be obtained;
Judge locally whether be stored with corresponding first data of the Data Identification;
If first data have been locally stored, first data are sent to the client.
Optionally, the method also includes:
If local not stored first data send the request of data to the storage server;
When receiving the second data that the storage server is sent, second data are sent to the client
End, and second data are being locally stored.
Optionally, if described be locally stored first data, first data are sent to the client
End includes:
It, will if receiving the busy-message that the storage server is sent and first data being locally stored
First data are sent to the client, and the busy-message is for indicating that the storage server can not handle data and ask
It asks.
Optionally, described first data are sent to the client to include:
Obtain the storage duration of first data;
If first data are sent to the visitor less than preset storage duration threshold value by the duration that stored
Family end;
If the duration that stored sends the number to the storage server greater than preset storage duration threshold value
According to request;
When receiving the error message for being used to indicate data request processing failure that the storage server is sent, by institute
It states the first data and is sent to the client.
Optionally, the method also includes:
According to the preset update cycle, the redundant data for meeting default treatment conditions, the default treatment conditions packet are determined
It includes request number of times in preset time period and is lower than default request number of times threshold value;
Delete the redundant data.
The communication bus that above-mentioned Reverse Proxy is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned Reverse Proxy and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
A kind of Reverse Proxy provided by the embodiments of the present application can receive the request of data of client transmission, number
The Data Identification of data to be obtained is carried according to request;Judge locally whether be stored with corresponding first data of Data Identification;Such as
The first data have been locally stored in fruit, then the first data are sent to client.Due to can store in Reverse Proxy to
Data are obtained, data to be obtained client can be sent directly to, therefore, can be improved the treatment effeciency of request of data.
In another embodiment provided by the present application, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with computer program in storage medium, the computer program realizes any of the above-described request of data when being executed by processor
The step of processing method.
In another embodiment provided by the present application, a kind of computer program product comprising instruction is additionally provided, when it
When running on computers, so that computer executes any data request processing method in above-described embodiment.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present application.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely the preferred embodiments of the application, are not intended to limit the protection scope of the application.It is all
Any modification, equivalent replacement, improvement and so within spirit herein and principle are all contained in the protection scope of the application
It is interior.
Claims (12)
1. a kind of data request processing method, which is characterized in that the method is applied to Reverse Proxy, the reversed generation
It manages server and storage server communicates to connect, the reverse-proxy caching has the part number in the storage server
According to, which comprises
The request of data that client is sent is received, the request of data carries the Data Identification of data to be obtained;
Judge locally whether be stored with corresponding first data of the Data Identification;
If first data have been locally stored, first data are sent to the client.
2. the method according to claim 1, wherein the method also includes:
If local not stored first data send the request of data to the storage server;
When receiving the second data that the storage server is sent, second data are sent to the client, and
Second data are being locally stored.
3. the method according to claim 1, wherein if described be locally stored first data, general
First data are sent to the client
It, will be described if receiving the busy-message that the storage server is sent and first data being locally stored
First data are sent to the client, and the busy-message is for indicating that the storage server can not handle request of data.
4. the method according to claim 1, wherein described be sent to the client packet for first data
It includes:
Obtain the storage duration of first data;
If first data are sent to the client less than preset storage duration threshold value by the duration that stored
End;
If the duration that stored sends the data to the storage server and asks greater than preset storage duration threshold value
It asks;
When receiving that the storage server sends for indicating the error message of data request processing failure, by described the
One data are sent to the client.
5. the method according to claim 1, wherein the method also includes:
According to the preset update cycle, determine that the redundant data for meeting default treatment conditions, the default treatment conditions include pre-
If request number of times is lower than default request number of times threshold value in the period;
Delete the redundant data.
6. a kind of data request processing device, which is characterized in that described device is applied to Reverse Proxy, the reversed generation
It manages server and storage server communicates to connect, the reverse-proxy caching has the part number in the storage server
According to described device includes:
Receiving module, for receiving the request of data of client transmission, the request of data carries the data of data to be obtained
Mark;
Judgment module, for judging locally whether be stored with corresponding first data of the Data Identification;
First sending module, for when first data have been locally stored, first data to be sent to the client
End.
7. device according to claim 6, which is characterized in that described device further include:
Second sending module, for when local not stored first data, Xiang Suoshu storage server to send the data
Request;
Third sending module, for when receiving the second data that the storage server is sent, second data to be sent out
It send to the client, and second data is being locally stored.
8. device according to claim 6, which is characterized in that first sending module includes:
First sending submodule, for that ought receive the busy-message of the storage server transmission and be locally stored described
When the first data, first data are sent to the client, the busy-message is for indicating the storage server
Request of data can not be handled.
9. device according to claim 6, which is characterized in that first sending module includes:
Acquisition submodule, for obtaining the storage duration of first data;
Second sending submodule, for when it is described stored duration less than preset storage duration threshold value when, it is several by described first
According to being sent to the client;
Third sending submodule, for when it is described stored duration greater than preset storage duration threshold value when, to storage clothes
Business device sends the request of data;
Second sending submodule is also used to when receiving that the storage server sends for indicating data request processing
When the error message of failure, first data are sent to the client.
10. device according to claim 6, which is characterized in that described device further include:
Determining module, for determining the redundant data for meeting default treatment conditions, the default place according to the preset update cycle
Manage bar part include in preset time period request number of times be lower than default request number of times threshold value;
Removing module, for deleting the redundant data.
11. a kind of Reverse Proxy, which is characterized in that including processor, communication interface, memory and communication bus,
In, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
12. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-5 any method and step when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910574217.6A CN110311975B (en) | 2019-06-28 | 2019-06-28 | Data request processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910574217.6A CN110311975B (en) | 2019-06-28 | 2019-06-28 | Data request processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110311975A true CN110311975A (en) | 2019-10-08 |
CN110311975B CN110311975B (en) | 2022-06-03 |
Family
ID=68079317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910574217.6A Active CN110311975B (en) | 2019-06-28 | 2019-06-28 | Data request processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110311975B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110839074A (en) * | 2019-11-07 | 2020-02-25 | 北京首钢自动化信息技术有限公司 | Data request receiving and processing method and device |
CN110955688A (en) * | 2019-12-23 | 2020-04-03 | 北京奇艺世纪科技有限公司 | Proxy server, data query method and device, electronic equipment and storage medium |
CN114390098A (en) * | 2020-10-21 | 2022-04-22 | 北京金山云网络技术有限公司 | Data transmission method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015061938A1 (en) * | 2013-10-28 | 2015-05-07 | 华为技术有限公司 | Method, device and system for redirecting data service proxy |
CN106909690A (en) * | 2017-03-07 | 2017-06-30 | 四川驹马企业管理有限公司 | Network data caching method |
CN106911735A (en) * | 2015-12-22 | 2017-06-30 | 北京奇虎科技有限公司 | Data capture method and device |
CN107222567A (en) * | 2017-07-07 | 2017-09-29 | 北京京东尚科信息技术有限公司 | Method, device and the service cluster of processing data request |
CN107943594A (en) * | 2016-10-13 | 2018-04-20 | 北京京东尚科信息技术有限公司 | Data capture method and device |
CN109831536A (en) * | 2019-03-22 | 2019-05-31 | 成都六四三六五科技有限公司 | A kind of front end load balancing service degradated system and method |
CN109922053A (en) * | 2019-02-22 | 2019-06-21 | 北京三快在线科技有限公司 | Data transmission method, device, electronic equipment and readable storage medium storing program for executing |
-
2019
- 2019-06-28 CN CN201910574217.6A patent/CN110311975B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015061938A1 (en) * | 2013-10-28 | 2015-05-07 | 华为技术有限公司 | Method, device and system for redirecting data service proxy |
CN106911735A (en) * | 2015-12-22 | 2017-06-30 | 北京奇虎科技有限公司 | Data capture method and device |
CN107943594A (en) * | 2016-10-13 | 2018-04-20 | 北京京东尚科信息技术有限公司 | Data capture method and device |
CN106909690A (en) * | 2017-03-07 | 2017-06-30 | 四川驹马企业管理有限公司 | Network data caching method |
CN107222567A (en) * | 2017-07-07 | 2017-09-29 | 北京京东尚科信息技术有限公司 | Method, device and the service cluster of processing data request |
CN109922053A (en) * | 2019-02-22 | 2019-06-21 | 北京三快在线科技有限公司 | Data transmission method, device, electronic equipment and readable storage medium storing program for executing |
CN109831536A (en) * | 2019-03-22 | 2019-05-31 | 成都六四三六五科技有限公司 | A kind of front end load balancing service degradated system and method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110839074A (en) * | 2019-11-07 | 2020-02-25 | 北京首钢自动化信息技术有限公司 | Data request receiving and processing method and device |
CN110955688A (en) * | 2019-12-23 | 2020-04-03 | 北京奇艺世纪科技有限公司 | Proxy server, data query method and device, electronic equipment and storage medium |
CN114390098A (en) * | 2020-10-21 | 2022-04-22 | 北京金山云网络技术有限公司 | Data transmission method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110311975B (en) | 2022-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10462025B2 (en) | Monitoring performance and operation of data exchanges | |
CN110311975A (en) | A kind of data request processing method and device | |
CN106796547A (en) | For the method and system that proxy caching smart object is eliminated | |
CN105610867B (en) | A kind of anti-abduction method and apparatus of DNS | |
US20190182270A1 (en) | System and method for inquiring ioc information by p2p protocol | |
CN110247986A (en) | A kind of document transmission method, device and electronic equipment | |
US20050216519A1 (en) | Access point that monitors guest usage | |
CN106027595A (en) | Access log processing method and system for CDN node | |
CN104601601A (en) | Web crawler detecting method and device | |
CN112612618B (en) | Interface current limiting method and device, computer equipment and storage medium | |
CN108647240A (en) | A kind of method, apparatus, electronic equipment and the storage medium of statistics visit capacity | |
CN110166529A (en) | It keeps logging in state method, apparatus, equipment and storage medium | |
CN108347459A (en) | A kind of high in the clouds data quick storage method and device | |
CN108804515A (en) | A kind of webpage loading method, webpage loading system and server | |
CN115190047A (en) | Server health monitoring method and system and computing equipment | |
JP4871903B2 (en) | Wireless gateway device, wireless gateway system | |
US20030187923A1 (en) | Data transfer scheme using re-direct response message for reducing network load | |
CN107438058A (en) | The filter method and filtration system of user's request | |
CN106250322B (en) | A kind of method and apparatus for writing data | |
CN111737084B (en) | Information monitoring method, device, intelligent equipment, computer equipment and medium | |
CN108259198B (en) | Method, device and equipment for prejudging domain name cache hit rate | |
CN109962944A (en) | A kind of media data storage method, storage device and electronic equipment | |
KR20210044281A (en) | Method and apparatus for ensuring continuous device operation stability in cloud degraded mode | |
CN105656921A (en) | Data transmission method, apparatus and device | |
CN111212136B (en) | Modbus protocol-based data caching method, device and system 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 |