CN107835267B - Domain name resolution method and device - Google Patents

Domain name resolution method and device Download PDF

Info

Publication number
CN107835267B
CN107835267B CN201711131133.2A CN201711131133A CN107835267B CN 107835267 B CN107835267 B CN 107835267B CN 201711131133 A CN201711131133 A CN 201711131133A CN 107835267 B CN107835267 B CN 107835267B
Authority
CN
China
Prior art keywords
domain name
interface
matched
preset
target
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
CN201711131133.2A
Other languages
Chinese (zh)
Other versions
CN107835267A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711131133.2A priority Critical patent/CN107835267B/en
Publication of CN107835267A publication Critical patent/CN107835267A/en
Application granted granted Critical
Publication of CN107835267B publication Critical patent/CN107835267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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]

Abstract

The invention provides a domain name resolution method and a domain name resolution device, which relate to the technical field of communication, and the method comprises the following steps: acquiring an interface identifier, acquiring a target domain name corresponding to the interface identifier, and analyzing the target domain name to obtain an analyzed address. The target domain name corresponding to the interface indicated by the interface identification is determined through the interface identification, so that the problem that part of domain names cannot be pre-resolved is solved, the time spent on opening the interface is reduced, the efficiency of opening the interface is improved, and the flexibility of pre-resolving the domain names is improved.

Description

Domain name resolution method and device
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a domain name resolution method and device.
Background
The domain name resolution is a process of resolving a domain name which is convenient to memorize into an IP (Internet Protocol) address, in daily life, a user usually inputs a domain name of a certain website to access a corresponding webpage, and in the process of accessing the webpage, a terminal needs to resolve the domain name input by the user into the IP address first and then open the corresponding webpage according to the IP address.
In the related art, the terminal may use a Domain Name System (DNS) pre-resolution technology to perform resolution and cache on Domain names included in the web pages, so as to increase the speed of opening corresponding web pages by the user. Specifically, the terminal may obtain each domain name included in the current page, and analyze each obtained domain name to obtain a corresponding IP address, so that when the user accesses the web page, the user may directly open the web page according to the domain name obtained by the analysis.
However, the terminal cannot perform pre-resolution on domain names of some interfaces, such as a bookmark interface, a website input interface, and the like, and needs to perform resolution to obtain corresponding IP addresses after detecting an access operation triggered by a user, which results in a long time spent by the user in accessing domain names included in the interfaces.
Disclosure of Invention
The embodiment of the invention provides a domain name resolution method and a domain name resolution device, which are used for solving the problem that access takes a long time due to the fact that a part of domain names cannot be pre-resolved.
In order to solve the technical problem, the invention is realized as follows: a method of domain name resolution, the method comprising:
acquiring an interface identifier;
acquiring a target domain name corresponding to the interface identifier;
and analyzing the target domain name to obtain an analyzed address.
In a first aspect, an embodiment of the present invention further provides a domain name resolution device, where the domain name resolution device includes:
the identification acquisition module is used for acquiring an interface identification;
the domain name acquisition module is used for acquiring a target domain name corresponding to the interface identifier;
and the analysis module is used for analyzing the target domain name to obtain an analyzed address.
In a second aspect, an embodiment of the present invention further provides a domain name resolution device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the domain name resolution method according to any one of the above domain name resolution methods.
In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of the domain name resolution method according to any one of the above domain name resolution methods.
In the embodiment of the invention, the interface identifier is obtained, the target domain name corresponding to the interface identifier is obtained according to the interface identifier, and finally the target domain name is analyzed to obtain the analyzed address. The target domain name corresponding to the interface indicated by the interface identification is determined through the interface identification, so that the problem that part of domain names cannot be pre-resolved is solved, the time spent on opening the interface is reduced, the efficiency of opening the interface is improved, and the flexibility of pre-resolving the domain names is improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a domain name resolution method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a domain name resolution method according to an embodiment of the present invention;
fig. 3 is a block diagram of a domain name resolution apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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 invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a domain name resolution method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 101, acquiring an interface identifier.
The interface identifier is used for identifying an interface displayed by the terminal, and the interface identifier may be a name corresponding to the interface or other identifiers.
When a user browses and surfs the internet, the terminal needs to perform pre-resolution on the domain name included in each interface, and the domain name included in each interface is different. Therefore, the terminal may obtain the interface identifier of the current interface first, so that in the subsequent step, the corresponding domain name is resolved according to the interface identifier. For example, when a user logs on a bookmark interface through a browser, the terminal may obtain an interface identifier of the bookmark interface.
And 102, acquiring a target domain name corresponding to the interface identifier.
After the terminal obtains the interface identifier, the terminal may find a corresponding relationship matching the interface identifier according to a preset corresponding relationship set in advance, and then determine a target domain name corresponding to the interface identifier according to the corresponding relationship obtained by matching.
It should be noted that, if a plurality of domain names corresponding to the interface identifier are recorded in the corresponding relationship obtained by matching, the terminal may screen the plurality of domain names to obtain a domain name satisfying corresponding conditions as a target domain name. However, if a small number of corresponding domain names are recorded in the correspondence, each corresponding domain name may be used as a target domain name corresponding to the interface identifier.
For example, when the interface indicated by the interface identifier is a bookmark interface, the target domain name corresponding to the bookmark interface may be each domain name collected by the user; when the interface indicated by the interface identifier is a first page of a certain website, the corresponding target domain names may be some domain names that are frequently visited by the user recently.
And 103, resolving the target domain name to obtain a resolved address.
After the terminal acquires the target domain name, the terminal can analyze the target domain name in advance to obtain the IP address corresponding to the target domain name when the user has not triggered the selection operation of the target domain name. When the terminal detects that the user triggers the selection operation of the target domain name, the terminal can jump to a corresponding interface according to the IP address obtained by pre-resolution, and the time spent on resolving the target domain name is saved.
It should be noted that the terminal may perform pre-resolution on a plurality of target domain names, and the embodiment of the present invention is described by taking only one target domain name as an example, and the embodiment of the present invention does not limit the number of the target domain names.
In summary, in the domain name resolution method provided in the embodiment of the present invention, the interface identifier is obtained, the target domain name corresponding to the interface identifier is obtained according to the interface identifier, and finally the target domain name is resolved to obtain the resolved address. The target domain name corresponding to the interface indicated by the interface identification is determined through the interface identification, so that the problem that part of domain names cannot be pre-resolved is solved, the time spent on opening the interface is reduced, the efficiency of opening the interface is improved, and the flexibility of pre-resolving the domain names is improved.
Example two
Referring to fig. 2, a flowchart illustrating steps of a domain name resolution method according to an embodiment of the present invention is shown, which may specifically include the following steps:
step 201, establishing a preset corresponding relationship between the interface and the domain name.
The terminal can obtain the preset interface identifier, obtain at least one preset domain name included in the interface indicated by the preset interface identifier, and finally establish the preset corresponding relation between the interface and the domain name according to the preset interface identifier and the at least one preset domain name.
Specifically, the terminal may obtain an interface identifier of each interface, use the obtained interface identifier as a preset interface identifier, obtain at least one preset domain name included in an interface indicated by each preset interface identifier, and finally establish a preset correspondence between the interface and the domain name according to each preset interface identifier and the at least one preset domain name included in the corresponding interface, so that in subsequent steps, a target domain name may be determined according to the preset correspondence.
For example, the terminal may obtain the interface identifier of the bookmark interface, and obtain each domain name recorded in the bookmark interface, and then may establish a corresponding relationship between the bookmark interface and each obtained domain name. The terminal can also obtain an interface identifier of a certain navigation interface, obtain a domain name corresponding to each link included in the navigation interface, and finally establish a preset corresponding relation between the navigation interface and the domain name.
Moreover, when the terminal establishes the preset corresponding relationship between the interface and the domain name, the access time and the access times of the user for accessing each domain name can be recorded, so that in the subsequent step, the domain name needing to be pre-resolved can be determined according to the access time and the access times.
It should be noted that the terminal may establish a plurality of corresponding relationships according to a plurality of preset interface identifiers, and in each corresponding relationship, the preset interface identifier may correspond to one preset domain name or a plurality of preset domain names.
Step 202, acquiring an interface identifier.
This step 202 is similar to step 101 and will not be described herein again.
Step 203, according to the interface identifier, searching in a preset corresponding relation between the interface and the domain name to obtain at least one matching domain name corresponding to the interface identifier.
The preset corresponding relation between the interface and the domain name is used for recording the corresponding relation between the interface and at least one domain name.
After the terminal obtains the interface identifier, the interface identifier may be matched with a preset interface identifier in a preset corresponding relationship. If the preset corresponding relation matched with the interface identifier is obtained, the interface indicated by the interface identifier is consistent with the interface indicated by the preset interface identifier, and the preset domain name recorded in the preset corresponding relation is the domain name corresponding to the interface identifier. Therefore, at least one preset domain name recorded in the preset corresponding relationship can be used as at least one matching domain name corresponding to the interface identifier.
Specifically, the terminal may traverse each preset interface identifier in the preset corresponding relationship according to the acquired interface identifier, and determine whether the interface identifier is consistent with the preset interface identifier in the preset corresponding relationship. When the interface identifier is consistent with a certain preset interface identifier, the preset corresponding relation to which the preset interface identifier belongs can be determined to be matched with the acquired interface identifier; however, if the interface identifier is inconsistent with a preset interface identifier, the next preset interface identifier may be obtained for matching.
Further, when it is determined that the interface identifier matches with a preset interface identifier, a preset correspondence to which the preset interface identifier belongs may be obtained, and at least one preset domain name recorded in the preset correspondence is used as at least one matching domain name corresponding to the interface identifier.
And 204, taking the domain name meeting the preset condition in the at least one matched domain name as a target domain name corresponding to the interface identifier.
Corresponding to step 201, in the process of establishing the preset corresponding relationship, the terminal may simultaneously record the access time and the access times of the user accessing each domain name, so that the terminal may screen at least one matching domain name according to the access time and/or the access times to obtain the target domain name.
Thus, step 204 may include at least one of step 204a and step 204 b:
step 204a, obtaining the access times corresponding to each matched domain name, sorting at least one matched domain name according to the sequence of the access times from large to small to obtain at least one sorted matched domain name, and selecting a preset number of matched domain names as target domain names according to the at least one sorted matched domain name.
After the terminal acquires at least one matched domain name, the terminal can also acquire the access times corresponding to each matched domain name, so as to judge according to the access times, determine whether the user frequently opens the interface corresponding to the matched domain name, and determine whether the matched domain name needs to be pre-resolved preferentially.
Specifically, the terminal may obtain the access times corresponding to each matching domain name, sort the corresponding matching domain names according to the access times and the sequence from large to small, and after the sorting, the terminal may select a preset number of matching domain names as the target domain name.
Furthermore, the number of access times corresponding to each selected target domain name is greater than the number of access times of the remaining unselected matching domain names, that is, the terminal may select several matching domain names with the largest number of access times as the target domain names.
For example, the terminal acquires 5 matching domain names, the preset number is 3, the terminal needs to select 3 matching domain names as the target domain names, the access times corresponding to each matching domain name are respectively 10 times, 3 times, 5 times, 8 times and 6 times, and after sorting and screening, the terminal selects the matching domain names corresponding to the access times of 10 times, 8 times and 6 times as the target domain names.
And 204b, acquiring access time corresponding to each matched domain name, sequencing at least one matched domain name according to the sequence of the access time from near to far to obtain at least one sequenced matched domain name, and selecting a preset number of matched domain names as target domain names according to the at least one sequenced matched domain name.
After the terminal acquires at least one matched domain name, the terminal can also acquire the access time corresponding to each matched domain name, so as to judge according to the access time and determine whether the user has recently opened the interface corresponding to the matched domain name, thereby determining whether the matched domain name needs to be pre-resolved preferentially.
Specifically, the terminal may obtain access time corresponding to each matched domain name, sequence the corresponding matched domain names according to the sequence of the access time and the sequence from near to far, and select the closest preset number of matched domain names as the target domain name.
Further, the difference between the access time corresponding to each selected target domain name and the current time is smaller than the difference between the access time of the remaining unselected matched domain names and the current time, that is, the terminal may select several matched domain names with the access time closest to the current time as the target domain names.
For example, when the current time is 18:00, the terminal acquires 5 matched domain names, the preset number is 3, that is, the terminal needs to select 3 matched domain names as target domain names, the access time corresponding to each matched domain name is 15:28, 16:19, 12:47, 17:39 and 14:55, and after sorting and screening, the terminal can select the matched domain names with the access time corresponding to 17:39, 16:19 and 15:28 as the target domain names.
It should be noted that, in practical applications, the terminal needs to comprehensively determine whether the selected matching domain name needs to be used as the target domain name according to the access times and the access time corresponding to the domain name, and then performs resolution.
The terminal can respectively assign different weights to the sequences obtained according to the access times and the sequences obtained according to the access time, perform screening according to the sequences after the weights are assigned, and take the matching domain name with the top sequence as the target domain name.
For example, if the preset number is 1, referring to table 1, two sorts of the matched domain names 1, 2, and 3 are respectively shown in table 1, and if the weights occupied by the access frequency sort and the access time sort are both 0.5, the sort of the matched domain name 1 after weight assignment is 1.5, the sort of the matched domain name 2 after weight assignment is 2, and the sort of the matched domain name 3 after weight assignment is 2.5, the matched domain name 1 may be selected as the target domain name.
TABLE 1
Matching domain names Access times ranking Access time ordering
1 1 2
2 3 1
3 2 3
In addition, the terminal may also acquire the target domain name in other manners, for example, when the terminal detects that the user inputs the domain name in the address input field, the domain name input by the user may be used as the target domain name; or, after the terminal detects that the user triggers a selection operation on a certain link, that is, after the terminal detects a selection operation on a certain domain name, the terminal may jump to an interface corresponding to the domain name, and in the jumping process, the terminal may acquire a key sub-domain name corresponding to the domain name and use the key sub-domain name as a target domain name.
The key sub-domain name corresponding to the domain name can be obtained according to a preset corresponding relation between the interface and the domain name, and the content corresponding to the key sub-domain name is used for displaying the interface corresponding to the domain name.
Step 205, the target domain name is resolved to obtain the resolved address.
Step 205 is similar to step 103 and will not be described herein again.
Step 206, updating the preset corresponding relation between the interface and the domain name.
After detecting that the user finishes surfing the internet and browsing the webpage interface, the terminal can acquire a history record generated by the user surfing the internet, so that the preset corresponding relation between the interface and the domain name can be updated according to the history record.
The history record can include an access path, at least one domain name accessed within a preset time, and a history interface identifier corresponding to each domain name.
For example, after the terminal detects that the user closes the browser, the terminal may obtain a history record generated in a process from the last time the user opens the browser to surf the internet to the last time the user closes the browser, where the history record records all interfaces accessed by the user in a process from the last time the user opens the browser to the last time the user closes the browser.
Optionally, the terminal may obtain at least one historical interface identifier, determine a target historical domain name corresponding to each historical interface identifier according to the access path, and update the preset corresponding relationship between the interface and the domain name according to the at least one historical interface identifier and the target historical domain name corresponding to each historical interface identifier.
Specifically, after the terminal acquires the history record, each history interface identifier in the history record may be acquired, and the target history domain name corresponding to the interface indicated by each history interface identifier is determined by combining the access path. That is, for the interface indicated by each history interface identifier, the terminal may determine, according to the access path in the history record, which interfaces corresponding to the domain names are opened through the interface indicated by the history interface identifier, so as to use the determined domain name as the target history domain name corresponding to the interface indicated by the history interface identifier.
Further, the terminal can also acquire a preset corresponding relationship between the interface corresponding to each historical interface identifier and the domain name, and update the domain name in the preset corresponding relationship according to the determined target historical domain name. When the target historical domain name is matched with the preset domain name in the preset corresponding relation, the access time and the access times corresponding to the preset domain name can be updated according to the target historical domain name; however, when the target history domain name does not match each preset domain name in the preset corresponding relationship, the target history domain name may be used as a new preset domain name to establish the preset corresponding relationship between the preset domain name and the preset interface identifier.
It should be noted that, in order to reduce redundant data stored in the terminal and reduce the work of performing pre-resolution by the terminal according to the target domain name, the terminal may delete the domain name that is not frequently visited by the user in the preset corresponding relationship between the interface and the domain name.
Optionally, the terminal may obtain the access time and the access frequency corresponding to each preset domain name in the preset corresponding relationship between the interface and the domain name, determine whether the access time and the access frequency corresponding to each preset domain name satisfy the domain name deletion condition, and finally delete the preset domain name satisfying the domain name deletion condition.
It should be noted that the process of determining whether the preset domain name meets the deletion condition is similar to the process of selecting the target domain name in step 204, and details are not repeated here.
In summary, in the domain name resolution method provided in the embodiment of the present invention, the interface identifier is obtained, the target domain name corresponding to the interface identifier is obtained according to the interface identifier, and finally the target domain name is resolved to obtain the resolved address. The target domain name corresponding to the interface indicated by the interface identification is determined through the interface identification, the condition that the terminal cannot pre-resolve the corresponding domain name under certain interfaces is avoided, the time spent on opening the interface is reduced, the efficiency of opening the interface is improved, and the flexibility of pre-resolving the domain name is improved.
Further, at least one matched domain name is obtained through searching, and the target domain name corresponding to the interface identifier is obtained through screening from the at least one matched domain name according to preset conditions. By further screening the matched domain names, the domain names which are not frequently visited by the user can be removed, the domain names which are recently visited or frequently visited by the user are reserved, the efficiency of the terminal for performing pre-resolution can be improved, and the work of the terminal for performing pre-resolution is reduced.
Furthermore, at least one matched domain name is screened according to the access times corresponding to each matched domain name, the matched domain names with the largest access times are used as target domain names, the matched domain names with the largest user access times are selected as the target domain names for analysis, and the accuracy of pre-analysis can be improved.
Furthermore, at least one matched domain name is screened according to the access time corresponding to each matched domain name, a plurality of matched domain names with the access time closest to the current time are used as target domain names, the matched domain name which is accessed by the user recently is selected as the target domain name to be analyzed, and the accuracy of pre-analysis can be improved.
Further, by pre-establishing a preset corresponding relationship between the interface and the domain name, after the terminal acquires the interface identifier, the terminal can quickly search for the matched domain name corresponding to the interface identifier according to the corresponding relationship, so that the efficiency of terminal pre-resolution is improved.
Further, by acquiring the history record, the terminal can update the preset corresponding relation between the interface and the domain name according to the domain name recorded in the history record, so that the preset corresponding relation can be updated in time according to the history record, and the integrity of the preset corresponding relation is maintained.
Further, according to the access time and the access times corresponding to each preset domain name, the preset domain name which is not frequently accessed by the user is deleted, and the workload of the terminal in preresolving can be reduced.
EXAMPLE III
Referring to fig. 3, a block diagram of a domain name resolution apparatus according to an embodiment of the present invention is shown, which may specifically include:
an identifier obtaining module 301, configured to obtain an interface identifier;
a domain name obtaining module 302, configured to obtain a target domain name corresponding to the interface identifier;
the resolving module 303 is configured to resolve the target domain name to obtain a resolved address.
Optionally, the identifier obtaining module 301 includes:
the searching submodule is used for searching in a preset corresponding relation between the interface and the domain name according to the interface identification so as to obtain at least one matched domain name corresponding to the interface identification;
and the determining sub-module is used for taking the domain name meeting the preset condition in the at least one matched domain name as the target domain name corresponding to the interface identifier.
Optionally, the number of times of access corresponding to the domain name is recorded in a preset corresponding relationship between the interface and the domain name;
the determination submodule includes:
the number obtaining unit is used for obtaining the access number corresponding to each matched domain name;
the sequencing unit is used for sequencing the at least one matched domain name according to the sequence of the access times from large to small to obtain at least one sequenced matched domain name;
and the selecting unit is used for selecting a preset number of matched domain names as the target domain name according to the at least one sorted matched domain name.
Optionally, the access time corresponding to the domain name is recorded in the preset corresponding relationship between the interface and the domain name;
the determination submodule includes:
the time acquisition unit is used for acquiring access time corresponding to each matched domain name;
the sorting unit is used for sorting the at least one matched domain name according to the sequence of the access time from near to far to obtain at least one sorted matched domain name;
and the selecting unit is used for selecting a preset number of matched domain names as the target domain name according to the at least one sorted matched domain name.
Optionally, the apparatus further comprises:
the preset identifier acquisition module is used for acquiring a preset interface identifier;
the preset domain name acquisition module is used for acquiring at least one preset domain name included in the interface indicated by the preset interface identifier;
and the corresponding relation establishing module is used for establishing a preset corresponding relation between the interface and the domain name according to the preset interface identifier and the at least one preset domain name.
Optionally, the apparatus further comprises:
the record acquisition module is used for acquiring a historical record, wherein the historical record comprises at least one domain name accessed within preset time;
and the corresponding relation updating module is used for updating the preset corresponding relation between the interface and the domain name according to the historical record.
Optionally, the history record further includes an access path and a history interface identifier corresponding to each domain name;
the corresponding relation updating module comprises:
the identification obtaining submodule is used for obtaining the at least one historical interface identification;
the domain name determining submodule is used for determining a target historical domain name corresponding to each historical interface identifier according to the access path;
and the corresponding relation updating submodule is used for updating the preset corresponding relation between the interface and the domain name according to the at least one historical interface identifier and the target historical domain name corresponding to each historical interface identifier.
Optionally, the apparatus further comprises:
the parameter acquisition module is used for acquiring access time and access times corresponding to each preset domain name in a preset corresponding relation between the interface and the domain name;
the judging module is used for judging whether the access time and the access times corresponding to each preset domain name meet the domain name deleting condition or not;
and the deleting module is used for deleting the preset domain name meeting the domain name deleting condition.
The mobile terminal provided in the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In summary, the domain name resolution apparatus provided in the embodiment of the present invention obtains the interface identifier, obtains the target domain name corresponding to the interface identifier according to the interface identifier, and finally resolves the target domain name to obtain the resolved address. The target domain name corresponding to the interface indicated by the interface identification is determined through the interface identification, the condition that the terminal cannot pre-resolve the corresponding domain name under certain interfaces is avoided, the time spent on opening the interface is reduced, the efficiency of opening the interface is improved, and the flexibility of pre-resolving the domain name is improved.
Fig. 4 is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, where the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 410 is configured to obtain an interface identifier;
the processor 410 is configured to obtain a target domain name corresponding to the interface identifier;
and the processor 410 is configured to analyze the target domain name to obtain an analyzed address.
In summary, the mobile terminal provided in the embodiment of the present invention obtains the interface identifier, obtains the target domain name corresponding to the interface identifier according to the interface identifier, and finally resolves the target domain name to obtain the resolved address. The target domain name corresponding to the interface indicated by the interface identification is determined through the interface identification, the condition that the terminal cannot pre-resolve the corresponding domain name under certain interfaces is avoided, the time spent on opening the interface is reduced, the efficiency of opening the interface is improved, and the flexibility of pre-resolving the domain name is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a domain name resolution device, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the domain name resolution method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned embodiment of the domain name resolution method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (6)

1. A domain name resolution method, the method comprising:
acquiring an interface identifier, wherein the interface identifier comprises a name corresponding to an interface;
acquiring a target domain name corresponding to the interface identifier;
analyzing the target domain name to obtain an analyzed address;
the obtaining of the target domain name corresponding to the interface identifier includes:
searching in a preset corresponding relation between an interface and a domain name according to the interface identifier to obtain at least one matched domain name corresponding to the interface identifier, wherein the interface is a bookmark interface or a navigation interface;
taking a domain name meeting a preset condition in the at least one matched domain name as a target domain name corresponding to the interface identifier, wherein the preset corresponding relation is used for recording the corresponding relation between the interface and the at least one domain name;
acquiring a history record, wherein the history record comprises at least one domain name accessed within preset time;
updating the preset corresponding relation between the interface and the domain name according to the history record;
the access time corresponding to the domain name is recorded in the preset corresponding relation between the interface and the domain name;
the taking the domain name meeting the preset condition in the at least one matched domain name as the target domain name corresponding to the interface identifier includes:
acquiring access time corresponding to each matched domain name;
sequencing the at least one matched domain name according to the sequence of the access time from near to far to obtain at least one sequenced matched domain name;
and selecting a preset number of matched domain names as the target domain name according to the at least one sequenced matched domain name.
2. The method according to claim 1, wherein the number of visits corresponding to the domain name is recorded in a preset correspondence between the interface and the domain name;
the taking the domain name meeting the preset condition in the at least one matched domain name as the target domain name corresponding to the interface identifier includes:
acquiring the access times corresponding to each matched domain name;
sequencing the at least one matched domain name according to the sequence of the access times from large to small to obtain at least one sequenced matched domain name;
and selecting a preset number of matched domain names as the target domain name according to the at least one sequenced matched domain name.
3. A domain name resolution apparatus, comprising:
the identification acquisition module is used for acquiring an interface identification, and the interface identification comprises a name corresponding to the interface;
the domain name acquisition module is used for acquiring a target domain name corresponding to the interface identifier;
the resolving module is used for resolving the target domain name to obtain an resolved address;
the identification acquisition module comprises:
the searching submodule is used for searching in a preset corresponding relation between an interface and a domain name according to the interface identification so as to obtain at least one matched domain name corresponding to the interface identification, wherein the interface is a bookmark interface or a navigation interface;
the determining sub-module is used for taking a domain name meeting a preset condition in the at least one matched domain name as a target domain name corresponding to the interface identifier, wherein the preset corresponding relation is used for recording the corresponding relation between the interface and the at least one domain name;
the record acquisition module is used for acquiring a historical record, wherein the historical record comprises at least one domain name accessed within preset time;
the corresponding relation updating module is used for updating the preset corresponding relation between the interface and the domain name according to the historical record;
the access time corresponding to the domain name is recorded in the preset corresponding relation between the interface and the domain name;
the determination sub-module includes:
the time acquisition unit is used for acquiring access time corresponding to each matched domain name;
the sorting unit is used for sorting the at least one matched domain name according to the sequence of the access time from near to far to obtain at least one sorted matched domain name;
and the selecting unit is used for selecting a preset number of matched domain names as the target domain name according to the sorted at least one matched domain name.
4. The device according to claim 3, wherein the preset correspondence between the interface and the domain name records the number of times of access corresponding to the domain name;
the determination sub-module includes:
the number obtaining unit is used for obtaining the access number corresponding to each matched domain name;
the sorting unit is used for sorting the at least one matched domain name according to the sequence of the access times from large to small to obtain at least one sorted matched domain name;
and the selecting unit is used for selecting a preset number of matched domain names as the target domain name according to the sorted at least one matched domain name.
5. A domain name resolution device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the domain name resolution method according to any one of claims 1 to 2.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the domain name resolution method according to any one of claims 1 to 2.
CN201711131133.2A 2017-11-15 2017-11-15 Domain name resolution method and device Active CN107835267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711131133.2A CN107835267B (en) 2017-11-15 2017-11-15 Domain name resolution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711131133.2A CN107835267B (en) 2017-11-15 2017-11-15 Domain name resolution method and device

Publications (2)

Publication Number Publication Date
CN107835267A CN107835267A (en) 2018-03-23
CN107835267B true CN107835267B (en) 2021-08-06

Family

ID=61651631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711131133.2A Active CN107835267B (en) 2017-11-15 2017-11-15 Domain name resolution method and device

Country Status (1)

Country Link
CN (1) CN107835267B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111030966B (en) * 2018-10-10 2022-05-27 阿里巴巴集团控股有限公司 Data processing method, device and machine readable medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100146415A1 (en) * 2007-07-12 2010-06-10 Viasat, Inc. Dns prefetch
CN104184841B (en) * 2013-05-23 2018-01-12 上海携程商务有限公司 Website dns resolution accelerated method and client
CN103685604B (en) * 2013-12-20 2017-07-11 北京奇安信科技有限公司 A kind of domain name pre-parsed method and device
CN104135546A (en) * 2014-07-25 2014-11-05 可牛网络技术(北京)有限公司 Method for loading webpage and terminal
CN106294848A (en) * 2016-08-22 2017-01-04 深圳市茁壮网络股份有限公司 A kind of web analysis, acquisition methods and device
CN106301928A (en) * 2016-08-22 2017-01-04 深圳市茁壮网络股份有限公司 A kind of web analysis, acquisition methods and device

Also Published As

Publication number Publication date
CN107835267A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN108845853B (en) Application program starting method and mobile terminal
CN108334539B (en) Object recommendation method, mobile terminal and computer-readable storage medium
CN109462668B (en) Method and device for processing domain name resolution request
CN109284144B (en) Fast application processing method and mobile terminal
CN110381204B (en) Information display method, mobile terminal and computer readable storage medium
CN107229618B (en) Method and device for displaying page
CN108600516B (en) Data acquisition method, mobile terminal and computer readable storage medium
CN108984066B (en) Application icon display method and mobile terminal
CN110958485A (en) Video playing method, electronic equipment and computer readable storage medium
CN109101327B (en) Switching of light application and mobile terminal
CN108897846B (en) Information searching method, apparatus and computer readable storage medium
CN110990679A (en) Information searching method and electronic equipment
CN107992615B (en) Website recommendation method, server and terminal
CN108391253B (en) application program recommendation method and mobile terminal
CN110069407B (en) Function test method and device for application program
CN110688497A (en) Resource information searching method and device, terminal equipment and storage medium
CN107765954B (en) Application icon updating method, mobile terminal and server
CN108595107B (en) Interface content processing method and mobile terminal
CN110908751B (en) Information display and collection method and device, electronic equipment and medium
CN111130995B (en) Image control method, electronic device, and storage medium
CN107835267B (en) Domain name resolution method and device
CN109684006B (en) Terminal control method and device
CN107734049B (en) Network resource downloading method and device and mobile terminal
CN107844203B (en) Input method candidate word recommendation method and mobile terminal
CN109325003B (en) Application program classification method and system based on terminal equipment

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
GR01 Patent grant
GR01 Patent grant