[go: up one dir, main page]

CN104639666A - Domain name access method and device - Google Patents

Domain name access method and device Download PDF

Info

Publication number
CN104639666A
CN104639666A CN201310547980.2A CN201310547980A CN104639666A CN 104639666 A CN104639666 A CN 104639666A CN 201310547980 A CN201310547980 A CN 201310547980A CN 104639666 A CN104639666 A CN 104639666A
Authority
CN
China
Prior art keywords
domain name
data acquisition
pointed
request
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310547980.2A
Other languages
Chinese (zh)
Other versions
CN104639666B (en
Inventor
尚子峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310547980.2A priority Critical patent/CN104639666B/en
Publication of CN104639666A publication Critical patent/CN104639666A/en
Application granted granted Critical
Publication of CN104639666B publication Critical patent/CN104639666B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/30Managing network names, e.g. use of aliases or nicknames
    • H04L61/3015Name registration, generation or assignment
    • H04L61/3025Domain name generation or assignment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network 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)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention discloses a domain name access method and device. In an embodiment of the present invention, when receiving a network access request, a browser reads an identifier variable value of a domain name indicated by the network access request from a system registry; when the read identifier variable value is a first value, the server directly sends a data obtaining request to a primary domain name of the domain name indicated by the network access request; and when the read identifier variable value is a second value, the server directly sends a data obtaining request to a secondary domain name of the domain name indicated by the network access request. Compared with a method in the prior art that a request is still sent to a domain name with a failed request after the same process is restarted in one life cycle of the browser, the method in the embodiment of the present invention has a beneficial effect of automatically selecting the primary domain name or the secondary domain name corresponding to the domain name for sending the request.

Description

Method for accessing domain name and device
Technical field
The present invention relates to computer realm, also relate to browser technology, particularly relate to a kind of method for accessing domain name and device.
Background technology
Usual server can adopt Main Domain and these two domain names of domain name for subsequent use to receive http request.At present, after browser receives the http request triggered user side, first initiate request to the Main Domain pointed by this http request, if the request failure initiated to Main Domain, then send request to the domain name for subsequent use of correspondence again.After a certain process sends local access failure of asking to Main Domain, browser does not carry out record, and so this process still can first send request to Main Domain next time, wastes the time of unnecessary wait timeout; Namely same process restarts rear transmission first time when asking, still can first send request to the failed Main Domain of request, and can not send request directly to available domain name for subsequent use, which results in the repeatedly domain name retry caused because domain name is unavailable, program response efficiency is low.
Summary of the invention
For solving the problem, be necessary to provide a kind of method for accessing domain name and device.
The embodiment of the invention discloses a kind of method for accessing domain name, comprise the following steps:
When receiving network access request, from system registry, read the marking variable value of domain name pointed by described network access request;
When described marking variable value is the first numerical value, the Main Domain to domain name pointed by described network access request sends data acquisition request;
When described marking variable value is second value, the domain name for subsequent use to domain name pointed by described network access request sends data acquisition request.
The embodiment of the present invention also discloses a kind of domain name access device, comprising:
Variate-value read module, during for receiving network access request, reads the marking variable value of domain name pointed by described network access request from system registry;
Data acquisition module, for when described marking variable value is the first numerical value, the Main Domain to domain name pointed by described network access request sends data acquisition request; When described marking variable value is second value, the domain name for subsequent use to domain name pointed by described network access request sends data acquisition request.
When embodiment of the present invention browser receives network access request, from system registry, read the marking variable value of domain name pointed by described network access request; When the marking variable value read is the first numerical value, the Main Domain to domain name pointed by this network access request sends data acquisition request; When the marking variable value read is second value, the domain name for subsequent use to domain name pointed by this network access request sends data acquisition request; Compared in prior art, in a life cycle of browser, after same process is restarted, the still first method sent request to the failed domain name of request, the embodiment of the present invention has the beneficial effect automatically selecting Main Domain corresponding to this domain name or domain name for subsequent use to send request.
Accompanying drawing explanation
Fig. 1 is method for accessing domain name first embodiment schematic flow sheet of the present invention;
Fig. 2 is method for accessing domain name second embodiment schematic flow sheet of the present invention;
Fig. 3 is domain name access device one embodiment high-level schematic functional block diagram of the present invention.
The realization of embodiment of the present invention object, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Technical scheme of the present invention is further illustrated below in conjunction with Figure of description and specific embodiment.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Fig. 1 is method for accessing domain name first embodiment schematic flow sheet of the present invention; As shown in Figure 1, method for accessing domain name of the present invention comprises the following steps:
Step S01, when receiving network access request, from system registry, read the marking variable value of domain name pointed by described network access request; When the marking variable value read is the first numerical value, perform step S02; When the marking variable value read is second value, perform step S03;
Browser receives the network access request that triggers user side as http(Hyper Text Transport Protocol, HTML (Hypertext Markup Language)) when asking, obtain the domain name pointed by this network access request; The domain name pointed by this network access request that browser obtains comprises Main Domain and domain name for subsequent use.
Browser reads the current domain name identification of domain name pointed by this network access request from the registration table of system, i.e. the marking variable value of domain name.According to the marking variable value of this domain name read from registration table, the marking variable value in initialization browser internal memory, makes the marking variable value in browser internal memory consistent with the marking variable value of this domain name read in system registry; And according to the marking variable value obtained, to Main Domain or the domain name for subsequent use transmission data acquisition request of the domain name pointed by this network request.
Step S02, send data acquisition request to the Main Domain of domain name pointed by described network access request;
Step S03, send data acquisition request to the domain name for subsequent use of domain name pointed by described network access request.
The marking variable value getting the domain name pointed by this network request in registration table at browser is the first numeric ratio this marking variable as obtained when being 0, represents that the domain name pointed by this network request is accessed first in this life cycle of browser; Then browser acquiescence is according to first sending data acquisition request to the Main Domain of domain name pointed by this network request.
The marking variable value getting the domain name pointed by this network request in registration table at browser is this marking variable that second value such as obtains when being 1, represent in this life cycle of browser, domain name pointed by this network request is not accessed first, and in access history in the past, when Main Domain to domain name pointed by this network request sends data acquisition request, what obtain is obtain failed information; Therefore, when the marking variable value getting the domain name pointed by this network request in registration table at browser is 1, browser sends data acquisition request directly to the domain name for subsequent use of domain name pointed by this network request, when avoiding same process to send data acquisition request to the Main Domain of domain name pointed by this network request, the failure information to be returned such as lose time because again obtaining failure.
Utilize the method for accessing domain name described by the embodiment of the present invention, in a life cycle of browser, during same process access domain name, no matter this carry out subsequent request or this process restart after the first request, all directly can access available domain name corresponding to this domain name, namely this domain name can Main Domain or domain name for subsequent use corresponding to this domain name; Such as, after this Main Domain to a certain domain name of certain process sends the access failure of data access request, when next time sends data acquisition request to this domain name again, this process then can not first send request to the Main Domain that this domain name is corresponding again.In a preferred embodiment, at the end of this life cycle of browser, corresponding to each web access requests preserved in browser internal memory, the marking variable value of domain name all empties; In next life cycle of browser, then according to the network access request that user side is triggered, from system registry, obtain the marking variable value of the corresponding domain name of triggered network access request.
When embodiment of the present invention browser receives network access request, from system registry, read the marking variable value of domain name pointed by described network access request; When the marking variable value read is the first numerical value, the Main Domain to domain name pointed by this network access request sends data acquisition request; When the marking variable value read is second value, the domain name for subsequent use to domain name pointed by this network access request sends data acquisition request; Compared in prior art, in a life cycle of browser, after same process is restarted, the still first method sent request to the failed domain name of request, the embodiment of the present invention has the beneficial effect automatically selecting Main Domain corresponding to this domain name or domain name for subsequent use to send request.
Fig. 2 is method for accessing domain name second embodiment schematic flow sheet of the present invention; The difference of embodiment described in embodiment described in Fig. 2 and Fig. 1 is, embodiment described in Fig. 2 for be the step S02 of embodiment described in Fig. 1 and the description of the follow-up execution step of step S03, namely when the marking variable value obtained at browser is the first numerical value, after the Main Domain of domain name pointed by this network access request sends data acquisition request, the course of work of browser; And when the marking variable value that browser obtains is second value, after the domain name for subsequent use of domain name pointed by this network access request sends data acquisition request, the course of work of browser.
Based on the specific descriptions of embodiment described in Fig. 1, as shown in Figure 2, in step S02, send data acquisition request to the Main Domain of domain name pointed by network access request, also comprise afterwards:
When sending the success of the data acquisition pointed by this data acquisition request to Main Domain, perform step S201; When sending the failure of the data acquisition pointed by this data acquisition request to described Main Domain, perform step S202;
Step S201, marking variable value is saved as the first numerical value, and by the marking variable value record after preserving in system registry;
After browser sends data acquisition request to the Main Domain of domain name pointed by this network request, server responds this data acquisition request, and when returning the data of request, represent browser this to Main Domain send data acquisition request pointed by data acquisition success; Then marking variable value is now saved as the first numeric ratio as the marking variable value in now browser internal memory is saved as 0 by browser, and the information being the first numerical value by this marking variable value of preserving in internal memory is sent in system registry, makes system registry table record marking variable value now be the first numerical value.So that in this life cycle of browser, when certain process accesses same domain name corresponding to this network access request again, according to the marking variable value recorded in registration table, directly access Main Domain corresponding to this domain name, improve program response efficiency.
Step S202, from system registry, read the mark initial value of domain name pointed by this network access request; When the described mark initial value obtained is first threshold, perform step S203; When the mark initial value obtained is Second Threshold, perform step S204;
Step S203, send data acquisition request to the domain name for subsequent use of domain name pointed by this network access request;
Step S204, described marking variable value is set to second value, and the described mark initial value being set to second value is recorded in described registration table.
After browser sends data acquisition request to the Main Domain of domain name pointed by this network request, server because of connect time-out etc. reason do not respond this data acquisition request time, represent browser this to Main Domain send data acquisition request pointed by data acquisition failure; Then browser reads the mark initial value of domain name pointed by this network access request from system registry, and identifies this mark initial value.
If pointed by this network access request that browser identification is read, the mark initial value of domain name is the mark initial value that first threshold such as reads is 0, then represent in this life cycle of browser, first have sent data acquisition request to the Main Domain of domain name pointed by this network request, not yet sent data acquisition request to the domain name for subsequent use of domain name pointed by this network request, then browser sends data acquisition request to the domain name for subsequent use of domain name pointed by this network access request, attempts obtaining corresponding data.
If pointed by this network access request that browser identification is read, the mark initial value of domain name is the mark initial value that Second Threshold such as reads is 1, then represent in this life cycle of browser, browser sent data acquisition request to the domain name for subsequent use of domain name pointed by this network request, and the data acquisition failure pointed by the data acquisition request sent to this domain name for subsequent use, namely browser has carried out once automatically switching between the Main Domain and domain name for subsequent use of domain name pointed by this network access request, and it is all failed respectively to the data acquisition request of Main Domain and domain name for subsequent use transmission, then marking variable value is set to 0 by browser, and the marking variable being set to 0 is saved in system registry, this network access request is unsuccessfully to terminate.Further, the failure of the data acquisition pointed by this data acquisition request is being sent to described Main Domain, and pointed by this network request obtained, the initial value of domain name is Second Threshold when being such as 1, browser returns the information of the data acquisition failure pointed by described data acquisition request, to point out this network access request of user side unsuccessfully to terminate.
In the present embodiment, in step S03 and step S203, send data acquisition request to the domain name for subsequent use of domain name pointed by network access request, also comprise afterwards:
When sending the success of the data acquisition pointed by described data acquisition request to described domain name for subsequent use, perform step S301; When sending the failure of the data acquisition pointed by described data acquisition request to described domain name for subsequent use, perform step S302;
Step S301, marking variable value is saved as second value, and by the marking variable value record after preserving in system registry;
Step S302, from system registry, read the mark initial value of domain name pointed by this network access request;
When the described mark initial value obtained is Second Threshold, returns the step S02 performed in embodiment described in Fig. 1, send data acquisition request to the Main Domain of the corresponding domain name of this network access request; When the mark initial value obtained is first threshold, browser returns the information of the data acquisition failure pointed by described data acquisition request, to point out this network access request of user side unsuccessfully to terminate.
After browser sends data acquisition request to the domain name for subsequent use of domain name pointed by this network request, server responds this data acquisition request, and when returning the data of request, represent this data acquisition success pointed by data acquisition request sent to domain name for subsequent use of browser; Then marking variable value is now set to second value and such as marking variable value is now set to 1 by browser, and the marking variable value being set to second value is saved in system registry, make system registry table record marking variable value now be second value; So that in this life cycle of browser, when certain process accesses same domain name corresponding to this network access request again, according to the marking variable value recorded in registration table, the domain name for subsequent use that this domain name of direct access is corresponding, avoid the Main Domain that this domain name of repeated accesses is invalid, improve program response efficiency.
After browser sends data acquisition request to the domain name for subsequent use of domain name pointed by this network request, when server does not respond this data acquisition request because connecting the reasons such as time-out, represent this data acquisition failure pointed by data acquisition request sent to domain name for subsequent use of browser; Then browser reads the mark initial value of domain name pointed by this network access request from system registry, and identifies this mark initial value.
If pointed by this network access request that browser identification is read, the mark initial value of domain name is the mark initial value that Second Threshold such as reads is 1, then represent in this life cycle of browser, first have sent data acquisition request to the domain name for subsequent use of domain name pointed by this network request, not yet sent data acquisition request to the Main Domain of domain name pointed by this network request, then browser sends data acquisition request to the Main Domain of domain name pointed by this network access request, attempts obtaining corresponding data.
If pointed by this network access request that browser identification is read, the mark initial value of domain name is the mark initial value that first threshold such as reads is 0, then represent in this life cycle of browser, browser sent data acquisition request to the Main Domain of domain name pointed by this network request, and the data acquisition failure pointed by the data acquisition request sent to this domain name for subsequent use, namely browser has carried out once automatically switching between the Main Domain and domain name for subsequent use of domain name pointed by this network access request, and it is all failed respectively to the data acquisition request of Main Domain and domain name for subsequent use transmission, then this network access request is unsuccessfully to terminate.Further, the failure of the data acquisition pointed by this data acquisition request is being sent to described domain name for subsequent use, and pointed by this network request obtained, the initial value of domain name is first threshold when being such as 0, browser returns the information of the data acquisition failure pointed by described data acquisition request, to point out this network access request of user side unsuccessfully to terminate.
The present embodiment browser is according to the result to Main Domain, domain name for subsequent use transmission data acquisition request, and combine the mark initial value of domain name pointed by the web access requests that obtains from system registry, identify that in domain name pointed by web access requests, whether Main Domain and domain name for subsequent use be effective, in the same domain name of concrete automatic switchover, the beneficial effect of Main Domain and domain name for subsequent use, avoids the trouble of the invalid domain name of repeated obtain; And after browser process startup, same domain name is only carried out to the switching of a Main Domain and domain name for subsequent use; In addition, owing to saving current available domain name in system registry, therefore when the process in browser once after finding available effective domain name, follow-uply all automatically using effective domain name to carry out data processing, finding effective domain name without the need to again attempting; Improve program response efficiency.
Fig. 3 is domain name access device one embodiment high-level schematic functional block diagram of the present invention; As shown in Figure 3, domain name access device of the present invention comprises: variate-value read module 01 and data acquisition module 02.
Variate-value read module 01, during for receiving network access request, reads the marking variable value of domain name pointed by described network access request from system registry;
Browser receive user side trigger network access request as http request time, obtain the domain name pointed by this network access request; The domain name pointed by this network access request that browser obtains comprises Main Domain and domain name for subsequent use.
Variate-value read module 01 reads the current domain name identification of domain name pointed by this network access request from the registration table of system, i.e. the marking variable value of domain name.According to the marking variable value of this domain name read from registration table, the marking variable value in variate-value read module 01 initialization browser internal memory, makes the marking variable value in browser internal memory consistent with the marking variable value of this domain name read in system registry; According to the marking variable value that variate-value read module 01 obtains, data acquisition module 02 sends data acquisition request to the Main Domain of the domain name pointed by this network request or domain name for subsequent use.
Data acquisition module 02, for when described marking variable value is the first numerical value, the Main Domain to domain name pointed by described network access request sends data acquisition request; When described marking variable value is second value, the domain name for subsequent use to domain name pointed by described network access request sends data acquisition request.
The marking variable value getting the domain name pointed by this network request in registration table at variate-value read module 01 is the first numeric ratio this marking variable as obtained when being 0, represent in this life cycle of browser, the domain name pointed by this network request is accessed first; Then data acquisition module 02 is given tacit consent to according to first sending data acquisition request to the Main Domain of domain name pointed by this network request.
The marking variable value getting the domain name pointed by this network request in registration table at variate-value read module 01 is this marking variable that second value such as obtains when being 1, represent in this life cycle of browser, domain name pointed by this network request is not accessed first, and in access history in the past, when Main Domain to domain name pointed by this network request sends data acquisition request, what obtain is obtain failed information; Therefore, the marking variable value getting the domain name pointed by this network request in registration table at variate-value read module 01 is second value when being such as 1, data acquisition module 02 sends data acquisition request directly to the domain name for subsequent use of domain name pointed by this network request, when avoiding same process to send data acquisition request to the Main Domain of domain name pointed by this network request, the failure information to be returned such as lose time because again obtaining failure.
Utilize the method for accessing domain name described by the embodiment of the present invention, in a life cycle of browser, during same process access domain name, no matter this carry out subsequent request or this process restart after the first request, all directly can access available domain name corresponding to this domain name, namely this domain name can Main Domain or domain name for subsequent use corresponding to this domain name; Such as, after this Main Domain to a certain domain name of certain process sends the access failure of data access request, when next time sends data acquisition request to this domain name again, this process then can not first send request to the Main Domain that this domain name is corresponding again.In a preferred embodiment, at the end of this life cycle of browser, corresponding to each web access requests preserved in browser internal memory, the marking variable value of domain name all empties; In next life cycle of browser, then according to the network access request that user side is triggered, from system registry, obtain the marking variable value of the corresponding domain name of triggered network access request.
When embodiment of the present invention browser receives network access request, from system registry, read the marking variable value of domain name pointed by described network access request; When the marking variable value read is the first numerical value, the Main Domain to domain name pointed by this network access request sends data acquisition request; When the marking variable value read is second value, the domain name for subsequent use to domain name pointed by this network access request sends data acquisition request; Compared in prior art, in a life cycle of browser, after same process is restarted, the still first method sent request to the failed domain name of request, the embodiment of the present invention has the beneficial effect automatically selecting Main Domain corresponding to this domain name or domain name for subsequent use to send request.
Please referring again to Fig. 3, in domain name access device of the present invention, after data acquisition module 02 sends data acquisition request to the Main Domain of domain name pointed by this network request, server responds this data acquisition request, and when returning the data of request, represent data acquisition module 02 this to Main Domain send data acquisition request pointed by data acquisition success; Then marking variable value is now saved as the first numeric ratio as the marking variable value in now browser internal memory is saved as 0 by data acquisition module 02, and the information being the first numerical value by this marking variable value of preserving in internal memory is sent in system registry, makes system registry table record marking variable value now be the first numerical value.So that in this life cycle of browser, when certain process accesses same domain name corresponding to this network access request again, according to the marking variable value recorded in registration table, directly access Main Domain corresponding to this domain name, improve program response efficiency.
After data acquisition module 02 sends data acquisition request to the Main Domain of domain name pointed by this network request, server because of connect time-out etc. reason do not respond this data acquisition request time, represent data acquisition module 02 this to Main Domain send data acquisition request pointed by data acquisition failure; Then data acquisition module 02 reads the mark initial value of domain name pointed by this network access request from system registry, and identifies this mark initial value.
If pointed by this network access request that data acquisition module 02 identification is read, the mark initial value of domain name is the mark initial value that first threshold such as reads is 0, then represent in this life cycle of browser, first have sent data acquisition request to the Main Domain of domain name pointed by this network request, not yet sent data acquisition request to the domain name for subsequent use of domain name pointed by this network request, then data acquisition module 02 sends data acquisition request to the domain name for subsequent use of domain name pointed by this network access request, attempts obtaining corresponding data.
If pointed by this network access request that data acquisition module 02 identification is read, the mark initial value of domain name is the mark initial value that Second Threshold such as reads is 1, then represent in this life cycle of browser, browser sent data acquisition request to the domain name for subsequent use of domain name pointed by this network request, and the data acquisition failure pointed by the data acquisition request sent to this domain name for subsequent use, namely data acquisition module 02 has carried out once automatically switching between the Main Domain and domain name for subsequent use of domain name pointed by this network access request, and it is all failed respectively to the data acquisition request of Main Domain and domain name for subsequent use transmission, then marking variable value is set to the first numeric ratio as marking variable value is set to 0 by data acquisition module 02, and the marking variable being set to the first numerical value is saved in system registry, this network access request is unsuccessfully to terminate.Further, the failure of the data acquisition pointed by this data acquisition request is being sent to described Main Domain, and when pointed by this network request obtained, the initial value of domain name is Second Threshold, browser returns the information of the data acquisition failure pointed by described data acquisition request, to point out this network access request of user side unsuccessfully to terminate.
After data acquisition module 02 sends data acquisition request to the domain name for subsequent use of domain name pointed by this network request, server responds this data acquisition request, and when returning the data of request, represent this data acquisition success pointed by data acquisition request sent to domain name for subsequent use of browser; Then marking variable value is now set to second value and such as marking variable value is now set to 1 by data acquisition module 02, and the marking variable value being set to second value is saved in system registry, make system registry table record marking variable value now be second value; So that in this life cycle of browser, when certain process accesses same domain name corresponding to this network access request again, according to the marking variable value recorded in registration table, the domain name for subsequent use that this domain name of direct access is corresponding, avoid the Main Domain that this domain name of repeated accesses is invalid, improve program response efficiency.
After data acquisition module 02 sends data acquisition request to the domain name for subsequent use of domain name pointed by this network request, when server does not respond this data acquisition request because connecting the reasons such as time-out, represent this data acquisition failure pointed by data acquisition request sent to domain name for subsequent use of browser; Then data acquisition module 02 reads the mark initial value of domain name pointed by this network access request from system registry, and identifies this mark initial value.
If pointed by this network access request that data acquisition module 02 identification is read, the mark initial value of domain name is the mark initial value that Second Threshold such as reads is 1, then represent in this life cycle of browser, first have sent data acquisition request to the domain name for subsequent use of domain name pointed by this network request, not yet sent data acquisition request to the Main Domain of domain name pointed by this network request, then data acquisition module 02 sends data acquisition request to the Main Domain of domain name pointed by this network access request, attempts obtaining corresponding data.
If pointed by this network access request that data acquisition module 02 identification is read, the mark initial value of domain name is the mark initial value that first threshold such as reads is 0, then represent in this life cycle of browser, browser sent data acquisition request to the Main Domain of domain name pointed by this network request, and the data acquisition failure pointed by the data acquisition request sent to this domain name for subsequent use, namely data acquisition module 02 has carried out once automatically switching between the Main Domain and domain name for subsequent use of domain name pointed by this network access request, and it is all failed respectively to the data acquisition request of Main Domain and domain name for subsequent use transmission, then this network access request is unsuccessfully to terminate.Further, the failure of the data acquisition pointed by this data acquisition request is being sent to described domain name for subsequent use, and the initial value of domain name pointed by this network request obtained is this initial value that first threshold such as obtains when being 0, browser returns the information of the data acquisition failure pointed by described data acquisition request, to point out this network access request of user side unsuccessfully to terminate.
The present embodiment browser is according to the result to Main Domain, domain name for subsequent use transmission data acquisition request, and combine the mark initial value of domain name pointed by the web access requests that obtains from system registry, identify that in domain name pointed by web access requests, whether Main Domain and domain name for subsequent use be effective, in the same domain name of concrete automatic switchover, the beneficial effect of Main Domain and domain name for subsequent use, avoids the trouble of the invalid domain name of repeated obtain; And after browser process startup, same domain name is only carried out to the switching of a Main Domain and domain name for subsequent use; In addition, owing to saving current available domain name in system registry, therefore when the process in browser once after finding available effective domain name, follow-uply all automatically using effective domain name to carry out data processing, finding effective domain name without the need to again attempting; Improve program response efficiency.
It should be noted that, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising this key element and also there is other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that above-described embodiment method can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (the domain name access device as described in ROM/RAM, magnetic disc, CD, Fig. 3), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computer, server, or the network equipment, or the domain name access device etc. described in Fig. 3) perform method described in the present invention each embodiment.
The foregoing is only the preferred embodiments of the present invention; not thereby its scope of the claims is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; directly or indirectly be used in the technical field that other are relevant, be all in like manner included in scope of patent protection of the present invention.

Claims (12)

1. a method for accessing domain name, is characterized in that, comprises the following steps:
When receiving network access request, from system registry, read the marking variable value of domain name pointed by described network access request;
When described marking variable value is the first numerical value, the Main Domain to domain name pointed by described network access request sends data acquisition request;
When described marking variable value is second value, the domain name for subsequent use to domain name pointed by described network access request sends data acquisition request.
2. the method for claim 1, is characterized in that, the described Main Domain to domain name pointed by network access request sends data acquisition request, also comprises afterwards:
When sending the success of the data acquisition pointed by described data acquisition request to described Main Domain, described marking variable value is saved as described first numerical value, and by the described marking variable value record after preservation to described registration table;
When sending the failure of the data acquisition pointed by described data acquisition request to described Main Domain, from described registration table, read the mark initial value of domain name pointed by described network access request; When the described mark initial value obtained is first threshold, send described data acquisition request to the domain name for subsequent use of domain name pointed by described network access request.
3. method as claimed in claim 2, it is characterized in that, described when sending the failure of the data acquisition pointed by described data acquisition request to Main Domain, from described registration table, read the mark initial value of domain name pointed by described network access request, also comprise afterwards:
When the described mark initial value obtained is Second Threshold, described marking variable value is set to described second value, and the described mark initial value being set to described second value is recorded in described registration table.
4. method as claimed in claim 3, is characterized in that, described marking variable value is set to described second value, and is recorded in described registration table by the described mark initial value being set to described second value, also comprises afterwards:
Return the information of the data acquisition failure pointed by described data acquisition request.
5. method as claimed in claim 1 or 2, is characterized in that, describedly sends described data acquisition request to the domain name for subsequent use of domain name pointed by network access request, also comprises afterwards:
When sending the success of the data acquisition pointed by described data acquisition request to described domain name for subsequent use, described marking variable value is saved as described second value, and by the described marking variable value record after preservation to described registration table;
When sending the failure of the data acquisition pointed by described data acquisition request to described domain name for subsequent use, from described registration table, read the mark initial value of domain name pointed by described network access request; When the described mark initial value obtained is Second Threshold, send described data acquisition request to described Main Domain.
6. method as claimed in claim 5, it is characterized in that, described when sending the failure of the data acquisition pointed by described data acquisition request to domain name for subsequent use, from described registration table, read the mark initial value of domain name pointed by described network access request, also comprise afterwards:
When the described mark initial value obtained is first threshold, return the information of the data acquisition failure pointed by described data acquisition request.
7. a domain name access device, is characterized in that, comprising:
Variate-value read module, during for receiving network access request, reads the marking variable value of domain name pointed by described network access request from system registry;
Data acquisition module, for when described marking variable value is the first numerical value, the Main Domain to domain name pointed by described network access request sends data acquisition request; When described marking variable value is second value, the domain name for subsequent use to domain name pointed by described network access request sends data acquisition request.
8. device as claimed in claim 7, it is characterized in that, described data acquisition module is used for:
When sending the success of the data acquisition pointed by described data acquisition request to described Main Domain, described marking variable value is saved as described first numerical value, and by the described marking variable value record after preservation to described registration table;
When sending the failure of the data acquisition pointed by described data acquisition request to described Main Domain, from described registration table, read the mark initial value of domain name pointed by described network access request; When the described mark initial value obtained is first threshold, send described data acquisition request to the domain name for subsequent use of domain name pointed by described network access request.
9. device as claimed in claim 8, is characterized in that, described data acquisition module also for:
When the described mark initial value obtained is Second Threshold, described marking variable value is set to described second value, and the described mark initial value being set to described second value is recorded in described registration table.
10. device as claimed in claim 9, is characterized in that, described data acquisition module also for:
Return the information of the data acquisition failure pointed by described data acquisition request.
11. devices as claimed in claim 7 or 8, it is characterized in that, described data acquisition module is used for:
When sending the success of the data acquisition pointed by described data acquisition request to described domain name for subsequent use, described marking variable value is saved as described second value, and by the described marking variable value record after preservation to described registration table;
When sending the failure of the data acquisition pointed by described data acquisition request to described domain name for subsequent use, from described registration table, read the mark initial value of domain name pointed by described network access request; When the described mark initial value obtained is Second Threshold, send described data acquisition request to described Main Domain.
12. devices as claimed in claim 11, is characterized in that, described data acquisition module also for:
When the described mark initial value obtained is first threshold, return the information of the data acquisition failure pointed by described data acquisition request.
CN201310547980.2A 2013-11-06 2013-11-06 Method for accessing domain name and device Active CN104639666B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310547980.2A CN104639666B (en) 2013-11-06 2013-11-06 Method for accessing domain name and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310547980.2A CN104639666B (en) 2013-11-06 2013-11-06 Method for accessing domain name and device

Publications (2)

Publication Number Publication Date
CN104639666A true CN104639666A (en) 2015-05-20
CN104639666B CN104639666B (en) 2019-04-16

Family

ID=53217967

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310547980.2A Active CN104639666B (en) 2013-11-06 2013-11-06 Method for accessing domain name and device

Country Status (1)

Country Link
CN (1) CN104639666B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218353A (en) * 2017-06-30 2019-01-15 苏宁云商集团股份有限公司 A kind of method and device of link establishment
CN109617912A (en) * 2019-01-15 2019-04-12 成都知道创宇信息技术有限公司 A kind of device intelligently switching anti-ddos attack using multiple domain names
CN109618017A (en) * 2018-12-12 2019-04-12 北京知道创宇信息技术有限公司 Domain name management method, apparatus and system
CN109743364A (en) * 2018-12-20 2019-05-10 广州市百果园信息技术有限公司 Multistep connection control method, device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002344488A (en) * 2001-05-15 2002-11-29 Fumio Kobayashi Network system and method for operating a plurality of domains simultaneously
CN1499396A (en) * 2002-10-24 2004-05-26 �Ҵ���˾ Method and device for maintaining internet field names data
CN1674593A (en) * 2005-04-01 2005-09-28 南京邮电学院 Automatic distributing and setting up address method based on master-slave communication mode
CN1679020A (en) * 2002-09-03 2005-10-05 摩托罗拉公司(在特拉华州注册的公司) Multiple unicast of data to multiple hosts having the same domain name
CN101340327A (en) * 2008-08-21 2009-01-07 腾讯科技(深圳)有限公司 Method, system and domain name parsing server implementing load balance of network server
US7680876B1 (en) * 2006-12-14 2010-03-16 Cisco Technology, Inc. Highly available domain name system
CN102137174A (en) * 2010-12-29 2011-07-27 华为技术有限公司 Method for caching of domain name system, authorized domain name server and cache domain name server
CN102790808A (en) * 2011-05-16 2012-11-21 奇智软件(北京)有限公司 Domain name resolution method and system, client

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002344488A (en) * 2001-05-15 2002-11-29 Fumio Kobayashi Network system and method for operating a plurality of domains simultaneously
CN1679020A (en) * 2002-09-03 2005-10-05 摩托罗拉公司(在特拉华州注册的公司) Multiple unicast of data to multiple hosts having the same domain name
CN1499396A (en) * 2002-10-24 2004-05-26 �Ҵ���˾ Method and device for maintaining internet field names data
CN1674593A (en) * 2005-04-01 2005-09-28 南京邮电学院 Automatic distributing and setting up address method based on master-slave communication mode
US7680876B1 (en) * 2006-12-14 2010-03-16 Cisco Technology, Inc. Highly available domain name system
CN101340327A (en) * 2008-08-21 2009-01-07 腾讯科技(深圳)有限公司 Method, system and domain name parsing server implementing load balance of network server
CN102137174A (en) * 2010-12-29 2011-07-27 华为技术有限公司 Method for caching of domain name system, authorized domain name server and cache domain name server
CN102790808A (en) * 2011-05-16 2012-11-21 奇智软件(北京)有限公司 Domain name resolution method and system, client

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218353A (en) * 2017-06-30 2019-01-15 苏宁云商集团股份有限公司 A kind of method and device of link establishment
CN109618017A (en) * 2018-12-12 2019-04-12 北京知道创宇信息技术有限公司 Domain name management method, apparatus and system
CN109743364A (en) * 2018-12-20 2019-05-10 广州市百果园信息技术有限公司 Multistep connection control method, device, computer equipment and storage medium
CN109617912A (en) * 2019-01-15 2019-04-12 成都知道创宇信息技术有限公司 A kind of device intelligently switching anti-ddos attack using multiple domain names

Also Published As

Publication number Publication date
CN104639666B (en) 2019-04-16

Similar Documents

Publication Publication Date Title
CN107832329B (en) Page resource obtaining method and terminal equipment
CN106302595B (en) Method and equipment for carrying out health check on server
US20170185678A1 (en) Crawler system and method
KR102194052B1 (en) Service execution method and device
EP3319293A1 (en) Cross-terminal login-free method and device
CN106936791B (en) Method and device for intercepting malicious website access
CN113366815B (en) Network resource request method, device, electronic equipment and storage medium
CN106059825A (en) Distributed system and configuration method
US10645001B2 (en) Information transmission method and apparatus, device and storage medium
CN107154963B (en) Request processing method and device and electronic equipment
CN102572014A (en) Message processing method and device and system thereof
US20140214963A1 (en) Method, server and system for data sharing in social networking service
CN102783119A (en) Access control method and system, and access terminal
CN110267314B (en) Method and device for switching network slices
CN112836152B (en) Page rendering method, system, computer device and computer readable storage medium
US20170289243A1 (en) Domain name resolution method and electronic device
CN104639666A (en) Domain name access method and device
CN108924043A (en) System monitoring method, gateway communication, gateway apparatus, service processing equipment
WO2020088170A1 (en) Domain name system configuration method and related apparatus
CN113407383A (en) Main/standby system switching method and device, server and main/standby system
JP6779307B2 (en) Method and device for page display
CN110347955B (en) Resource detection method and device
CN107241446B (en) File transmission method and device of application program, terminal equipment and storage medium
US20190208471A1 (en) Smart card control method and device, terminal device and smart card
CN111159298B (en) Service request processing method and device, electronic equipment and storage medium

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221122

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133

Patentee after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 2, 518044, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.