CN114793223A - DNS record storage method and device, storage medium and electronic equipment - Google Patents

DNS record storage method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114793223A
CN114793223A CN202110107380.9A CN202110107380A CN114793223A CN 114793223 A CN114793223 A CN 114793223A CN 202110107380 A CN202110107380 A CN 202110107380A CN 114793223 A CN114793223 A CN 114793223A
Authority
CN
China
Prior art keywords
domain name
request message
dns record
dns
sending
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
CN202110107380.9A
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN202110107380.9A priority Critical patent/CN114793223A/en
Publication of CN114793223A publication Critical patent/CN114793223A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a DNS record storage method and device, a DNS record storage medium and electronic equipment, and belongs to the technical field of computers. The storage method of the DNS record comprises the following steps: the method comprises the steps of obtaining a first domain name system DNS record corresponding to domain name information, sending a first uploading request message to an interplanetary file system IPFS, receiving first address information of the first DNS record from the IPFS, and sending a second uploading request message to a block chain system. Therefore, in the application, the DNS analysis platform server obtains the address information by storing the DNS record in the IPFS system, and then stores the domain name information in the DNS record and the associated key value pair formed by the address information in the blockchain system.

Description

DNS record storage method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for storing a DNS record, a storage medium and electronic equipment.
Background
At present, a Domain Name System (DNS) is a distributed database for mapping between a Domain Name and an Internet Protocol (IP) address, and when a user accesses the Internet, the user only needs to input a Domain Name with semantic characteristics, and obtains an IP address corresponding to the Domain Name through Domain Name resolution, so that the user can access the Internet more conveniently. The DNS server is used to store and transfer information required for domain name resolution through Resource Records (RR). The Blockchain (Blockchain) is a distributed shared database, and has high security and privacy for stored contents. The DNS server may perform the resolution of the domain name, and the DNS server includes: recursive DNS servers and upper level DNS servers (root DNS server, top level DNS server, and authoritative DNS server). With the development of internet technology, recursive DNS servers based on block chains are developed, so that the stored resource records have shareability. However, in the prior art, generally, the obtained resource records are directly stored in the cache of the recursive DNS server, and the storage scheme in the prior art has a problem of low storage efficiency. Therefore, how to optimally design a DNS server in combination with a block chain to improve the storage space utilization rate, the bandwidth effective utilization rate, and the response speed is a problem to be solved at present.
Disclosure of Invention
The embodiment of the application provides a DNS record storage method and device, a storage medium and electronic equipment, and the technical problems of low storage space utilization rate, low bandwidth effective utilization rate, low response speed and the like can be effectively solved by combining the advantages of an interplanetary file system and a block chain system. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for storing a DNS record, including:
acquiring a first domain name system DNS record corresponding to domain name information;
sending a first uploading request message to an interplanetary file system IPFS; the first upload request message carries the first DNS record, and is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record;
receiving first address information of the first DNS record from the IPFS system;
sending a second uploading request message to the block chain system; the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to instruct the block chain system to store the domain name information and the first address information.
In a second aspect, an embodiment of the present application provides a storage apparatus for a DNS record, where the apparatus includes:
the acquisition module is used for acquiring a first domain name system DNS record corresponding to the domain name information;
the uploading module is used for sending a first uploading request message to the interplanetary file system IPFS; the first upload request message carries the first DNS record, and the first upload request message is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record;
a receiving module, configured to receive first address information of the first DNS record from the IPFS system;
the sending module is used for sending a second uploading request message to the block chain system; the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to instruct the block chain system to store the domain name information and the first address information.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
when the method, the device, the storage medium and the electronic equipment for storing the DNS record work, a first domain name system DNS record corresponding to domain name information is obtained, a first uploading request message is sent to an interplanetary file system IPFS, first address information of the first DNS record from the IPFS system is received, and a second uploading request message is sent to a block chain system. The DNS analysis platform server obtains address information by storing DNS records in an IPFS system, and then stores an associated key value pair formed by domain name information in the DNS records and the address information in a block chain system.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a communication system architecture provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a DNS record storage method according to an embodiment of the present application;
fig. 3 is another schematic flowchart of a method for storing a DNS record according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a storage device for DNS records according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The following description refers to the accompanying drawings in which like numerals refer to the same or similar elements throughout the different views, unless otherwise specified. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In order to solve the above-mentioned problems that with the development of internet technology, the number of domain names and their corresponding resource records on the internet is getting larger and larger, and the current technology has low storage space utilization rate, low bandwidth effective utilization rate, slow response speed, etc., a method for storing DNS records is proposed. The computer system can be a computer system of a smart phone, a notebook computer, a tablet computer and the like.
In the following method embodiments, for convenience of description, only the main body of execution of each step is described as a DNS resolution platform server.
The following describes in detail a storage method of DNS records according to an embodiment of the present application with reference to fig. 2 to fig. 3.
Fig. 1 is a schematic structural diagram of a DNS record storage system according to an embodiment of the present application. As shown in fig. 1, the storage System of the DNS record mainly includes a blockchain System, a DNS resolution platform, and an InterPlanetary File System (IPFS), where the DNS resolution platform mainly receives new, query, and update instructions (carrying domain name information) from a user, and returns instruction results, the IPFS System is mainly used to store DNS records and return storage address information, and the blockchain System is used to store an associated key value pair formed by the domain name information and the storage address information.
Referring to fig. 2, a flowchart of a method for storing a DNS record is provided according to an embodiment of the present application. The method may comprise the steps of:
s201, obtaining a first domain name system DNS record corresponding to the domain name information.
Generally, a DNS record refers to a record used to store data about domain name information and IP addresses, and is also called a resource record. The DNS analysis platform server responds to an uploading instruction of a user and sends a query message to the DNS server, wherein the query message carries domain name information, receives an answer message returned by the DNS server responding to the query message, and analyzes the answer message to obtain a first DNS record corresponding to the domain name information.
S202, sending a first uploading request message to an interplanetary file system IPFS.
Generally, the first upload request packet carries the first DNS record, and the first upload request packet is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record. The IPFS system is a point-to-point distributed file system (bitcoin is a point-to-point electronic cash system) with the goal of linking all computing devices with the same file system together in order to complement (or even replace) the hypertext transfer protocol that currently governs the internet. After a DNS analysis platform server obtains a first domain name system DNS record corresponding to domain name information, when the data volume of the first uploading request message is larger than a data threshold value, the first uploading request message is segmented to obtain a plurality of sub-data packets, the plurality of sub-data packets are numbered, and the numbered sub-data packets are uploaded to a plurality of nodes of the IPFS system.
S203, receiving first address information of the first DNS record from the IPFS system.
Generally, after sending a first upload request message, the DNS resolution platform server receives first address information of the first DNS record from the IPFS system, for example: the first address information is represented by a hash value, which is a4d8180ddbfb8ab09d77eb, and the DNS resolution platform server can query the corresponding first DNS record on the IPFS system through the hash value.
S204, sending a second uploading request message to the block chain system.
Generally, the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to instruct the block chain system to store the domain name information and the first address information. After receiving the first address information, the DNS analysis platform server determines a central node in the blockchain system, and sends the second upload request message to the central node, so that the central node broadcasts the second upload request message to other nodes in the blockchain system.
In one embodiment, a DNS resolution platform server sends a first query request packet to the blockchain system in response to a query instruction of a user, where the first query request packet carries domain name information, receives address information queried by the blockchain system according to the domain name information, and sends a second query request packet to the IPFS system, where the second query request packet carries the address information, and receives the first DNS record queried by the IPFS system according to the domain name information. In one embodiment, the DNS resolution platform server sends a first update request packet to the blockchain system based on an update instruction of a user, where the first update request packet includes a second DNS record, and is used to instruct the IPFS system to update the second DNS record corresponding to the domain name information, generate second address information of the second DNS record, receive second address information of the second DNS record from the IPFS system, and send a second update request packet to the blockchain system, where the second update request packet includes the domain name information and the second address information, and the second update request packet is used to instruct the blockchain system to store the domain name information and the second address information.
In one embodiment, when the first DNS record includes a plurality of internet protocol IP addresses, the DNS resolution platform server sends a hypertext transfer protocol Http access request to each IP address, receives an access response packet sent by a server corresponding to each IP address in response to the access request packet, determines a reachable IP address in each IP address based on the access response packet, sends a probe request packet based on a Ping protocol of a network diagnostic tool to each reachable IP address, receives a probe response packet sent by the server corresponding to each IP address in response to the probe request packet, resolves the probe request packet to determine link quality, and sends the IP address with the best link quality to the user terminal.
According to the above, a first domain name system DNS record corresponding to domain name information is acquired, a first upload request message is sent to an interplanetary file system IPFS, first address information of the first DNS record from the IPFS system is received, and a second upload request message is sent to a block chain system. The DNS analysis platform server obtains address information by storing DNS records in an IPFS system, and then stores an associated key value pair formed by domain name information in the DNS records and the address information in a block chain system.
Referring to fig. 3, another flow chart of a method for storing a DNS record is provided in the embodiment of the present application. The storage method of the DNS record can comprise the following steps:
s301, sending a query message to a DNS in response to an uploading instruction of a user, and receiving an answer message returned by the DNS in response to the query message.
Generally, the query packet carries domain name information. The DNS resolution platform server sends a query message to the DNS server in response to an upload instruction of a user, where the query message includes information of a domain name of a host to be accessed, for example: and then the DNS analysis platform server receives an answer message returned by the DNS server in response to the query message, wherein the answer message comprises http:// www.what21.com/corresponding IP address information and the like.
S302, analyzing the answer message to obtain a first DNS record corresponding to the domain name information.
Generally, after receiving an answer message, the DNS resolution platform server resolves the answer message to obtain a first DNS record corresponding to the domain name information, for example: the resulting first DNS record includes the IP address 192.123.001.1, along with other information specifying a DNS server that resolves the domain or sub-domain name and specifying a mail server that receives the information.
And S303, when the data volume of the first uploading request message is greater than a data threshold, segmenting the first uploading request message to obtain a plurality of sub-data packets.
Generally, the first upload request packet carries the first DNS record, and the first upload request packet is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record. After a DNS resolution platform server obtains a first DNS record, a first upload request packet is generated based on the first DNS record, whether the data volume of the first upload request packet is greater than a data volume threshold is determined, and when the data volume of the first upload request packet is greater than the data volume threshold, the first upload request packet is segmented to obtain a plurality of sub packets, for example: the data volume of a first uploading request message generated by a DNS analysis platform server is 8M, a data threshold value is set to be 5M, and then the first uploading request message is divided into 2 sub-data packets of 4M.
S304, numbering the sub-data packets, and uploading the numbered sub-data packets to a plurality of nodes of the IPFS system.
Generally, after obtaining a plurality of sub-packets, the DNS resolution platform server numbers the plurality of sub-packets, and uploads the numbered plurality of sub-packets to a plurality of nodes of the IPFS system, for example: the DNS analysis platform server numbers two 4M sub-data packets as numbers 1 and 2 according to a segmentation sequence, then obtains nodes a and b of the IPFS system, uploads the sub-data packet number 1 to the node a, and uploads the sub-data packet number 2 to the node b.
S305, receiving first address information of the first DNS record from the IPFS system, and determining a central node in the block chain system.
Generally, after the DNS resolution platform server uploads a plurality of numbered sub packets to a plurality of nodes of the IPFS system, the DNS resolution platform server receives first address information of the first DNS record from the IPFS system, for example: the first address information is represented by a hash value, where the hash value is a4d8180ddbfb8ab09d77eb, and the DNS resolution platform server can query the corresponding first DNS record on the IPFS system through the hash value. The DNS resolution platform server then determines the central node in the blockchain system, for example: the central node of the blockchain system is determined to be a.
S306, sending the second upload request packet to the central node, so that the central node broadcasts the second upload request packet to other nodes in the block chain system.
Generally, the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to instruct the block chain system to store the domain name information and the first address information. After determining the central node in the blockchain system, the DNS resolution platform server sends the second upload request packet to the central node, so that the central node broadcasts the second upload request packet to other nodes in the blockchain system, for example: the DNS analysis platform server uploads an association key value pair formed by carrying domain name information http:// www.lizi.com and corresponding first address information (represented by a hash value) d8818f4bcc9dd3aa14184b1b71cf6aad21a126a0 to the central node A, then the block chain system server packs the association key value pair into blocks, and the blocks are broadcasted to all nodes (nodes such as B, C, D) for determination and writing into the blocks.
S307, responding to a query instruction of a user, sending a first query request message to the blockchain system, and receiving address information queried by the blockchain system according to the domain name information.
Generally, after the DNS resolution platform server sends the second upload request packet to the central node, the storage of the first DNS record is completed, and operations such as querying and updating are also included. The first query request message carries the domain name information. Responding to a query instruction of a user, the DNS resolution platform server sends a first query request message to the blockchain system, and receives address information queried by the blockchain system according to the domain name information, for example: the domain name information is http:// www.lizi2.com/, and the obtained address information is 3a0b8b23459164478b5ed7274e2782d5c7ec9054 represented by a hash value.
S308, sending a second query request message to the IPFS system, and receiving the first DNS record queried by the IPFS system according to the domain name information.
Generally, the second query request packet carries the address information. After receiving the address information queried by the blockchain system according to the domain name information, the DNS resolution platform server sends a second query request message to the IPFS system, and receives the first DNS record queried by the IPFS system according to the domain name information, for example: the address information is represented by a hash value of 3a0b8b23459164478b5ed7274e2782d5c7ec9054, and then the address information is queried in the IPFS system according to the hash value to a first DNS record, wherein the first DNS record carries an IP address of 192.188.100.1.
S309, when the first DNS record comprises a plurality of internet protocol IP addresses, monitoring the link quality of the communication link corresponding to each IP address, and sending the IP address with the best link quality to the user terminal.
Generally, after receiving the first DNS record, the DNS resolution platform server resolves the first DNS record, and when the first DNS record includes a plurality of internet protocol IP addresses, monitors link quality of a communication link corresponding to each IP address, and sends an IP address with the best link quality to the user terminal, for example: and if the domain name information carried by the query instruction is http:// www.lizi2.com/, analyzing the first DNS record to obtain two IP addresses 191.100.101.1 and 191.100.101.2 respectively, and if the link qualities of communication links corresponding to the two IP addresses are 57DBm and 90DBm respectively, sending 191.100.101.2 to the user terminal. In one embodiment, a DNS resolution platform server sends a Http access request to each IP address, receives an access response packet sent by a server corresponding to each IP address in response to the access request packet, determines reachable IP addresses in the IP addresses based on the access response packet, then sends a probe request packet based on a Ping protocol of a network diagnostic tool to each reachable IP address, receives a probe response packet sent by the server corresponding to each IP address in response to the probe request packet, and resolves the probe request packet to determine link quality.
S310, sending a first update request message to the blockchain system based on an update instruction of a user, receiving second address information of the second DNS record from the IPFS system, and sending a second update request message to the blockchain system.
Generally, the first update request packet includes a second DNS record, and the first update request packet is used to instruct the IPFS system to update the second DNS record corresponding to the domain name information and generate second address information of the second DNS record. The second update request packet includes the domain name information and the second address information, and the second update request packet is used to instruct the block chain system to store the domain name information and the second address information. After the DNS resolution platform server completes storing and querying the first DNS record, the DNS resolution platform server sends a first update request message to the blockchain system based on an update instruction of a user, receives second address information of the second DNS record from the IPFS system, and sends a second update request message to the blockchain system, for example: the http:// www.lizi3.com/corresponding DNS record is changed from a first DNS record (carrying an IP address of 191.100.101.101) to a second DNS record (carrying an IP address of 191.100.101.102), the DNS record stored in the IPFS system is firstly updated, the obtained address information is updated to eb2ae2e57b667d8335e8f2adeb61fdd0 by using the hash value of dc3849d324800cde78ce4 a8899e437ba3912e, and then the associated key value pair formed by the domain name information and the address information in the block chain system is updated to http:// www.lizi3.com/corresponding 191.100.101.101 to http:// www.lizi3.com/corresponding 191.100.101.102.
When the scheme of the embodiment of the application is executed, a first domain name system DNS record corresponding to domain name information is obtained, a first uploading request message is sent to an interplanetary file system IPFS, first address information of the first DNS record from the IPFS system is received, and a second uploading request message is sent to a block chain system. The DNS analysis platform server obtains address information by storing DNS records in an IPFS system, and then stores an associated key value pair formed by domain name information in the DNS records and the address information in a block chain system.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 4, a schematic structural diagram of a storage apparatus for DNS records according to an exemplary embodiment of the present application is shown, which is hereinafter referred to as the storage apparatus 4 for short. The storage means 4 may be implemented as all or part of the terminal in software, hardware or a combination of both. The method comprises the following steps:
an obtaining module 401, configured to obtain a first domain name system DNS record corresponding to domain name information;
an upload module 402, configured to send a first upload request message to an interplanetary file system IPFS; the first upload request message carries the first DNS record, and is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record;
a receiving module 403, configured to receive first address information of the first DNS record from the IPFS system;
a sending module 404, configured to send a second upload request packet to the block chain system; the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to indicate that the domain name information and the first address information are stored in the block chain system.
Optionally, the obtaining module 401 further includes:
the analysis unit is used for responding to an uploading instruction of a user and sending a query message to the DNS; wherein, the query message carries domain name information; receiving an answer message returned by the DNS server in response to the query message; and analyzing the answer message to obtain a first DNS record corresponding to the domain name information.
Optionally, the uploading module 402 further includes:
the dividing unit is used for dividing the first uploading request message to obtain a plurality of sub data packets when the data volume of the first uploading request message is greater than a data threshold; numbering the plurality of sub-data packets; and uploading the numbered sub-packets to a plurality of nodes of the IPFS system.
Optionally, the sending module 404 further includes:
a determining unit, configured to determine a central node in the blockchain system; and sending the second upload request message to the central node, so that the central node broadcasts the second upload request message to other nodes in the block chain system.
The query unit is used for responding to a query instruction of a user and sending a first query request message to the block chain system; wherein, the first query request message carries the domain name information; receiving address information inquired by the block chain system according to the domain name information; sending a second query request message to the IPFS system; wherein, the second query request message carries the address information; and receiving the first DNS record queried by the IPFS system according to the domain name information.
The updating unit is used for sending a first updating request message to the block chain system based on an updating instruction of a user; the first update request message is used for instructing the IPFS system to update the second DNS record corresponding to the domain name information and generating second address information of the second DNS record; receiving second address information for the second DNS record from the IPFS system; sending a second updating request message to the block chain system; the second update request packet includes the domain name information and the second address information, and the second update request packet is used to instruct the block chain system to store the domain name information and the second address information.
The monitoring unit is used for monitoring the link quality of a communication link corresponding to each IP address when the first DNS record comprises a plurality of Internet protocol IP addresses; and sending the IP address with the best link quality to the user terminal.
The detection unit is used for sending a detection request message based on a Ping protocol of a network diagnosis tool to each reachable IP address; receiving a detection response message sent by a server corresponding to each IP address in response to the detection request message; and analyzing the detection request message to determine the link quality.
The access unit is used for sending hypertext transfer protocol Http access requests to all IP addresses; receiving an access response message sent by a server corresponding to each IP address in response to the access request message; and determining the reachable IP addresses in the IP addresses based on the access response message.
The embodiment of the present application and the method embodiments of fig. 2 to 3 are based on the same concept, and the technical effects brought by the embodiment are also the same, and the specific process may refer to the description of the method embodiments of fig. 2 to 3, and will not be described again here.
The device 4 may be a field-programmable gate array (FPGA), an application-specific integrated chip, a system on chip (SoC), a Central Processing Unit (CPU), a Network Processor (NP), a digital signal processing circuit, a Micro Controller Unit (MCU), or a Programmable Logic Device (PLD) or other integrated chips.
When the scheme of the embodiment of the application is executed, a first domain name system DNS record corresponding to domain name information is obtained, a first uploading request message is sent to an interplanetary file system IPFS, first address information of the first DNS record from the IPFS system is received, and a second uploading request message is sent to a block chain system. The DNS analysis platform server obtains address information by storing a DNS record in an IPFS system, and then stores domain name information in the DNS record and an associated key value pair formed by the address information in a block chain system.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the above method steps, and a specific execution process may refer to specific descriptions of the embodiment shown in fig. 2 or fig. 3, which is not described herein again.
The present application further provides a computer program product, which stores at least one instruction that is loaded and executed by the processor to implement the template control method according to the above embodiments.
Please refer to fig. 5, which is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 5 may include: at least one processor 501, at least one network interface 504, a user interface 503, memory 505, at least one communication bus 502.
Wherein a communication bus 502 is used to enable the connection communication between these components.
The user interface 503 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 503 may also include a standard wired interface and a wireless interface.
The network interface 504 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 501 may include one or more processing cores, among other things. The processor 501 connects various parts within the overall terminal 500 using various interfaces and lines to perform various functions of the terminal 500 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 505 and invoking data stored in the memory 505. Optionally, the processor 501 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 501, but may be implemented by a single chip.
The Memory 505 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable medium. The memory 505 may be used to store instructions, programs, code sets, or instruction sets. The memory 505 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 505 may alternatively be at least one memory device located remotely from the processor 501. As shown in fig. 5, memory 505, which is a type of computer storage medium, may include an operating system, a network communications module, a user interface module, and a storage application for DNS records.
In the electronic device 500 shown in fig. 5, the user interface 503 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and processor 501 may be configured to invoke a storage application of the DNS record stored in memory 505 and perform the following operations:
acquiring a first domain name system DNS record corresponding to domain name information;
sending a first uploading request message to an interplanetary file system IPFS; the first upload request message carries the first DNS record, and is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record;
receiving first address information of the first DNS record from the IPFS system;
sending a second uploading request message to the block chain system; the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to instruct the block chain system to store the domain name information and the first address information.
In one embodiment, processor 501 executes the obtaining of the first domain name system DNS record corresponding to the domain name information, including:
responding to an uploading instruction of a user and sending a query message to a DNS (domain name system) server; wherein, the query message carries domain name information;
receiving an answer message returned by the DNS in response to the query message;
and analyzing the answer message to obtain a first DNS record corresponding to the domain name information.
In one embodiment, the processor 501 executes the sending of the first upload request message to the interplanetary file system IPFS, which includes:
when the data volume of the first uploading request message is larger than a data threshold, segmenting the first uploading request message to obtain a plurality of sub data packets;
numbering the plurality of sub-data packets;
and uploading the numbered sub-data packets to a plurality of nodes of the IPFS system.
In one embodiment, the processor 501 performs the sending of the second upload request message to the blockchain system, including:
determining a central node in the blockchain system;
and sending the second upload request message to the central node, so that the central node broadcasts the second upload request message to other nodes in the block chain system.
In one embodiment, after the processor 501 performs the sending of the second upload request message to the blockchain system, the method further includes:
responding to a query instruction of a user and sending a first query request message to the block chain system; wherein, the first query request message carries the domain name information;
receiving address information inquired by the block chain system according to the domain name information;
sending a second query request message to the IPFS system; wherein, the second query request message carries the address information;
and receiving the first DNS record queried by the IPFS system according to the domain name information.
In one embodiment, after the processor 501 performs the sending of the second upload request message to the blockchain system, the method further includes:
sending a first updating request message to the block chain system based on an updating instruction of a user; the first update request message is used for instructing the IPFS system to update the second DNS record corresponding to the domain name information and generating second address information of the second DNS record;
receiving second address information for the second DNS record from the IPFS system;
sending a second updating request message to the block chain system; the second update request packet includes the domain name information and the second address information, and the second update request packet is used to instruct the block chain system to store the domain name information and the second address information.
In one embodiment, after processor 501 executes the receiving of the first DNS record queried by the IPFS system according to the domain name information, the method further includes:
monitoring link quality of a communication link corresponding to each Internet Protocol (IP) address when the first DNS record comprises a plurality of IP addresses;
and sending the IP address with the best link quality to the user terminal.
In one embodiment, the processor 501 performs the monitoring of the link quality of the communication link corresponding to each IP address, including:
sending a detection request message based on a Ping protocol of a network diagnosis tool to each reachable IP address;
receiving a detection response message sent by a server corresponding to each IP address in response to the detection request message;
and analyzing the detection request message to determine the link quality.
In an embodiment, before the processor 501 performs the sending of the Ping protocol-based probe request packet to each reachable IP address, the method further includes:
sending a hypertext transfer protocol Http access request to each IP address;
receiving an access response message sent by a server corresponding to each IP address in response to the access request message;
and determining the reachable IP address in each IP address based on the access response message.
The technical concept of the embodiment of the present application is the same as that of fig. 2 or fig. 3, and the specific process may refer to the method embodiment of fig. 2 or fig. 3, which is not described herein again.
In the embodiment of the application, a first domain name system DNS record corresponding to domain name information is obtained, a first upload request message is sent to an interplanetary file system IPFS, first address information of the first DNS record from the IPFS is received, and a second upload request message is sent to a block chain system. The DNS analysis platform server obtains address information by storing DNS records in an IPFS system, and then stores an associated key value pair formed by domain name information in the DNS records and the address information in a block chain system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A method of storing DNS records, the method comprising:
acquiring a first domain name system DNS record corresponding to domain name information;
sending a first uploading request message to an interplanetary file system IPFS; the first upload request message carries the first DNS record, and is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record;
receiving first address information for the first DNS record from the IPFS system;
sending a second uploading request message to the block chain system; the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to instruct the block chain system to store the domain name information and the first address information.
2. The method according to claim 1, wherein the obtaining a first domain name system DNS record corresponding to domain name information includes:
responding to an uploading instruction of a user and sending a query message to a DNS (domain name system) server; wherein, the query message carries domain name information;
receiving an answer message returned by the DNS server in response to the query message;
and analyzing the answer message to obtain a first DNS record corresponding to the domain name information.
3. The method according to claim 1, wherein said sending a first upload request message to the interplanetary file system IPFS comprises:
when the data volume of the first uploading request message is larger than a data threshold value, the first uploading request message is segmented to obtain a plurality of sub data packets;
numbering the plurality of sub-data packets;
and uploading the numbered sub-data packets to a plurality of nodes of the IPFS system.
4. The method of claim 1, wherein sending a second upload request message to the blockchain system comprises:
determining a central node in the blockchain system;
and sending the second upload request message to the central node, so that the central node broadcasts the second upload request message to other nodes in the block chain system.
5. The method of claim 1, wherein after sending the second upload request message to the blockchain system, the method further comprises:
responding to a query instruction of a user and sending a first query request message to the block chain system; the first query request message carries the domain name information;
receiving address information inquired by the block chain system according to the domain name information;
sending a second query request message to the IPFS system; wherein, the second query request message carries the address information;
and receiving the first DNS record queried by the IPFS system according to the domain name information.
6. The method of claim 1, wherein after sending the second upload request message to the blockchain system, the method further comprises:
sending a first updating request message to the block chain system based on an updating instruction of a user; the first update request message is used for instructing the IPFS system to update the second DNS record corresponding to the domain name information and generate second address information of the second DNS record;
receiving second address information for the second DNS record from the IPFS system;
sending a second updating request message to the block chain system; the second update request packet includes the domain name information and the second address information, and the second update request packet is used to instruct the block chain system to store the domain name information and the second address information.
7. The method according to claim 5, wherein after receiving the first DNS record queried by the IPFS system according to the domain name information, further comprising:
monitoring link quality of a communication link corresponding to each Internet Protocol (IP) address when the first DNS record comprises a plurality of IP addresses;
and sending the IP address with the best link quality to the user terminal.
8. An apparatus for storing DNS records, comprising:
the acquisition module is used for acquiring a first domain name system DNS record corresponding to the domain name information;
the uploading module is used for sending a first uploading request message to the interplanetary file system IPFS; the first upload request message carries the first DNS record, and is used to instruct the IPFS system to store the first DNS record and generate first address information of the first DNS record;
a receiving module, configured to receive first address information of the first DNS record from the IPFS system;
the sending module is used for sending a second uploading request message to the block chain system; the second upload request packet includes the domain name information and the first address information, and the second upload request packet is used to indicate that the domain name information and the first address information are stored in the block chain system.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 7.
10. An electronic device, comprising: a memory and a processor; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 7.
CN202110107380.9A 2021-01-26 2021-01-26 DNS record storage method and device, storage medium and electronic equipment Pending CN114793223A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110107380.9A CN114793223A (en) 2021-01-26 2021-01-26 DNS record storage method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110107380.9A CN114793223A (en) 2021-01-26 2021-01-26 DNS record storage method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114793223A true CN114793223A (en) 2022-07-26

Family

ID=82460139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110107380.9A Pending CN114793223A (en) 2021-01-26 2021-01-26 DNS record storage method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114793223A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250265A (en) * 2022-08-15 2022-10-28 中国联合网络通信集团有限公司 Domain name system DNS data synchronization method and device and domain name system
CN115499362A (en) * 2022-08-23 2022-12-20 中国电信股份有限公司 IP configuration information management method and device, and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115250265A (en) * 2022-08-15 2022-10-28 中国联合网络通信集团有限公司 Domain name system DNS data synchronization method and device and domain name system
CN115250265B (en) * 2022-08-15 2023-05-16 中国联合网络通信集团有限公司 Domain Name System (DNS) data synchronization method and device and domain name system
CN115499362A (en) * 2022-08-23 2022-12-20 中国电信股份有限公司 IP configuration information management method and device, and electronic equipment

Similar Documents

Publication Publication Date Title
CN108028833B (en) NAS data access method, system and related equipment
CN114338594B (en) ARP (Address resolution protocol) response-substituting method, device, equipment and storage medium in Kubernetes environment
CN114793223A (en) DNS record storage method and device, storage medium and electronic equipment
CN104199728B (en) Picture transmits information displaying method and device
US20170289243A1 (en) Domain name resolution method and electronic device
CN112261094A (en) Message processing method and proxy server
CN114840339A (en) GPU server, data calculation method and electronic equipment
CN111835596B (en) Target state detection method and device and electronic equipment
CN109710502A (en) Log transmission method, apparatus and storage medium
CN113536168A (en) Component processing method and device
CN113468445A (en) Request processing method and device, electronic equipment and computer readable medium
CN112492060A (en) Service resource processing method and system, proxy equipment and request equipment
CN112910910B (en) Method, device, equipment and storage medium for processing OPCDA protocol message
CN112395070A (en) Data processing system and method
CN110442696A (en) Inquiry processing method and device
CN114979028B (en) Data packet processing method, device and storage medium
CN112040023B (en) Object access method and device, electronic equipment and machine-readable storage medium
CN114090927A (en) Page loading method and device, computer equipment and storage medium
CN114791905A (en) Resource record storage method and device, storage medium and electronic equipment
CN114979128A (en) Cross-region communication method and device and electronic equipment
CN112527453A (en) Virtualization information simulation system, method and computer-readable storage medium
CN113849255B (en) Data processing method, device and storage medium
CN112631871A (en) Behavior message processing method and device, storage medium and electronic equipment
CN114928556A (en) Interface service test method and related equipment
CN117743233A (en) Data processing method, device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination