CN112134968A - Domain name access method and device, electronic equipment and storage medium - Google Patents

Domain name access method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112134968A
CN112134968A CN202011057706.3A CN202011057706A CN112134968A CN 112134968 A CN112134968 A CN 112134968A CN 202011057706 A CN202011057706 A CN 202011057706A CN 112134968 A CN112134968 A CN 112134968A
Authority
CN
China
Prior art keywords
domain name
accessed
file
pool
access request
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
CN202011057706.3A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011057706.3A priority Critical patent/CN112134968A/en
Publication of CN112134968A publication Critical patent/CN112134968A/en
Pending legal-status Critical Current

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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The invention relates to a domain name resolution technology, and provides a domain name access method, a domain name access device, electronic equipment and a storage medium. The method comprises the steps of extracting a domain name to be accessed from a page access request when the page access request is received, detecting whether the domain name to be accessed is accessed for the first time, obtaining a configuration domain name from a pre-configured domain name pool when the domain name to be accessed is detected to be accessed for the first time, obtaining a configuration file corresponding to the domain name to be accessed, replacing the domain name to be accessed with the configuration domain name in the configuration file, obtaining a target file, and operating the target file to respond to the page access request. The invention can still normally access the webpage even if the domain name of the webpage is forbidden or hijacked. In addition, the invention also relates to a block chain technology, and the target file can be stored in the block chain.

Description

Domain name access method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of domain name resolution technologies, and in particular, to a domain name access method and apparatus, an electronic device, and a storage medium.
Background
At present, in order to better propagate a webpage, a third-party environment is generally used for accessing the webpage, when the webpage triggers a forbidding rule of the third-party environment, a domain name corresponding to the webpage is forbidden, and a user cannot normally access the webpage by using the domain name within a time limit of the webpage domain name being forbidden. Meanwhile, in some small operator network environments, domain names corresponding to web pages are easily hijacked by operators, so that users cannot normally access the web pages in some areas, and therefore services provided by enterprises cannot be normally used.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a domain name access method, device, electronic device and storage medium, which can still access a web page normally when the domain name of the web page is blocked or hijacked.
In one aspect, the present invention provides a domain name access method, where the domain name access method includes:
when a page access request is received, extracting a domain name to be accessed from the page access request, and detecting whether the domain name to be accessed is accessed for the first time;
when the domain name to be accessed is detected to be accessed for the first time, acquiring a configured domain name from a pre-configured domain name pool;
acquiring a configuration file corresponding to the domain name to be accessed;
replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file;
and operating the target file to respond to the page access request.
According to the preferred embodiment of the present invention, the extracting the domain name to be accessed from the page access request includes:
acquiring all idle threads from the thread pool, and acquiring the processing efficiency of each idle thread;
determining the idle thread with the highest processing efficiency as a target thread;
analyzing the message of the page access request by using the target thread to obtain data information carried by the page access request;
and acquiring information corresponding to a preset label from the data information as the domain name to be accessed.
According to a preferred embodiment of the present invention, the detecting whether the domain name to be visited is visited for the first time includes one or a combination of the following ways:
acquiring all received requests, detecting whether the domain name to be accessed is included in all the requests, and determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in all the requests, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in all the requests; and/or
The method comprises the steps of obtaining a log table, detecting whether the domain name to be accessed exists in the log table or not, determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in the log table, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in the log table.
According to the preferred embodiment of the present invention, the obtaining of the configured domain name from the preconfigured domain name pool includes:
acquiring all domain names in the domain name pool;
screening an unallocated domain name from all the acquired domain names to serve as a target domain name;
and selecting the configuration domain name from the target domain name.
According to a preferred embodiment of the present invention, the obtaining of the configuration file corresponding to the domain name to be accessed includes:
traversing a pre-configured file list;
when the file name which is the same as the domain name to be accessed is traversed in the file list, determining a path where a file corresponding to the file name is located;
and acquiring the configuration file from the path.
According to a preferred embodiment of the present invention, after the target file is executed in response to the page access request, the method further comprises:
when the execution failure of the target file is detected, determining the access times of the configuration domain name;
when the access times are larger than or equal to a preset threshold value, deleting the configured domain name from the domain name pool, and acquiring other domain names from the domain name pool;
replacing the configured domain name with the other domain name in the destination file.
According to a preferred embodiment of the present invention, after the configured domain name is deleted from the domain name pool, the method further comprises:
detecting the number of domain names in the domain name pool;
when the number is smaller than a configuration value, generating prompt information according to the domain name pool and the number;
encrypting the prompt information by adopting a symmetric encryption technology to obtain a ciphertext;
and sending the ciphertext to the terminal equipment of the appointed contact person.
In another aspect, the present invention further provides a domain name access apparatus, including:
the device comprises an extracting unit, a judging unit and a judging unit, wherein the extracting unit is used for extracting a domain name to be accessed from a page access request when the page access request is received, and detecting whether the domain name to be accessed is accessed for the first time;
the acquisition unit is used for acquiring a configured domain name from a pre-configured domain name pool when the domain name to be accessed is detected to be accessed for the first time;
the obtaining unit is further configured to obtain a configuration file corresponding to the domain name to be accessed;
the replacing unit is used for replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file;
and the operation unit is used for operating the target file to respond to the page access request.
In another aspect, the present invention further provides an electronic device, including:
a memory storing computer readable instructions; and
a processor executing computer readable instructions stored in the memory to implement the domain name access method.
In another aspect, the present invention also provides a computer-readable storage medium, in which computer-readable instructions are stored, and the computer-readable instructions are executed by a processor in an electronic device to implement the domain name access method.
According to the technical scheme, when a page access request is received, the domain name to be accessed is extracted from the page access request, whether the domain name to be accessed is accessed for the first time or not is detected, the domain name to be accessed can be accurately extracted through the page access request, when the domain name to be accessed is detected to be accessed for the first time, the configured domain name capable of replacing the domain name to be accessed is obtained from a pre-configured domain name pool, when the domain name to be accessed is accessed for the first time, the configured domain name capable of replacing the domain name to be accessed is obtained, the configuration file corresponding to the domain name to be accessed is obtained, and the domain name to be accessed is replaced by the configured domain name in the configuration file to obtain the target file; and replacing the domain name to be accessed with the configuration domain name, accessing a page corresponding to the domain name to be accessed through the configuration domain name, and operating the target file to respond to the page access request. The invention can ensure that the webpage can be normally accessed by a dynamic domain name access mode, thereby being capable of normally and practically using the service provided by enterprises.
Drawings
Fig. 1 is a flow chart of a preferred embodiment of the domain name access method of the present invention.
Fig. 2 is a functional block diagram of a preferred embodiment of the domain name access apparatus of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device implementing the domain name access method according to the preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a preferred embodiment of the domain name access method of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The domain name access method is applied to one or more electronic devices, which are devices capable of automatically performing numerical calculation and/or information processing according to computer readable instructions set or stored in advance, and the hardware thereof includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), a smart wearable device, and the like.
The electronic device may include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network electronic device, an electronic device group consisting of a plurality of network electronic devices, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network electronic devices.
The network in which the electronic device is located includes, but is not limited to: the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
S10, when a page access request is received, extracting a domain name to be accessed from the page access request, and detecting whether the domain name to be accessed is accessed for the first time.
In at least one embodiment of the present invention, the page access request may be triggered by a user, or may be automatically triggered within a preset time. Further, the preset time may be a time point or a time period.
In at least one embodiment of the present invention, the data information carried in the page access request includes, but is not limited to: the domain name to be accessed. Further, the domain name to be accessed refers to a domain name corresponding to a page to which the user needs to access the page. Com, for example, the domain name to be accessed may be pingan.
In at least one embodiment of the present invention, the extracting, by the electronic device, the domain name to be accessed from the page access request includes:
acquiring all idle threads from the thread pool, and acquiring the processing efficiency of each idle thread;
determining the idle thread with the highest processing efficiency as a target thread;
analyzing the message of the page access request by using the target thread to obtain data information carried by the page access request;
and acquiring information corresponding to a preset label from the data information as the domain name to be accessed.
The preset tag is a predefined tag, for example, the preset tag is a name.
The page access request is analyzed by using the target thread with the highest processing efficiency, and the target thread does not need to wait for processing other requests, so that the processing efficiency of the target thread is highest, meanwhile, only the message of the page access request needs to be analyzed, and the whole request does not need to be analyzed, so that the analysis efficiency of the page access request can be improved, and in addition, the domain name to be accessed can be accurately extracted by presetting the mapping relation between the label and the domain name to be accessed.
In at least one embodiment of the present invention, the electronic device detecting whether the domain name to be visited is visited for the first time includes one or a combination of the following ways:
acquiring all received requests, detecting whether the domain name to be accessed is included in all the requests, and determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in all the requests, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in all the requests; and/or
The method comprises the steps of obtaining a log table, detecting whether the domain name to be accessed exists in the log table or not, determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in the log table, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in the log table.
By the embodiment, whether the domain name to be accessed is accessed for the first time can be determined in various modes, and the detection of the domain name to be accessed is facilitated.
And S11, when the domain name to be accessed is detected to be accessed for the first time, acquiring a configured domain name from a preconfigured domain name pool.
In at least one embodiment of the present invention, the domain name pool stores a plurality of preconfigured domain names, and the domain name pool stores a domain name different from the domain name to be accessed. For example, the domain name to be accessed is pingan.com, and the domain names stored in the domain name pool may be b1.com, b2.com, and the like.
In at least one embodiment of the present invention, before obtaining the configured domain name from the preconfigured domain name pool, the method further comprises:
setting the domain name pool, and setting domain names in a plurality of pools, wherein the number of the domain names in the plurality of pools is a preset value;
storing the domain names in the plurality of pools in the domain name pool.
By setting a plurality of domain names in the domain name pool, a plurality of choices can be made when the configured domain name is obtained from the domain name pool, and the selection rate is improved.
In at least one embodiment of the present invention, the acquiring, by the electronic device, the configured domain name from the preconfigured domain name pool includes:
acquiring all domain names in the domain name pool;
screening an unallocated domain name from all the acquired domain names to serve as a target domain name;
and selecting the configuration domain name from the target domain name.
For example: acquiring all domain names b1.com, b2.com, b3.com and b4.com in a domain name pool, screening the unassigned domain names b3.com and b4.com, further determining that target domain names b3.com and b4.com exist, and selecting any domain name from the target domain names as a configuration domain name, so that the configuration domain name can be b3.com, and the configuration domain name can also be b4. com.
Through the embodiment, the domain names in the domain name pool can be prevented from being repeatedly distributed, and further errors in page access are avoided.
And S12, acquiring a configuration file corresponding to the domain name to be accessed.
In at least one embodiment of the present invention, the configuration file stores the domain name to be accessed and an IP address corresponding to the domain name to be accessed.
In at least one embodiment of the present invention, the electronic device runs the configuration file, and can access the page of the domain name to be accessed.
In at least one embodiment of the present invention, the acquiring, by the electronic device, the configuration file corresponding to the domain name to be accessed includes:
traversing a pre-configured file list;
when the file name which is the same as the domain name to be accessed is traversed in the file list, determining a path where a file corresponding to the file name is located;
and acquiring the configuration file from the path.
By the embodiment, the configuration file can be accurately acquired.
And S13, replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file.
It is emphasized that the object file may also be stored in a node of a blockchain in order to further ensure the privacy and security of the object file.
In at least one embodiment of the present invention, the target file stores the configuration domain name and an IP address corresponding to the domain name to be accessed.
In at least one embodiment of the present invention, the electronic device runs the target file, and can access the page of the domain name to be accessed.
In at least one embodiment of the present invention, the replacing, by the electronic device, the domain name to be accessed with the configured domain name in the configuration file, and obtaining the target file includes:
determining the domain name position of the domain name to be accessed in the configuration file;
deleting the domain name to be accessed from the domain name position, and filling the configuration domain name in the domain name position where the domain name to be accessed is deleted to generate the target file.
In at least one embodiment of the invention, after obtaining the object file, the electronic device stores the object file.
By the embodiment, when the webpage corresponding to the domain name to be accessed is accessed subsequently, the configured domain name can be directly used for page access, the domain name does not need to be acquired from the domain name pool again, and the domain name access efficiency is improved.
S14, operating the target file to respond to the page access request.
In at least one embodiment of the invention, after running the target file in response to the page access request, the method further comprises:
when the execution failure of the target file is detected, determining the access times of the configuration domain name;
when the access times are larger than or equal to a preset threshold value, deleting the configured domain name from the domain name pool, and acquiring other domain names from the domain name pool;
replacing the configured domain name with the other domain name in the destination file.
The preset threshold may be freely configured according to an application scenario, which is not limited in the present invention.
Through the implementation mode, when the configured domain name is hijacked or forbidden, the domain name to be accessed can be successfully accessed.
In at least one embodiment of the invention, after removing the configured domain name from the domain name pool, the method further comprises:
detecting the number of domain names in the domain name pool;
when the number is smaller than a configuration value, generating prompt information according to the domain name pool and the number;
encrypting the prompt information by adopting a symmetric encryption technology to obtain a ciphertext;
and sending the ciphertext to the terminal equipment of the appointed contact person.
Through the implementation mode, when the number is lower than the configuration value, the specified contact person can be reminded to supplement the domain name in the domain name pool in time.
According to the technical scheme, when a page access request is received, the domain name to be accessed is extracted from the page access request, whether the domain name to be accessed is accessed for the first time or not is detected, the domain name to be accessed can be accurately extracted through the page access request, when the domain name to be accessed is detected to be accessed for the first time, the configured domain name capable of replacing the domain name to be accessed is obtained from a pre-configured domain name pool, when the domain name to be accessed is accessed for the first time, the configured domain name capable of replacing the domain name to be accessed is obtained, the configuration file corresponding to the domain name to be accessed is obtained, and the domain name to be accessed is replaced by the configured domain name in the configuration file to obtain the target file; and replacing the domain name to be accessed with the configuration domain name, accessing a page corresponding to the domain name to be accessed through the configuration domain name, and operating the target file to respond to the page access request. The invention can ensure that the webpage can be normally accessed by a dynamic domain name access mode, thereby being capable of normally and practically using the service provided by enterprises.
Fig. 2 is a functional block diagram of a preferred embodiment of the domain name access apparatus according to the present invention. The domain name access device 11 includes an extraction unit 110, an acquisition unit 111, a replacement unit 112, an execution unit 113, a setting unit 114, a storage unit 115, a determination unit 116, a deletion unit 117, a detection unit 118, a generation unit 119, an encryption unit 120, and a transmission unit 121. The module/unit referred to herein is a series of computer readable instruction segments that can be accessed by the processor 13 and perform a fixed function and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When receiving a page access request, the extracting unit 110 extracts a domain name to be accessed from the page access request, and detects whether the domain name to be accessed is accessed for the first time.
In at least one embodiment of the present invention, the page access request may be triggered by a user, or may be automatically triggered within a preset time. Further, the preset time may be a time point or a time period.
In at least one embodiment of the present invention, the data information carried in the page access request includes, but is not limited to: the domain name to be accessed. Further, the domain name to be accessed refers to a domain name corresponding to a page to which the user needs to access the page. Com, for example, the domain name to be accessed may be pingan.
In at least one embodiment of the present invention, the extracting unit 110 extracts the domain name to be accessed from the page access request, including:
acquiring all idle threads from the thread pool, and acquiring the processing efficiency of each idle thread;
determining the idle thread with the highest processing efficiency as a target thread;
analyzing the message of the page access request by using the target thread to obtain data information carried by the page access request;
and acquiring information corresponding to a preset label from the data information as the domain name to be accessed.
The preset tag is a predefined tag, for example, the preset tag is a name.
The page access request is analyzed by using the target thread with the highest processing efficiency, and the target thread does not need to wait for processing other requests, so that the processing efficiency of the target thread is highest, meanwhile, only the message of the page access request needs to be analyzed, and the whole request does not need to be analyzed, so that the analysis efficiency of the page access request can be improved, and in addition, the domain name to be accessed can be accurately extracted by presetting the mapping relation between the label and the domain name to be accessed.
In at least one embodiment of the present invention, the detecting, by the extracting unit 110, whether the domain name to be visited is visited for the first time includes one or a combination of the following ways:
acquiring all received requests, detecting whether the domain name to be accessed is included in all the requests, and determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in all the requests, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in all the requests; and/or
The method comprises the steps of obtaining a log table, detecting whether the domain name to be accessed exists in the log table or not, determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in the log table, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in the log table.
By the embodiment, whether the domain name to be accessed is accessed for the first time can be determined in various modes, and the detection of the domain name to be accessed is facilitated.
When detecting that the domain name to be accessed is accessed for the first time, the obtaining unit 111 obtains the configured domain name from the preconfigured domain name pool.
In at least one embodiment of the present invention, the domain name pool stores a plurality of preconfigured domain names, and the domain name pool stores a domain name different from the domain name to be accessed. For example, the domain name to be accessed is pingan.com, and the domain names stored in the domain name pool may be b1.com, b2.com, and the like.
In at least one embodiment of the present invention, before obtaining a configured domain name from a preconfigured domain name pool, the setting unit 114 sets the domain name pool, and sets domain names in a plurality of pools, where the number of domain names in the plurality of pools is a preset value;
the storage unit 115 stores the domain names in the plurality of pools in the domain name pool.
By setting a plurality of domain names in the domain name pool, a plurality of choices can be made when the configured domain name is obtained from the domain name pool, and the selection rate is improved.
In at least one embodiment of the present invention, the obtaining unit 111 obtains the configured domain name from the preconfigured domain name pool, where the obtaining unit includes:
acquiring all domain names in the domain name pool;
screening an unallocated domain name from all the acquired domain names to serve as a target domain name;
and selecting the configuration domain name from the target domain name.
For example: acquiring all domain names b1.com, b2.com, b3.com and b4.com in a domain name pool, screening the unassigned domain names b3.com and b4.com, further determining that target domain names b3.com and b4.com exist, and selecting any domain name from the target domain names as a configuration domain name, so that the configuration domain name can be b3.com, and the configuration domain name can also be b4. com.
Through the embodiment, the domain names in the domain name pool can be prevented from being repeatedly distributed, and further errors in page access are avoided.
The obtaining unit 111 obtains a configuration file corresponding to the domain name to be accessed.
In at least one embodiment of the present invention, the configuration file stores the domain name to be accessed and an IP address corresponding to the domain name to be accessed.
In at least one embodiment of the present invention, the operation unit 113 operates the configuration file, and can implement access to the page of the domain name to be accessed.
In at least one embodiment of the present invention, the acquiring unit 111 acquires the configuration file corresponding to the domain name to be accessed includes:
traversing a pre-configured file list;
when the file name which is the same as the domain name to be accessed is traversed in the file list, determining a path where a file corresponding to the file name is located;
and acquiring the configuration file from the path.
By the embodiment, the configuration file can be accurately acquired.
The replacing unit 112 replaces the domain name to be accessed with the configured domain name in the configuration file to obtain a target file.
It is emphasized that the object file may also be stored in a node of a blockchain in order to further ensure the privacy and security of the object file.
In at least one embodiment of the present invention, the target file stores the configuration domain name and an IP address corresponding to the domain name to be accessed.
In at least one embodiment of the present invention, the running unit 113 runs the target file, and can implement access to the page of the domain name to be accessed.
In at least one embodiment of the present invention, the replacing unit 112 replaces the domain name to be accessed with the configured domain name in the configuration file, and obtaining the target file includes:
determining the domain name position of the domain name to be accessed in the configuration file;
deleting the domain name to be accessed from the domain name position, and filling the configuration domain name in the domain name position where the domain name to be accessed is deleted to generate the target file.
In at least one embodiment of the present invention, after obtaining the target file, the storage unit 115 stores the target file.
By the embodiment, when the webpage corresponding to the domain name to be accessed is accessed subsequently, the configured domain name can be directly used for page access, the domain name does not need to be acquired from the domain name pool again, and the domain name access efficiency is improved.
The execution unit 113 executes the target file in response to the page access request.
In at least one embodiment of the present invention, after the target file is executed in response to the page access request, when it is detected that the target file fails to execute, the determining unit 116 determines the number of accesses of the configured domain name;
when the access frequency is greater than or equal to a preset threshold, the deleting unit 117 deletes the configured domain name from the domain name pool, and acquires another domain name from the domain name pool;
the replacement unit 112 replaces the configured domain name with the other domain name in the destination file.
The preset threshold may be freely configured according to an application scenario, which is not limited in the present invention.
Through the implementation mode, when the configured domain name is hijacked or forbidden, the domain name to be accessed can be successfully accessed.
In at least one embodiment of the invention, after removing the configured domain name from the domain name pool, the method further comprises:
the detecting unit 118 detects the number of domain names in the domain name pool;
when the number is smaller than the configuration value, the generating unit 119 generates prompt information according to the domain name pool and the number;
the encryption unit 120 encrypts the prompt message by using a symmetric encryption technology to obtain a ciphertext;
the sending unit 121 sends the ciphertext to the terminal device of the designated contact.
Through the implementation mode, when the number is lower than the configuration value, the specified contact person can be reminded to supplement the domain name in the domain name pool in time.
According to the technical scheme, when a page access request is received, the domain name to be accessed is extracted from the page access request, whether the domain name to be accessed is accessed for the first time or not is detected, the domain name to be accessed can be accurately extracted through the page access request, when the domain name to be accessed is detected to be accessed for the first time, the configured domain name capable of replacing the domain name to be accessed is obtained from a pre-configured domain name pool, when the domain name to be accessed is accessed for the first time, the configured domain name capable of replacing the domain name to be accessed is obtained, the configuration file corresponding to the domain name to be accessed is obtained, and the domain name to be accessed is replaced by the configured domain name in the configuration file to obtain the target file; and replacing the domain name to be accessed with the configuration domain name, accessing a page corresponding to the domain name to be accessed through the configuration domain name, and operating the target file to respond to the page access request. The invention can ensure that the webpage can be normally accessed by a dynamic domain name access mode, thereby being capable of normally and practically using the service provided by enterprises.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the present invention for implementing a domain name access method.
In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and computer readable instructions, such as a domain name access program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 13 is an operation core and a control center of the electronic device 1, and is connected to each part of the whole electronic device 1 by various interfaces and lines, and executes an operating system of the electronic device 1 and various installed application programs, program codes, and the like.
The processor 13 executes an operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the various embodiments of the domain name access method described above, such as the steps shown in fig. 1.
Illustratively, the computer readable instructions may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing specific functions, which are used for describing the execution process of the computer readable instructions in the electronic device 1. For example, the computer-readable instructions may be divided into an extraction unit 110, an acquisition unit 111, a replacement unit 112, an execution unit 113, a setting unit 114, a storage unit 115, a determination unit 116, a deletion unit 117, a detection unit 118, a generation unit 119, an encryption unit 120, and a transmission unit 121.
The memory 12 may be used for storing the computer readable instructions and/or modules, and the processor 13 implements various functions of the electronic device 1 by executing or executing the computer readable instructions and/or modules stored in the memory 12 and invoking data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area, wherein the program storage 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 created according to use of the electronic device, and the like. The memory 12 may include non-volatile and volatile memories, such as: a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other storage device.
The memory 12 may be an external memory and/or an internal memory of the electronic device 1. Further, the memory 12 may be a memory having a physical form, such as a memory stick, a TF Card (Trans-flash Card), or the like.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by hardware that is configured to be instructed by computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer readable instructions comprise computer readable instruction code which may be in source code form, object code form, an executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying said computer readable instruction code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM).
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
In conjunction with fig. 1, the memory 12 in the electronic device 1 stores computer-readable instructions to implement a domain name access method, and the processor 13 can execute the computer-readable instructions to implement:
when a page access request is received, extracting a domain name to be accessed from the page access request, and detecting whether the domain name to be accessed is accessed for the first time;
when the domain name to be accessed is detected to be accessed for the first time, acquiring a configured domain name from a pre-configured domain name pool;
acquiring a configuration file corresponding to the domain name to be accessed;
replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file;
and operating the target file to respond to the page access request.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer readable instructions, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The computer readable storage medium has computer readable instructions stored thereon, wherein the computer readable instructions when executed by the processor 13 are configured to implement the steps of:
when a page access request is received, extracting a domain name to be accessed from the page access request, and detecting whether the domain name to be accessed is accessed for the first time;
when the domain name to be accessed is detected to be accessed for the first time, acquiring a configured domain name from a pre-configured domain name pool;
acquiring a configuration file corresponding to the domain name to be accessed;
replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file;
and operating the target file to respond to the page access request.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A domain name access method, characterized in that the domain name access method comprises:
when a page access request is received, extracting a domain name to be accessed from the page access request, and detecting whether the domain name to be accessed is accessed for the first time;
when the domain name to be accessed is detected to be accessed for the first time, acquiring a configured domain name from a pre-configured domain name pool;
acquiring a configuration file corresponding to the domain name to be accessed;
replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file;
and operating the target file to respond to the page access request.
2. The domain name access method according to claim 1, wherein the extracting the domain name to be accessed from the page access request comprises:
acquiring all idle threads from the thread pool, and acquiring the processing efficiency of each idle thread;
determining the idle thread with the highest processing efficiency as a target thread;
analyzing the message of the page access request by using the target thread to obtain data information carried by the page access request;
and acquiring information corresponding to a preset label from the data information as the domain name to be accessed.
3. The domain name access method according to claim 1, wherein the detecting whether the domain name to be accessed is accessed for the first time comprises one or more of the following combinations:
acquiring all received requests, detecting whether the domain name to be accessed is included in all the requests, and determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in all the requests, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in all the requests; and/or
The method comprises the steps of obtaining a log table, detecting whether the domain name to be accessed exists in the log table or not, determining that the domain name to be accessed is accessed for the first time when the domain name to be accessed is not detected in the log table, or determining that the domain name to be accessed is not accessed for the first time when the domain name to be accessed is detected in the log table.
4. The domain name access method according to claim 1, wherein said obtaining the configured domain name from the preconfigured domain name pool comprises:
acquiring all domain names in the domain name pool;
screening an unallocated domain name from all the acquired domain names to serve as a target domain name;
and selecting the configuration domain name from the target domain name.
5. The domain name access method according to claim 1, wherein the obtaining of the configuration file corresponding to the domain name to be accessed comprises:
traversing a pre-configured file list;
when the file name which is the same as the domain name to be accessed is traversed in the file list, determining a path where a file corresponding to the file name is located;
and acquiring the configuration file from the path.
6. The domain name access method of claim 1, wherein after running the target file in response to the page access request, the method further comprises:
when the execution failure of the target file is detected, determining the access times of the configuration domain name;
when the access times are larger than or equal to a preset threshold value, deleting the configured domain name from the domain name pool, and acquiring other domain names from the domain name pool;
replacing the configured domain name with the other domain name in the destination file.
7. The domain name access method of claim 6, wherein after removing the configured domain name from the domain name pool, the method further comprises:
detecting the number of domain names in the domain name pool;
when the number is smaller than a configuration value, generating prompt information according to the domain name pool and the number;
encrypting the prompt information by adopting a symmetric encryption technology to obtain a ciphertext;
and sending the ciphertext to the terminal equipment of the appointed contact person.
8. A domain name access device, comprising:
the device comprises an extracting unit, a judging unit and a judging unit, wherein the extracting unit is used for extracting a domain name to be accessed from a page access request when the page access request is received, and detecting whether the domain name to be accessed is accessed for the first time;
the acquisition unit is used for acquiring a configured domain name from a pre-configured domain name pool when the domain name to be accessed is detected to be accessed for the first time;
the obtaining unit is further configured to obtain a configuration file corresponding to the domain name to be accessed;
the replacing unit is used for replacing the domain name to be accessed with the configuration domain name in the configuration file to obtain a target file;
and the operation unit is used for operating the target file to respond to the page access request.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing computer readable instructions; and
a processor executing computer readable instructions stored in the memory to implement a domain name access method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium characterized by: the computer-readable storage medium stores therein computer-readable instructions which are executed by a processor in an electronic device to implement the domain name access method according to any one of claims 1 to 7.
CN202011057706.3A 2020-09-29 2020-09-29 Domain name access method and device, electronic equipment and storage medium Pending CN112134968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011057706.3A CN112134968A (en) 2020-09-29 2020-09-29 Domain name access method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011057706.3A CN112134968A (en) 2020-09-29 2020-09-29 Domain name access method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112134968A true CN112134968A (en) 2020-12-25

Family

ID=73843329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011057706.3A Pending CN112134968A (en) 2020-09-29 2020-09-29 Domain name access method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112134968A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769802A (en) * 2020-12-31 2021-05-07 微医云(杭州)控股有限公司 Access verification method and device based on server, electronic equipment and storage medium
CN113301177A (en) * 2021-04-27 2021-08-24 百果园技术(新加坡)有限公司 Domain name anti-blocking method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639672A (en) * 2015-02-12 2015-05-20 广州华多网络科技有限公司 Method and device for domain name resolution (DNS)
WO2017020776A1 (en) * 2015-07-31 2017-02-09 北京金山安全软件有限公司 Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword
CN108881517A (en) * 2018-08-01 2018-11-23 北京闲徕互娱网络科技有限公司 Domain name pond automatic management method and system
CN111475754A (en) * 2020-04-07 2020-07-31 广州市百果园信息技术有限公司 Page loading method, device, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104639672A (en) * 2015-02-12 2015-05-20 广州华多网络科技有限公司 Method and device for domain name resolution (DNS)
WO2017020776A1 (en) * 2015-07-31 2017-02-09 北京金山安全软件有限公司 Method and apparatus for obtaining keyword and for suggesting information on the basis of keyword
CN108881517A (en) * 2018-08-01 2018-11-23 北京闲徕互娱网络科技有限公司 Domain name pond automatic management method and system
CN111475754A (en) * 2020-04-07 2020-07-31 广州市百果园信息技术有限公司 Page loading method, device, terminal and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769802A (en) * 2020-12-31 2021-05-07 微医云(杭州)控股有限公司 Access verification method and device based on server, electronic equipment and storage medium
CN113301177A (en) * 2021-04-27 2021-08-24 百果园技术(新加坡)有限公司 Domain name anti-blocking method and device

Similar Documents

Publication Publication Date Title
JP2017532649A (en) Confidential information processing method, apparatus, server, and security determination system
CN113050900A (en) Screen sharing method, device, equipment and storage medium
CN107395784B (en) Method and device for importing internet protocol IP pools in batches
CN112948851A (en) User authentication method, device, server and storage medium
CN112287329A (en) Service instance checking method and device, electronic equipment and storage medium
CN112134968A (en) Domain name access method and device, electronic equipment and storage medium
US20220188437A1 (en) Data Access Monitoring and Control
CN112053143B (en) Fund routing method, apparatus, electronic device and storage medium
CN112948418A (en) Dynamic query method, device, equipment and storage medium
CN112433705A (en) Script generation method and device, electronic equipment and storage medium
CN114207614A (en) Safety investigation platform
CN114035827A (en) Application program updating method, device, equipment and storage medium
CN112416583A (en) High-frequency request processing method and device, electronic equipment and storage medium
CN111984601A (en) Log file deleting method and device, electronic equipment and storage medium
CN111796936A (en) Request processing method and device, electronic equipment and medium
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN112711696A (en) Request access method, device, electronic equipment and storage medium
CN112711398A (en) Method, device and equipment for generating buried point file and storage medium
CN114175067A (en) Incident survey workspace generation and survey control
CN116360769A (en) Code generation method, device, equipment and storage medium
CN112434237A (en) Page loading method and device, electronic equipment and storage medium
CN112738175A (en) Request processing method and related equipment
CN113282218A (en) Multi-dimensional report generation method, device, equipment and storage medium
CN112632098A (en) Dynamic generation method of structured query statement and related 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