CN110113440A - A kind of request responding method, device and terminal - Google Patents
A kind of request responding method, device and terminal Download PDFInfo
- Publication number
- CN110113440A CN110113440A CN201910300213.9A CN201910300213A CN110113440A CN 110113440 A CN110113440 A CN 110113440A CN 201910300213 A CN201910300213 A CN 201910300213A CN 110113440 A CN110113440 A CN 110113440A
- Authority
- CN
- China
- Prior art keywords
- http
- request
- address
- server
- dns
- 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
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- 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
Abstract
The embodiment of the invention provides a kind of request responding methods, applied to HTTP client, the described method includes: sending dns resolution request to default dns server based on preset protocol, so that the domain name mapping carried in dns resolution request is target ip address by the default dns server, and the target ip address is sent to the HTTP client, wherein, the preset protocol is the agreement different from the dns resolution agreement of standard;HTTP request, which is sent, to the HTTP server that IP address is target ip address obtains response results, and the response results are fed back into the HTTP client so that the HTTP server responds the HTTP request;Receive the response results of the HTTP server feedback.As it can be seen that the technical solution provided through the embodiment of the present invention, can be improved HTTP client and obtains the probability of accurate IP address, and obtain the probability of accurate response results.
Description
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of request responding method, device and terminal.
Background technique
HTTP (HyperText Transfer Protocol, hypertext transfer protocol) is based on TCP/IP (Transfer
Control Protocol/Internet Protocol, transmission control protocol/Internet protocol) on an application layer association
View, which is a kind of typical request/response protocol.
Specifically, HTTP client sends the analysis request for carrying domain name, standard to the domain name system DNS server of standard
Dns server receive the request after, translate domain names into as IP address;And the IP address parsed is sent to HTTP client
End;After HTTP client receives the IP address, HTTP request, HTTP are sent to the HTTP server that IP address is the IP address
Server responds the HTTP request after the HTTP request for receiving the transmission of HTTP client, obtains response results, and will response
As a result HTTP client is fed back to.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art:
Existing HTTP client, which is measured dns resolution agreement, to be sent to the dns server of standard and carries domain name
Analysis request.But in practical applications, the probability that the dns resolution agreement of standard is held as a hostage is higher, once the DNS of standard
Analysis protocol is held as a hostage, and causes HTTP client that cannot obtain accurate IP address, and eventually leading to HTTP client cannot obtain
Accurate response results.
Summary of the invention
The embodiment of the present invention has been designed to provide a kind of request responding method, device and electronic equipment, to improve
HTTP client obtains the probability of accurate IP address, and obtains the probability of accurate response results.Specific technical solution is such as
Under:
In a first aspect, being applied to HTTP client, the method the embodiment of the invention provides a kind of request responding method
Include:
Dns resolution request is sent to default dns server based on preset protocol, so that the default dns server will
The domain name mapping carried in the dns resolution request is target ip address, and the target ip address is sent to the HTTP
Client, wherein the preset protocol is the agreement different from the dns resolution agreement of standard;
HTTP request is sent to the HTTP server that IP address is target ip address, so that the HTTP server responds
The HTTP request obtains response results, and the response results is fed back to the HTTP client;
Receive the response results of the HTTP server feedback.
It is optionally, described that the step of dns resolution is requested is sent to default dns server based on preset protocol, comprising:
When the dns server of criterion translates domain names into and fails for IP address, taken based on preset protocol to default DNS
Business device sends dns resolution request.
Optionally, the preset protocol is HTTP, and the predetermined server is HTTP dns server;
It is described that the step of dns resolution is requested is sent to default dns server based on preset protocol, comprising:
Dns resolution request is sent to HTTP dns server based on HTTP, so that the HTTP dns server receives
To after dns resolution request, the corresponding relationship based on domain name and IP address is determining corresponding with domain name that is carrying in dns resolution request
Target ip address, and the target ip address is sent to the HTTP client.
Optionally, the preset protocol is User Datagram Protocol UDP, and the predetermined server is UDP dns server;
It is described that the step of dns resolution is requested is sent to default dns server based on preset protocol, comprising:
Dns resolution request is sent to UDP dns server based on UDP, so that the UDP dns server receives
After dns resolution request, from obtained in the dns server of standard requested with dns resolution in the domain name that carries corresponding Target IP
Location, and the target ip address is sent to the HTTP client.
Optionally, after the response results for receiving the HTTP server feedback the step of, the method is also wrapped
It includes:
Judge whether the response results are intended response result;
If the response results are not intended responses as a result, described send out to the HTTP server that IP address is target ip address
The step of sending HTTP request, comprising:
HTTP cryptographic operations are executed to HTTP request, obtain encrypted HTTP request;
Encrypted HTTP request is sent to the HTTP server that IP address is target ip address, so that the HTTP takes
Device be engaged in after receiving encrypted HTTP request, encrypted HTTP request is decrypted, the HTTP after being decrypted is asked
It asks;And the HTTP request after decryption is responded, response results are obtained, and the response results are fed back into HTTP client.
Optionally, described the step of sending HTTP request to the HTTP server that IP address is target ip address, comprising:
Monitor the transmission speed of HTTP request;
Judge whether the transmission speed is less than Preset Transfer speed;
If the transmission speed is less than the Preset Transfer speed, transport protocol is accelerated based on third party, is to IP address
The HTTP server of target ip address sends HTTP request.
Second aspect, the embodiment of the invention provides a kind of request responding devices, are applied to HTTP client, described device
Include:
Analysis request sending module, for sending dns resolution request to default dns server based on preset protocol, so that
The domain name mapping that carries in dns resolution request is target ip address by the default dns server, and by the target
IP address is sent to the HTTP client, wherein the preset protocol is the agreement different from the dns resolution agreement of standard;
HTTP request sending module sends HTTP request to the HTTP server that IP address is target ip address, so that
The HTTP server responds the HTTP request, obtains response results, and the response results are fed back to the HTTP visitor
Family end;
Response results receiving module, for receiving the response results of the HTTP server feedback.
Optionally, the analysis request sending module, is specifically used for:
When the dns server of criterion translates domain names into and fails for IP address, taken based on preset protocol to default DNS
Business device sends dns resolution request.
Optionally, the preset protocol is HTTP, and the predetermined server is HTTP dns server;
The analysis request sending module, is specifically used for:
Dns resolution request is sent to HTTP dns server based on HTTP, so that the HTTP dns server receives
To after dns resolution request, the corresponding relationship based on domain name and IP address is determining corresponding with domain name that is carrying in dns resolution request
Target ip address, and the target ip address is sent to the HTTP client.
Optionally, the preset protocol is User Datagram Protocol UDP, and the predetermined server is UDP dns server;
The analysis request sending module, is specifically used for:
Dns resolution request is sent to UDP dns server based on UDP, so that the UDP dns server receives
After dns resolution request, from obtained in the dns server of standard requested with dns resolution in the domain name that carries corresponding Target IP
Location, and the target ip address is sent to the HTTP client.
Optionally, described device further include:
Response results judgment module, for the response results for receiving the HTTP server feedback the step of it
Afterwards, judge whether the response results are intended response result;
If the response results are not intended responses as a result, the HTTP request sending module, is specifically used for:
HTTP cryptographic operations are executed to HTTP request, obtain encrypted HTTP request;
Encrypted HTTP request is sent to the HTTP server that IP address is target ip address, so that the HTTP takes
Device be engaged in after receiving encrypted HTTP request, encrypted HTTP request is decrypted, the HTTP after being decrypted is asked
It asks;And the HTTP request after decryption is responded, response results are obtained, and the response results are fed back into HTTP client.
Optionally, the HTTP request sending module, is specifically used for:
Monitor the transmission speed of HTTP request;
Judge whether the transmission speed is less than Preset Transfer speed;
If the transmission speed is less than the Preset Transfer speed, transport protocol is accelerated based on third party, is to IP address
The HTTP server of target ip address sends HTTP request.
The third aspect, the embodiment of the invention also provides a kind of terminal, operation has HTTP client in the terminal, including
Processor, communication interface, memory and communication bus, wherein processor, communication interface, memory are completed by communication bus
Mutual communication;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes request responding method described in first aspect.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable
Instruction is stored in storage medium, when run on a computer, so that computer executes request described in first aspect and rings
Induction method.
At the another aspect that the present invention is implemented, the embodiment of the invention also provides a kind of, and the computer program comprising instruction is produced
Product, when run on a computer, so that computer executes mark request responding method described in first aspect.
Technical solution provided in an embodiment of the present invention sends dns resolution to default dns server based on preset protocol and asks
It asks, wherein preset protocol is the agreement different from the dns resolution agreement of standard, and the probability that preset protocol is held as a hostage is lower;It is default
Dns server after obtaining dns resolution request, dns resolution can be requested in the domain name mapping that carries be target ip address,
And target ip address is sent to HTTP client;HTTP client can be to IP address after receiving target ip address
The HTTP server of target ip address sends HTTP request;After HTTP server receives the HTTP request, responds the HTTP and ask
It asks, obtains response results, and the response results are fed back into HTTP client.As it can be seen that the skill provided through the embodiment of the present invention
Art scheme can be improved HTTP client and obtain the probability of accurate IP address, and obtains the probability of accurate response results.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, 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 request responding method provided by the embodiment of the present invention;
Fig. 2 is a kind of structural schematic diagram for requesting responding device provided by the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of terminal provided by the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is described.
In order to solve the technical issues of recording in background technique, the embodiment of the invention provides a kind of request responding method,
Device and terminal obtain the probability of accurate IP address to improve HTTP client, and obtain the general of accurate response results
Rate.
In a first aspect, being applied to HTTP client, HTTP visitor the embodiment of the invention provides a kind of request responding method
Family end is run in the terminal.
As shown in Figure 1, request responding method provided by the embodiment of the present invention, may include steps of:
S110 sends dns resolution request to default dns server based on preset protocol, so that default dns server will
The domain name mapping carried in dns resolution request is target ip address, and target ip address is sent to HTTP client, wherein
Preset protocol is the agreement different from the dns resolution agreement of standard.
HTTP client is based on preset protocol and sends dns resolution request to default dns server, wherein preset protocol is
The agreement different from the dns resolution agreement of standard, the preset protocol can be the customized agreement of developer;Since this is default
Agreement is the customized agreement of developer, and therefore, the probability which is held as a hostage is lower.Default dns server is connecing
It can be accurate IP address, i.e. target by the domain name mapping carried in dns resolution request after receiving dns resolution request
IP address, and target ip address is sent to HTTP client.
Wherein, preset protocol can be the HTTP based on HTTP request mode, alternatively, the preset protocol can also be and be based on
The User Datagram Protocol UDP of UDP message format, this is all reasonable.
In one embodiment, the step of dns resolution is requested is sent to default dns server based on preset protocol, it can
To include:
When the dns server of criterion translates domain names into and fails for IP address, taken based on preset protocol to default DNS
Business device sends dns resolution request.
In this embodiment, HTTP client is requesting it to predetermined server transmission dns resolution based on preset protocol
Before, it can first measured dns resolution agreement be requested to the transmission dns resolution of the dns server of standard.
In practical applications, in one case, what the dns server that HTTP client is likely to be received standard was sent
Information such as " domain name mapping mistakes ", HTTP client can be determined that the dns server of standard translates domain names into as IP address at this time
Failure.HTTP client can send DNS solution to default dns server based on preset protocol to obtain accurate IP address
Analysis request.
In another case, HTTP client is likely to be received the IP address that the dns server of standard is sent, at this point,
HTTP client can send HTTP request to the HTTP server with the IP address, and HTTP server receives the HTTP and asks
After asking, the HTTP request can be responded, obtains response results, and the response results are sent to HTTP client, HTTP client
After termination receives the response results, it can be determined that whether the response results are intended response as a result, if the response results are not
Intended response is as a result, HTTP client can be determined that the dns server of standard translates domain names into as IP address failure at this time.HTTP
Client can send dns resolution request to default dns server based on preset protocol to obtain accurate IP address.
In order to scheme describe it is clear, by embodiment below to based on preset protocol to default dns server send DNS solution
The specific implementation of analysis request is described in detail.
S120 sends HTTP request to the HTTP server that IP address is target ip address, so that HTTP server is rung
HTTP request is answered, obtains response results, and the response results are fed back into the HTTP client.
HTTP client can be sent after obtaining target ip address to the HTTP server that IP address is target ip address
HTTP request, HTTP server can respond the HTTP request, obtain response results after obtaining HTTP request;And by the sound
Should result feed back to HTTP client.
In one embodiment, the step of sending HTTP request to the HTTP server that IP address is target ip address,
May include:
Monitor the transmission speed of HTTP request;
Judge whether transmission speed is less than Preset Transfer speed;
If transmission speed is less than Preset Transfer speed, transport protocol is accelerated based on third party, for Target IP to IP address
The HTTP server of location sends HTTP request.
In this embodiment, when sending HTTP request to HTTP server due to HTTP client, it is normally based on biography
Transport control protocol discusses TCP transmission, and the transmission speed based on TCP is slower under weak net environment, and HTTP client can monitor HTTP
The transmission speed of request, and judge whether transmission speed is less than Preset Transfer speed;If transmission speed is less than Preset Transfer speed
Degree, illustrates that the transmission speed based on TCP is slower, and therefore, HTTP client can accelerate transport protocol based on third party, to IP
Location is that the HTTP server of target ip address sends HTTP request, so as to increase the transmission rate of HTTP request, wherein the
It is UDT or KCP that tripartite, which accelerates transport protocol, this is all reasonable.
It should be noted that in practical applications, during HTTP client sends HTTP request to HTTP server,
HTTP request may also be held as a hostage, therefore, in one embodiment, in the step for the response results for receiving HTTP server feedback
After rapid, request responding method can also include:
Judge whether response results are intended response result;
If response results are not that intended response is asked as a result, sending HTTP to the HTTP server that IP address is target ip address
The step of asking may include:
HTTP cryptographic operations are executed to HTTP request, obtain encrypted HTTP request;
Encrypted HTTP request is sent to the HTTP server that IP address is target ip address, so that HTTP server
After receiving encrypted HTTP request, encrypted HTTP request is decrypted, the HTTP request after being decrypted;And
HTTP request after response decryption.
In this embodiment, after HTTP client receives the response results that HTTP server is fed back, it can be determined that ring
Answer whether result is intended response result;If response results are not intended responses as a result, illustrating HTTP client by HTTP
During request is sent to HTTP server, HTTP request is held as a hostage, and therefore, HTTP client can execute HTTP request
HTTP cryptographic operations obtain encrypted HTTP request, and send and add to the HTTP server that IP address is target ip address
HTTP request after close after HTTP server receives encrypted HTTP request, can be added using the head with HTTP client
It is close to operate corresponding decryption oprerations, encrypted HTTP request is decrypted, the HTTP request after being decrypted, and respond solution
HTTP request after close obtains response results, and the response results is fed back to HTTP client.
Wherein, HTTP client can be used customized Encryption Algorithm to grasp HTTP request HTTP encryptions of execution
Make, in this way, solution corresponding with customized Encryption Algorithm can be used after HTTP server receives encrypted HTTP request
Encrypted HTTP request is decrypted in close algorithm.
For example, HTTP client can execute HTTP cryptographic operations, HTTP to HTTP request using 3DES encryption mode
After server receives encrypted HTTP request, encrypted HTTP request can be solved using 3DES manner of decryption
It is close.The embodiment of the present invention executes the mode and HTTP server of HTTP cryptographic operations to HTTP client to HTTP request
The mode for executing decryption oprerations to encrypted HTTP request is not specifically limited.
It should be noted that the HTTP request after HTTP server response decryption can also be to sound after obtaining response results
Should result encrypted, obtain encrypted response results, and encrypted response results are fed back into HTTP client, HTTP
Client receives encrypted response results, encrypted response results can be decrypted, and then accurately rung
Answer result.
Seen from the above description, what is transmitted to HTTP server due to HTTP client is encrypted HTTP request, is added
During transmission, the probability be held as a hostage or distorted is lower for HTTP request after close, and therefore, HTTP client obtains accurately
Response results probability it is higher.Also, HTTP client is to execute HTTP cryptographic operations to HTTP request, reduces execution
Additional encryption and decryption operates consumed resource.
S130 receives the response results of HTTP server feedback.
After HTTP server obtains response results, to the HTTP client feedback response results, so that HTTP client can
To obtain response results.
Technical solution provided in an embodiment of the present invention sends dns resolution to default dns server based on preset protocol and asks
It asks, wherein preset protocol is the agreement different from the dns resolution agreement of standard, and the probability that preset protocol is held as a hostage is lower;It is default
Dns server after obtaining dns resolution request, dns resolution can be requested in the domain name mapping that carries be target ip address,
And target ip address is sent to HTTP client;HTTP client can be to IP address after receiving target ip address
The HTTP server of target ip address sends HTTP request;After HTTP server receives the HTTP request, responds the HTTP and ask
It asks, obtains response results, and the response results are fed back into HTTP client.As it can be seen that the skill provided through the embodiment of the present invention
Art scheme can be improved HTTP client and obtain the probability of accurate IP address, and obtains the probability of accurate response results.
In order to scheme describe it is clear, by embodiment below to based on preset protocol to default dns server send DNS solution
The specific implementation of analysis request is described in detail.
In one embodiment, preset protocol HTTP, predetermined server are HTTP dns server;
In this embodiment, the step of dns resolution is requested is sent to default dns server based on preset protocol, it can be with
Include:
Dns resolution request is sent to HTTP dns server based on HTTP, so that HTTP dns server receives DNS
After analysis request, the corresponding relationship based on domain name and IP address, determining target corresponding with domain name that is being carried in dns resolution request
IP address, and target ip address is sent to HTTP client.
In this embodiment, since preset protocol is HTTP, predetermined server is HTTP dns server, and HTTP
The corresponding relationship of domain name and IP address is stored in dns server, therefore, HTTP client can be based on HTTP to HTTP DNS
Server sends dns resolution request, and HTTP dns server, can be based on domain name with IP after receiving dns resolution request
The corresponding relationship of location searches the corresponding target ip address of domain name carried in dns resolution request, and target ip address is sent to
HTTP client.
Is for example, dns resolution requested are as follows: http://xxxx/d? dn=www.iqiyi.com, wherein xxxx is pre-
If dns server, www.iqiyi.com is the domain name to be parsed, Target IP corresponding with the domain name carried in dns resolution request
Address are as follows: 111.206.13.62;111.206.13.61.
In another embodiment, preset protocol is User Datagram Protocol UDP, and predetermined server is UDP DNS service
Device;
The step of dns resolution is requested is sent to default dns server based on preset protocol, may include:
Dns resolution request is sent to UDP dns server based on UDP, so that UDP dns server receives DNS solution
After analysis request, from obtained in the dns server of standard requested with dns resolution in the corresponding target ip address of the domain name that carries, and
Target ip address is sent to HTTP client.
In this embodiment, since preset protocol is User Datagram Protocol UDP, predetermined server is UDP DNS clothes
Business device, the UDP dns server, can be from acquisitions in the dns server of standard and dns resolution request as proxy server
The corresponding target ip address of the domain name of carrying.Therefore, HTTP client can send DNS solution to UDP dns server based on UDP
Analysis request, UDP dns server receive dns resolution request after, can the corresponding relationship based on domain name and IP address, search
The corresponding target ip address of domain name carried in dns resolution request, and target ip address is sent to HTTP client.
Second aspect, the embodiment of the invention provides a kind of request responding devices, as shown in Fig. 2, being applied to HTTP client
End, described device include:
Analysis request sending module 210, for sending dns resolution request to default dns server based on preset protocol, with
So that the default dns server by the dns resolution request in the domain name mapping that carries be target ip address, and by the mesh
Mark IP address is sent to the HTTP client, wherein the preset protocol is the association different from the dns resolution agreement of standard
View;
HTTP request sending module 220 sends HTTP request to the HTTP server that IP address is target ip address, so that
It obtains the HTTP server and responds the HTTP request, obtain response results, and the response results are fed back into the HTTP
Client;
Response results receiving module 230, for receiving the response results of the HTTP server feedback.
Optionally, the analysis request sending module, is specifically used for:
When the dns server of criterion translates domain names into and fails for IP address, taken based on preset protocol to default DNS
Business device sends dns resolution request.
Optionally, the preset protocol is HTTP, and the predetermined server is HTTP dns server;
The analysis request sending module, is specifically used for:
Dns resolution request is sent to HTTP dns server based on HTTP, so that the HTTP dns server receives
To after dns resolution request, the corresponding relationship based on domain name and IP address is determining corresponding with domain name that is carrying in dns resolution request
Target ip address, and the target ip address is sent to the HTTP client.
Optionally, the preset protocol is User Datagram Protocol UDP, and the predetermined server is UDP dns server;
The analysis request sending module, is specifically used for:
Dns resolution request is sent to UDP dns server based on UDP, so that the UDP dns server receives
After dns resolution request, from obtained in the dns server of standard requested with dns resolution in the domain name that carries corresponding Target IP
Location, and the target ip address is sent to the HTTP client.
Optionally, described device further include:
Response results judgment module, for the response results for receiving the HTTP server feedback the step of it
Afterwards, judge whether the response results are intended response result;
If the response results are not intended responses as a result, the HTTP request sending module, is specifically used for:
HTTP cryptographic operations are executed to HTTP request, obtain encrypted HTTP request;
Encrypted HTTP request is sent to the HTTP server that IP address is target ip address, so that the HTTP takes
Device be engaged in after receiving encrypted HTTP request, encrypted HTTP request is decrypted, the HTTP after being decrypted is asked
It asks;And the HTTP request after decryption is responded, response results are obtained, and the response results are fed back into HTTP client.
Optionally, the HTTP request sending module, is specifically used for:
Monitor the transmission speed of HTTP request;
Judge whether the transmission speed is less than Preset Transfer speed;
If the transmission speed is less than the Preset Transfer speed, transport protocol is accelerated based on third party, is to IP address
The HTTP server of target ip address sends HTTP request.
The third aspect, the embodiment of the invention also provides a kind of terminal, operation has HTTP client, such as Fig. 3 in the terminal
Shown, which may include processor 301, communication interface 302, memory 303 and communication bus 304, wherein processor
301, communication interface 302, memory 303 completes mutual communication by communication bus 304,
Memory 303, for storing computer program;
Processor 301 when for executing the program stored on memory 303, realizes that request described in first aspect is rung
Induction method.
The communication bus that above-mentioned terminal is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, abbreviation EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..
Only to be indicated with a thick line in figure, it is not intended that an only bus or a type of bus convenient for indicating.
Communication interface is for the communication between above-mentioned terminal and other equipment.
Memory may include random access memory (Random Access Memory, abbreviation RAM), also may include
Nonvolatile memory (non-volatile memory), 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,
Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor
(Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific
Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array,
Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Technical solution provided in an embodiment of the present invention sends dns resolution to default dns server based on preset protocol and asks
It asks, wherein preset protocol is the agreement different from the dns resolution agreement of standard, and the probability that preset protocol is held as a hostage is lower;It is default
Dns server after obtaining dns resolution request, dns resolution can be requested in the domain name mapping that carries be target ip address,
And target ip address is sent to HTTP client;HTTP client can be to IP address after receiving target ip address
The HTTP server of target ip address sends HTTP request;After HTTP server receives the HTTP request, responds the HTTP and ask
It asks, obtains response results, and the response results are fed back into HTTP client.As it can be seen that the skill provided through the embodiment of the present invention
Art scheme can be improved HTTP client and obtain the probability of accurate IP address, and obtains the probability of accurate response results.
Fourth aspect additionally provides a kind of computer readable storage medium in another embodiment provided by the invention, should
Instruction is stored in computer readable storage medium, when run on a computer, so that computer executes above-described embodiment
In any request responding method.
Technical solution provided in an embodiment of the present invention sends dns resolution to default dns server based on preset protocol and asks
It asks, wherein preset protocol is the agreement different from the dns resolution agreement of standard, and the probability that preset protocol is held as a hostage is lower;It is default
Dns server after obtaining dns resolution request, dns resolution can be requested in the domain name mapping that carries be target ip address,
And target ip address is sent to HTTP client;HTTP client can be to IP address after receiving target ip address
The HTTP server of target ip address sends HTTP request;After HTTP server receives the HTTP request, responds the HTTP and ask
It asks, obtains response results, and the response results are fed back into HTTP client.As it can be seen that the skill provided through the embodiment of the present invention
Art scheme can be improved HTTP client and obtain the probability of accurate IP address, and obtains the probability of accurate response results.
5th aspect, in another embodiment provided by the invention, additionally provides a kind of computer program comprising instruction
Product, when run on a computer, so that computer executes any request responding method in above-described embodiment.
Technical solution provided in an embodiment of the present invention sends dns resolution to default dns server based on preset protocol and asks
It asks, wherein preset protocol is the agreement different from the dns resolution agreement of standard, and the probability that preset protocol is held as a hostage is lower;It is default
Dns server after obtaining dns resolution request, dns resolution can be requested in the domain name mapping that carries be target ip address,
And target ip address is sent to HTTP client;HTTP client can be to IP address after receiving target ip address
The HTTP server of target ip address sends HTTP request;After HTTP server receives the HTTP request, responds the HTTP and ask
It asks, obtains response results, and the response results are fed back into HTTP client.As it can be seen that the skill provided through the embodiment of the present invention
Art scheme can be improved HTTP client and obtain the probability of accurate IP address, and obtains the probability of accurate response results.
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 invention.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,
For electronic equipment, storage medium and computer program product embodiments, since it is substantially similar to the method embodiment, so retouching
That states is fairly simple, and the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (13)
1. a kind of request responding method, which is characterized in that be applied to HTTP client, which comprises
Dns resolution request is sent to default dns server based on preset protocol, so that the default dns server will be described
The domain name mapping carried in dns resolution request is target ip address, and the target ip address is sent to the HTTP client
End, wherein the preset protocol is the agreement different from the dns resolution agreement of standard;
HTTP request is sent to the HTTP server that IP address is target ip address, so that described in HTTP server response
HTTP request obtains response results, and the response results is fed back to the HTTP client;
Receive the response results of the HTTP server feedback.
2. the method according to claim 1, wherein described sent based on preset protocol to default dns server
The step of dns resolution is requested, comprising:
When the dns server of criterion translates domain names into and fails for IP address, preset protocol is based on to default dns server
Send dns resolution request.
3. the predetermined server is the method according to claim 1, wherein the preset protocol is HTTP
HTTP dns server;
It is described that the step of dns resolution is requested is sent to default dns server based on preset protocol, comprising:
Dns resolution request is sent to HTTP dns server based on HTTP, so that the HTTP dns server receives DNS
After analysis request, the corresponding relationship based on domain name and IP address, determining target corresponding with domain name that is being carried in dns resolution request
IP address, and the target ip address is sent to the HTTP client.
4. the method according to claim 1, wherein the preset protocol be User Datagram Protocol UDP, it is described
Predetermined server is UDP dns server;
It is described that the step of dns resolution is requested is sent to default dns server based on preset protocol, comprising:
Dns resolution request is sent to UDP dns server based on UDP, so that the UDP dns server receives DNS solution
After analysis request, from obtained in the dns server of standard requested with dns resolution in the corresponding target ip address of the domain name that carries, and
The target ip address is sent to the HTTP client.
5. the method according to claim 1, wherein in the response knot for receiving the HTTP server feedback
After the step of fruit, the method also includes:
Judge whether the response results are intended response result;
If the response results are not intended responses as a result, described send to the HTTP server that IP address is target ip address
The step of HTTP request, comprising:
HTTP cryptographic operations are executed to HTTP request, obtain encrypted HTTP request;
Encrypted HTTP request is sent to the HTTP server that IP address is target ip address, so that the HTTP server
After receiving encrypted HTTP request, encrypted HTTP request is decrypted, the HTTP request after being decrypted;And
HTTP request after response decryption, obtains response results, and the response results are fed back to HTTP client.
6. method according to any one of claims 1 to 5, which is characterized in that it is described to IP address be target ip address
HTTP server sends the step of HTTP request, comprising:
Monitor the transmission speed of HTTP request;
Judge whether the transmission speed is less than Preset Transfer speed;
If the transmission speed is less than the Preset Transfer speed, transport protocol is accelerated based on third party, is target to IP address
The HTTP server of IP address sends HTTP request.
7. a kind of request responding device, which is characterized in that be applied to HTTP client, described device includes:
Analysis request sending module, for sending dns resolution request to default dns server based on preset protocol, so that institute
It is target ip address that default dns server, which is stated, by the domain name mapping carried in dns resolution request, and by the Target IP
Location is sent to the HTTP client, wherein the preset protocol is the agreement different from the dns resolution agreement of standard;
HTTP request sending module sends HTTP request to the HTTP server that IP address is target ip address, so that described
HTTP server responds the HTTP request, obtains response results, and the response results are fed back to the HTTP client;
Response results receiving module, for receiving the response results of the HTTP server feedback.
8. device according to claim 7, which is characterized in that the analysis request sending module is specifically used for:
When the dns server of criterion translates domain names into and fails for IP address, preset protocol is based on to default dns server
Send dns resolution request.
9. device according to claim 7, which is characterized in that the preset protocol is HTTP, and the predetermined server is
HTTP dns server;
The analysis request sending module, is specifically used for:
Dns resolution request is sent to HTTP dns server based on HTTP, so that the HTTP dns server receives DNS
After analysis request, the corresponding relationship based on domain name and IP address, determining target corresponding with domain name that is being carried in dns resolution request
IP address, and the target ip address is sent to the HTTP client.
10. device according to claim 7, which is characterized in that the preset protocol is User Datagram Protocol UDP, institute
Stating predetermined server is UDP dns server;
The analysis request sending module, is specifically used for:
Dns resolution request is sent to UDP dns server based on UDP, so that the UDP dns server receives DNS solution
After analysis request, from obtained in the dns server of standard requested with dns resolution in the corresponding target ip address of the domain name that carries, and
The target ip address is sent to the HTTP client.
11. device according to claim 7, which is characterized in that described device further include:
Response results judgment module is sentenced after the response results for receiving the HTTP server feedback the step of
Whether the response results of breaking are intended response result;
If the response results are not intended responses as a result, the HTTP request sending module, is specifically used for:
HTTP cryptographic operations are executed to HTTP request, obtain encrypted HTTP request;
Encrypted HTTP request is sent to the HTTP server that IP address is target ip address, so that the HTTP server
After receiving encrypted HTTP request, encrypted HTTP request is decrypted, the HTTP request after being decrypted;And
HTTP request after response decryption, obtains response results, and the response results are fed back to HTTP client.
12. according to the described in any item devices of claim 7 to 11, which is characterized in that the HTTP request sending module, specifically
For:
Monitor the transmission speed of HTTP request;
Judge whether the transmission speed is less than Preset Transfer speed;
If the transmission speed is less than the Preset Transfer speed, transport protocol is accelerated based on third party, is target to IP address
The HTTP server of IP address sends HTTP request.
13. a kind of terminal, which is characterized in that operation has a HTTP client in the terminal, including processor, communication interface, deposits
Reservoir and communication bus, 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 method and step of claim 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910300213.9A CN110113440B (en) | 2019-04-15 | 2019-04-15 | Request response method, device and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910300213.9A CN110113440B (en) | 2019-04-15 | 2019-04-15 | Request response method, device and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110113440A true CN110113440A (en) | 2019-08-09 |
CN110113440B CN110113440B (en) | 2022-06-03 |
Family
ID=67483863
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910300213.9A Active CN110113440B (en) | 2019-04-15 | 2019-04-15 | Request response method, device and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110113440B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111343299A (en) * | 2020-03-12 | 2020-06-26 | 宋磊 | Multi-protocol active detection type intelligent DNS and method thereof |
CN111917511A (en) * | 2020-07-06 | 2020-11-10 | 青岛海尔科技有限公司 | Data receiving method |
CN111931083A (en) * | 2020-06-30 | 2020-11-13 | 北京奇艺世纪科技有限公司 | Webpage loading method and device, terminal equipment and readable storage medium |
CN114051016A (en) * | 2022-01-12 | 2022-02-15 | 满金坝(深圳)科技有限公司 | IP intelligent matching method of mobile terminal in HTTP request and mobile terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102904959A (en) * | 2012-10-19 | 2013-01-30 | 李恺 | Network accelerating method and gateway |
US20150237158A1 (en) * | 2012-03-31 | 2015-08-20 | Beijing Qihoo Technology Company Limited | Method and system for accessing website |
CN104994079A (en) * | 2015-06-10 | 2015-10-21 | 网宿科技股份有限公司 | Access request processing method, access request processing device and acceleration server |
CN105100294A (en) * | 2014-05-20 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Webpage acquiring method, system, network server, browser and GSLB |
CN108574660A (en) * | 2017-03-09 | 2018-09-25 | 武汉斗鱼网络科技有限公司 | A kind of method and system obtaining IP address |
CN109413219A (en) * | 2017-08-15 | 2019-03-01 | 广州市动景计算机科技有限公司 | A kind of domain name analytic method and device, server and storage medium |
-
2019
- 2019-04-15 CN CN201910300213.9A patent/CN110113440B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150237158A1 (en) * | 2012-03-31 | 2015-08-20 | Beijing Qihoo Technology Company Limited | Method and system for accessing website |
CN102904959A (en) * | 2012-10-19 | 2013-01-30 | 李恺 | Network accelerating method and gateway |
CN105100294A (en) * | 2014-05-20 | 2015-11-25 | 阿里巴巴集团控股有限公司 | Webpage acquiring method, system, network server, browser and GSLB |
CN104994079A (en) * | 2015-06-10 | 2015-10-21 | 网宿科技股份有限公司 | Access request processing method, access request processing device and acceleration server |
CN108574660A (en) * | 2017-03-09 | 2018-09-25 | 武汉斗鱼网络科技有限公司 | A kind of method and system obtaining IP address |
CN109413219A (en) * | 2017-08-15 | 2019-03-01 | 广州市动景计算机科技有限公司 | A kind of domain name analytic method and device, server and storage medium |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111343299A (en) * | 2020-03-12 | 2020-06-26 | 宋磊 | Multi-protocol active detection type intelligent DNS and method thereof |
CN111343299B (en) * | 2020-03-12 | 2022-07-05 | 宋磊 | Multi-protocol active detection type intelligent DNS and method thereof |
CN111931083A (en) * | 2020-06-30 | 2020-11-13 | 北京奇艺世纪科技有限公司 | Webpage loading method and device, terminal equipment and readable storage medium |
CN111931083B (en) * | 2020-06-30 | 2023-07-25 | 北京奇艺世纪科技有限公司 | Webpage loading method and device, terminal equipment and readable storage medium |
CN111917511A (en) * | 2020-07-06 | 2020-11-10 | 青岛海尔科技有限公司 | Data receiving method |
CN111917511B (en) * | 2020-07-06 | 2024-01-30 | 青岛海尔科技有限公司 | Data receiving method |
CN114051016A (en) * | 2022-01-12 | 2022-02-15 | 满金坝(深圳)科技有限公司 | IP intelligent matching method of mobile terminal in HTTP request and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN110113440B (en) | 2022-06-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110113440A (en) | A kind of request responding method, device and terminal | |
US10027564B2 (en) | Unobtrusive methods and systems for collecting information transmitted over a network | |
US20180332453A1 (en) | Contextual deep linking of applications | |
US9648033B2 (en) | System for detecting the presence of rogue domain name service providers through passive monitoring | |
US11316948B2 (en) | Exit node benchmark feature | |
CN107463453B (en) | Method, device, equipment and storage medium for communication between different applications of same terminal | |
CN108259425A (en) | The determining method, apparatus and server of query-attack | |
US20150058469A1 (en) | Monitoring NAT Behaviors Through URI Dereferences in Web Browsers | |
CN107231402A (en) | HTTP request processing method, apparatus and system | |
CN107360261A (en) | A kind of HTTP request processing method, device and electronic equipment | |
CN108270882A (en) | The analysis method and device of domain name, storage medium, electronic device | |
CN106341438A (en) | Request processing method and device | |
CN109787951A (en) | A kind of network data access method, device and electronic equipment | |
US8949952B2 (en) | Multi-stack subscriber sign on | |
CN106412975B (en) | A kind of test method and device of content charging loophole | |
CN106131165B (en) | Anti-stealing link method and device for content distributing network | |
US20100293257A1 (en) | Actively updating clients with selected data | |
CN112565406B (en) | Gray release method, gray release system and electronic equipment | |
WO2019134219A1 (en) | Webpage advertisement anti-shielding method, content distribution network and client | |
CN110120971A (en) | A kind of gray scale dissemination method, device and electronic equipment | |
US20090259666A1 (en) | Unobtrusive methods and systems for collecting information transmitted over a network | |
US20180212923A1 (en) | Domain name system network traffic management | |
CN108089972A (en) | interface test method and device | |
CN109194706A (en) | Internet resources dial testing method and terminal | |
CN109446445A (en) | A kind of resource acquiring method and device |
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 |