Blockchain service discovery method and apparatus based on domain name system (DNS)
Through the DNS-based blockchain service discovery method, users can quickly find and access blockchain services that meet their needs, solving the problem of low discovery and access efficiency in existing technologies and ensuring the security and compliance of services. sex.
Patent Information
- Application Number
- PCT/CN2023/133870
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-07
- Filing Date
- 2023-11-24
- Publication Date
- 2024-09-12
AI Technical Summary
It is difficult for users to quickly discover blockchain services that meet their needs, and they cannot effectively judge the security of services, resulting in low blockchain service discovery and access efficiency and poor user experience.
Adopt the blockchain service discovery method based on the domain name system DNS, obtain the blockchain domain name through the blockchain domain name management device, select the target blockchain domain name, obtain the blockchain identification BID resource record from the DNS server, and obtain the blockchain service configuration information, and establishes a communication connection with the blockchain server to achieve security verification.
It enables users to conveniently discover and access blockchain services that meet their needs, improves the efficiency of blockchain service discovery and access, and ensures the security and compliance of services.
Smart Images

Figure CN2023133870_12092024_PF_FP
Abstract
Description
Blockchain service discovery method and device based on domain name system DNS Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain service discovery method and device based on the Domain Name System (DNS). Background Art
[0002] With the development of blockchain technology, its application scenarios have expanded beyond finance, with a growing number of blockchain-based applications emerging. For example, blockchain deployments encompass scenarios such as supply chain finance, healthcare, digital assets, logistics information, legal evidence storage, product authenticity traceability, rental property traceability, and mutual insurance. Various companies have launched a variety of blockchain services, such as a "blockchain + supply chain finance solution" built on real transaction data and a "blockchain anti-counterfeiting and traceability platform" built on blockchain architecture.
[0003] In the existing technology, due to the wide variety of current blockchain services and the differences in the providers of blockchain services, it is difficult for users to quickly find blockchain applications that meet their needs, and they are also unable to judge the security of each blockchain service, resulting in low efficiency in discovering and accessing blockchain services and poor user experience.
[0004] Summary of the Invention
[0005] In response to the problems existing in the prior art, the present invention provides a blockchain service discovery method and device based on the Domain Name System (DNS).
[0006] The present invention provides a blockchain service discovery method based on the Domain Name System (DNS), comprising:
[0007] The terminal obtains at least one blockchain domain name from the blockchain domain name management device; each blockchain domain name corresponds to a service category and / or service provider; different blockchain domain names correspond to different blockchains;
[0008] The terminal selects a target blockchain domain name from each of the blockchain domain names; the target blockchain domain name corresponds to a target blockchain;
[0009] The terminal obtains a blockchain identifier BID resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name; the BID resource record includes configuration information of the blockchain service;
[0010] The terminal establishes a communication connection with the blockchain server corresponding to the target blockchain domain name based on the configuration information.
[0011] According to a DNS-based blockchain service discovery method provided by the present invention, the terminal obtains at least one blockchain domain name from a blockchain domain name management device, including:
[0012] The terminal sends a query request to the blockchain domain name management device, where the query request includes a service category and / or a service provider;
[0013] The terminal receives a query response from the blockchain domain name management device;
[0014] The query response includes at least one of the following:
[0015] A service category domain name and at least one blockchain domain name corresponding to the service category;
[0016] The service categories provided by the service provider and at least one corresponding blockchain domain name.
[0017] According to a DNS-based blockchain service discovery method provided by the present invention, the configuration information of the blockchain server includes at least one of the following:
[0018] The type of blockchain;
[0019] The type of the blockchain server's IP address;
[0020] Service category;
[0021] The port number for connecting to the blockchain server;
[0022] Server host name Host Name;
[0023] The IP address of the blockchain server;
[0024] The URL for accessing the blockchain service.
[0025] According to a DNS-based blockchain service discovery method provided by the present invention, the method further includes:
[0026] The terminal receives the certificate sent by the blockchain server during the transport layer security TLS handshake phase;
[0027] The terminal determines that the blockchain server is valid if the certificate meets the target condition;
[0028] The target condition includes: the domain name field of the subject alternative name in the certificate contains the target blockchain domain name, and the user field in the certificate is the same as the Host Name field value included in the BID resource record.
[0029] The present invention also provides a blockchain service discovery method based on the domain name system DNS, comprising:
[0030] The blockchain domain name management device provides at least one blockchain domain name to the terminal; each blockchain domain name corresponds to a service category and / or service provider; different blockchain domain names correspond to different blockchains.
[0031] According to a DNS-based blockchain service discovery method provided by the present invention, the blockchain domain name management device provides at least one blockchain domain name to a terminal, including:
[0032] The blockchain domain name management device receives a query request from the terminal, where the query request includes a service category and / or a service provider;
[0033] The blockchain domain name management device sends a query response to the terminal;
[0034] The query response includes at least one of the following:
[0035] A service category domain name and at least one blockchain domain name corresponding to the service category;
[0036] The service categories provided by the service provider and at least one corresponding blockchain domain name.
[0037] According to a DNS-based blockchain service discovery method provided by the present invention, the method further includes:
[0038] The blockchain domain name management device obtains different blockchain identifier BID resource records corresponding to multiple blockchain domain names; each BID resource record includes configuration information of the blockchain service;
[0039] The blockchain domain name management device registers the blockchain domain name corresponding to each blockchain service based on the registration application of the provider of each blockchain service.
[0040] The present invention also provides a blockchain service discovery device based on the domain name system DNS, comprising:
[0041] A first acquisition module is configured to acquire at least one blockchain domain name from a blockchain domain name management device; each blockchain domain name corresponds to a service category and / or service provider; and different blockchain domain names correspond to different blockchains;
[0042] A selection module, configured to select a target blockchain domain name from the blockchain domain names; the target blockchain domain name corresponds to a target blockchain;
[0043] A second acquisition module is configured to obtain, based on the target blockchain domain name, a blockchain identifier BID resource record corresponding to the target blockchain domain name from a DNS server; the BID resource record includes configuration information of the blockchain service;
[0044] A connection establishment module is used to establish a communication connection with the blockchain server corresponding to the target blockchain domain name based on the configuration information.
[0045] The present invention also provides a blockchain service discovery device based on the domain name system DNS, comprising:
[0046] A module is provided for providing at least one blockchain domain name to a terminal; each blockchain domain name corresponds to a service category and / or service provider; different blockchain domain names correspond to different blockchains.
[0047] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, it implements any of the DNS-based blockchain service discovery methods described above.
[0048] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the DNS-based blockchain service discovery methods described above.
[0049] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described DNS-based blockchain service discovery methods.
[0050] The blockchain service discovery method and device based on the domain name system (DNS) provided by the present invention obtain at least one blockchain domain name from a blockchain domain name management device, each of the blockchain domain names corresponding to a service category and / or a service provider; select a target blockchain domain name from each of the blockchain domain names, and obtain a BID resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name. The BID resource record includes configuration information of the blockchain service, thereby establishing a communication connection with the blockchain server based on the configuration information, allowing users to easily discover blockchain applications with certain functions that meet the functions required by the user or are operated and maintained by a specific organization, and quickly discover and access the required blockchain services. That is, blockchain application discovery and convenient access are achieved through the DNS infrastructure. Moreover, since the blockchain domain name management device provides at least one blockchain domain name, it can help users screen blockchain services that have been verified to be secure and compliant, thereby ensuring the security of the blockchain services accessed by users. In this way, the efficiency of discovering and accessing blockchain services can be improved, and the user experience can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] FIG1 is a flow chart of a method for discovering blockchain services based on the Domain Name System (DNS) provided by the present invention;
[0052] FIG2 is a second flow chart of the blockchain service discovery method based on the Domain Name System (DNS) provided by the present invention;
[0053] FIG3 is a schematic diagram of a blockchain service discovery device based on the domain name system DNS provided by the present invention;
[0054] FIG4 is a second structural diagram of a blockchain service discovery device based on the domain name system DNS provided by the present invention;
[0055] FIG5 is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0056] The following describes the blockchain service discovery method based on the domain name system DNS provided by the present invention in conjunction with Figures 1 and 2.
[0057] It should be noted that the terminal in the present invention may include, for example, at least one of the following: a mobile phone, a tablet personal computer, a laptop computer, a notebook computer, a personal digital assistant (PDA), a handheld computer, a netbook, an ultra-mobile personal computer (UMPC), a mobile Internet device (MID), an augmented reality (AR), a virtual reality (VR) device, a robot, a wearable device (Wearable Device), a flight vehicle, a vehicle user equipment (VUE), a shipborne device, a pedestrian user equipment (PUE), a smart home (home appliances with wireless communication functions, such as refrigerators, televisions, washing machines or furniture, etc.), a game console, a personal computer (PC), an ATM or a self-service machine and other terminal-side devices. Wearable devices include smart watches, smart bracelets, smart headphones, smart glasses, smart jewelry (smart bracelets, smart bracelets, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. In-vehicle devices may also be referred to as in-vehicle terminals, in-vehicle controllers, in-vehicle modules, in-vehicle components, in-vehicle chips, or in-vehicle units. The present invention does not limit the specific type of terminal.
[0058] FIG1 is a flow chart of a blockchain service discovery method based on the Domain Name System (DNS) provided by the present invention. As shown in FIG1 , the blockchain service discovery method based on the Domain Name System (DNS) includes steps 101-104; wherein:
[0059] Step 101: The terminal obtains at least one blockchain domain name from a blockchain domain name management device; each blockchain domain name corresponds to a service category and / or service provider; different blockchain domain names correspond to different blockchains.
[0060] Optionally, the management party of the blockchain domain name management device may include: a government management agency or a domestic authoritative blockchain alliance organization.
[0061] Optionally, define the following three domain names related to blockchain service discovery:
[0062] 1. Blockchain Discovery Entry Domain Name: Pre-designate or configure a domain name as the general entry domain name for blockchain service discovery, such as blockchain.cn. The registration and management body of this blockchain discovery entry domain name is a government agency or a domestic authoritative blockchain alliance organization.
[0063] 2. Service Category Domain Name: Based on the industry or service category involved in the blockchain service, each industry type will correspond to a subdomain under the blockchain discovery portal domain name. For example, if the service category is medical, the service category domain name could be medical.blockchain.cn.
[0064] 3. Blockchain domain name: Register a subdomain under the corresponding service category domain name according to the service category provided by the blockchain. Each blockchain domain name corresponds to a specific blockchain.
[0065] For example, Company A launched Blockchain X to provide medical services. The blockchain domain name might be a-xchain.medical.blockchain.cn. Different blockchains for the same service category have different domain names.
[0066] Optionally, the implementation method of the terminal obtaining at least one blockchain domain name from the blockchain domain name management device may include:
[0067] Step 1: The terminal sends a query request to the blockchain domain name management device, where the query request includes a service category and / or a service provider;
[0068] The blockchain domain name management device receives a query request from the terminal, and the blockchain domain name management device determines a service category domain name and at least one blockchain domain name corresponding to the service category based on the service category and / or service provider included in the query request, and / or determines the service category provided by the service provider and the corresponding at least one blockchain domain name; the blockchain domain name management device sends a query response to the terminal.
[0069] Step 2: The terminal receives a query response from the blockchain domain name management device; wherein the query response includes at least one of the following:
[0070] a) A service category domain name corresponding to the service category and at least one blockchain domain name;
[0071] b) The service categories provided by the service provider and at least one corresponding blockchain domain name.
[0072] Step 102: The terminal selects a target blockchain domain name from each of the blockchain domain names; the target blockchain domain name corresponds to a target blockchain.
[0073] Step 103: The terminal obtains a Blockchain Identification (BID) resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name; the BID resource record includes configuration information of the blockchain service.
[0074] Optionally, the configuration information of the blockchain server may include at least one of the following:
[0075] 1) Blockchain type (Category);
[0076] 2) The type of the blockchain server's Internet Protocol (IP) address;
[0077] 3) Service category;
[0078] 4) The port number for connecting to the blockchain server;
[0079] 5) Server host name (Host Name);
[0080] 6) The IP address of the blockchain server;
[0081] 7) The Uniform Resource Locator (URL) for accessing the blockchain service.
[0082] Optionally, the RDATA structure of the BID resource record is shown in Table 1:
[0083] Table 1. RDATA structure of a BID resource record
[0084] The definitions of the fields in Table 1 are as follows:
[0085] a) BID Category: occupies 4 bits and indicates the type of blockchain. A value of 0 indicates a public blockchain, and a value of 1 indicates a consortium blockchain.
[0086] b) IP Type: The type of the server IP address, which occupies 4 bits. A value of 0 indicates that both IPv4 and IPv6 fields are present, with the order of IPv4 address first and IPv6 address second. A value of 1 indicates that only the IPv4 address field is carried. A value of 2 indicates that only the IPv6 address field is carried.
[0087] c) Type: occupies one byte and is classified according to industry categories, indicating the service category provided by the blockchain.
[0088] d) Detail Type: Occupies two bytes and indicates the detailed category of the service provided by the blockchain. It represents the specific category under each Type.
[0089] e) Port: Port number, occupies two bytes, indicating the port number of the connection server.
[0090] f) Length: Occupies two bytes and indicates the length of the Host Name field in bytes.
[0091] g) IPv4: Indicates the IPv4 address of the blockchain service server. This field is optional and whether it is included depends on the value type of the IP Type field.
[0092] h) IPv6: Indicates the IPv6 address of the blockchain service server. This field is optional and whether it is included depends on the value type of the IP Type field.
[0093] i)Host Name: Variable length, host name of the blockchain server.
[0094] j) Service URL: Variable length, URL to connect to the blockchain server.
[0095] Step 104: The terminal establishes a communication connection with the blockchain server corresponding to the target blockchain domain name based on the configuration information.
[0096] Optionally, the terminal parses the BID resource record to obtain configuration information of the blockchain server.
[0097] Alternatively, the user can obtain the service category domain name corresponding to the desired service category through an interface provided by the blockchain domain name management device on a terminal. The user then obtains all subdomains (blockchain domain names) under the service category domain name. The user selects a blockchain domain name from among all subdomains and queries the BID resource record for that blockchain domain name. It should be noted that the query response can be signed and authenticated using a DNS Security Extensions (DNSSEC) record. After receiving the query response, the terminal parses the data content of the blockchain BID resource record and obtains information such as the blockchain server's IP address, port number, URL, and server host name.
[0098] The terminal establishes a Hypertext Transfer Protocol over Secure Socket Layer (HTTPS) connection with the blockchain server based on the blockchain server's IP address, port number, URL, server host name, and other information. During the Transport Layer Security (TLS) handshake phase, it is necessary to verify whether the domain name field of the Subject Alternative Name in the server certificate contains the blockchain domain name used to query the BID resource record, and ensure that the user field in the certificate is consistent with the Host Name field value obtained in the BID resource record.
[0099] Optionally, during the TLS handshake phase, the terminal receives a certificate sent by the blockchain server; the terminal determines whether the certificate satisfies a target condition: if the certificate satisfies the target condition, the terminal determines that the blockchain server is trustworthy or valid; alternatively, if the certificate does not meet the target condition, the terminal determines that the blockchain server is untrustworthy or invalid. This invention implements a blockchain service discovery mechanism based on the DNS infrastructure, minimizing the impact on organizations and users providing blockchain services and facilitating deployment. Furthermore, this invention has no impact on network devices that do not support this extension or existing functionality.
[0100] Optionally, the target condition includes: the domain name field of the Subject Alternative Name in the certificate contains the target blockchain domain name, and the user field in the certificate is the same as the Host Name field value included in the BID resource record.
[0101] The blockchain service discovery method based on the domain name system (DNS) provided by the present invention obtains at least one blockchain domain name from a blockchain domain name management device, each of the blockchain domain names corresponding to a service category and / or a service provider; selects a target blockchain domain name from each of the blockchain domain names, and obtains a BID resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name, wherein the BID resource record includes configuration information of the blockchain service, thereby establishing a communication connection with the blockchain server based on the configuration information, so that users can conveniently discover blockchain applications with certain functions that meet the functions required by the users or are operated and maintained by specific organizations, and quickly discover and access the required blockchain services, that is, discover and conveniently access blockchain applications through the DNS infrastructure. Moreover, since the blockchain domain name management device provides at least one blockchain domain name, it can help users screen blockchain services that have been verified to be secure and compliant, thereby ensuring the security of the blockchain services accessed by users. In this way, the efficiency of discovering and accessing blockchain services can be improved, and the user experience can be improved.
[0102] FIG2 is a second flow chart of the blockchain service discovery method based on the Domain Name System (DNS) provided by the present invention. As shown in FIG2 , the DNS-based blockchain service discovery method includes the following steps:
[0103] Step 201: The blockchain domain name management device provides at least one blockchain domain name to the terminal; each blockchain domain name corresponds to a service category and / or service provider; different blockchain domain names correspond to different blockchains.
[0104] Optionally, the blockchain domain name management device can store different service category domain names and blockchain domain names according to different service categories and / or service providers; different blockchain domain names correspond to different blockchains.
[0105] Optionally, the blockchain domain name management device may provide at least one blockchain domain name to the terminal in an implementation manner that includes:
[0106] Step a: The blockchain domain name management device receives a query request from the terminal, wherein the query request includes a service category and / or a service provider;
[0107] Step b: The blockchain domain name management device sends a query response to the terminal; wherein the query response includes at least one of the following:
[0108] A service category domain name and at least one blockchain domain name corresponding to the service category;
[0109] The service categories provided by the service provider and at least one corresponding blockchain domain name.
[0110] Optionally, the blockchain domain name registration process may include:
[0111] The blockchain domain name management device obtains different blockchain identifier BID resource records corresponding to multiple blockchain domain names; each BID resource record includes configuration information of the blockchain service;
[0112] The blockchain domain name management device registers the blockchain domain name corresponding to each blockchain service based on the registration application of the provider of each blockchain service;
[0113] Each blockchain service sets a BID resource record corresponding to a domain name based on its configuration information when registering a blockchain domain name.
[0114] Optionally, the process of registering a blockchain domain name by the blockchain domain name management device includes the following steps a-c:
[0115] Step a: The blockchain domain name management device obtains different blockchain identifier BID resource records corresponding to multiple blockchain domain names; each BID resource record includes configuration information of the corresponding blockchain server;
[0116] Step b: The blockchain domain name management device registers the blockchain domain name corresponding to each BID resource record based on each BID resource record;
[0117] Step c: The blockchain domain name management device sends each of the BID resource records to the DNS server.
[0118] For example, a company launches a blockchain that provides services in a certain field. The registration process is as follows:
[0119] Step 1: First, the company submits an application to the blockchain domain name management device to register a subdomain under the service category provided by its own blockchain.
[0120] Step 2: After receiving the company's application, the blockchain domain name management device executes the registration approval process. This includes verifying the company's identity (such as corporate / institutional qualifications), the legitimacy of the blockchain (blockchain access path), and the relationship between the company and the blockchain it provides.
[0121] Step 3: After the registration approval process is passed, the blockchain domain name management device agrees to the company's request.
[0122] Step 4: The company provides the information required to record its blockchain's BID resource, and the blockchain domain name management device registers the corresponding domain name. The tag format is "company name - blockchain name." For example, if Company A launched a blockchain named xchain, the tag might be a-xchain. The blockchain domain name management device registers the domain name under the service category of the blockchain service provided by the company. For example, if Company A launched a medical blockchain, the blockchain domain name might be a-xchain.medical.blockchain.cn.
[0123] Step 5: Configure authentication information. The server hostname of the blockchain launched by the company is stored in the Host Name field of the BID resource record of the blockchain domain name registered in Step 4. When applying for a certificate based on this server hostname, the domain name field of the Subject Alternative Name must include the blockchain domain name registered in Step 4. Before issuing a certificate, the certificate issuing authority must verify the authenticity of this information and the corresponding relationship with the blockchain domain name management device. The certificate will be issued after verification.
[0124] The blockchain service discovery method based on the domain name system (DNS) provided by the present invention provides at least one blockchain domain name to a terminal through a blockchain domain name management device, and each blockchain domain name corresponds to a service category and / or a service provider, so that a user can select a target blockchain domain name from the blockchain domain names through the terminal, thereby conveniently discovering blockchain applications with certain functions that meet the functions required by the user or are operated and maintained by a specific organization, thereby quickly discovering and accessing the required blockchain services, that is, realizing the discovery and convenient access of blockchain applications through the DNS infrastructure. Moreover, since the blockchain domain name management device provides at least one blockchain domain name, it can help users screen blockchain services that have been verified to be secure and compliant, and can ensure the security of the blockchain services accessed by the user. In this way, the efficiency of discovering and accessing blockchain services can be improved, and the user experience can be improved.
[0125] An example is provided below to illustrate the blockchain service discovery method based on the domain name system DNS provided by the present invention.
[0126] 1. Configuration process steps:
[0127] Suppose Company A launches Blockchain X, which provides services in the medical authentication field. The blockchain discovery portal domain is assumed to be blockchain.cn.
[0128] 1. First, Company A applied to register a subdomain under the medical category to the administrator of the blockchain discovery portal domain name, namely the blockchain domain name management device.
[0129] 2. After receiving Company A's application, the administrator of the blockchain discovery portal domain will proceed with the registration approval process. This includes verifying Company A's identity, verifying the legitimacy of Blockchain X, and verifying the relationship between Company A and Blockchain X. Company A may be required to provide information such as its corporate identity and blockchain access path, both online and offline.
[0130] 3. After the registration approval process is passed, the blockchain finds that the administrator of the entry domain name agrees to Company A’s application request.
[0131] 4. Company A provides the information required for the BID resource record on Blockchain X. The administrator of the blockchain discovery portal domain name registers the corresponding subdomain. The tag format is "Company Name - Blockchain Name," and the registered domain name is a-xchain.medical.blockchain.cn.
[0132] 5. Configure authentication information. Assuming the Host Name in the BID resource record is a-xchain.acompany.cn, a-xchain.acompany.cn must include the value a-xchain.medical.blockchain.cn in the Subject Alternative Name domain name field when applying for a certificate. Before issuing a certificate, the certificate issuing authority must verify the authenticity of this information and the corresponding relationship with the administrator of the blockchain discovery portal domain name. The certificate will be issued only after successful verification.
[0133] 2. Blockchain service discovery and verification process:
[0134] User U wants to discover and select an existing available blockchain service in the medical category.
[0135] 1. The user obtains the domain name corresponding to the medical category through the interface provided by the administrator of the blockchain discovery entry domain name, which is medical.blockchain.cn.
[0136] 2. Get all subdomains under medical.blockchain.cn.
[0137] 3. User U selects a domain name a-xchain.medical.blockchain.cn and queries the BID resource record for that domain name. The query response is signed and authenticated by the DNSSEC record.
[0138] 4. After receiving the query response, user U parses the data content of the blockchain BID resource record and obtains information such as the server IP address, port number, URL, and server host name.
[0139] 5. User U establishes an HTTPS connection with the blockchain server based on the obtained server IP address, port number, URL, server host name, and other information. During the TLS handshake phase, it is necessary to verify whether the domain name field of the Subject Alternative Name in the server certificate contains a-xchain.medical.blockchain.cn. It is also necessary to ensure that the user field in the certificate is consistent with the Host Name field value obtained in the BID resource record.
[0140] 6. After the above steps are verified, user U accesses and uses the blockchain service.
[0141] The following describes a blockchain service discovery device based on the domain name system DNS provided by the present invention. The blockchain service discovery device based on the domain name system DNS described below and the blockchain service discovery method based on the domain name system DNS described above can refer to each other.
[0142] FIG3 is a structural diagram of a blockchain service discovery device based on a domain name system (DNS) provided by the present invention. As shown in FIG3 , the blockchain service discovery device 300 based on a domain name system (DNS) is applied to a terminal and includes: a first acquisition module 301, a selection module 302, a second acquisition module 303, and a connection establishment module 304; wherein:
[0143] A first acquisition module 301 is configured to acquire at least one blockchain domain name from a blockchain domain name management device; each blockchain domain name corresponds to a service category and / or service provider; and different blockchain domain names correspond to different blockchains;
[0144] A selection module 302 is configured to select a target blockchain domain name from the blockchain domain names; the target blockchain domain name corresponds to a target blockchain;
[0145] A second acquisition module 303 is configured to obtain a blockchain identifier (BID) resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name; the BID resource record includes configuration information of the blockchain service;
[0146] The connection establishment module 304 is used to establish a communication connection with the blockchain server corresponding to the target blockchain domain name based on the configuration information.
[0147] The blockchain service discovery device based on the domain name system (DNS) provided by the present invention obtains at least one blockchain domain name from a blockchain domain name management device, each of the blockchain domain names corresponds to a service category and / or a service provider; selects a target blockchain domain name from each of the blockchain domain names, and obtains a BID resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name. The BID resource record includes configuration information of the blockchain service, thereby establishing a communication connection with the blockchain server based on the configuration information, so that users can easily discover blockchain applications with certain functions that meet the functions required by the users or are operated and maintained by specific organizations, and quickly discover and access the required blockchain services. That is, blockchain application discovery and convenient access are achieved through the DNS infrastructure. Moreover, since the blockchain domain name management device provides at least one blockchain domain name, it can help users screen blockchain services that have been verified to be secure and compliant, and can ensure the security of the blockchain services accessed by users. In this way, the efficiency of discovering and accessing blockchain services can be improved, and the user experience can be improved.
[0148] Optionally, the first acquiring module 301 is specifically configured to:
[0149] Sending a query request to the blockchain domain name management device, wherein the query request includes a service category and / or a service provider;
[0150] Receiving a query response from the blockchain domain name management device;
[0151] The query response includes at least one of the following:
[0152] A service category domain name and at least one blockchain domain name corresponding to the service category;
[0153] The service categories provided by the service provider and at least one corresponding blockchain domain name.
[0154] Optionally, the configuration information of the blockchain server includes at least one of the following:
[0155] The type of blockchain;
[0156] The type of the blockchain server's IP address;
[0157] Service category;
[0158] The port number for connecting to the blockchain server;
[0159] Server host name Host Name;
[0160] The IP address of the blockchain server;
[0161] The URL for accessing the blockchain service.
[0162] Optionally, the first receiving module 302 is further configured to receive a certificate sent by the blockchain server during a transport layer security (TLS) handshake phase;
[0163] The connection establishment module 305 is further configured to determine that the blockchain server is valid if the certificate satisfies a target condition; wherein the target condition includes: the domain name field of the subject alternative name in the certificate contains the target blockchain domain name, and the user field in the certificate is the same as the Host Name field value included in the BID resource record.
[0164] FIG4 is a second structural diagram of a blockchain service discovery device based on a domain name system (DNS) provided by the present invention. As shown in FIG4 , the blockchain service discovery device 400 based on a domain name system (DNS) is applied to a blockchain domain name management device, and includes:
[0165] A providing module 401 is configured to provide at least one blockchain domain name to a terminal; each blockchain domain name corresponds to a service category and / or service provider; and different blockchain domain names correspond to different blockchains.
[0166] The blockchain service discovery device based on the domain name system DNS provided by the present invention provides at least one blockchain domain name to the terminal, and each blockchain domain name corresponds to a service category and / or service provider, so that the user can select a target blockchain domain name from the blockchain domain names through the terminal, thereby conveniently discovering blockchain applications with certain functions that meet the functions required by the user or are operated and maintained by a specific organization, thereby quickly discovering and accessing the required blockchain services, that is, realizing the discovery and convenient access of blockchain applications through the DNS infrastructure, and because the blockchain domain name management device provides at least one blockchain domain name, it can help users screen blockchain services that have been verified to be secure and compliant, and can ensure the security of the blockchain services accessed by the user, thereby improving the efficiency of discovering and accessing blockchain services and improving the user experience.
[0167] Optionally, the providing module 401 is specifically configured to:
[0168] receiving a query request from the terminal, wherein the query request includes a service category and / or a service provider;
[0169] sending a query response to the terminal;
[0170] The query response includes at least one of the following:
[0171] A service category domain name and at least one blockchain domain name corresponding to the service category;
[0172] The service categories provided by the service provider and at least one corresponding blockchain domain name.
[0173] Optionally, the device further comprises:
[0174] The third acquisition module is used to obtain different blockchain identifier BID resource records corresponding to multiple blockchain domain names; each BID resource record includes configuration information of the blockchain service;
[0175] The registration module is used to register the blockchain domain name corresponding to each blockchain service based on the registration application of the provider of each blockchain service.
[0176] FIG5 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG5 , the electronic device 500 may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540. The processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the blockchain service discovery method based on the domain name system DNS provided by the present invention.
[0177] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the blockchain service discovery method based on the domain name system DNS provided by the present invention.
[0179] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the blockchain service discovery method based on the domain name system DNS provided by the present invention.
[0180] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0181] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
Claims
1. A blockchain service discovery method based on the domain name system DNS, It is characterized in that include: The terminal obtains at least one blockchain domain name from the blockchain domain name management device; Each of the blockchain domain names corresponds to a service category and / or a service provider; different blockchain domain names correspond to different blockchains; The terminal selects a target blockchain domain name from each of the blockchain domain names; the target blockchain domain name corresponds to a target blockchain; The terminal obtains a blockchain identifier BID resource record corresponding to the target blockchain domain name from a DNS server based on the target blockchain domain name; the BID resource record includes configuration information of the blockchain service; The terminal establishes a communication connection with the blockchain server corresponding to the target blockchain domain name based on the configuration information.
2. According to the DNS-based blockchain service discovery method of claim 1, It is characterized in that The terminal obtains at least one blockchain domain name from the blockchain domain name management device, including: The terminal sends a query request to the blockchain domain name management device, wherein the query request includes a service category and / or a service provider; The terminal receives a query response from the blockchain domain name management device; The query response includes at least one of the following: A service category domain name corresponding to the service category and at least one blockchain domain name; The service category provided by the service provider and at least one corresponding blockchain domain name.
3. According to the DNS-based blockchain service discovery method according to claim 1 or 2, It is characterized in that The configuration information includes at least one of the following: The type of blockchain; The type of the blockchain server's IP address; Type of service; The port number for connecting to the blockchain server; Server host name Host Name; The IP address of the blockchain server; The URL for accessing the blockchain service.
4. According to the DNS-based blockchain service discovery method of claim 1, It is characterized in that The method further comprises: The terminal receives the certificate sent by the blockchain server during the transport layer security TLS handshake phase; The terminal determines that the blockchain server is valid if the certificate meets the target condition; The target condition includes: the domain name field of the subject alternative name in the certificate contains the target blockchain domain name, and the user field in the certificate is the same as the Host Name field value included in the BID resource record.
5. A blockchain service discovery method based on the domain name system DNS, It is characterized in that include: The blockchain domain name management device provides at least one blockchain domain name to the terminal; Each of the blockchain domain names corresponds to a service category and / or a service provider; different blockchain domain names correspond to different blockchains.
6. According to the DNS-based blockchain service discovery method of claim 5, It is characterized in that The blockchain domain name management device provides at least one blockchain domain name to the terminal, including: The blockchain domain name management device receives a query request from the terminal, wherein the query request includes a service category and / or a service provider; The blockchain domain name management device sends a query response to the terminal; The query response includes at least one of the following: A service category domain name corresponding to the service category and at least one blockchain domain name; The service category provided by the service provider and at least one corresponding blockchain domain name.
7. According to the DNS-based blockchain service discovery method of claim 5, It is characterized in that The method further comprises: The blockchain domain name management device obtains different blockchain identifier BID resource records corresponding to the multiple blockchain domain names respectively; each BID resource record includes configuration information of the blockchain service; The blockchain domain name management device registers the blockchain domain name corresponding to each blockchain service based on the registration application of the provider of each blockchain service.
8. A blockchain service discovery device based on the domain name system DNS, It is characterized in that include: A first acquisition module, configured to acquire at least one blockchain domain name from a blockchain domain name management device; Each of the blockchain domain names corresponds to a service category and / or a service provider; different blockchain domain names correspond to different blockchains; A selection module, used to select a target blockchain domain name from each of the blockchain domain names; the target blockchain domain name corresponds to a target blockchain; The second acquisition module is used to obtain the blockchain identifier BID resource record corresponding to the target blockchain domain name from the DNS server based on the target blockchain domain name; the BID resource record includes the configuration of the blockchain service information; A connection establishment module is used to establish a communication connection with the blockchain server corresponding to the target blockchain domain name based on the configuration information.
9. A blockchain service discovery device based on the domain name system DNS, It is characterized in that include: A module is provided, used to provide at least one blockchain domain name to a terminal; each blockchain domain name corresponds to a service category and / or a service provider; different blockchain domain names correspond to different blockchains.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, it implements the DNS-based blockchain service discovery method as described in any one of claims 1 to 4, or implements the DNS-based blockchain service discovery method as described in any one of claims 5 to 7.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, it implements the DNS-based blockchain service discovery method as described in any one of claims 1 to 4, or implements the DNS-based blockchain service discovery method as described in any one of claims 5 to 7.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, it implements the DNS-based blockchain service discovery method as described in any one of claims 1 to 4, or implements the DNS-based blockchain service discovery method as described in any one of claims 5 to 7.
Citation Information
Patent Citations
Information processing method and system based on adjacent nodes of block chain network
CN109951481A
User terminal and block chain domain name resolution method thereof
CN109951482A
Domain name detection method, device, equipment and system
CN111181937A
Domain name distribution and management method and system based on public blockchain
CN113329106A
Block chain service discovery method and device based on domain name system (DNS)
CN116436963A
