CN111491033A - Connection establishing method and device - Google Patents

Connection establishing method and device Download PDF

Info

Publication number
CN111491033A
CN111491033A CN202010344255.5A CN202010344255A CN111491033A CN 111491033 A CN111491033 A CN 111491033A CN 202010344255 A CN202010344255 A CN 202010344255A CN 111491033 A CN111491033 A CN 111491033A
Authority
CN
China
Prior art keywords
domain name
address
app
background service
service environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010344255.5A
Other languages
Chinese (zh)
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.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media 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 Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202010344255.5A priority Critical patent/CN111491033A/en
Publication of CN111491033A publication Critical patent/CN111491033A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • 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)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a connection establishing method and device, which are applied to an app in a terminal, and the method comprises the following steps: when a network connection request is acquired, analyzing a domain name from the network connection request; determining a background service environment currently selected by the app, and acquiring a corresponding relation between a domain name and an ip address, which is configured in advance by a background server aiming at the background service environment currently selected by the app; searching an ip address corresponding to a domain name in a preset corresponding relation between the domain name and the ip address by a background server aiming at a background service environment currently selected by app; and if the IP address is found, establishing connection with a target server in the background service environment currently selected by the app according to the IP address corresponding to the domain name. According to the method, interaction with external equipment can be reduced, operation is simplified, and connection establishing efficiency is improved.

Description

Connection establishing method and device
Technical Field
The present application relates to the field of App technologies, and in particular, to a connection establishment method and apparatus.
Background
Currently, an app (Application software) generally goes through stages of development, testing, production, and the like, and the app needs to establish connection with different background service environments at different stages to complete or test functions of the app.
The method comprises the steps that a dns server is appointed to be a testing environment dns in wifi setting, the appointed dns server returns a background testing environment ip address corresponding to a domain name to the app, and the app utilizes the ip address to establish connection with the background testing environment; or, the mode of connecting the agent: and (3) configuring hosts in the agent software, designating the ip address corresponding to the domain name, and manually intervening the request process.
However, the above-mentioned method of establishing a connection has problems of complicated operation and low efficiency.
Disclosure of Invention
In order to solve the foregoing technical problems, embodiments of the present application provide a connection establishing method and apparatus, so as to achieve the purposes of simplifying operations and improving connection establishing efficiency, and the technical solution is as follows:
a connection establishment method is applied to an app in a terminal and comprises the following steps:
when a network connection request is acquired, analyzing a domain name from the network connection request;
determining a background service environment currently selected by the app, and acquiring a corresponding relation between a domain name and an ip address, which is configured in advance by a background server aiming at the background service environment currently selected by the app;
searching an ip address corresponding to the domain name in a preset corresponding relation between the domain name and the ip address in the background server aiming at the background service environment currently selected by the app;
and if the domain name is found, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name.
Preferably, the determining the background service environment currently selected by the app includes:
acquiring a background service environment modification page;
and selecting one background service environment from the background service environment modification page as the currently selected background service environment of the app.
Preferably, the obtaining of the correspondence between the domain name and the ip address, which is configured in advance by the background server for the background service environment currently selected by the app, includes:
sending an acquisition request to a background server, and receiving a preset corresponding relation between a domain name and an ip address for the currently selected background service environment of the app returned by the background server.
Preferably, before the acquiring the network connection request and analyzing the domain name from the network connection request, the method further includes:
acquiring corresponding relations between domain names and ip addresses which are pre-configured by a background server respectively aiming at different background service environments;
the obtaining of the corresponding relationship between the domain name and the ip address, which is configured in advance by the background server for the background service environment currently selected by the app, includes:
and searching the corresponding relation between the domain name of the currently selected background service environment of the app and the ip address from the corresponding relations between the domain name and the ip address which are pre-configured by the background server respectively aiming at different background service environments.
Preferably, the obtaining of the correspondence between the domain name and the ip address, which are pre-configured by the background server for different background service environments, includes:
receiving information issued by a background server through a preset interface;
the information issued by the background server at least comprises: and the background server respectively pre-configures the corresponding relation between the domain name and the ip address according to different background service environments.
A connection establishment apparatus comprising:
the analysis module is used for analyzing the domain name from the network connection request when the network connection request is acquired;
the first acquisition module is used for determining the currently selected background service environment of the app and acquiring the corresponding relation between a domain name and an ip address, which is configured in advance by a background server aiming at the currently selected background service environment of the app;
the searching module is used for searching an ip address corresponding to the domain name in a preset corresponding relation between the domain name and the ip address in the background service environment currently selected by the background server for the app;
and the connection establishing module is used for establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name if the ip address corresponding to the domain name is found.
Preferably, the first obtaining module is specifically configured to:
acquiring a background service environment modification page;
and selecting one background service environment from the background service environment modification page as the currently selected background service environment of the app.
Preferably, the first obtaining module is specifically configured to:
sending an acquisition request to a background server, and receiving a preset corresponding relation between a domain name and an ip address for the currently selected background service environment of the app returned by the background server.
Preferably, the apparatus further comprises:
the second acquisition module is used for acquiring the corresponding relation between the domain name and the ip address which are respectively pre-configured by the background server aiming at different background service environments;
the first obtaining module is specifically configured to: and searching the corresponding relation between the domain name of the currently selected background service environment of the app and the ip address from the corresponding relations between the domain name and the ip address which are pre-configured by the background server respectively aiming at different background service environments.
Preferably, the second obtaining module is specifically configured to:
receiving information issued by a background server through a preset interface;
the information issued by the background server at least comprises: and the background server respectively pre-configures the corresponding relation between the domain name and the ip address according to different background service environments.
Compared with the prior art, the beneficial effect of this application is:
in the application, when a network connection request is acquired, a domain name is analyzed from the network connection request, a background service environment selected currently by the app is determined, and a mode that an ip address corresponding to the domain name is searched in a preset corresponding relation between the domain name and the ip address for the background service environment selected currently by the app is adopted by a background server, so that the ip address corresponding to the specified background service environment is determined inside the app, and the connection is established by using the ip address and a target server in the background service environment selected currently by the app, so that the interaction with external equipment can be reduced, the operation is simplified, and the connection establishment efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of an embodiment 1 of a connection establishment method provided in the present application;
fig. 2 is a flowchart of embodiment 2 of connection establishment provided by the present application;
fig. 3 is a flowchart of embodiment 3 of connection establishment provided by the present application;
fig. 4 is a flowchart of embodiment 4 of connection establishment provided by the present application;
fig. 5 is a schematic logical structure diagram of a connection establishment apparatus provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application discloses a connection establishing method, which is characterized in that the method is applied to an app in a terminal and comprises the following steps: when a network connection request is acquired, analyzing a domain name from the network connection request; determining a background service environment currently selected by the app; searching an ip address corresponding to the domain name in a preset corresponding relation between the domain name and the ip address by a background server aiming at a background service environment currently selected by the app; and if the domain name is found, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name. In the application, the operation can be simplified, and the efficiency of establishing the connection is improved.
The connection establishment method disclosed in the embodiment of the present application is applied to an app in a terminal, and then, as shown in fig. 1, a flowchart of an embodiment 1 of the connection establishment method provided by the present application may include the following steps:
step S11, when the network connection request is acquired, the domain name is resolved from the network connection request.
When the app initiates a network connection request, a network request code integrated in the app acquires the network connection request initiated by the app and analyzes a domain name from the acquired network connection request.
The background service environment may be understood as: the system software is deployed on a service host of a computer room and is used for receiving a network request sent from a client, carrying out internal processing, generating a response and sending the response back. A background service environment may consist of multiple host systems to handle requests under different domain names.
In this embodiment, in the background service environment, a domain name of each background server is set. And, the domain names of a certain background server in different background service environments may also be the same. However, under the condition that the domain names of a certain background server in different background service environments are the same, the ip addresses of the background server in different background service environments can be set to be different, so as to distinguish the background servers in different background service environments. Based on this, the background server can preset the corresponding relation between different domain names and ip addresses according to different background service environments. For example, the background server presets the following correspondence between the domain name and the ip address for the background development environment: com (domain name): 172.1.1.1(ip address), b.com (domain name): 172.1.1.2(ip address), c.com (domain name): 172.1.1.3(ip address); or, the background server presets the following corresponding relation between the domain name and the ip address for the background test environment: com (domain name): 172.1.2.1(ip address), b.com (domain name): 172.1.2.2(ip address), c.com (domain name): 172.1.2.3(ip address); or, the background server presets the following corresponding relation between the domain name and the ip address for the background production environment: com (domain name): 172.1.3.1(ip address), b.com (domain name): 172.1.3.2(ip address), c.com (domain name): 172.1.3.3(ip address).
And step S12, determining the background service environment currently selected by the app.
Since the ip addresses of the background servers may be different in different background service environments, after the domain name is resolved, the background service environment currently selected by the app needs to be determined.
And step S13, acquiring a corresponding relation between a domain name and an ip address, which is configured in advance by the background server aiming at the background service environment currently selected by the app.
The corresponding relation between the domain name and the ip address is respectively preconfigured in the background server for different background service environments, so that when the currently selected background service environment of the app is in the background service environment set preconfigured in the background server, the corresponding relation between the domain name and the ip address preconfigured in the background service environment currently selected by the app can be obtained by the background server.
In this embodiment, the background server may be understood as: a background server in the background service environment selected by the app. Of course, the background server may be a background server for managing different background service environments on an upper layer of different background service environments.
Step S14, the background server searches, in the pre-configured corresponding relationship between the domain name and the ip address, for the background service environment currently selected by the app, an ip address corresponding to the domain name.
If the search result is found, step S15 is executed.
After acquiring the corresponding relation between the domain name and the ip address, which is configured in advance, of the background service environment currently selected by the app by the background server, the ip address corresponding to the domain name is searched in the corresponding relation between the domain name and the ip address, which is configured in advance, of the background service environment currently selected by the app by the background server.
And step S15, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name.
And establishing connection with a target server in the currently selected background service environment of the app according to the ip address corresponding to the domain name, and completing establishment of connection between the app and the currently selected background service environment.
In the application, when a network connection request is acquired, a domain name is analyzed from the network connection request, a background service environment selected currently by the app is determined, and a mode that an ip address corresponding to the domain name is searched in a preset corresponding relation between the domain name and the ip address for the background service environment selected currently by the app is adopted by a background server, so that the ip address corresponding to the specified background service environment is determined inside the app, and the connection is established by using the ip address and a target server in the background service environment selected currently by the app, so that the interaction with external equipment can be reduced, the operation is simplified, and the connection establishment efficiency is improved.
As another alternative embodiment of the present application, referring to fig. 2, a flowchart of an embodiment 2 of a connection establishment method provided by the present application is provided, where this embodiment mainly relates to a refinement scheme of connection establishment described in the foregoing embodiment 1, and as shown in fig. 2, the method may include, but is not limited to, the following steps:
step S21, when the network connection request is acquired, the domain name is resolved from the network connection request.
The detailed process of step S21 can be referred to the related description of step S11 in embodiment 1, and is not repeated here.
And step S22, acquiring a background service environment modification page.
In this embodiment, the background service environment modification page may be acquired when a request for switching the background service environment is received. The background service environment modification page may include at least a list of information including a plurality of background service environments.
Step S23, selecting one background service environment from the background service environment modification page as the currently selected background service environment of the app.
And in the background service environment modification page, one background service environment is selected, so that the background service environment can be dynamically selected by the app.
Steps S22-S23 are a specific implementation of step S12 in example 1.
And step S24, acquiring a corresponding relation between a domain name and an ip address, which is configured in advance by the background server aiming at the background service environment currently selected by the app.
Step S25, searching for an ip address corresponding to the domain name in a pre-configured corresponding relationship between the domain name and the ip address for the background service environment currently selected by the app by the background server.
If the search result is found, step S26 is executed.
And step S26, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name.
The detailed procedures of steps S24-S26 can be found in the related descriptions of steps S13-S15 in embodiment 1, and are not repeated herein.
As another alternative embodiment of the present application, referring to fig. 3, a flowchart of embodiment 3 of a connection establishment method provided in the present application is provided, where this embodiment mainly relates to a refinement scheme of connection establishment described in the foregoing embodiment 1, and as shown in fig. 3, the method may include, but is not limited to, the following steps:
step S31, when the network connection request is acquired, the domain name is resolved from the network connection request.
And step S32, determining the background service environment currently selected by the app.
The detailed procedures of steps S31-S32 can be found in the related descriptions of steps S11-S12 in embodiment 1, and are not repeated herein.
Step S33, sending an acquisition request to a backend server, and receiving a pre-configured correspondence between a domain name and an ip address for the currently selected backend service environment of the app, which is returned by the backend server.
And sending an acquisition request to a background server, responding to the acquisition request by the background server, and returning the preset corresponding relation between the domain name and the ip address of the background server aiming at the background service environment currently selected by the app to the app. Correspondingly, the app receives the corresponding relation between the domain name and the ip address, which is preset for the currently selected background service environment of the app and is returned by the background server.
Step S34, searching for an ip address corresponding to the domain name in a pre-configured corresponding relationship between the domain name and the ip address for the background service environment currently selected by the app by the background server.
If the search result is found, step S35 is executed.
And step S35, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name.
The detailed procedures of steps S34-S35 can be found in the related descriptions of steps S14-S15 in embodiment 1, and are not repeated herein.
In this embodiment, after the background service environment currently selected by the app is determined, an acquisition request is sent to the background server, and only the correspondence between the domain name and the ip address, which is configured in advance for the background service environment currently selected by the app and returned by the background server, is received, so that the data transmission amount can be reduced.
As another alternative embodiment of the present application, referring to fig. 4, a flowchart of an embodiment 4 of a connection establishment method provided by the present application is provided, where this embodiment mainly relates to a refinement scheme of connection establishment described in the foregoing embodiment 1, and as shown in fig. 4, the method may include, but is not limited to, the following steps:
and step S41, acquiring the corresponding relation between the domain name and the ip address pre-configured by the background server respectively aiming at different background service environments.
In this embodiment, the background server may actively issue the correspondence between the domain name and the ip address that are respectively preconfigured for different background service environments, and the app receives the correspondence between the domain name and the ip address that are issued by the background server and are respectively preconfigured for different background service environments.
Certainly, the app may also send an acquisition request to the backend server, and after receiving the acquisition request, the backend server issues the corresponding relationships between the domain names and the ip addresses that are respectively preconfigured for different backend service environments to the app, and the app receives the corresponding relationships between the domain names and the ip addresses that are issued by the backend server and are respectively preconfigured for different backend service environments.
Specifically, the receiving, by the app, the correspondence between the domain name and the ip address, which are issued by the background server and are respectively configured in advance for different background service environments, may include:
receiving information issued by a background server through a preset interface;
the information issued by the background server at least comprises: and the background server respectively pre-configures the corresponding relation between the domain name and the ip address according to different background service environments.
When the background server needs to send information to the app, the app can be ensured to perform information interaction with the background server through a preset interface.
In this embodiment, the background server may be understood as: and the background server is used for managing different background service environments on the upper layers of different background service environments.
Step S42, when the network connection request is acquired, the domain name is resolved from the network connection request.
And step S43, determining the background service environment currently selected by the app.
The detailed procedures of steps S42-S43 can be found in the related descriptions of steps S11-S12 in embodiment 1, and are not repeated herein.
Step S44, searching a corresponding relationship between the domain name and the ip address of the background service environment currently selected by the app from the corresponding relationships between the domain name and the ip address pre-configured for different background service environments by the background server.
If the search result is found, step S45 is executed.
Step S45, searching for an ip address corresponding to the domain name in a pre-configured corresponding relationship between the domain name and the ip address for the background service environment currently selected by the app by the background server.
If the search result is found, step S46 is executed.
And step S46, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name.
The detailed procedures of steps S45-S46 can be found in the related descriptions of steps S14-S15 in embodiment 1, and are not repeated herein.
In this embodiment, when a network connection request is acquired, before a domain name is resolved from the network connection request, corresponding relationships between the domain name and an ip address, which are pre-configured by a background server for different background service environments, are pre-acquired, and when the network connection request is acquired and a connection needs to be established with a background service environment, a corresponding relationship between the domain name and the ip address of a currently selected background service environment of the app is searched from the corresponding relationships between the domain name and the ip address, which are pre-configured by the pre-acquired background server for different background service environments, respectively, so that acquisition time of the corresponding relationship between the domain name and the ip address of the currently selected background service environment of the app can be shortened, acquisition efficiency is improved, and connection establishment efficiency is further improved.
Next, a connection establishing apparatus provided in the present application will be described, and the connection establishing apparatus described below and the connection establishing method described above may be referred to correspondingly.
Referring to fig. 5, the connection establishing apparatus includes: the device comprises an analysis module 11, a first acquisition module 12, a search module 13 and a connection establishment module 14.
The resolving module 11 is configured to, when a network connection request is obtained, resolve a domain name from the network connection request;
a first obtaining module 12, configured to determine a background service environment currently selected by the app, and obtain a correspondence between a domain name and an ip address, which are configured in advance by a background server for the background service environment currently selected by the app;
the searching module 13 is configured to search an ip address corresponding to the domain name in a pre-configured correspondence between the domain name and the ip address for the background service environment currently selected by the app by the background server;
and the connection establishing module 14 is configured to establish a connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name if the ip address corresponding to the domain name is found.
In this embodiment, the first obtaining module 12 may be specifically configured to:
acquiring a background service environment modification page;
and selecting one background service environment from the background service environment modification page as the currently selected background service environment of the app.
In this embodiment, the first obtaining module 12 may be specifically configured to:
sending an acquisition request to a background server, and receiving a preset corresponding relation between a domain name and an ip address for the currently selected background service environment of the app returned by the background server.
In this embodiment, the connection establishing apparatus may further include:
the second acquisition module is used for acquiring the corresponding relation between the domain name and the ip address which are respectively pre-configured by the background server aiming at different background service environments;
accordingly, the first obtaining module 12 may be specifically configured to: and searching the corresponding relation between the domain name of the currently selected background service environment of the app and the ip address from the corresponding relations between the domain name and the ip address which are pre-configured by the background server respectively aiming at different background service environments.
In this embodiment, the second obtaining module may be specifically configured to:
receiving information issued by a background server through a preset interface;
the information issued by the background server at least comprises: and the background server respectively pre-configures the corresponding relation between the domain name and the ip address according to different background service environments.
It should be noted that each embodiment is mainly described as a difference from the other embodiments, and the same and similar parts between the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The method and the device for establishing the connection provided by the present application are described in detail above, and a specific example is applied in the description to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A connection establishment method is applied to an app in a terminal, and comprises the following steps:
when a network connection request is acquired, analyzing a domain name from the network connection request;
determining a background service environment currently selected by the app, and acquiring a corresponding relation between a domain name and an ip address, which is configured in advance by a background server aiming at the background service environment currently selected by the app;
searching an ip address corresponding to the domain name in a preset corresponding relation between the domain name and the ip address in the background server aiming at the background service environment currently selected by the app;
and if the domain name is found, establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name.
2. The method of claim 1, wherein the determining the background service environment currently selected by the app comprises:
acquiring a background service environment modification page;
and selecting one background service environment from the background service environment modification page as the currently selected background service environment of the app.
3. The method according to claim 1, wherein the obtaining of the correspondence between the domain name and the ip address, which is configured in advance by the background server, for the background service environment currently selected by the app, comprises:
sending an acquisition request to a background server, and receiving a preset corresponding relation between a domain name and an ip address for the currently selected background service environment of the app returned by the background server.
4. The method according to claim 1, wherein before the analyzing the domain name from the network connection request when the network connection request is obtained, further comprising:
acquiring corresponding relations between domain names and ip addresses which are pre-configured by a background server respectively aiming at different background service environments;
the obtaining of the corresponding relationship between the domain name and the ip address, which is configured in advance by the background server for the background service environment currently selected by the app, includes:
and searching the corresponding relation between the domain name of the currently selected background service environment of the app and the ip address from the corresponding relations between the domain name and the ip address which are pre-configured by the background server respectively aiming at different background service environments.
5. The method according to claim 4, wherein the obtaining of the correspondence between the domain name and the ip address, which are pre-configured by the background server for different background service environments, respectively comprises:
receiving information issued by a background server through a preset interface;
the information issued by the background server at least comprises: and the background server respectively pre-configures the corresponding relation between the domain name and the ip address according to different background service environments.
6. A connection establishment apparatus, comprising:
the analysis module is used for analyzing the domain name from the network connection request when the network connection request is acquired;
the first acquisition module is used for determining the currently selected background service environment of the app and acquiring the corresponding relation between a domain name and an ip address, which is configured in advance by a background server aiming at the currently selected background service environment of the app;
the searching module is used for searching an ip address corresponding to the domain name in a preset corresponding relation between the domain name and the ip address in the background service environment currently selected by the background server for the app;
and the connection establishing module is used for establishing connection with a target server in the background service environment currently selected by the app according to the ip address corresponding to the domain name if the ip address corresponding to the domain name is found.
7. The apparatus of claim 6, wherein the first obtaining module is specifically configured to:
acquiring a background service environment modification page;
and selecting one background service environment from the background service environment modification page as the currently selected background service environment of the app.
8. The apparatus of claim 6, wherein the first obtaining module is specifically configured to:
sending an acquisition request to a background server, and receiving a preset corresponding relation between a domain name and an ip address for the currently selected background service environment of the app returned by the background server.
9. The apparatus of claim 6, further comprising:
the second acquisition module is used for acquiring the corresponding relation between the domain name and the ip address which are respectively pre-configured by the background server aiming at different background service environments;
the first obtaining module is specifically configured to: and searching the corresponding relation between the domain name of the currently selected background service environment of the app and the ip address from the corresponding relations between the domain name and the ip address which are pre-configured by the background server respectively aiming at different background service environments.
10. The apparatus of claim 9, wherein the second obtaining module is specifically configured to:
receiving information issued by a background server through a preset interface;
the information issued by the background server at least comprises: and the background server respectively pre-configures the corresponding relation between the domain name and the ip address according to different background service environments.
CN202010344255.5A 2020-04-27 2020-04-27 Connection establishing method and device Pending CN111491033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010344255.5A CN111491033A (en) 2020-04-27 2020-04-27 Connection establishing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010344255.5A CN111491033A (en) 2020-04-27 2020-04-27 Connection establishing method and device

Publications (1)

Publication Number Publication Date
CN111491033A true CN111491033A (en) 2020-08-04

Family

ID=71797679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010344255.5A Pending CN111491033A (en) 2020-04-27 2020-04-27 Connection establishing method and device

Country Status (1)

Country Link
CN (1) CN111491033A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422355A (en) * 2022-01-10 2022-04-29 成都易达数安科技有限公司 Method for APP to automatically adapt to two-path broadband special line

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9137217B1 (en) * 2014-05-16 2015-09-15 Iboss, Inc. Manage encrypted network traffic using DNS responses
CN105391811A (en) * 2014-08-29 2016-03-09 腾讯科技(深圳)有限公司 DNS (domain name resolution) method, access method for application server, and terminal
CN107682465A (en) * 2017-06-24 2018-02-09 平安科技(深圳)有限公司 Domain name mapping device, method and computer-readable recording medium
CN108183974A (en) * 2017-11-27 2018-06-19 深圳市丰巢科技有限公司 Domain name dynamic switching method of intelligent terminal application program and intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9137217B1 (en) * 2014-05-16 2015-09-15 Iboss, Inc. Manage encrypted network traffic using DNS responses
CN105391811A (en) * 2014-08-29 2016-03-09 腾讯科技(深圳)有限公司 DNS (domain name resolution) method, access method for application server, and terminal
CN107682465A (en) * 2017-06-24 2018-02-09 平安科技(深圳)有限公司 Domain name mapping device, method and computer-readable recording medium
CN108183974A (en) * 2017-11-27 2018-06-19 深圳市丰巢科技有限公司 Domain name dynamic switching method of intelligent terminal application program and intelligent terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422355A (en) * 2022-01-10 2022-04-29 成都易达数安科技有限公司 Method for APP to automatically adapt to two-path broadband special line

Similar Documents

Publication Publication Date Title
US8707429B2 (en) DNS resolution, policies, and views for large volume systems
US10721317B2 (en) Global provisioning of millions of users with deployment units
US10693834B2 (en) Client subnet efficiency by equivalence class aggregation
CN107613037B (en) Domain name redirection method and system
CN107786678B (en) Domain name resolution method, device and system
JP2020532784A (en) Information transmission method and device
CN109600410B (en) Data storage system and method
CN110730250B (en) Information processing method and device, service system and storage medium
CN109327559B (en) Domain name resolution method and device based on hybrid cloud platform
CN113438307A (en) Domain name resolution method, server, system and storage medium
US10257254B2 (en) Method and associated server for providing user-friendly operation
US8943195B2 (en) Node detection apparatus, node detection method and computer readable medium
CN111491033A (en) Connection establishing method and device
CN104079682A (en) Address translation method and device based on domain name system (DNS)
CN113301005B (en) Data acquisition method and device
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN111565129A (en) Server remote testing method, device, equipment and storage medium
JP3873975B2 (en) View access control method by domain name, DNS server system apparatus, view access control program by domain name, and storage medium storing view access control program by domain name
CN110635958B (en) Network fault diagnosis method, device and storage medium
CN108712515B (en) Domain name resolution method and system
CN114301872A (en) Domain name based access method and device, electronic equipment and storage medium
CN111200512A (en) Network connection disaster tolerance method, terminal device, storage medium and electronic device
CN113065078B (en) Statistical analysis method for simulating user behavior to dial and test multistage domain names of WEB sites
CN115102923B (en) AGPS positioning starting method, device, equipment, medium and program product
CN107015994B (en) Webpage content acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200804

RJ01 Rejection of invention patent application after publication