CN110381081B - Network access method and device and electronic equipment - Google Patents

Network access method and device and electronic equipment Download PDF

Info

Publication number
CN110381081B
CN110381081B CN201910725177.0A CN201910725177A CN110381081B CN 110381081 B CN110381081 B CN 110381081B CN 201910725177 A CN201910725177 A CN 201910725177A CN 110381081 B CN110381081 B CN 110381081B
Authority
CN
China
Prior art keywords
domain name
access
domain
wide area
domain names
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
Application number
CN201910725177.0A
Other languages
Chinese (zh)
Other versions
CN110381081A (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.)
Shanghai Ismartv Network Technologies Co ltd
Original Assignee
Shanghai Ismartv Network Technologies 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 Shanghai Ismartv Network Technologies Co ltd filed Critical Shanghai Ismartv Network Technologies Co ltd
Priority to CN201910725177.0A priority Critical patent/CN110381081B/en
Publication of CN110381081A publication Critical patent/CN110381081A/en
Application granted granted Critical
Publication of CN110381081B publication Critical patent/CN110381081B/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/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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5076Update or notification mechanisms, e.g. DynDNS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to the field of network technologies, and in particular, to a network access method, a device, and an electronic device. A network access method comprising: responding to a network access request for accessing a wide area network service, and acquiring a domain name set corresponding to the network access request, wherein the domain name set comprises a plurality of domain names; sequentially initiating access to the wide area network service through the plurality of domain names to obtain an access result of the domain name which has initiated the access in the plurality of domain names; and deleting the unavailable domain name from the domain name set according to the access result. The network access method, the network access device and the electronic equipment can improve the access efficiency of the wide area network service on the basis of ensuring the normal access of the wide area network service.

Description

Network access method and device and electronic equipment
Technical Field
The present invention relates to the field of network technologies, and in particular, to a network access method, a device, and an electronic device.
Background
In the prior art, when access to a wide area network service needs to be initiated, the same domain name is generally used, and after the first access fails, repeated access is performed again through the domain name. The problem with this is that if the domain name is hijacked, the content delivery network (Content Delivery Network, CDN) server crashes, or the source server is under too much pressure, resulting in network congestion, etc., there is no way to guarantee normal access to the wide area network service.
In view of the above problems, a solution is to provide a domain name set including a plurality of domain names in advance, and when access to a certain wide area network service needs to be initiated, repeated access is performed by traversing the domain name set. This increases the normal access rate of wide area network access, but affects the access efficiency of wide area network access if some of the domain names in the set of domain names are not otherwise available.
Disclosure of Invention
An object of the embodiments of the present application is to provide a network access method, device, and electronic device, so as to improve access efficiency of a wide area network service on the basis of ensuring normal access of the wide area network service.
In a first aspect, an embodiment of the present application provides a network access method, including:
responding to a network access request for accessing a wide area network service, and acquiring a domain name set corresponding to the network access request, wherein the domain name set comprises a plurality of domain names;
sequentially initiating access to the wide area network service through the plurality of domain names to obtain an access result of the domain name which has initiated access in the plurality of domain names;
and deleting the unavailable domain name from the domain name set according to the access result.
According to the network access method provided by the embodiment of the invention, the network access request for accessing the wide area network service can be responded, the domain name set corresponding to the network access request is obtained, the domain name set comprises a plurality of domain names, access is sequentially initiated to the wide area network service through the plurality of domain names, the access result of the domain name which has been initiated to access in the plurality of domain names is obtained, and then the unavailable domain name is deleted from the domain name set according to the access result. Therefore, after the access to the wide area network service is initiated by the domain names in turn for the first time, when the access is initiated again, the access to the wide area network service is prevented from being initiated again by the unavailable domain names, and the purpose of improving the access efficiency of the wide area network service on the basis of ensuring the normal access of the wide area network service is achieved.
With reference to the first aspect, in a first optional implementation manner of the first aspect provided by the embodiments of the present application, the sequentially initiating, by the multiple domain names, access to the wide area network service, to obtain an access result of a domain name that has initiated access from among the multiple domain names, includes:
acquiring the priority orders of the domain names;
and according to the priority order, sequentially initiating access to the wide area network service through the plurality of domain names until the access is successful or the access of the plurality of domain names fails, and obtaining the access result of the domain name which has initiated the access in the plurality of domain names.
In the network access method provided in the embodiment of the present application, access is sequentially initiated to a wide area network service through a plurality of domain names, and an access result of a domain name from which access has been initiated in the plurality of domain names is obtained, including: and acquiring the priority order of the plurality of domain names, and sequentially initiating access to the wide area network service through the plurality of domain names according to the priority order until the access is successful or the access of the plurality of domain names fails, and acquiring the access result of the domain names which have initiated the access in the plurality of domain names. In this way, when access is sequentially initiated to the wide area network service through the plurality of domain names, the access can be performed according to the priority order, thereby further improving the access efficiency of the wide area network service.
With reference to the first optional implementation manner of the first aspect, the embodiment of the present application further provides a second optional implementation manner of the first aspect, where the acquiring a priority order of the plurality of domain names includes:
respectively testing the connection speed of each domain name pointing to the CDN server in the plurality of domain names;
obtaining the priority order of each domain name pointing to the CDN server according to the connection speed test result;
the priority of the domain name of the plurality of domain names directed to the source station server is set to the lowest level.
In this embodiment of the present application, obtaining a priority order of a plurality of domain names includes: and respectively carrying out connection speed test on each domain name pointing to the CDN server in the plurality of domain names, obtaining the priority order of each domain name pointing to the CDN server according to the connection speed test result, and setting the priority of the domain name pointing to the source station server in the plurality of domain names as the lowest level. Therefore, network congestion caused by overlarge pressure of the source station server can be avoided, and normal access of wide area network service is guaranteed.
With reference to the first aspect, the embodiments of the present application further provide a third optional implementation manner of the first aspect, where deleting, according to the access result, an unavailable domain name from the domain name set includes:
determining all target domain names included in the plurality of domain names, wherein the target domain names are domain names which initiate access failure to the wide area network service;
detecting the availability of all the target domain names;
and deleting the target domain name with the unavailable availability detection result from the domain name set.
In this embodiment, deleting, according to the access result, the domain name that is not available from the domain name set includes: determining all target domain names included in the plurality of domain names, wherein the target domain names are domain names which initiate access failure to the wide area network service, detecting the availability of all target domain names, and deleting the target domain names with the unavailable availability detection result from the domain name set. Therefore, the unavailable domain name can be reliably deleted from the domain name set, and the access efficiency of the wide area network service is improved on the basis of ensuring the normal access of the wide area network service.
With reference to the third optional implementation manner of the first aspect, the embodiment of the present application further provides a fourth optional implementation manner of the first aspect, where the performing availability detection on all the target domain names includes:
obtaining network access feedback information corresponding to each target domain name;
and obtaining an availability detection result of the target domain name according to the network access feedback information.
In the embodiment of the present application, the availability detection for all the target domain names includes: and obtaining network access feedback information corresponding to each target domain name, and obtaining an availability detection result of the target domain name according to the network access feedback information. Thus, the accuracy of the target domain name availability detection result can be further improved, and the aim of reliably deleting the unavailable domain name from the domain name set is fulfilled.
With reference to the first aspect, the embodiments of the present application further provide a fifth optional implementation manner of the first aspect, where the method further includes:
according to a preset time interval, a domain name acquisition request is initiated to a source station server, and a domain name set corresponding to the wide area network service is acquired;
and replacing the domain name set acquired before by using the domain name set acquired later.
The network access method provided by the embodiment of the application further comprises the following steps: and initiating a domain name acquisition request to a source station server according to a preset time interval, acquiring a domain name set corresponding to the wide area network service, and replacing the domain name set acquired in advance by utilizing the domain name set acquired later. In this way, after the access to the wide area network service is initiated by the multiple domain names in turn for the first time and the multiple domain names are determined to be unavailable, the access to the wide area network service can be initiated again by including the multiple domain names in the re-acquired domain name set.
With reference to the first aspect or the fifth optional implementation manner of the first aspect, the embodiment of the present application further provides a sixth optional implementation manner of the first aspect, and after deleting, according to the access result, an unavailable domain name from the domain name set, the method further includes:
judging whether the domain name set is empty or not;
and if the domain name set is empty, re-acquiring the domain name set corresponding to the wide area network service.
In this embodiment of the present application, after deleting the unavailable domain name from the domain name set according to the access result, the method further includes: judging whether the domain name set is empty, if so, sending a domain name acquisition request to a source station server, and re-acquiring the domain name set corresponding to the wide area network service. Thus, after the access to the wide area network service is initiated by the plurality of domain names in turn for the first time and the plurality of domain names are determined to be unavailable, the access to the wide area network service can be initiated again by the plurality of domain names included in the re-acquired domain name set, so that the purpose of improving the access efficiency of the wide area network service is achieved on the basis of ensuring the normal access of the wide area network service.
In a second aspect, an embodiment of the present application further provides a network access device, including:
a first set acquisition module, configured to respond to a network access request for accessing a wide area network service, and acquire a domain name set corresponding to the network access request, where the domain name set includes a plurality of domain names;
the result acquisition module is used for sequentially initiating access to the wide area network service through the plurality of domain names and acquiring the access result of the domain name which has initiated the access in the plurality of domain names;
and the domain name deleting module is used for deleting the unavailable domain name from the domain name set according to the access result.
The network access device provided by the embodiment of the application comprises a first set acquisition module, a result acquisition module and a domain name deletion module. The first set obtaining module can respond to a network access request for accessing the wide area network service to obtain a domain name set corresponding to the network access request, wherein the domain name set comprises a plurality of domain names. The result acquisition module can sequentially initiate access to the wide area network service through the plurality of domain names, and acquire the access result of the domain name which has initiated access in the plurality of domain names. The domain name deletion module is capable of deleting the unavailable domain name from the domain name set according to the access result. Therefore, after the access to the wide area network service is initiated by the domain names in turn for the first time, when the access is initiated again, the access to the wide area network service is prevented from being initiated again by the unavailable domain names, and the purpose of improving the access efficiency of the wide area network service on the basis of ensuring the normal access of the wide area network service is achieved.
In a third aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement a network access method provided in the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium, where a computer program is stored, where the computer program is executed to implement the network access method provided in the first aspect or any optional implementation manner of the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic block diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart of a network access method according to an embodiment of the present application.
Fig. 3 is a schematic block diagram of a wide area network service system according to an embodiment of the present application.
Fig. 4 is a schematic block diagram of a domain name set according to an embodiment of the present application.
Fig. 5 is a schematic block diagram of a network access device according to an embodiment of the present application.
Reference numerals: 100-an electronic device; 110-a processor; 120-memory; 200-network access means; 210-a first set acquisition module; 220-a result acquisition module; 230-domain name deletion module.
Detailed Description
For the purposes, technical solutions and advantages of the embodiments of the present application, the technical solutions of the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
Referring to fig. 1, a schematic block diagram of an electronic device 100 applying a network access method and apparatus according to an embodiment of the present application is shown. In the embodiment of the present application, the electronic device 100 may be, but is not limited to, a smart phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PAD), a mobile internet device (Mobile Internet Device, MID), and the like. Structurally, the electronic device 100 may include a processor 110 and a memory 120.
The processor 110 is electrically connected to the memory 120, either directly or indirectly, to enable data transmission or interaction, for example, the elements may be electrically connected to each other via one or more communication buses or signal lines. The network access device 200 includes at least one software module that may be stored in the memory 120 in the form of software or Firmware (Firmware) or cured in an Operating System (OS) of the electronic apparatus 100. The processor 110 is configured to execute executable modules stored in the memory 120, such as software functional modules and computer programs included in the network access device 200, to implement a network access method. The processor 110 may execute the computer program after receiving the execution instructions.
The processor 110 may be an integrated circuit chip with signal processing capability. The processor 110 may also be a general purpose processor, for example, a digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), discrete gate or transistor logic, discrete hardware components, and may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. Further, the general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 120 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), and electrically erasable programmable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM). The memory 120 is used for storing a program, and the processor 110 executes the program after receiving an execution instruction.
It should be understood that the configuration shown in fig. 1 is merely illustrative, and the electronic device 100 provided in the embodiment of the present application may also have fewer or more components than those shown in fig. 1, or may have a different configuration than that shown in fig. 1. In addition, the components shown in fig. 1 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart of a network access method according to an embodiment of the present application, where the method is applied to the electronic device 100 shown in fig. 1. It should be noted that, the network access method provided in the embodiment of the present application is not limited to the sequence shown in fig. 2 and the following, and the specific flow and steps of the network access method are described below in conjunction with fig. 2.
Step S100, responding to a network access request for accessing a wide area network service, and acquiring a domain name set corresponding to the network access request, wherein the domain name set comprises a plurality of domain names.
In this embodiment, the wide area network service may be a data service provided by platforms such as naughty, jindong, tremble, fighting fish TV, google, and dog search. Referring to fig. 3, in a wan service system, an electronic device can communicate with a plurality of CDN servers, and a source server for storing source data of a wan service, where each CDN server is configured to manage a plurality of node servers, and the node servers are configured to cache part of data of the wan service, for example, static data of the wan service. And the plurality of domain names included in the domain name set may be a plurality of CDN domain names directed to CDN servers and source domain names directed to source servers (as shown in fig. 4).
Step S200, access is initiated to the wide area network service through the domain names in sequence, and an access result of the domain name which has initiated the access in the domain names is obtained.
In this embodiment of the present application, the access to the wan service may be initiated sequentially by a plurality of domain names, for example, according to a preset order, or may be initiated according to a random order. However, in order to further improve the access efficiency of the wan service, in the embodiment of the present application, it is preferable to initiate access to the wan service according to the priority order.
When access is initiated to the wide area network service in the order of priority, step S200 may include three sub-steps of step S210, step S220, and step S230.
Step S210, acquiring the priority orders of the domain names.
For step S210, as a first optional implementation manner, in this embodiment of the present application, the priority order of the multiple domains may be preset at the source server, for example, for the domains pointing to the CDN servers, the priority order of the corresponding CDN domains may be set according to the number of operators of the CDN servers, the service capability evaluation result of the CDN server operators, the number of node servers managed by the CDN servers, and other evaluation factors, and finally, the priority of the domain pointing to the source server in the multiple domains is set to the lowest level. Based on this, it can be appreciated that the plurality of domain name books included in the domain name set carry a pre-set priority order.
For step S210, as a second alternative implementation manner, in this embodiment of the present application, the priority order of the multiple domain names may also be determined in real time by the electronic device. Based on this, step S210 further includes three sub-steps of step S211, step S212, and step S213.
Step S211, performing connection speed test on each domain name pointing to the CDN server in the plurality of domain names.
In this embodiment of the present application, the connection speed test method may download a test file from each CDN server, determine the download time length of the test file, or perform a connection speed test on each domain name pointing to the CDN server in the multiple domain names by using a "ping" command.
Step S212, according to the connection speed test result, the priority order of each domain name pointing to the CDN server is obtained. It can be understood that in the embodiment of the present application, the order of priority of the corresponding domain names is set according to the connection speed of the CDN server.
In step S213, the priority of the domain name pointing to the source station server among the plurality of domain names is set to the lowest level, so as to avoid network congestion caused by excessive pressure of the source station server.
Step S220, according to the priority order, the access is initiated to the wide area network service through the plurality of domain names in turn until the access is successful or the access of the plurality of domain names fails, and the access result of the domain names which have initiated the access in the plurality of domain names is obtained. In this embodiment of the present application, after each access to the wan service is initiated through a domain name, the access result of the domain name may be obtained immediately and stored. An access procedure provided in step 200 will be briefly described below taking as an example the initiation of an access to a wide area network service via a plurality of domain names included in the set of domain names shown in fig. 4.
Firstly, acquiring the priority order of a plurality of domain names, specifically, the priority of a CDN server 1 domain name, a CDN server 2 domain name and a CDN server 3 domain name to a source station server domain name is sequentially reduced. And after that, acquiring the domain name of the CDN server 1, sending the domain name of the CDN server 1 to a domain name resolution server for domain name resolution, acquiring an IP address corresponding to the CDN server 1, and returning to the electronic equipment to enable the electronic equipment to access the server corresponding to the IP address, namely, the CDN server 1, if the static data of the wide area network service are cached in a plurality of node servers managed and controlled by the CDN server 1, and the static data are successfully returned to the electronic equipment, the access is successful, namely, the access is stopped, and if the access fails, the steps are repeated through the domain name of the CDN server 2.
It should be noted that, in the above access process, after the domain name resolver obtains the IP address corresponding to the CDN server 1, the domain name resolver may directly access the server corresponding to the IP address, that is, the CDN server 1, if static data of the wide area network service is cached in a plurality of node servers managed by the CDN server 1, and the static data is successfully returned to the electronic device, the access is successful, that is, the access is stopped, and if the access fails, the above steps are repeated by continuing to pass through the domain name of the CDN server 2.
And step S300, deleting the unavailable domain name from the domain name set according to the access result.
In the embodiment of the present application, the domain name that is not possible is a domain name that initiates access failure to the wan service. Based on this, in the embodiment of the present application, step S300 may include three sub-steps of step S310, step S320, and step S330.
In step S310, all target domain names included in the plurality of domain names are determined, the target domain names being domain names that initiate access failure to the wide area network service.
Step S320, performing availability detection on all the target domain names.
In this embodiment of the present application, the detection of the availability of resolution of all target domain names may be downloading a test file from a server corresponding to each target domain name, and taking the download result as the network access feedback information. Based on this, step S320 may include obtaining, for each target domain name, network access feedback information corresponding to the target domain name, and obtaining an availability detection result of the target domain name according to the network access feedback information.
Step S330, deleting the target domain name whose availability detection result is unavailable from the domain name set.
Optionally, in an embodiment of the present application, after step S300, the network access method further includes step S400 and step S500.
Step S400, judging whether the domain name set is empty.
Step S500, if the domain name set is empty, the domain name set corresponding to the wide area network service is re-acquired.
For step S500, as a first optional implementation manner, in this embodiment of the present application, when the domain name set is empty, a real-time domain name acquisition request may be initiated to the source station server to reacquire the domain name set corresponding to the wan service.
In order to improve the obtaining efficiency of the domain name set, in the embodiment of the present application, the network access method may further include step S600 and step S700.
Step S600, a domain name acquisition request is initiated to a source station server according to a preset time interval, and a domain name set corresponding to the wide area network service is acquired.
Step S700, replacing the domain name set acquired earlier with the domain name set acquired later.
In an exemplary embodiment of the present application, a domain name acquisition request may be initiated to a source station server at a first time point, a domain name set corresponding to a wide area network service may be acquired as a first domain name set, and stored in a local domain name storage space preset by an electronic device, after a preset time interval, a domain name acquisition request may be initiated to the source station server at a second time point, to acquire a domain name set corresponding to the wide area network service, as a second domain name set, and the first domain name set is replaced by the second domain name set.
Further, it is understood that the preset time interval may be specifically set according to a class of the wide area network service, a current access time, and the like, where the class of the wide area network service may include a shopping class (e.g., panned, jindong), an entertainment class (e.g., tremble, fighting fish TV), a search class (e.g., google, hundred degrees), and the like. Based on this, in the embodiment of the present application, the type of the wan service may be further determined, and meanwhile, the current access time may be obtained, and a preset time interval may be set according to the type of the wan service and the current access time.
For example, for a certain wan service, if the category of the wan service is shopping or entertainment and the current access time is 8.00-18.00, the preset time interval is set to a first time length, if the category of the wan service is shopping or entertainment and the current access time is 18.00-24.00, the preset time interval is set to a second time length, and if the category of the wan service is shopping or entertainment and the current access time is 24.00-8.00, the preset time interval is set to a third time length, wherein the third time length is less than the first time length, and the first time length is less than the second time length.
Based on the settings of step S600 and step S700, in the embodiment of the present application, as a second optional implementation manner, when the domain name set is empty, the domain name set corresponding to the wan service is further obtained again in a local domain name storage space preset by the electronic device.
Through the arrangement, after the access to the wide area network service is initiated by the plurality of domain names in turn for the first time and the plurality of domain names are determined to be unavailable, the access to the wide area network service can be initiated again by the plurality of domain names included in the re-acquired domain name set, so that the purpose of improving the access efficiency of the wide area network service on the basis of ensuring the normal access of the wide area network service is achieved.
Based on the same inventive concept as the above-mentioned network access method, the embodiment of the present application further provides a network access device 200, referring to fig. 5, where the network access device 200 provided in the embodiment of the present application includes a first set obtaining module 210, a result obtaining module 220, and a domain name deleting module 230.
The first set obtaining module 210 is configured to obtain, in response to a network access request for accessing a wide area network service, a domain name set corresponding to the network access request, where the domain name set includes a plurality of domain names.
The description about the first set acquisition module 210 may refer specifically to the detailed description of step S100 shown in fig. 2, that is, step S100 may be performed by the first set acquisition module 210.
The result obtaining module 220 is configured to sequentially initiate access to the wan service through the multiple domain names, and obtain an access result of the domain name from which the access has been initiated in the multiple domain names.
The description about the result acquisition module 220 may refer specifically to the detailed description of step S200 shown in fig. 2, that is, step S200 may be performed by the result acquisition module 220.
The domain name deleting module 230 is configured to delete an unavailable domain name from the domain name set according to the access result.
The description about the domain name deletion module 230 may refer specifically to the detailed description of step S300 shown in fig. 2, that is, step S300 may be performed by the domain name deletion module 230.
Optionally, in the embodiment of the present application, the result obtaining module 220 includes a priority obtaining unit and a result obtaining unit.
And the priority acquisition unit is used for acquiring the priority orders of the domain names.
For a description of the priority acquisition unit reference is made in particular to the detailed description of step S210 in the previous method embodiment, i.e. step S210 may be performed by the priority acquisition unit
The result acquisition unit is used for sequentially initiating access to the wide area network service through the plurality of domain names according to the priority order until the access is successful or the access of the plurality of domain names fails, and acquiring the access result of the domain name which has initiated the access in the plurality of domain names.
For the description of the result acquisition unit reference is specifically made to the detailed description of step S220 in the foregoing method embodiment, i.e. step S220 may be performed by the result acquisition unit.
Optionally, in the embodiment of the present application, the priority obtaining unit includes a testing subunit, a priority obtaining subunit, and a source station setting unit.
And the testing subunit is used for testing the connection speed of each domain name pointing to the CDN server in the plurality of domain names.
For a description of the test subunit, reference is specifically made to the detailed description of step S211 in the foregoing method embodiment, i.e. step S211 may be performed by the test subunit.
And the priority obtaining subunit is used for obtaining the priority sequence of each domain name pointing to the CDN server according to the connection speed test result.
For a description of the priority acquisition subunit, reference is specifically made to the detailed description of step S212 in the foregoing method embodiment, that is, step S212 may be performed by the priority acquisition subunit.
And the source station setting unit is used for setting the priority of the domain name directed to the source station server in the plurality of domain names to be the lowest level.
The description of the source station setup unit may refer specifically to the detailed description of step S213 in the foregoing method embodiment, that is, step S213 may be performed by the source station setup unit.
Alternatively, in the embodiment of the present application, the domain name deletion module 230 includes a domain name determination unit, a probe unit, and a domain name deletion unit.
And the domain name determining unit is used for determining all target domain names included in the plurality of domain names, wherein the target domain names are domain names initiating access failure to the wide area network service.
For the description of the domain name determining unit, reference is specifically made to the detailed description of step S310 in the foregoing method embodiment, that is, step S310 may be performed by the domain name determining unit.
And the detection unit is used for detecting the availability of all the target domain names.
Optionally, the detecting unit is configured to obtain, for each target domain name, network access feedback information corresponding to the target domain name, and obtain an availability detecting result of the target domain name according to the network access feedback information.
For a description of the detection unit reference is made in particular to the detailed description of step S320 in the previous method embodiment, i.e. step S320 may be performed by the detection unit.
And the domain name deleting unit is used for deleting the target domain name with the unavailable availability detection result from the domain name set.
For the description of the domain name deletion unit, reference is specifically made to the detailed description of step S330 in the foregoing method embodiment, that is, step S330 may be performed by the domain name deletion unit.
Optionally, in the embodiment of the present application, the network access device further includes a judging module and a second set obtaining module.
And the judging module is used for judging whether the domain name set is empty.
For a description of the determination module, reference is specifically made to the detailed description of step S400 in the foregoing method embodiment, that is, step S400 may be performed by the determination module.
And the second set acquisition module is used for re-acquiring the domain name set corresponding to the wide area network service when the domain name set is empty.
For a description of the second set acquisition module, reference may be made in particular to the detailed description of step S500 in the foregoing method embodiment, i.e. step S500 may be performed by the second set acquisition module.
Optionally, in an embodiment of the present application, the network access device further includes a third set acquisition module and a replacement module.
And the third set acquisition module is used for initiating a domain name acquisition request to the source station server according to a preset time interval to acquire a domain name set corresponding to the wide area network service.
For a description of the third set of acquisition modules reference is made in particular to the detailed description of step S600 in the previous method embodiments, i.e. step S600 may be performed by the third set of acquisition modules.
And the replacing module is used for replacing the domain name set acquired before by utilizing the domain name set acquired later.
For a description of the replacement module reference is made in particular to the detailed description of step S700 in the previous method embodiment, i.e. step S700 may be performed by the replacement module.
In addition, the embodiment of the application further provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed, the online video method provided in the embodiment of the method can be implemented, and specifically, reference may be made to the embodiment of the method, which is not described herein again.
In summary, the network access method provided in the embodiment of the present application may respond to a network access request for accessing a wide area network service, obtain a domain name set corresponding to the network access request, where the domain name set includes a plurality of domain names, sequentially initiate access to the wide area network service through the plurality of domain names, obtain an access result of a domain name from which access has been initiated in the plurality of domain names, and then delete, according to the access result, an unavailable domain name from the domain name set. Therefore, after the access to the wide area network service is initiated by the domain names in turn for the first time, when the access is initiated again, the access to the wide area network service is prevented from being initiated again by the unavailable domain names, and the purpose of improving the access efficiency of the wide area network service on the basis of ensuring the normal access of the wide area network service is achieved.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It should be noted that in this document, relational terms such as "first," "second," and "third," and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (9)

1. A network access method, comprising:
responding to a network access request for accessing a wide area network service, and acquiring a domain name set corresponding to the network access request, wherein the domain name set comprises a plurality of domain names;
sequentially initiating access to the wide area network service through the plurality of domain names to obtain an access result of the domain name which has initiated access in the plurality of domain names;
deleting the unavailable domain name from the domain name set according to the access result; wherein the unavailable domain name comprises: and carrying out availability detection on the target domain name with failed access in the plurality of domain names, wherein the availability detection result is an unavailable domain name.
2. The network access method according to claim 1, wherein the sequentially initiating access to the wide area network service through the plurality of domain names, obtaining an access result of a domain name from which access has been initiated from among the plurality of domain names, includes:
acquiring the priority orders of the domain names;
and according to the priority order, sequentially initiating access to the wide area network service through the plurality of domain names until the access is successful or the access of the plurality of domain names fails, and obtaining the access result of the domain name which has initiated the access in the plurality of domain names.
3. The network access method according to claim 2, wherein the acquiring the priority order of the plurality of domain names comprises:
respectively testing the connection speed of each domain name pointing to the CDN server in the plurality of domain names;
obtaining the priority order of each domain name pointing to the CDN server according to the connection speed test result;
the priority of the domain name of the plurality of domain names directed to the source station server is set to the lowest level.
4. The network access method according to claim 1, wherein the detecting the availability of the target domain name having failed access from the plurality of domain names includes:
obtaining network access feedback information corresponding to each target domain name;
and obtaining an availability detection result of the target domain name according to the network access feedback information.
5. The network access method of claim 1, wherein the method further comprises:
according to a preset time interval, a domain name acquisition request is initiated to a source station server, and a domain name set corresponding to the wide area network service is acquired;
and replacing the domain name set acquired before by using the domain name set acquired later.
6. The network access method according to claim 1 or 5, wherein after deleting the unavailable domain name from the domain name set according to the access result, the method further comprises:
judging whether the domain name set is empty or not;
and if the domain name set is empty, re-acquiring the domain name set corresponding to the wide area network service.
7. A network access device, comprising:
a first set acquisition module, configured to respond to a network access request for accessing a wide area network service, and acquire a domain name set corresponding to the network access request, where the domain name set includes a plurality of domain names;
the result acquisition module is used for sequentially initiating access to the wide area network service through the plurality of domain names and acquiring the access result of the domain name which has initiated the access in the plurality of domain names;
the domain name deleting module is used for deleting the unavailable domain name from the domain name set according to the access result; wherein the unavailable domain name comprises: and carrying out availability detection on the target domain name with failed access in the plurality of domain names, wherein the availability detection result is an unavailable domain name.
8. An electronic device comprising a processor and a memory, the memory having stored thereon a computer program, the processor being configured to execute the computer program to implement the network access method of any of claims 1-6.
9. A computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the network access method of any of claims 1 to 6.
CN201910725177.0A 2019-08-07 2019-08-07 Network access method and device and electronic equipment Active CN110381081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910725177.0A CN110381081B (en) 2019-08-07 2019-08-07 Network access method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910725177.0A CN110381081B (en) 2019-08-07 2019-08-07 Network access method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN110381081A CN110381081A (en) 2019-10-25
CN110381081B true CN110381081B (en) 2023-07-18

Family

ID=68258363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910725177.0A Active CN110381081B (en) 2019-08-07 2019-08-07 Network access method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110381081B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111049949B (en) * 2019-12-31 2023-04-25 奇安信科技集团股份有限公司 Domain name identification method and device, electronic equipment and medium
CN114615276B (en) * 2022-03-11 2024-01-26 抖音视界有限公司 Domain name scheduling method and device for content distribution network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915404A (en) * 2015-06-01 2015-09-16 安一恒通(北京)科技有限公司 Method and device for accessing invalid website
CN109582888A (en) * 2018-11-30 2019-04-05 上海爱优威软件开发有限公司 Web page bookmark method for sorting and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8966121B2 (en) * 2008-03-03 2015-02-24 Microsoft Corporation Client-side management of domain name information
CN108810092B (en) * 2018-05-17 2021-09-14 Oppo广东移动通信有限公司 Network access method and device, electronic equipment and computer readable storage medium
CN109246227A (en) * 2018-09-26 2019-01-18 北京达佳互联信息技术有限公司 A kind of data request method, device, terminal device and storage medium
CN109347766B (en) * 2018-12-07 2022-03-08 网宿科技股份有限公司 Resource scheduling method and device
CN109769040A (en) * 2018-12-14 2019-05-17 平安普惠企业管理有限公司 Content delivery network service switching method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915404A (en) * 2015-06-01 2015-09-16 安一恒通(北京)科技有限公司 Method and device for accessing invalid website
CN109582888A (en) * 2018-11-30 2019-04-05 上海爱优威软件开发有限公司 Web page bookmark method for sorting and system

Also Published As

Publication number Publication date
CN110381081A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN112929326B (en) Malicious domain name access detection method and device and computer readable storage medium
CN109995866B (en) Distributed file verification method and device, computer device and storage medium
CN109542361B (en) Distributed storage system file reading method, system and related device
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
CN110381081B (en) Network access method and device and electronic equipment
CN111385316B (en) Resource refreshing method, access method and device
CN111046310A (en) Page processing method, device, server and computer readable storage medium
CN109743378B (en) Information pushing system, information pushing method and electronic equipment
CN112839076B (en) Data storage method, data reading method, gateway, electronic equipment and storage medium
CN113709530B (en) Resource downloading method, system, electronic equipment and storage medium
CN108900547B (en) Source returning control method and device
CN112597039A (en) Virtual machine access method, system, device and computer readable storage medium
CN110311975B (en) Data request processing method and device
CN109446445B (en) Resource acquisition method and device
CN109446825B (en) Method and device for expanding access control authority
CN113157487A (en) Data recovery method and apparatus thereof
CN110213073B (en) Data flow direction changing method, electronic device, computing node and storage medium
CN112115103A (en) File address display method and device, electronic equipment and readable storage medium
CN109347766B (en) Resource scheduling method and device
CN109729062B (en) Online method of encryption server and proxy server
CN111078437A (en) Remote calling method and device of verification code, electronic equipment and readable storage medium
CN107203915B (en) Data storage method and device
CN107846429B (en) File backup method, device and system
CN113783883A (en) Network picture authority control method, medium and device
CN114363403A (en) Service access method, system, computer device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210427

Address after: 200050 room 323, building 14, no.350 Xianxia Road, Changning District, Shanghai

Applicant after: SHANGHAI ISMARTV NETWORK TECHNOLOGIES Co.,Ltd.

Address before: Room 301-530, floor 3, building 1, No. 400, Fangchun Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai 200000

Applicant before: Shanghai Qianshan Network Technology Development Co.,Ltd.

GR01 Patent grant
GR01 Patent grant