CN107070988A - Message processing method and device - Google Patents
Message processing method and device Download PDFInfo
- Publication number
- CN107070988A CN107070988A CN201710127642.1A CN201710127642A CN107070988A CN 107070988 A CN107070988 A CN 107070988A CN 201710127642 A CN201710127642 A CN 201710127642A CN 107070988 A CN107070988 A CN 107070988A
- Authority
- CN
- China
- Prior art keywords
- domain name
- record
- response messages
- dns response
- 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.)
- Pending
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
-
- 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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiments of the invention provide a kind of message processing method and device.In embodiments of the present invention, the DNS request message that receiving terminal is sent, DNS request message carries the first domain name of webpage to be visited;Calculate the HASH values of the first domain name;The record for the HASH values for including calculating is searched in the default message list being locally stored;If finding the record of the HASH values of the first domain name including calculating in default message list, without obtaining DNS response messages from domain name resolution server, the DNS response messages in the record locally found are directly sent to terminal.So as to save the Internet resources between proxy server and domain name resolution server, and do not influenceed by the communication connection between proxy server and domain name resolution server, then avoid reducing the acquisition efficiency for obtaining DNS response messages because the communication connection between proxy server and domain name resolution server is unstable.
Description
Technical field
The present embodiments relate to field of computer technology, more particularly to a kind of message processing method and device.
Background technology
Domain name resolution server provides the information that webpage domain name is mutually changed with IP address for people, is internet system
One basic technology facility, which is that people are daily, browses indispensable part during webpage.
At present, when user's webpage a certain using terminal access, user can input the domain of webpage to be visited in the terminal
Name, for example, when user needs the homepage for browsing Baidu, the domain name of the homepage of Baidu can be inputted in the terminal
" www.baidu.com ", terminal obtains the domain name of the webpage to be visited of user's input, and generates DNS (Domain Name
System, domain name system) request message, the domain name of webpage to be visited is carried in DNS request message, is then turned to proxy server
DNS request message is sent out, so that proxy server forwards DNS request message to domain name resolution server, domain name resolution server is obtained
The domain name according to the webpage is taken, IP address (the Internet Protocol of the web page server for the webpage that is stored with are obtained
Address, Internet protocol address), and domain name and the IP address generation DNS response reports of web page server according to the webpage
Text, then sends the DNS response messages, proxy server is after the DNS response messages are received, by this to proxy server
DNS response messages are forwarded to terminal;Terminal receives the DNS response messages, and then the web service in the DNS response messages
The IP address of device obtains the webpage from web page server, and shows the webpage on screen, so that user browses.
However, it is found by the inventors that, there is following defect in prior art:
Terminal is during DNS response messages are obtained, and terminal needs to carry out data friendship twice between proxy server
Mutually, and between proxy server needs and domain name resolution server data interaction twice is also carried out, causes terminal obtaining DNS sound
More Internet resources can be expended during answering message, and it is less efficient to obtain the acquisition of DNS response messages.
The content of the invention
To overcome problem present in correlation technique, the embodiment of the present invention provides a kind of message processing method and device.
First aspect according to embodiments of the present invention is there is provided a kind of message processing method, applied to proxy server, described
Method includes:
The domain name system DNS request message that receiving terminal is sent, the DNS request message carries the first of webpage to be visited
Domain name;
Calculate the HASH values of first domain name;
Being searched in the default message list being locally stored includes the record of the HASH values, and the default message list is deposited
Having stored up in a plurality of record, each record at least includes a HASH value and a DNS response message;And different records includes
HASH values it is different with DNS response messages;
If finding the record of the HASH values including first domain name, to the note found described in terminal transmission
DNS response messages in record.
Further, methods described also includes:
If not finding the record of the HASH values including first domain name, send described to domain name resolution server
DNS request message;
Receive the DNS response messages that domain name resolution server is returned according to the DNS request message;
To the DNS response messages received described in terminal transmission;
The HASH values of first domain name are constituted into a record with the DNS response messages received, and are stored in
In the default message list.
Further, methods described also includes:
When the residue of the data stored in each response field is obtained from the DNS response messages received effectively
It is long;
In all remaining effective times of the acquisition, most short remaining effective time is selected, and be used as described receive
The remaining effective time of the DNS response messages arrived;
The remaining effective time of the DNS response messages received is stored in the record of composition.
Further, methods described also includes:
While the DNS response messages into the record found described in terminal transmission, sent to the terminal
Remaining effective time in the record found.
Further, methods described also includes:
According to the proxy server it is local at the time of, in the default message list, constituted described in real-time update
The remaining effective time of the DNS response messages received in record;And when the reception DNS response messages it is surplus
When remaining effective time is zero, the record of composition is deleted from the default message list.
Second aspect according to embodiments of the present invention is there is provided a kind of message process device, applied to proxy server, described
Device includes:
First receiving module, the domain name system DNS request message sent for receiving terminal, the DNS request message is taken
The first domain name with webpage to be visited;
Computing module, the HASH values for calculating first domain name;
Searching modul, includes the record of the HASH values for being searched in the default message list being locally stored, described
Default message list, which is stored in a plurality of record, each record, at least includes a HASH value and a DNS response message;And
The HASH values that different records includes are different with DNS response messages;
First sending module, if the record for finding the HASH values including first domain name, to the terminal
DNS response messages in the record found described in sending.
Further, described device also includes:
Second sending module, if the record for not finding the HASH values including first domain name, to domain name
Resolution server sends the DNS request message;
Second receiving module, rings for receiving the DNS that domain name resolution server is returned according to the DNS request message
Answer message;
3rd sending module, for the DNS response messages that receive described in being sent to the terminal;
First memory module, for the HASH values of first domain name to be constituted with the DNS response messages received
One record, and be stored in the default message list.
Further, described device also includes:
Acquisition module, for obtaining the number stored in each response field from the DNS response messages received
According to remaining effective time;
Selecting module, in all remaining effective times of the acquisition, selecting most short remaining effective time, and
It is used as the remaining effective time of the DNS response messages received;
Second memory module, for the remaining effective time of the DNS response messages received to be stored in into composition
In record.
Further, described device also includes:
4th sending module, for the same of the DNS response messages in the record found described in being sent to the terminal
When, the remaining effective time into the record found described in terminal transmission.
Further, described device also includes:
Update module, for according to the proxy server it is local at the time of, in the default message list, in real time more
The remaining effective time of the DNS response messages received in the record of the new composition;Removing module, for when described
When the remaining effective time of the DNS response messages of reception is zero, the record of composition is deleted from the default message list.
Technical scheme provided in an embodiment of the present invention can include the following benefits:
In embodiments of the present invention, the DNS request message that receiving terminal is sent, DNS request message carries webpage to be visited
The first domain name;Calculate the HASH values of the first domain name;Being searched in the default message list being locally stored includes what is calculated
The record of HASH values;If finding the record of the HASH values of the first domain name including calculating in default message list,
Without obtaining DNS response messages from domain name resolution server, directly the DNS in the record locally found is responded and reported
Text is sent to terminal.So as to save the Internet resources between proxy server and domain name resolution server, and do not taken by agency
The influence for the communication connection being engaged between device and domain name resolution server, is then avoided due to proxy server and domain name resolution service
Communication connection between device is unstable and reduces the acquisition efficiency for obtaining DNS response messages.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not
The embodiment of the present invention can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the present invention
Example, and be used to together with specification to explain the principle of the embodiment of the present invention.
Fig. 1 is a kind of structural representation of message handling system according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of message processing method according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of message processing method according to an exemplary embodiment;
Fig. 4 is a kind of structural representation of message process device according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the embodiment of the present invention.On the contrary, they be only with
As be described in detail in the appended claims, embodiment of the present invention some in terms of consistent apparatus and method example.
Fig. 1 is a kind of structural representation of message handling system according to an exemplary embodiment, as shown in figure 1,
The system includes terminal 1, proxy server 2 and name server 3.Communicated to connect between terminal 1 and proxy server 2, terminal 1
Data interaction can be realized by communication connection therebetween between proxy server 2;Proxy server 2 and domain name service
Communicated to connect between device 3.Number can be realized by communication connection therebetween between proxy server 2 and name server 3
According to interaction.
Fig. 2 is a kind of flow chart of message processing method according to an exemplary embodiment, as shown in Fig. 2 the party
Method is used in proxy server 2 as shown in Figure 1, and this method comprises the following steps.
In step S101, the DNS request message that receiving terminal is sent, DNS request message carries the of webpage to be visited
One domain name;
In embodiments of the present invention, user is generally surfed the Net using terminal, when user needs to utilize a certain webpage of terminal access
When, user needs to input the domain name of the webpage in the terminal first, for example, www.baidu.com or www.taobao.com
Deng.Terminal obtains the domain name of the webpage of user's input, and is obtained and deposit from domain name resolution server according to the domain name of the webpage
IP (Internet Protocol Address, Internet protocol address) address of the web page server of the webpage is contained, and then
IP address further according to web page server obtains the webpage from web page server, and shows on the screen of terminal the webpage,
So that user browses.
Wherein, in order to the webpage of the webpage that is stored with is obtained from domain name resolution server according to the domain name of the webpage
The IP address of server, terminal needs to generate DNS request message according to the domain name of the webpage, and is sent to domain name resolution server
DNS request message;So that the domain Name acquisition net for the webpage that domain name resolution server will be carried according to the first DNS request message
The IP address of page server, and IP address and the domain name generation DNS response messages of the webpage according to web page server, Ran Houxiang
Terminal returns to DNS response messages;Terminal extracts the IP address of web page server from DNS response messages again afterwards.
In embodiments of the present invention, terminal to domain name resolution server send DNS request message when, it is necessary to first by DNS
Request message is sent to proxy server, and then DNS request message is forwarded to domain name resolution server by proxy server again.Phase
Ying Di, domain name resolution server takes when returning to DNS response messages to terminal, it is necessary to first send DNS response messages to agency
Business device, and then DNS response messages are forwarded to terminal by proxy server again.
Therefore, in embodiments of the present invention, when terminal needs to access a certain webpage, it will send and take to proxy server
The DNS request message of domain name with the webpage, the domain name that proxy server carries the webpage in receive terminal transmission one
DNS request message after, DNS response messages will be obtained from domain name resolution server, carries and deposits in the DNS response messages
The IP address of the web page server of the webpage and the domain name of the webpage are contained, and the DNS response messages are returned to terminal.
If terminal also needs to access the webpage afterwards, terminal can also send the DNS request message to proxy server,
Proxy server is still required for obtaining the DNS response messages from domain name resolution server, and returns to DNS response reports to terminal
Text, terminal receives the DNS response messages again.
But, the process that proxy server obtains the DNS response messages from domain name resolution server is:
Proxy server forwards the DNS request message to domain name resolution server;Domain name resolution server receives the DNS please
Seek message, and the webpage carried according to the DNS request message domain Name acquisition be stored with the webpage web page server IP
Address, the IP address of web page server and the domain name of the webpage further according to the webpage generate the DNS response messages, and to agency
Server returns to the DNS response messages;Proxy server receives the DNS response messages that domain name resolution server is returned.
During the entire process of the DNS response messages are obtained from domain name resolution server, proxy server needs and domain
Name resolution server carries out data interaction twice, can expend network money more between proxy server and domain name resolution server
Source, and communication connection between proxy server and domain name resolution server it is unstable when, it may be necessary to expend more time
Proxy server can just receive the DNS response messages of domain name resolution server return, cause to obtain the DNS response messages
Obtain less efficient.
Therefore, if the DNS request message of the carrying of the terminal transmission domain name is received again afterwards, in order to carry
The network that height obtains the acquisition efficiency of the DNS response messages and saved between proxy server and domain name resolution server is provided
Source, when proxy server receives the DNS response messages of name server return, except forwarding the DNS to respond to terminal
Outside message, proxy server can also calculate the HASH values of the domain name of the webpage, then by HASH values and the DNS response message groups
Into a record, and store in the default message list being locally stored.
In this way, in embodiments of the present invention, when the DNS request message for receiving the first domain name for carrying webpage to be visited
When, proxy server performs step S102 without directly forwarding the DNS request message to domain name resolution server:Calculate
The HASH values for the first domain name that the DNS request message is carried;Then step S103 is performed.
In step s 102, the HASH values of the first domain name are calculated;
In embodiments of the present invention, can according to HASH algorithms or MD5 (Message Digest Algorithm 5,
Message Digest Algorithm 5) algorithm calculates the HASH values of the first domain name, of the invention that this is not limited.Wherein, it is different
The HASH values of domain name are different.
In step s 103, the record for the HASH values for including calculating is searched in the default message list being locally stored;
In embodiments of the present invention, at least one record, each are stored in the default message list being locally stored
At least include a HASH value and a DNS response message in record;And the HASH values that include of different records and DNS response reports
It is literary different.
For presetting the HASH values in any one record in message list, the record with being taken in the DNS response messages
The HASH values of at least one domain name of band are identical, same for presetting other each record in message list.
If the record of the HASH values of the first domain name including calculating is found in default message list, in step
In S104, the DNS response messages in the record found are sent to terminal.
In embodiments of the present invention, in default message list including the record of the HASH values of the first domain name calculated
In, also there is DNS response messages, the domain name of webpage to be visited is at least carried in the DNS response messages in the record and is stored with
Treating in the DNS response messages is visited according to HASH values in the IP address of the web page server of webpage to be visited, and the record
Ask that the domain name of webpage calculates what is obtained.
Further, after the DNS response messages during proxy server sends the record found to terminal, terminal
The DNS response messages of proxy server transmission will be received, are extracted in the DNS response messages then sent from proxy server
Go out the IP address of the web page server for the webpage to be visited that is stored with, and according to the IP address of web page server from web page server
Webpage to be visited is obtained, and then webpage to be visited is shown on the screen of terminal, so that user browses webpage to be visited.
In embodiments of the present invention, the DNS request message that receiving terminal is sent, DNS request message carries webpage to be visited
The first domain name;Calculate the HASH values of the first domain name;Being searched in the default message list being locally stored includes what is calculated
The record of HASH values;If finding the record of the HASH values of the first domain name including calculating in default message list,
Without obtaining DNS response messages from domain name resolution server, directly the DNS in the record locally found is responded and reported
Text is sent to terminal.So as to save the Internet resources between proxy server and domain name resolution server, and do not taken by agency
The influence for the communication connection being engaged between device and domain name resolution server, is then avoided due to proxy server and domain name resolution service
Communication connection between device is unstable and reduces the acquisition efficiency for obtaining DNS response messages.
Further, if not finding the note of the HASH values of the first domain name including calculating in default message list
Record, then proxy server can not just perform step S104, and then terminal can not just obtain being stored with the webpage clothes of webpage to be visited
Be engaged in device IP address, also can not just obtain webpage to be visited and be browsed for user, therefore, do not find including calculate first
In the case of the record of the HASH values of domain name, browsed to enable the terminal to obtain webpage to be visited for user, referring to Fig. 3,
This method also includes:
If not finding the record of the HASH values including the first domain name in default message list, in step s 201,
The DNS request message is sent to domain name resolution server;
If not finding the record of the HASH values including the first domain name in default message list, before illustrating not
The DNS message requests for the first domain name for carrying webpage to be visited were received, that is, being this time to receive carrying net to be visited first
The DNS message requests of first domain name of page, accordingly, it would be desirable to the DNS request message be sent to domain name resolution server, so that domain name
The domain name for the webpage to be visited that resolution server is carried according to DNS request message, obtains the webpage clothes for the webpage to be visited that is stored with
The IP address of business device, and IP address and the domain name generation DNS response messages of webpage to be visited according to web page server, Yi Jixiang
Proxy server returns to the DNS response messages of generation.
In step S202, the DNS response messages that domain name resolution server is returned according to the DNS request message are received;
In step S203, the DNS response messages received are sent to terminal;
Further, after proxy server sends the DNS response messages received to terminal, terminal will be received
Storage is extracted in the DNS response messages that proxy server is sent, the DNS response messages then sent from proxy server to need
The IP address of the web page server of webpage is accessed, and obtains to be visited from web page server according to the IP address of web page server
Webpage, and then webpage to be visited is shown on the screen of terminal, so that user browses webpage to be visited.
Further, if receiving the DNS request message of terminal transmission again afterwards, it is somebody's turn to do in order to improve to obtain
The acquisition efficiency of DNS response messages and the Internet resources saved between proxy server and domain name resolution server, agency's clothes
The HASH values of first domain name and the DNS response messages received can also be constituted one and record by device of being engaged in, and be stored in and locally deposited
In the default message list of storage.In this way, when receiving the DNS request message of terminal transmission again after, it is possible to according to
Above-mentioned steps S101~step S104 flow gets the DNS response messages, and obtaining for the DNS response messages is obtained so as to improve
Take efficiency and the Internet resources saved between proxy server and domain name resolution server.
In an alternative embodiment of the invention, sometimes a webpage includes multiple domain names, that is, by multiple domain names all
The webpage can be accessed, for example, the domain name of the homepage of Baidu includes www.baidu.com and www.a.shifen.com
Deng.
And, it is generally the case that terminal can utilize IPV4 agreements or IPV6 protocol access webpage to be visited, however, net
IP address of the page server in IPV4 agreements is different from the IP address in IPV6 agreements, can in order that obtaining terminal energy
Unrestricted choice IPV4 agreements or IPV6 protocol access webpage to be visited, in embodiments of the present invention, domain name resolution server exists
, can be according to IP address of the web page server in IPV4 agreements, web page server in IPV6 agreements when generating DNS response messages
IP address, the second domain name of the first domain name of webpage to be visited and webpage to be visited generation DNS response messages.
Therefore, in an alternative embodiment of the invention, the DNS response messages received include multiple response fields, each
Be stored with data in response field, and the data stored in each response field are provided with remaining effective time,
Stored for example, being stored in a response field in the second domain name of webpage to be visited, another response field
IP address of the webpage to be visited in IPV4 agreements, and have in a response field and store webpage to be visited in IPV6 agreements
In IP address etc..
And, the IP address and web page server of the second domain name, web page server of webpage to be visited in IPV4 agreements exist
IP address in IPV6 agreements is each provided with remaining effective time respectively.
Wherein, IP of the remaining effective time, web page server of the second domain name of webpage to be visited in IPV4 agreements
The remaining effective time of IP address of the remaining effective time of location with web page server in IPV6 agreements may be identical, can also
It is different.
Wherein, before the remaining effective time of the IP address in web page server in IPV6 agreements reaches zero, terminal can
To obtain webpage to be visited from web page server by IP address of the web page server in IPV6 agreements, once web service
When IP address of the device in IPV6 agreements reaches zero, the second domain name of IP address of the web page server in IPV6 agreements is to lose
Effect, terminal just can not obtain net to be visited by IP address of the web page server in IPV6 agreements from web page server again
Page.
Secondly, before the remaining effective time of IP address of the web page server in IPV4 agreements reaches zero, terminal can
To obtain webpage to be visited from web page server by IP address of the web page server in IPV4 agreements, once web service
When IP address of the device in IPV4 agreements reaches zero, the second domain name of IP address of the web page server in IPV4 agreements is to lose
Effect, terminal just can not obtain net to be visited by IP address of the web page server in IPV4 agreements from web page server again
Page.
And, before the remaining effective time of the second domain name of webpage to be visited reaches zero, terminal can be by waiting to visit
The second domain name access webpage to be visited of webpage is asked, once the remaining effective time of the second domain name of webpage to be visited reaches zero
When, the second domain name of webpage to be visited is failure, and terminal just can not be to be visited by the second domain name access of webpage to be visited again
Webpage.
Sometimes, the DNS response messages that terminal can return to proxy server are buffered in terminal local, so, instantly
When one time terminal needs to access webpage to be visited, if the DNS response messages have been locally stored, terminal is just without again from agency
The DNS response messages are obtained in server, directly from locally can just getting the DNS response messages, and then DNS sound are obtained
IP address and web page server IP address in IPV6 agreement of the web page server in message in IPV4 agreements is answered, then
Taken according to IP address or web page server IP address in IPV6 agreement of the web page server in IPV4 agreements from webpage
Webpage to be visited is obtained in business device.
If however, the second domain name failure of webpage to be visited, illustrates that the second domain name of web page server is altered, eventually
Hold the second domain name in the DNS response messages can not access webpage to be visited.
If IP address failure of the web page server in IPV4 agreements, illustrates IP of the web page server in IPV4 agreements
Address has been changed to other addresses, and terminal is from the web page server in the DNS response messages of caching in IPV4 agreements
IP address can not obtain webpage to be visited from web page server.
If IP address failure of the web page server in IPV6 agreements, illustrates IP of the web page server in IPV6 agreements
Address has been changed to other addresses, and terminal is from the web page server in the DNS response messages of caching in IPV6 agreements
IP address can not obtain webpage to be visited from web page server.
However, the IP address in IPV4 agreement of the terminal according to failure or the IP address in the IPV6 agreements of failure from
When obtaining webpage to be visited not successfully in web page server, flow will be terminated.It is known that user can not browse webpage to be visited.
Therefore, in order to ensure that user can browse through webpage to be visited, in embodiments of the present invention, proxy server need from
The remaining effective time of the data stored in each response field is obtained in the DNS response messages received;In the institute of acquisition
Have in remaining effective time, select most short remaining effective time, and when effective as the residue of the DNS response messages received
It is long;The remaining effective time of the DNS response messages received is stored in the record of composition.
For example, obtaining the residue of the IP address of the remaining effective time, web page server of the second domain name in IPV4 agreements
The remaining effective time of the IP address of effective time and web page server in IPV6 agreements;It is effective in the residue of the second domain name
The remaining effective time and the remaining effective time of the IP address in IPV6 agreements of duration, IP address in IPV4 agreements
It is middle to select most short remaining effective time, and it is used as the remaining effective time of the DNS response messages received;By what is received
The remaining effective time of DNS response messages is stored in the record of composition.
In this way, while the DNS response messages during proxy server sends the record found to terminal, in addition it is also necessary to
The remaining effective time in the record found is sent to terminal.So that terminal is effective by the DNS response messages and the residue
Duration constitutes a corresponding relation being recorded and stored between the DNS response messages of terminal local storage and remaining effective time
In.
Secondly, terminal updates pair between DNS response messages and remaining effective time in real time according to local current time
Remaining effective time in should being related to, and when the corresponding remaining effective time of the NDS response messages reaches zero, then rung from DNS
Answer in the corresponding relation between message and remaining effective time and delete the record.Afterwards, if also to access webpage to be visited, by
The record is deleted in corresponding relation between local DNS response messages and remaining effective time, accordingly, it would be desirable to
New DNS response messages are reacquired from proxy server according to the first domain name of webpage to be visited, so as to ensure that user
It can browse through webpage to be visited.
Further, proxy server according to proxy server it is local at the time of, in default message list, real-time update
The remaining effective time of the DNS response messages received in the record of composition;And when the residue of the DNS response messages received
When effective time is zero, the record of composition is deleted from default message list.
In embodiments of the present invention, when the remaining effective time of the DNS response messages of reception is zero, reception should
DNS response messages are invalid, also just without continuing to store the DNS response messages received local, therefore, in order to save
The local memory space of proxy server is, it is necessary to delete the record of composition in default message list.
Fig. 4 is a kind of structural representation of message process device according to an exemplary embodiment.Reference picture 4, should
Device includes:
First receiving module 11, the domain name system DNS request message sent for receiving terminal, the DNS request message
Carry the first domain name of webpage to be visited;
Computing module 12, the HASH values for calculating first domain name;
Searching modul 13, includes the record of the HASH values, institute for being searched in the default message list being locally stored
Stating default message list and storing in a plurality of record, each record at least includes a HASH value and a DNS response message;
And the HASH values that different records includes are different with DNS response messages;
First sending module 14, if the record for finding the HASH values including first domain name, to the end
DNS response messages in the record found described in the transmission of end.
Further, described device also includes:
Second sending module, if the record for not finding the HASH values including first domain name, to domain name
Resolution server sends the DNS request message;
Second receiving module, rings for receiving the DNS that domain name resolution server is returned according to the DNS request message
Answer message;
3rd sending module, for the DNS response messages that receive described in being sent to the terminal;
First memory module, for the HASH values of first domain name to be constituted with the DNS response messages received
One record, and be stored in the default message list.
Further, described device also includes:
Acquisition module, for obtaining the number stored in each response field from the DNS response messages received
According to remaining effective time;
Selecting module, in all remaining effective times of the acquisition, selecting most short remaining effective time, and
It is used as the remaining effective time of the DNS response messages received;
Second memory module, for the remaining effective time of the DNS response messages received to be stored in into composition
In record.
Further, described device also includes:
4th sending module, for the same of the DNS response messages in the record found described in being sent to the terminal
When, the remaining effective time into the record found described in terminal transmission.
Further, described device also includes:
Update module, for according to the proxy server it is local at the time of, in the default message list, in real time more
The remaining effective time of the DNS response messages received in the record of the new composition;Removing module, for when described
When the remaining effective time of the DNS response messages of reception is zero, the record of composition is deleted from the default message list.
In embodiments of the present invention, the DNS request message that receiving terminal is sent, DNS request message carries webpage to be visited
The first domain name;Calculate the HASH values of the first domain name;Being searched in the default message list being locally stored includes what is calculated
The record of HASH values;If finding the record of the HASH values of the first domain name including calculating in default message list,
Without obtaining DNS response messages from domain name resolution server, directly the DNS in the record locally found is responded and reported
Text is sent to terminal.So as to save the Internet resources between proxy server and domain name resolution server, and do not taken by agency
The influence for the communication connection being engaged between device and domain name resolution server, is then avoided due to proxy server and domain name resolution service
Communication connection between device is unstable and reduces the acquisition efficiency for obtaining DNS response messages.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
Those skilled in the art will readily occur to its of the present invention after considering specification and putting into practice invention disclosed herein
Its embodiment.The application is intended to any modification, purposes or the adaptations of the embodiment of the present invention, these modifications,
Purposes or adaptations follow the general principle of the embodiment of the present invention and including undocumented skill of the embodiment of the present invention
Common knowledge or conventional techniques in art field.Description and embodiments are considered only as exemplary, the embodiment of the present invention
True scope and spirit pointed out by appended claim.
It should be appreciated that the accurate knot that the embodiment of the present invention is not limited to be described above and is shown in the drawings
Structure, and various modifications and changes can be being carried out without departing from the scope.The scope of the embodiment of the present invention is only by appended right
It is required that to limit.
Claims (10)
1. a kind of message processing method, applied to proxy server, it is characterised in that methods described includes:
The domain name system DNS request message that receiving terminal is sent, the DNS request message carries the first domain of webpage to be visited
Name;
Calculate the HASH values of first domain name;
Being searched in the default message list being locally stored includes the record of the HASH values, and the default message list is stored
At least include a HASH value and a DNS response message in a plurality of record, each record;And different record includes
HASH values are different with DNS response messages;
If finding the record of the HASH values including first domain name, into the record found described in terminal transmission
DNS response messages.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
If not finding the record of the HASH values including first domain name, the DNS is sent to domain name resolution server
Request message;
Receive the DNS response messages that domain name resolution server is returned according to the DNS request message;
To the DNS response messages received described in terminal transmission;
The HASH values of first domain name and the DNS response messages received are constituted into a record, and are stored in described
In default message list.
3. according to the method described in claim 1, it is characterised in that methods described also includes:
The remaining effective time of the data stored in each response field is obtained from the DNS response messages received;
In all remaining effective times of the acquisition, selection most short remaining effective time, and received described in
The remaining effective time of DNS response messages;
The remaining effective time of the DNS response messages received is stored in the record of composition.
4. the method described in as requested 3, it is characterised in that methods described also includes:
While the DNS response messages into the record found described in terminal transmission, send described to the terminal
Remaining effective time in the record found.
5. the method according to claim 3 or 4, it is characterised in that methods described also includes:
According to the proxy server it is local at the time of, in the default message list, the record constituted described in real-time update
In the DNS response messages received remaining effective time;And when the residue of the DNS response messages of the reception has
When a length of zero during effect, the record of composition is deleted from the default message list.
6. a kind of message process device, applied to proxy server, it is characterised in that described device includes:
First receiving module, the domain name system DNS request message sent for receiving terminal, the DNS request message is carried and treated
Access the first domain name of webpage;
Computing module, the HASH values for calculating first domain name;
Searching modul, includes the record of the HASH values for being searched in the default message list being locally stored, described default
Message list, which is stored in a plurality of record, each record, at least includes a HASH value and a DNS response message;And it is different
The HASH values that include of record it is different with DNS response messages;
First sending module, if the record for finding the HASH values including first domain name, sends to the terminal
DNS response messages in the record found.
7. device according to claim 6, it is characterised in that described device also includes:
Second sending module, if the record for not finding the HASH values including first domain name, to domain name mapping
Server sends the DNS request message;
Second receiving module, report is responded for receiving the DNS that domain name resolution server is returned according to the DNS request message
Text;
3rd sending module, for the DNS response messages that receive described in being sent to the terminal;
First memory module, for the HASH values of first domain name to be constituted into one with the DNS response messages received
Record, and be stored in the default message list.
8. device according to claim 6, it is characterised in that described device also includes:
Acquisition module, for obtaining the data stored in each response field from the DNS response messages received
Remaining effective time;
Selecting module, in all remaining effective times of the acquisition, selecting most short remaining effective time, and conduct
The remaining effective time of the DNS response messages received;
Second memory module, the record for the remaining effective time of the DNS response messages received to be stored in composition
In.
9. the device described in as requested 8, it is characterised in that described device also includes:
4th sending module, while for DNS response messages in the record that finds described in being sent to the terminal, to
Remaining effective time in the record found described in the terminal transmission.
10. device according to claim 8 or claim 9, it is characterised in that described device also includes:
Update module, for according to the proxy server it is local at the time of, in the default message list, real-time update institute
State the remaining effective time of the DNS response messages received in the record of composition;Removing module, for being received when described
The remaining effective time of DNS response messages when being zero, the record of composition is deleted from the default message list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710127642.1A CN107070988A (en) | 2017-03-06 | 2017-03-06 | Message processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710127642.1A CN107070988A (en) | 2017-03-06 | 2017-03-06 | Message processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107070988A true CN107070988A (en) | 2017-08-18 |
Family
ID=59623013
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710127642.1A Pending CN107070988A (en) | 2017-03-06 | 2017-03-06 | Message processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107070988A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108777709A (en) * | 2018-05-31 | 2018-11-09 | 康键信息技术(深圳)有限公司 | Website access method, device, computer equipment and storage medium |
CN110266832A (en) * | 2019-07-08 | 2019-09-20 | 新华三信息安全技术有限公司 | A kind of domain name analytic method and device |
CN110636374A (en) * | 2018-06-22 | 2019-12-31 | 北京京东尚科信息技术有限公司 | Method and device for searching information |
CN110995881A (en) * | 2019-11-29 | 2020-04-10 | 南京亚信智网科技有限公司 | Domain name storage method and device |
CN111901449A (en) * | 2020-07-01 | 2020-11-06 | 四川速宝网络科技有限公司 | Method and device for optimizing domain name access |
CN112822309A (en) * | 2021-04-19 | 2021-05-18 | 北京视界云天科技有限公司 | Domain name resolution method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102882791A (en) * | 2012-10-30 | 2013-01-16 | 杭州迪普科技有限公司 | Method and device for processing DNS (Domain Name Server) business |
CN104158919A (en) * | 2014-08-20 | 2014-11-19 | 安一恒通(北京)科技有限公司 | Webpage access implementation method, server and client |
CN105791460A (en) * | 2016-03-03 | 2016-07-20 | 中国科学院信息工程研究所 | DNS agent cache optimization method and system based on multi-dimension aggregation |
-
2017
- 2017-03-06 CN CN201710127642.1A patent/CN107070988A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102882791A (en) * | 2012-10-30 | 2013-01-16 | 杭州迪普科技有限公司 | Method and device for processing DNS (Domain Name Server) business |
CN104158919A (en) * | 2014-08-20 | 2014-11-19 | 安一恒通(北京)科技有限公司 | Webpage access implementation method, server and client |
CN105791460A (en) * | 2016-03-03 | 2016-07-20 | 中国科学院信息工程研究所 | DNS agent cache optimization method and system based on multi-dimension aggregation |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108777709A (en) * | 2018-05-31 | 2018-11-09 | 康键信息技术(深圳)有限公司 | Website access method, device, computer equipment and storage medium |
CN110636374A (en) * | 2018-06-22 | 2019-12-31 | 北京京东尚科信息技术有限公司 | Method and device for searching information |
CN110266832A (en) * | 2019-07-08 | 2019-09-20 | 新华三信息安全技术有限公司 | A kind of domain name analytic method and device |
CN110995881A (en) * | 2019-11-29 | 2020-04-10 | 南京亚信智网科技有限公司 | Domain name storage method and device |
CN111901449A (en) * | 2020-07-01 | 2020-11-06 | 四川速宝网络科技有限公司 | Method and device for optimizing domain name access |
CN111901449B (en) * | 2020-07-01 | 2022-07-22 | 四川速宝网络科技有限公司 | Method and device for optimizing domain name access |
CN112822309A (en) * | 2021-04-19 | 2021-05-18 | 北京视界云天科技有限公司 | Domain name resolution method and device |
CN112822309B (en) * | 2021-04-19 | 2021-07-16 | 北京视界云天科技有限公司 | Domain name resolution method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11909639B2 (en) | Request routing based on class | |
CN107070988A (en) | Message processing method and device | |
US10511567B2 (en) | Network resource identification | |
CN104202360B (en) | The method of accessed web page, device and router | |
US9479476B2 (en) | Processing of DNS queries | |
CN109067936B (en) | Domain name resolution method and device | |
CN105934930A (en) | Method and apparatus for obtaining content from a media server | |
CN113055503B (en) | IPv6 webpage link processing method, device, equipment and readable storage medium | |
US20050005027A1 (en) | Method and system for obtaining data through an IP transmission network by using an optimized domain name server | |
CN108494870B (en) | CDN-based dynamic data loading method and device | |
WO2024124663A1 (en) | Method and apparatus for supporting batch cdn cache refresh | |
CN107682281A (en) | A kind of application management method of SDN switch and SDN switch | |
CN112149017A (en) | Webpage access method, device and system, electronic equipment and storage medium | |
CN107070885A (en) | Information processing method, apparatus and system | |
CN107154927A (en) | Message processing method and device | |
CN105760396B (en) | A kind of webpage loading method and device | |
CN109218454A (en) | The response method and dns server of DNS request | |
CN112714078A (en) | Network traffic identification method and device, storage medium and server | |
CN112968980B (en) | Probability determination method and device, storage medium and server | |
CN106570099A (en) | Method for storing and acquiring media file in Portal page, Portal server and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170818 |
|
RJ01 | Rejection of invention patent application after publication |