CN105279156B - Network information communication means and network information browsing apparatus - Google Patents
Network information communication means and network information browsing apparatus Download PDFInfo
- Publication number
- CN105279156B CN105279156B CN201410233698.1A CN201410233698A CN105279156B CN 105279156 B CN105279156 B CN 105279156B CN 201410233698 A CN201410233698 A CN 201410233698A CN 105279156 B CN105279156 B CN 105279156B
- Authority
- CN
- China
- Prior art keywords
- address
- domain name
- current
- tcp connection
- network information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
It include: that the corresponding IP address of the domain name is inquired to domain name analysis system dns server according to the domain name in the web-page requests after receiving web-page requests the invention discloses a kind of network information communication means and device;If query result is that the domain name corresponds to the IP address sequence comprising more than two IP address, using first IP address therein as current IP address;Execute TCP connection establishment process, it include: to establish TCP connection to current IP address request, process resource access is executed if being within a specified time successfully established TCP connection with the current IP address, otherwise using next IP address in the IP address sequence as current IP address, this TCP connection establishment process is repeated;Execute process resource access, comprising: using the TCP connection being successfully established, access the network information of the IP address of the TCP connection opposite end.Using the present invention, the page access speed of network information browsing apparatus can be improved.
Description
Technical field
The present invention relates to internet information processing technique more particularly to a kind of network information communication means and the network information are clear
Look at device.
Background technique
In current work and life, smart machine such as computer, mobile phone, individual digital with data-handling capacity
Assistant (PDA, Personal Digital Assistant), handheld computer (Pocket PC), tablet computer, intelligence electricity
Depending on etc. have become the essential tool of people.
Occurs the network information browsing apparatus that can browse through the network information on intelligent devices at present.Network information browsing
Device is the Client browse program of WWW (Web) service.Network information browsing apparatus can send various ask to Web server
It asks, and the hypertext information and various multimedia data formats sent from server is parsed, rendered, shown and played,
In the industry cycle, network information browsing apparatus is also referred to as browser.Network information browsing apparatus can be dedicated browser, can also
To be the client software with web page browsing function and other functions.
Network information browsing apparatus is when occurring browsing event, by the triggering of network information browsing apparatus kernel to current browsing
The corresponding service of web page address, that is, uniform resource locator (URL, Uniform/Universal Resource Locator)
Device initiates hypertext transfer protocol (HTTP, HyperText Transfer Protocol) request.The HTTP request refers to net
The data that network information browsing device is sent by http protocol to the corresponding web page server of the URL.Web page server receives
To after HTTP request, http response is generated according to the information carried in corresponding HTTP request, and return to the network information
Browsing apparatus kernel, network information browsing apparatus kernel render webpage according to the http response.
In network data communication technical field, the http protocol belongs to application layer protocol, and in a lower layer, then it uses
Transmission control protocol/Internet Protocol (TCP/IP, Transmission Control Protocol/Internet
Protocol it) is communicated, ICP/IP protocol also known as network communication protocol, is the most basic agreement of Internet, by network layer
IP agreement and transport layer Transmission Control Protocol composition.TCP/IP defines how how electronic equipment be connected into internet and data
The standard transmitted between them.ICP/IP protocol uses 4 layers of hierarchical structure, and each layer all call it next layer is mentioned
The agreement of confession completes oneself demand.For popular: TCP be responsible for discovery transmission the problem of, one it is problematic issue signal,
It asks and transmits again, until all data safeties are properly transferred to destination.And IP is to each electronics of access internet
Equipment provides an address, i.e. IP address.
The network information browsing apparatus of smart machine in the prior art carries out the detailed process of network information browse operation
Include:
Receive the click sliding scaling click instruction instructed such as to screen that user inputs smart machine, and will be relevant
Event (such as the page request and network load events for opening www.aaa.com) incoming network information browsing apparatus kernel, net
Above-mentioned event is pushed to network loading module again and initiates network HTTP request by network information browsing device kernel.
When usual user initiates web page browsing request, the information for inputting smart machine is domain name, such as www.aaa.com.
Each smart machine of connection on the internet is owned by a unique address, i.e. IP address.Due to IP
Location is string number, it has not been convenient to remembers, therefore domain name analysis system (DNS, Domain Name System) occurs in industry,
DNS allows user to replace IP address using a string of common letters (i.e. " domain name ").
Network information browsing apparatus is sent to DNS clothes after receiving page request event, by the domain name in the page request
Business device goes to inquire the current corresponding effective IP address of the domain name, and dns server is corresponded to returning after operation is inquired in parsing
IP address.For example, domain name character string as www.aaa.com can be converted into as similar 123.157.58.118
IP address.
Network information browsing apparatus receives the query result of dns server return, the i.e. correct IP address of dns resolution, it
It is attached afterwards using the connection strategy of Transmission Control Protocol with the IP address, to establish TCP connection.
After being successfully established TCP connection, then it is corresponding domain name to be obtained from the IP address by source obtaining module
Network data;The raw network data received is parsed according to html web page text specification, it is final obtain can identify and
The page structure of processing, while according to the layout and structure of HTML/CSS specification definition, calculate the length and width of page all elements
It renders relevant data comprising complicated with position etc. and saves into built-in storage.
The element for including inside the relevant page and placement position are finally plotted to the desired location of screen of intelligent device,
Text, image, flash etc. in the page is presented on the screen according to standards and specifications.
Domain name in above-mentioned page request is sent to after dns server, and dns server may inquire the domain name
Multiple effective IP address are currently corresponded to, such as ip [1], ip [2], ip [3] ..., i.e. IP address sequence.
In the prior art, it is assumed that dns server returns multiple effective IP address, such as ip [1], ip [2], ip
[3] ..., then existing network information browsing apparatus can first attempt to establish TCP connection with ip [1], issue SYN to ip [1] and ask
It asks.SYN is that TCP/IP establishes the handshake request signal used when TCP connection.It establishes between client and server normal
When TCP is connected to the network, client computer issues a SYN message first, and server is received using SYN+ response (ACK) response expression
This message, last client computer are responded again with ACK message.It can just set up between client and server so reliable
TCP connection, data can just be transmitted between client and server.
In the prior art, it if network information browsing apparatus was not successfully established TCP connection with ip [1] in 3 seconds, weighs
Second of SYN request newly is initiated to the ip [1], the time interval of second of SYN request is 6 seconds, i.e., the no and ip in 6 seconds
[1] it is successfully established TCP connection, then initiates third time SYN request to the ip [1] again, the time interval of third time SYN request is
9 seconds, i.e., it is not successfully established TCP connection with ip [1] in 9 seconds, then terminates the SYN request process to the ip [1], then downwards
One IP address, that is, ip [2] initiates SYN request.Requesting the process for establishing TCP connection with the ip [2] and above-mentioned ip [1] similarly,
It is not successfully established TCP connection in 3 seconds, then initiates second of SYN request, if not being successfully established TCP company in 6 seconds
It connects, then initiates third time SYN request, if not being successfully established TCP connection in 9 seconds, turn to next IP address and repeat
The above process is executed, then executes subsequent resource acquisition, parsing, drafting until successfully establishing TCP connection with certain IP address
The operation such as upper screen, or if all IP address returned with dns server are not all successfully established TCP connection, this net
Network information browse failure.
The shortcomings that above-mentioned prior art, is: can waste the time much reattempted to, and then increase network information browsing dress
The average time for setting access network information resource has seriously affected the page browsing speed of smart machine network information browsing apparatus
Degree.
Summary of the invention
In view of this, the main purpose of the present invention is to provide a kind of network information communication means and network information browsing dresses
It sets, to improve the page browsing speed of network information browsing apparatus.
The technical scheme of the present invention is realized as follows:
A kind of network information communication means, comprising:
It, should to the inquiry of domain name analysis system dns server according to the domain name in the web-page requests after receiving web-page requests
The corresponding IP address of domain name;
If query result is that the domain name corresponds to the IP address sequence comprising more than two IP address, by therein first
A IP address is as current IP address;
Execute TCP connection establishment process, comprising: TCP connection is established to current IP address request, if within a specified time
TCP connection, which is successfully established, with the current IP address then executes process resource access, it otherwise will be next in the IP address sequence
IP address repeats this TCP connection establishment process as current IP address;
Execute process resource access, comprising: using the TCP connection being successfully established, access the IP of the TCP connection opposite end
The network information of address
A kind of network information browsing apparatus, comprising:
DNS query module, for after receiving web-page requests, according to the domain name in the web-page requests to domain name analysis system
Dns server inquires the corresponding IP address of the domain name;
Query result processing module, for being the corresponding IP comprising more than two IP address of the domain name in above-mentioned query result
When address sequence, using first IP address therein as current IP address, triggers TCP connection and establish module;
TCP connection establishes module, for executing TCP connection establishment process, comprising: establishes TCP to current IP address request
Connection, triggers source obtaining module if being within a specified time successfully established TCP connection with the current IP address;Otherwise by institute
Next IP address in IP address sequence is stated as current IP address, repeats this TCP connection establishment process;
Source obtaining module, the TCP connection for being successfully established described in utilizing, accesses the IP address of the TCP connection opposite end
The network information.
It compared with prior art, is that a domain name is corresponding including two or more IP in DNS query result due to the present invention
When the IP address sequence of location, then since wherein first IP address request establish TCP connection, if within a specified time with this
Current IP address is successfully established the network information that TCP connection then accesses the IP address of the TCP connection opposite end, otherwise no longer to same
IP address repetitive requests establish TCP connection, but TCP connection is established in IP address request directly down, repeats this process, until
The network information that TCP connection then accesses the IP address of the TCP connection opposite end is established with a certain IP address.Therefore the present invention, can be with
Quick TCP connection successively is carried out to the IP address sequence in DNS query result to request to attempt, and shortens network information browsing apparatus
The average time for accessing the network information, improve the page browsing speed of network information browsing apparatus.
Detailed description of the invention
Fig. 1 is a kind of flow chart of network information communication means of the present invention;
Fig. 2 is a kind of flow chart of network information communication means of the present invention;
Fig. 3 is a kind of composition schematic diagram of network information browsing apparatus of the present invention;
Fig. 4 is another composition schematic diagram of network information browsing apparatus of the present invention.
Specific embodiment
With reference to the accompanying drawing and specific embodiment the present invention is further described in more detail.
Network information communication means of the present invention can apply the network information browsing apparatus in all smart machines
On, it can especially apply on the network information browsing apparatus of smart machine.The smart machine such as computer, mobile phone, a
Personal digital assistant's device (PDA, Personal Digital Assistant), handheld computer (Pocket PC), tablet computer,
Even smart television etc..The network information browsing apparatus refers to that is run in the smart machine is used to browse webpage
Software service can be dedicated web browser, be also possible to have the client of web page browsing function and other functions soft
Part.
Fig. 1 is a kind of flow chart of network information communication means of the present invention.This method is browsed by the network information
Device executes.Referring to Fig. 1, which includes:
Step 101, after receiving web-page requests, according to the domain name in the web-page requests to domain name analysis system DNS service
Device inquires the corresponding IP address of the domain name.
The web-page requests are triggered by web-page requests event, and the web-page requests event for example can be user and exist
The domain name of accessed webpage is had input in network information browsing apparatus address field and triggers access operation, user clicks some
Web page interlinkage etc. includes the domain-name information for the webpage to be accessed in the web-page requests.Specifically for example, network information browsing dress
The web-page requests to the resource http://A/res of domain name A can be initiated in setting.
If step 102, query result are that the domain name corresponds to the IP address sequence comprising more than two IP address, by it
In first IP address as current IP address, execute subsequent step, that is, jump to step 103.
If query result is that the domain name only corresponds to an IP address, the processing side of prior art can be used
Formula, including send TCP connection to the IP address and establish request, it is re-emitted if within a specified time establishing connection failure
TCP connection establishes request, and the foundation of third time TCP connection is re-emitted if establishing connection failure within second of specified time
Request, this network communication fails if within a specified time establishing connection failure, once TCP is successfully established with the IP address
Connection, then access the network information of the IP address of the TCP connection opposite end.
Step 103 executes TCP connection establishment process, specifically includes: TCP connection is established to current IP address request, if
TCP connection within a specified time, which is successfully established, with the current IP address then jumps into step 104;It otherwise will be in the IP address sequence
Next IP address as current IP address, repeat this step 103.
For example, if in the query result including IP address sequence ip [1], ip [2], ip [3], then it first will be therein
Ip [1] is used as current IP address, establishes TCP connection to the ip [1] request, i.e. sending SYN request.The specified time can root
Set according to demand, according to network and device resource situation, a kind of preferably embodiment be 3 seconds the specified time.Certainly at it
The specified time may be set to be other time in his embodiment.If at the appointed time (such as 3 seconds) interior network information is clear
Look at device and the ip [1] be successfully established TCP connection, then jump to step 104, otherwise abandon current connection request immediately, will under
One IP address, that is, ip [2] is used as current IP address;TCP connection is established to the ip [2] request, if at the appointed time (such as 3
Second) interior network information browsing device and the ip [2] be successfully established TCP connection, then step 104 is jumped to, otherwise abandons working as immediately
Preceding connection request regard next IP address, that is, ip [3] as current IP address;TCP connection is established to the ip [3] request, if
Specified time (such as 3 seconds) interior network information browsing device and the ip [3] have been successfully established TCP connection, then jump to step 104,
Otherwise this network communication fails, and terminates this process.In another embodiment, for the last one IP address, that is, ip [3], institute
Stating specified time can also be set as 3+6+9 seconds, 18 seconds totally in the way of the prior art, it can it requests respectively three times, the
Request time is 3 seconds, initiates second if not setting up successfully and requests, and second of request time is 6 seconds, if do not built
Third time is then initiated in vertical success requests, and third time request time is 9 seconds, this network communication fails if not setting up successfully.
Step 104 executes process resource access, comprising: using the TCP connection being successfully established, accesses the TCP connection
The network information of the IP address of opposite end obtains the corresponding network data of domain name that is, from the IP address.Assuming that the IP address
For ip [i], then related network information usually is obtained from http://ip [i]/res.
It receives after the network data that the IP address obtains, is parsed according to html web page text specification, finally obtained
The page structure that can be identified and handle is taken, while according to the layout and structure of HTML/CSS specification definition, calculating page institute
Having length and width and position of element etc. includes that the relevant data of complicated rendering are saved into built-in storage.It then will be in the relevant page
Element and placement position that bread contains finally are plotted to the desired location of screen of intelligent device, by the page text, image,
Flash etc. is presented on the screen according to standards and specifications.
Illustrate the beneficial effect that the present invention can reach below by specific experimental data.
Assuming that network information browsing apparatus is to access certain domain name m.aaa.com, then 2 IP are returned to by dns resolution,
The unobstructed situation of respectively IP1 and IP2. but IP1 and IP2 are really different, tabulate herein, as shown in table 1 below:
Table 1
So, the prior art is (assuming that needing for the IP that can be connected with the m.aaa.com average time for establishing TCP connection
Establish on the time theory of connection is 0 second), then:
Time required for prior art=(0*50%+ (3+6+9) * 50%) * 50%*2=9 seconds
Time required for technical solution of the present invention
=(0*50%+3*50%) * 50%+ (0*50%+3*50%) * 50%
=0.75+0.75
=1.5 seconds
In another embodiment of the present invention, the last one described IP address uses existing connection type, then overall required
Time is as follows:
=(0*50%+3*50%) * 50%+ (0*50%+ (3+6+9) * 50%) * 50%
=1.5*0.5+4.5
=0.75+4.5
=5.25 seconds
Also needed for using within 5.25 seconds the connection type of the prior art completely than each IP address the time 9 seconds it is shorter.
It will be apparent that technical solution of the present invention time energy used on being successfully established TCP connection is shorter, page browsing speed is more
Fastly, and as the corresponding IP address number of a domain name is more, this advantage is more obvious.
Fig. 2 is another flow chart of network information communication means of the present invention.This method is clear by the network information
Device of looking at executes.Referring to fig. 2, which specifically includes that
Step 201 creates DNS database in local external memory.
The local refers to the local intelligent equipment of installation network information browsing apparatus.The external memory is and memory
Reservoir is corresponding.The effect of built-in storage and is exchanged with external memory for temporarily storing the operational data in CPU
Data.As long as equipment is in operation, CPU will be transferred to the data for needing operation in built-in storage and carry out operation, when operation is complete
Result is sent out again at rear CPU, the operation of built-in storage also determines the stable operation of smart machine.External memory refers to
Reservoir in addition to built-in storage and cpu cache, such reservoir still can save data after generally powering off, amount of storage will be compared with
Built-in storage is big, but arithmetic speed is slow compared with built-in storage.
This step 201 can execute after network information browsing apparatus is installed and started for the first time, when creating DNS data
Library, network information browsing apparatus need not then repeat creation DNS database after being again started up.
Step 202, the network information browsing apparatus starting after, the data in the DNS database are imported into local
In memory.In the present invention, the local memory reservoir refers in the local of the smart machine where network information browsing apparatus
Memory, more specifically: the memory block with the built-in storage of the process context of present networks information browsing device.
It is typically referred to after network information browsing apparatus installs starting after the starting of network information browsing apparatus described in this step,
Be again started up and start later, can by the DNS database domain name and its corresponding IP address imported into local memory
In reservoir, specifically: by the DNS database domain name and its corresponding IP address imported into and present networks information browse fill
In the built-in storage memory block for the process context set.
Step 203, after receiving web-page requests, according to the inquiry of the domain name local memory reservoir in the web-page requests, if
It inquires local memory reservoir and has the domain name and then obtain the corresponding IP address of the domain name, and skip and described looked into dns server
The step of asking the domain name corresponding IP address, leaps to step 205;If inquiring local memory reservoir not domain name,
Then jump to step 204.
Step 204 inquires the corresponding IP address of the domain name to dns server, and by the domain name and its corresponding IP address
It is stored in local dns database.
If (query result that inquires from local memory reservoir is inquired from dns server for step 205, query result
The query result arrived) when being the corresponding IP address sequence comprising more than two IP address of the domain name, by first IP therein
Location executes subsequent step as current IP address.If query result is the corresponding IP address of the domain name, existing skill is utilized
The scheme of art is handled, it is not necessary to execute subsequent step.
Step 206, to current IP address request establish TCP connection, if within a specified time with the current IP address at
Function establishes TCP connection and then jumps into next step;Otherwise using next IP address in the IP address sequence as current IP address,
Repeat this step.
Step 207, using the TCP connection being successfully established, access the network letter of the IP address of the TCP connection opposite end
Breath.
Such as above-described embodiment, DNS database is being locallyd create, is being inquired with obtaining the corresponding IP of domain name from dns server
Behind location, domain name and its corresponding IP address are stored in local dns database, it, will after the starting of network information browsing apparatus
Domain name and its corresponding IP address in the DNS database are imported into local memory reservoir, after receiving web-page requests, root
According to the inquiry of the domain name local memory reservoir in the web-page requests, the reading pair if inquiring local memory reservoir and having this domain name
The IP address answered;Otherwise the corresponding IP address of the domain name is obtained from dns server inquiry, by the domain name and its corresponding IP address
It is stored in local dns database.Using this technical solution, since the corresponding IP address of the domain name for having inquired acquisition being deposited
Storage is in the DNS database of external memory, by the domain name and its correspondence in external memory after the starting of network information browsing apparatus
IP address is imported into built-in storage, after receiving web-page requests, whether there is the web-page requests domain in audit memory reservoir first
The corresponding IP address of name, if there is then directly accessing the IP address, again from the dns server inquiry pair on network if not
The IP address answered.By this processing, the number that the dns server on network initiates inquiry request, section can be greatly reduced
The resource consumption for having saved dns server also saves corresponding network flow resource, it is often more important that due to looking into built-in storage
The speed of inquiry will be significantly faster than the speed of network inquiry, therefore can greatly improve the page access speed of network information browsing apparatus
Degree.
Certainly, it if not receiving web-page requests, but is actively triggered according to specified logic by network information browsing apparatus
The corresponding IP address of domain name is obtained from dns server inquiry, then in this case, also by the domain name and its corresponding IP
Location is stored in local dns database, as long as that is, network information browsing apparatus obtains the corresponding IP of domain name from dns server
The domain name and its corresponding IP address are then stored in local dns database by address.
It is described to obtain the domain name from dns server inquiry in step 204 in another preferred embodiment of the invention
It, can also be into while the domain name and its corresponding IP address are stored in local dns database after corresponding IP address
One step includes: that the domain name and its corresponding IP address are imported into local memory reservoir, specifically: by the domain name and its corresponding
IP address is imported into the built-in storage memory block with the process context of present networks information browsing device.In this way, if network is believed
In the case that breath browsing apparatus does not restart, receives in the process of this starting and asked to the webpage that same domain name is initiated again
It asks, then can inquire the corresponding IP address of the domain name in local memory reservoir, to further reduce in time to network
On dns server initiate inquiry request number, save the resource consumption of dns server, also save corresponding network
Floating resources, and can be further improved the page access speed of the network information browsing apparatus of this starting.
It is described after the starting of network information browsing apparatus in step 202 in another preferred embodiment of the invention,
It, can also be by the domain name in the DNS database and its before corresponding IP address information imported into local memory reservoir
One step includes: to traverse to the corresponding IP address of each domain name in the DNS database, judges the corresponding IP of each domain name
Effectively whether address, retain the domain name and its corresponding IP address if effectively, delete the domain name if invalid currently
And its corresponding IP address, by the effective domain name and its corresponding IP address in the DNS database after Ergodic judgement
It imported into local memory reservoir.
Wherein, described to judge that whether effectively the corresponding IP address of each domain name, specifically includes currently:
For each domain name, the time of domain name deposit DNS database and the time difference of current time are determined, when judging this
Between difference whether exceed the preset domain name/IP address corresponding time-to-live, if exceed if determine the corresponding IP address of the domain name
In current invalid, otherwise determine the corresponding IP address of the domain name the currently active.The domain name IP address corresponding time-to-live
Usually determine based on experience value, and pre-set, for example, usual domain name/IP address correspond to the time-to-live be 1 day to 7 days,
If it is the corresponding IP address of domain name of large-scale website, the time-to-live can lengthen significantly.
Invalid, expired domain name and its IP address number can be rejected in time and be left out to processing through the foregoing embodiment
According to, retain effective domain name and its IP address corresponding relationship, improve the speed that DNS database imports local memory reservoir,
It reduces in the error rate for locally carrying out IP address inquiry, further increases the access speed to target webpage.
It is in step 202, described to start in network information browsing apparatus in another preferred embodiment of the invention
Afterwards, by the DNS database domain name and its corresponding IP address information imported into local memory reservoir, specifically: adopt
With asynchronous system, after the specified time after the starting of network information browsing apparatus, by the DNS database domain name and its
Corresponding IP address information is asynchronous to be imported into local memory reservoir.
After asynchronous system, after receiving enabled instruction starting due to network information browsing apparatus, need to load correlation
Resource, so if once start by the DNS database domain name and its corresponding IP address information imported into local
Built-in storage can be such that starting speed slows down, network information browsing apparatus performance be influenced, therefore in the present embodiment, using asynchronous side
Formula, specified time after the starting of network information browsing apparatus and then by domain name in the DNS database and its corresponding
IP address information is asynchronous to be imported into local memory reservoir, can mutually be rushed to avoid with the related resource loaded when starting in this way
It is prominent, reduce the influence to network information browsing apparatus performance.The specified time can opening according to network information browsing apparatus
Dynamic speed is preset.
Corresponding with the above method of the invention, the invention also discloses a kind of network information browsing apparatus, for executing
State method.Certain network information browsing apparatus may include other basic modules of existing network information browsing device, due to
It is little with relationship of the invention, therefore repeat no more herein.Fig. 3 is a kind of group of network information browsing apparatus of the present invention
At schematic diagram.Referring to Fig. 3, which is mainly comprised the following modules:
DNS query module 301, for after receiving web-page requests, according to the domain name in the web-page requests to domain name mapping
System dns server inquires the corresponding IP address of the domain name.
Query result processing module 302, for being that the domain name is corresponding comprising more than two IP address in above-mentioned query result
IP address sequence when, using first IP address therein as current IP address, trigger TCP connection and establish module 303.
TCP connection establishes module 303, for executing TCP connection establishment process, comprising: requests to establish to current IP address
TCP connection triggers source obtaining module if being within a specified time successfully established TCP connection with the current IP address;Otherwise
Using next IP address in the IP address sequence as current IP address, this TCP connection establishment process is repeated.
The specified time can set according to demand, according to network and device resource situation, a kind of preferably embodiment
It is 3 seconds for the specified time.Certainly the specified time may be set to be other time in other embodiments.
Source obtaining module 304, the TCP connection for being successfully established described in utilizing, with accessing the IP of the TCP connection opposite end
The network information of location obtains the corresponding network data of domain name that is, from the IP address.
The network information browsing apparatus receives after the network data that the IP address obtains, and can use the network information
The existing processing module of browsing apparatus is parsed according to html web page text specification, what final acquisition can be identified and be handled
Page structure, while according to the layout and structure of HTML/CSS specification definition, calculate length and width and the position of page all elements
It saves Deng comprising the relevant data of complicated rendering into built-in storage.Then the element and layout that will include inside the relevant page
Position is finally plotted to the desired location of screen of intelligent device, by text, image, flash in the page etc. according to standard and rule
Model is presented on the screen.
Fig. 4 is another composition schematic diagram of network information browsing apparatus of the present invention.Referring to fig. 4, the network information
Browsing apparatus may further comprise:
DNS database creation module 401, for localling create DNS database.
DNS data import modul 402 is used for after the starting of network information browsing apparatus, by the number in the DNS database
According to importeding into local memory reservoir.
In the fig. 4 embodiment, the DNS query module 301 is further used for: it is described receive web-page requests after, to
Domain name analysis system dns server is inquired before the corresponding IP address of the domain name, further comprises: according in the web-page requests
Inquiry of the domain name local memory reservoir, the corresponding IP of the domain name is obtained if inquiring local memory reservoir and having the domain name
The corresponding IP address of the domain name is transmitted to the query result processing module by location, and it is corresponding not inquire the domain name to dns server
IP address;If inquiring local memory reservoir not domain name, the corresponding IP address of the domain name is inquired to dns server,
The corresponding IP address of the domain name is transmitted to the query result processing module, and the domain name and its corresponding IP address are stored in
In local dns database.Certainly, if not receiving web-page requests, but according to specified logic by network information browsing apparatus
Actively triggering obtains the corresponding IP address of domain name from dns server inquiry, then in this case, also by the domain name and its right
The IP address answered is stored in local dns database.
Query result processing module 302 later is in above-mentioned query result (the inquiry knot inquired from local memory reservoir
Fruit or the query result inquired from dns server) when being the corresponding IP address sequence comprising more than two IP address of the domain name,
Using first IP address therein as current IP address, triggers TCP connection and establish module.
In another preferred embodiment of network information browsing apparatus of the present invention, the DNS data import modul
402 are further used for: before the data in the DNS database are imported into local memory reservoir, further to described
The corresponding IP address of each domain name in DNS database is traversed, judge the corresponding IP address of each domain name currently whether
Effectively, retain the domain name and its corresponding IP address if effectively, if invalid with deleting the domain name and its corresponding IP
Location, after Ergodic judgement by the DNS database effective domain name and its corresponding IP address imported into local memory
In reservoir.
In another preferred embodiment of network information browsing apparatus of the present invention, the DNS data import modul
402 are specifically used for: asynchronous system are used, after the specified time after the starting of network information browsing apparatus, by the DNS data
Domain name and its corresponding IP address information in library are asynchronous to be imported into local memory reservoir.
In another preferred embodiment of network information browsing apparatus of the present invention, the DNS query module 301 into
One step is used for: after obtaining the corresponding IP address of the domain name from dns server inquiry, by the domain name and its corresponding IP address
While being stored in local dns database, the domain name and its corresponding IP address are further imported into local memory reservoir.
In any embodiment of above-mentioned network information browsing apparatus, the local memory reservoir is clear with present networks information
Look at device process context built-in storage memory block.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit
It is that modules physically exist alone, can also be integrated in one unit with two or more modules.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.The function of each embodiment
Energy module can be located at a terminal or network node, or may be distributed on multiple terminals or network node.
In addition, each embodiment of the invention can pass through the data processing by data processing equipment such as computer execution
Program is realized.Obviously, data processor constitutes the present invention.In addition, being commonly stored data in one storage medium
Processing routine is by directly reading out storage medium for program or by installing or copying to data processing equipment for program
It stores in equipment (such as hard disk and/or built-in storage) and executes.Therefore, such storage medium also constitutes the present invention.Storage medium
Can be used any kind of recording mode, for example, paper storage medium (such as paper tape), magnetic storage medium (such as floppy disk, hard disk,
Flash memory etc.), optical storage media (such as CD-ROM), magnetic-optical storage medium (such as MO) etc..
Therefore the invention also discloses a kind of storage mediums, wherein it is stored with data processor, the data processor
For executing any embodiment of the above method of the present invention.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (12)
1. a kind of network information communication means is applied to terminal characterized by comprising
101, after receiving web-page requests, the corresponding IP of the domain name is inquired to dns server according to the domain name in the web-page requests
Address;
102, if query result is that the domain name corresponds to the IP address sequence comprising more than two IP address, by therein first
A IP address is as current IP address;
103, TCP connection establishment process is executed, comprising:
1031, to current IP address request establish TCP connection, and judge whether within the first specified time with the current IP address
It is successfully established TCP connection;
1032, if so, jumping to step 104;
1033, current connection request otherwise, is abandoned immediately, as current IP using next IP address in the IP address sequence
Location, and judge whether current IP address is the last one IP address in the IP address sequence;
If 1034, the last one not described IP address of current IP address, return step 1031, for the last one non-IP
Location only attempts connection once, does not establish TCP connection to same IP address repetitive requests;
If 1035, current IP address is the last one described IP address, TCP is established to current IP address request for the first time and is connected
It connects, and judges whether to be successfully established TCP connection with the current IP address within the first specified time: if so, jumping to step
104;Otherwise, TCP connection is established to current IP address request second, and judge whether current with this within the second specified time
IP address is successfully established TCP connection;If so, jumping to step 104;Otherwise third time is established TCP to current IP address request and is connected
It connects, and judges whether to be successfully established TCP connection with the current IP address within third specified time;If so, jumping to step
104;Otherwise terminate this network communication;
104, process resource access is executed, comprising: using the TCP connection being successfully established, access the IP of the TCP connection opposite end
The network information of address;
The method further includes:
DNS database is created in the external memory of terminal local;
After the starting of network information browsing apparatus, the data in the DNS database are imported into terminal local built-in storage;
It is described receive web-page requests after, inquire the corresponding IP address of the domain name to domain name analysis system dns server before, into
One step includes: according to the inquiry of the domain name local memory reservoir in the web-page requests, if inquiring local memory reservoir has this
Domain name then obtains the corresponding IP address of the domain name, and skips the step that the corresponding IP address of the domain name is inquired to dns server
Suddenly;If inquiring local memory reservoir not domain name, the corresponding IP address of the domain name is inquired to dns server, and will
The domain name and its corresponding IP address are stored in local dns database.
2., will be described the method according to claim 1, wherein described after the starting of network information browsing apparatus
Before data in DNS database are imported into local memory reservoir, further comprise:
The corresponding IP address of each domain name in the DNS database is traversed, judges the corresponding IP address of each domain name
Whether effectively, retain the domain name and its corresponding IP address if effectively currently, deleted if invalid the domain name and its
Corresponding IP address, by the effective domain name and its importing of corresponding IP address in the DNS database after Ergodic judgement
Into local memory reservoir.
3. according to the method described in claim 2, it is characterized in that, the corresponding IP address of each domain name of judgement is currently
It is no effective, it specifically includes:
For each domain name, determines the time of domain name deposit DNS database and the time difference of current time, judge the time difference
Whether exceed the preset domain name/IP address corresponding time-to-live, determines that the corresponding IP address of the domain name is being worked as if exceeding
It is preceding invalid, otherwise determine the corresponding IP address of the domain name the currently active.
4., will be described the method according to claim 1, wherein described after the starting of network information browsing apparatus
Data in DNS database are imported into local memory reservoir, specifically: asynchronous system is used, in network information browsing apparatus
After specified time after starting, by the DNS database domain name and its corresponding IP address information is asynchronous imported into this
In ground built-in storage.
5. the method according to claim 1, wherein described, from dns server inquiry, to obtain the domain name corresponding
After IP address, while the domain name and its corresponding IP address are stored in local dns database, further comprise: will
The domain name and its corresponding IP address imported into local memory reservoir.
6. method according to any one of claims 2 to 5, which is characterized in that the local memory reservoir, specifically: with
The built-in storage memory block of the process context of present networks information browsing device.
7. a kind of network information browsing apparatus, which is characterized in that be applied to terminal, described device includes:
DNS query module, for after receiving web-page requests, according to the domain name in the web-page requests to domain name analysis system DNS
Server inquires the corresponding IP address of the domain name;
Query result processing module, for being the corresponding IP address comprising more than two IP address of the domain name in above-mentioned query result
When sequence, using first IP address therein as current IP address, triggers TCP connection and establish module;
TCP connection establishes module, and for executing TCP connection establishment process, specific implementation procedure includes:
1031, to current IP address request establish TCP connection, and judge whether within the first specified time with the current IP address
It is successfully established TCP connection;
1032, if so, jumping to source obtaining module;
1033, current connection request otherwise, is abandoned immediately, as current IP using next IP address in the IP address sequence
Location, and judge whether current IP address is the last one IP address in the IP address sequence;
If 1034, the last one not described IP address of current IP address, return step 1031, for the last one non-IP
Location only attempts connection once, does not establish TCP connection to same IP address repetitive requests;
If 1035, current IP address is the last one described IP address, TCP is established to current IP address request for the first time and is connected
It connects, and judges whether to be successfully established TCP connection with the current IP address within the first specified time: being obtained if so, jumping to resource
Modulus block;Otherwise, TCP connection is established to current IP address request second, and judge whether within the second specified time and be somebody's turn to do
Current IP address is successfully established TCP connection;If so, jumping to source obtaining module;Otherwise third time is requested to current IP address
TCP connection is established, and judges whether to be successfully established TCP connection with the current IP address within third specified time;If so, jumping
To source obtaining module;Otherwise terminate this network communication;
Source obtaining module, the TCP connection for being successfully established described in utilizing, accesses the net of the IP address of the TCP connection opposite end
Network information;
The device further comprises:
DNS database creation module creates DNS database for the external memory in terminal local;
DNS data import modul, for after the starting of network information browsing apparatus, the data in the DNS database to be imported
Into terminal local built-in storage;
The DNS query module is further used for: it is described receive web-page requests after, looked into domain name analysis system dns server
Before asking the corresponding IP address of the domain name, further comprise: according to the inquiry of the domain name local memory reservoir in the web-page requests, such as
Fruit, which inquires local memory reservoir and has the domain name, then obtains the corresponding IP address of the domain name, and the corresponding IP address of the domain name is passed
To the query result processing module, the corresponding IP address of the domain name is not inquired to dns server;If inquiring local memory
The not no domain name of reservoir, then inquire the corresponding IP address of the domain name to dns server, the corresponding IP address of the domain name be transmitted to institute
Query result processing module is stated, and the domain name and its corresponding IP address are stored in local dns database.
8. network information browsing apparatus according to claim 7, which is characterized in that the DNS data import modul is into one
Step is used for: before the data in the DNS database are imported into local memory reservoir, further to the DNS data
The corresponding IP address of each domain name in library is traversed, and judges whether the corresponding IP address of each domain name is effective currently, such as
Fruit effectively then retains the domain name and its corresponding IP address, deletes the domain name and its corresponding IP address if invalid, time
Go through judgement after by the DNS database effective domain name and its corresponding IP address imported into local memory reservoir.
9. network information browsing apparatus according to claim 7, which is characterized in that the DNS data import modul is specific
For: asynchronous system is used, it, will be in the DNS database after the specified time after the starting of network information browsing apparatus
Domain name and its corresponding IP address information is asynchronous imported into local memory reservoir.
10. network information browsing apparatus according to claim 7, which is characterized in that the DNS query module is further used
In: after obtaining the corresponding IP address of the domain name from dns server inquiry, the domain name and its corresponding IP address are stored in
While in local dns database, the domain name and its corresponding IP address are further imported into local memory reservoir.
11. according to the described in any item network information browsing apparatus of claim 7 to 10, which is characterized in that the local memory
Reservoir are as follows: the built-in storage memory block with the process context of present networks information browsing device.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 6 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410233698.1A CN105279156B (en) | 2014-05-29 | 2014-05-29 | Network information communication means and network information browsing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410233698.1A CN105279156B (en) | 2014-05-29 | 2014-05-29 | Network information communication means and network information browsing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105279156A CN105279156A (en) | 2016-01-27 |
CN105279156B true CN105279156B (en) | 2019-11-29 |
Family
ID=55148183
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410233698.1A Active CN105279156B (en) | 2014-05-29 | 2014-05-29 | Network information communication means and network information browsing apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105279156B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108206808A (en) * | 2016-12-16 | 2018-06-26 | 北京酷我科技有限公司 | A kind of method and system of quick connection flow media domain name |
CN107635027B (en) * | 2017-09-27 | 2021-03-30 | 网易(杭州)网络有限公司 | Domain name resolution method, medium, device and computing equipment |
CN108134831A (en) * | 2017-12-21 | 2018-06-08 | 美的集团股份有限公司 | The method and apparatus of household electrical appliance and its linking objective server |
CN110138599B (en) * | 2019-04-24 | 2020-11-17 | 北京字节跳动网络技术有限公司 | Domain Name System (DNS) query method, device, medium and electronic equipment based on domain name association degree |
CN114938373B (en) * | 2022-05-23 | 2023-11-03 | 睿云联(厦门)网络通讯技术有限公司 | High-availability connection method and system for cloud platform TCP long connection service |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101895589A (en) * | 2010-07-26 | 2010-11-24 | 杭州华三通信技术有限公司 | Wide area network router and method for establishing routing table items therein |
CN102572011A (en) * | 2012-02-02 | 2012-07-11 | 中国科学院计算机网络信息中心 | Method, device and system for processing data |
CN102882791A (en) * | 2012-10-30 | 2013-01-16 | 杭州迪普科技有限公司 | Method and device for processing DNS (Domain Name Server) business |
CN103237089A (en) * | 2013-05-16 | 2013-08-07 | 广东睿江科技有限公司 | Method and device for repairing domain name system (DNS) polling mode-based webpages and server |
CN103238310A (en) * | 2010-12-01 | 2013-08-07 | 诺基亚西门子通信公司 | Apparatus and method for establishing connections |
CN103389983A (en) * | 2012-05-08 | 2013-11-13 | 阿里巴巴集团控股有限公司 | Webpage content grabbing method and device applied to network crawler system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7689671B2 (en) * | 2007-03-09 | 2010-03-30 | International Business Machines Corporation | System and method for multiple IP addresses during domain name resolution |
-
2014
- 2014-05-29 CN CN201410233698.1A patent/CN105279156B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101895589A (en) * | 2010-07-26 | 2010-11-24 | 杭州华三通信技术有限公司 | Wide area network router and method for establishing routing table items therein |
CN103238310A (en) * | 2010-12-01 | 2013-08-07 | 诺基亚西门子通信公司 | Apparatus and method for establishing connections |
CN102572011A (en) * | 2012-02-02 | 2012-07-11 | 中国科学院计算机网络信息中心 | Method, device and system for processing data |
CN103389983A (en) * | 2012-05-08 | 2013-11-13 | 阿里巴巴集团控股有限公司 | Webpage content grabbing method and device applied to network crawler system |
CN102882791A (en) * | 2012-10-30 | 2013-01-16 | 杭州迪普科技有限公司 | Method and device for processing DNS (Domain Name Server) business |
CN103237089A (en) * | 2013-05-16 | 2013-08-07 | 广东睿江科技有限公司 | Method and device for repairing domain name system (DNS) polling mode-based webpages and server |
Also Published As
Publication number | Publication date |
---|---|
CN105279156A (en) | 2016-01-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106489145B (en) | Access method, device and the Web site system of web site | |
JP5230642B2 (en) | Web page display method and system | |
CN103383687B (en) | A kind of page processing method and device | |
CN100424694C (en) | Implementing method of network profile | |
CN105279156B (en) | Network information communication means and network information browsing apparatus | |
US10015226B2 (en) | Methods for making AJAX web applications bookmarkable and crawlable and devices thereof | |
US20110191664A1 (en) | Systems for and methods for detecting url web tracking and consumer opt-out cookies | |
US20120136927A1 (en) | Computer networking system and method with javascript execution for pre-fetching content from dynamically-generated url and javascript injection to modify date or random number calculation | |
CN103685590B (en) | Obtain the method and system of IP address | |
CN107391664A (en) | Page data processing method and system based on WEB | |
CN104798071A (en) | Improving web sites performance using edge servers in fog computing architecture | |
CN1210409A (en) | Server-side asynchronous form management | |
CN102867007A (en) | Webpage browsing method and device | |
US20180375962A1 (en) | Facilitation of efficient web site page loading | |
CN105930528A (en) | Webpage cache method and server | |
CN103220371A (en) | Method and system for conducting content adaptation | |
CN102882974A (en) | Method for saving website access resource by website identification version number | |
CN103810176A (en) | Pre-fetching accessing method and device of webpage information | |
CN101046806B (en) | Search engine system and method | |
CN110430188A (en) | A kind of quick url filtering method and device | |
CN102882988B (en) | A kind of method, apparatus and equipment of the address information for obtaining resource information | |
CN104615597B (en) | The methods, devices and systems of cache file are removed in browser | |
CN101211340A (en) | Dynamic network crawler based on client end /service end | |
CN103716319B (en) | A kind of apparatus and method of web access optimization | |
CN106528563A (en) | Content access method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |