CN113726563A - Block chain service access method and device, computer equipment and storage medium - Google Patents

Block chain service access method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113726563A
CN113726563A CN202110961437.1A CN202110961437A CN113726563A CN 113726563 A CN113726563 A CN 113726563A CN 202110961437 A CN202110961437 A CN 202110961437A CN 113726563 A CN113726563 A CN 113726563A
Authority
CN
China
Prior art keywords
target
domain
block chain
blockchain
service
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.)
Granted
Application number
CN202110961437.1A
Other languages
Chinese (zh)
Other versions
CN113726563B (en
Inventor
张松松
权鹏宇
郭林海
张琛
万化
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202110961437.1A priority Critical patent/CN113726563B/en
Publication of CN113726563A publication Critical patent/CN113726563A/en
Application granted granted Critical
Publication of CN113726563B publication Critical patent/CN113726563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

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

Abstract

The application relates to a block chain service access method, a block chain service access device, computer equipment and a storage medium, and relates to the technical field of block chains. The method comprises the steps of obtaining a block chain domain locator corresponding to a target block chain service, traversing a block chain domain space according to the block chain domain locator, selecting a target block chain domain corresponding to the target block chain service from a plurality of block chain domains included in the block chain domain space, determining a target access address and target domain configuration according to an access address and domain configuration included in the target block chain domain, and finally accessing the block chain service according to the target access address and the target domain configuration. In this method, the blockchain application only needs to identify the blockchain service based on the blockchain domain locator, and does not need to pay attention to the specific configuration and access address related to the blockchain service.

Description

Block chain service access method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for accessing blockchain services, a computer device, and a storage medium.
Background
The block chain network constructed based on the block chain technology has the characteristics of anonymity, non-tamper property, traceability and the like. Blockchain networks are therefore increasingly being used in business services.
In practical applications, the blockchain network includes a plurality of nodes, and a terminal device corresponding to each node is configured with a blockchain application, where the blockchain application can access the blockchain service based on an access interface provided by the blockchain service. Specifically, the blockchain application stores an access address and configuration information corresponding to the blockchain service, and when the blockchain service needs to be accessed, the blockchain application can determine an access interface based on the access address, then configure the access interface according to the configuration information, and finally access the blockchain service by using the configured access interface.
At present, some large enterprises or organizations access more and more blockchain services, which results in an increase of blockchain services accessed by blockchain applications, and accordingly, management of access addresses and configuration information by blockchain applications becomes more and more complicated.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device and a storage medium for accessing a blockchain service.
A blockchain service access method is applied to a target device, the target device is provided with a blockchain access system, the blockchain access system comprises a blockchain application and a blockchain domain name service, and the method comprises the following steps:
acquiring a block chain domain locator corresponding to a target block chain service to be accessed through a block chain application;
traversing a block chain domain space according to a block chain domain locator through a block chain domain name service to obtain a target block chain domain corresponding to a target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and accessing the target block chain service according to the target access address and the target domain configuration.
In one embodiment, the step of obtaining a target blockchain domain corresponding to the target blockchain service by traversing the blockchain domain space through the blockchain domain name service according to the blockchain domain locator includes:
and traversing the block chain space through the block chain domain name service according to at least one domain name and the sequence of the domain name level of each domain name from high to low to obtain a target block chain domain corresponding to the target block chain service.
In one embodiment, acquiring a target access address and a target domain configuration of a target blockchain service according to a target blockchain domain includes:
determining a target access address according to the access addresses included in the traversed block chain domains;
and determining the target domain configuration according to the domain configurations included in the traversed block chain domains.
In one embodiment, determining the target domain configuration according to the domain configurations included in the traversed blockchain domains includes:
and merging the domain configurations included in the traversed block chain domains to obtain the target domain configuration.
In one embodiment, accessing a target blockchain service according to a target access address and a target domain configuration comprises:
calling a block chain domain name service to determine an access interface according to a target access address, configuring the access interface according to target domain configuration, and accessing the target block chain service based on the configured access interface; and forwarding the access result returned by the blockchain service to the blockchain application.
In one embodiment, accessing a target blockchain service according to a target access address and a target domain configuration comprises:
and calling the blockchain application to determine an access interface according to the target access address, configuring the access interface according to the target domain configuration, accessing the target blockchain service based on the configured access interface, and acquiring an access result returned by the blockchain service.
In one embodiment, after acquiring the target access address and the target domain configuration of the target blockchain service according to the target blockchain domain, the method further includes:
and calling the domain name service of the block chain to generate an access log according to the target access address and the target domain configuration.
A blockchain service access device is applied to a target device, the target device is provided with a blockchain access system, the blockchain access system comprises a blockchain application and a blockchain domain name service, and the blockchain service access device comprises:
the block chain application module is used for acquiring a block chain domain locator corresponding to a target block chain service to be accessed through block chain application;
the device comprises a block chain domain name service module, a block chain domain name service module and a block chain domain name service module, wherein the block chain domain name service module is used for traversing a block chain domain space according to a block chain domain locator through a block chain domain name service to obtain a target block chain domain corresponding to a target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, and the block chain domain space comprises a plurality of block chain domains;
and the access module is used for accessing the target block chain service according to the target access address and the target domain configuration.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a block chain domain locator corresponding to a target block chain service to be accessed through a block chain application;
traversing a block chain domain space according to a block chain domain locator through a block chain domain name service to obtain a target block chain domain corresponding to a target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and accessing the target block chain service according to the target access address and the target domain configuration.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a block chain domain locator corresponding to a target block chain service to be accessed through a block chain application;
traversing a block chain domain space according to a block chain domain locator through a block chain domain name service to obtain a target block chain domain corresponding to a target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and accessing the target block chain service according to the target access address and the target domain configuration.
The block chain service access method, the block chain service access device, the computer equipment and the storage medium can simplify the management of the configuration of a plurality of block chain services. The method comprises the steps of obtaining a block chain domain locator corresponding to a target block chain service, traversing a block chain domain space according to the block chain domain locator, selecting a target block chain domain corresponding to the target block chain service from a plurality of block chain domains included in the block chain domain space, determining a target access address and target domain configuration according to an access address and domain configuration included in the target block chain domain, and finally accessing the block chain service according to the target access address and the target domain configuration. In this method, the blockchain application only needs to identify the blockchain service based on the blockchain domain locator, and does not need to pay attention to the specific configuration and access address related to the blockchain service.
Drawings
FIG. 1 is a flow diagram illustrating a method for blockchain service access in one embodiment;
FIG. 2 is a flowchart illustrating a method for obtaining a target access address and target domain configuration in one embodiment;
FIG. 3 is a block chain domain space diagram according to an embodiment;
FIG. 4 is a flow diagram illustrating traversal of the blockchain domain space in one embodiment;
FIG. 5 is a diagram of a blockchain access system in one embodiment;
FIG. 6 is a diagram of another block chain access system in one embodiment;
FIG. 7 is a block diagram of a blockchain service access device in one embodiment;
FIG. 8 is a diagram of the internal structure of a target device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Currently, the blockchain application is integrated with the blockchain service, and in order to integrate with the blockchain service, the blockchain application needs to manage configuration information on which the access blockchain service depends, such as an access address of the blockchain service, an account name of the blockchain service, an intelligent contract name, and the like.
For large organizations or enterprises, since multiple blockchain services may be accessed, there may be a case where there are multiple blockchain applications that are applicable to different scenarios, and each blockchain application manages independently the configuration of the dependent blockchain service. In this case, there is no uniform standard and management means for each blockchain application. Alternatively, one blockchain application may access multiple blockchain services, and as the number of blockchain services accessed increases, the management of the blockchain application on the allocation of blockchain services becomes complicated, and the allocation of one blockchain service has management problems, which may affect the access of all other blockchain services.
Based on this, the embodiments of the present application provide a method for accessing a blockchain service, which can simplify the management of the configuration of the blockchain service. The core of the scheme is that the discovery and configuration functions related in the process of accessing the blockchain service by the blockchain application are independent into a blockchain domain name service, so that the blockchain application and the blockchain service are decoupled. Blockchain applications only need to access blockchain services through blockchain domain locators. The method can meet various conditions of one-to-one, one-to-many, many-to-many and the like of block chain application and block chain service.
In one embodiment, as shown in fig. 1, there is provided a blockchain service access method, which is applied to a target device configured with a blockchain access system, where the blockchain access system includes a blockchain application and a blockchain domain name service, and the method includes the following steps:
step 101, a target device obtains a block chain domain locator corresponding to a target block chain service to be accessed through a block chain application.
The target blockchain service refers to a blockchain service that the blockchain application needs to access, and may be any one of a plurality of blockchain services that the blockchain application can access.
The blockchain domain locator includes at least one domain name including a domain name corresponding to the target blockchain service. The blockchain domain locator is used for determining a target blockchain domain corresponding to the target blockchain service, so as to obtain a target access address and target domain configuration required for accessing the target blockchain service from the target blockchain domain.
In this embodiment, the blockchain application may provide an input box, and the external input device performs an input operation in the input box, so that the target device may obtain the blockchain domain locator through the blockchain application.
Optionally, in this embodiment of the present application, the format of the blockchain field locator may be expressed as follows:
……"3rd-Level-Domain"."2nd-Level-Domain"."1st-Level-Domain"。
it should be noted that the blockchain field locator may comprise a more multi-level configuration, and is not limited to the three-level configuration illustrated in this example
Step 102, the target device traverses the blockchain domain space according to the blockchain domain locator through the blockchain domain name service to obtain a target blockchain domain corresponding to the target blockchain service, and obtains a target access address and a target domain configuration of the target blockchain service according to the target blockchain domain.
Wherein the blockchain domain space comprises a plurality of blockchain domains.
In the embodiment of the application, the blockchain domain represents a set of accessible interfaces and data on the blockchain, and provides a uniform access address and configuration for the service layer to access. The main information contained in the block chain is: name: a blockchain domain name to uniquely identify the blockchain domain. Access address: the entry address of the blockchain domain is the access address of the blockchain service corresponding to the blockchain domain. And (3) domain configuration: and the user-defined configuration of the blockchain domain configures the called access interface based on the domain configuration when the access interface of the blockchain domain is called through the access address.
Optionally, the domain configuration of each blockchain domain is a custom JSON string.
In this embodiment, the blockchain domain space may further include a blockchain domain locator corresponding to each blockchain domain. And the block chain domain corresponding to the block chain domain locator corresponding to the target block chain service to be accessed is the target block chain domain. The target device may obtain the access address and the domain configuration included in the target blockchain domain through the blockchain domain name service, and then obtain the target access address and the target domain configuration according to the access address and the domain configuration included in the target blockchain domain.
Optionally, in this embodiment of the present application, the method for obtaining the target access address and the target domain configuration may include two methods, where one method is: the access address included in the target blockchain domain may be used as the target access address, and the domain included in the target blockchain domain may be configured as the target domain. Another approach is described below.
And 103, the target device accesses the target block chain service according to the target access address and the target domain configuration.
In the embodiment of the application, after the target device obtains the target access address, the target device may determine the access interface based on the target access address, then configure the access interface by using the target domain configuration, and then access the blockchain service based on the configured access interface. Specifically, in this embodiment of the present application, the target device may directly access the blockchain service through the blockchain application, or may access the blockchain service through the blockchain domain name service, and forward an access result returned by the blockchain service to the blockchain application.
The method provided by the embodiment of the application comprises the steps of obtaining a block chain domain locator corresponding to a target block chain service, traversing a block chain domain space according to the block chain domain locator, selecting a target block chain domain corresponding to the target block chain service from a plurality of block chain domains included in the block chain domain space, determining a target access address and a target domain configuration according to an access address and a domain configuration included in the target block chain domain, and finally accessing the block chain service according to the target access address and the target domain configuration. In this method, the blockchain application only needs to identify the blockchain service based on the blockchain domain locator, and does not need to pay attention to the specific configuration and access address related to the blockchain service. In the method, the blockchain application only needs to identify the blockchain service based on the domain name of the blockchain service, and does not need to pay attention to the specific configuration and the access address related to the blockchain service.
The following describes a process of acquiring a target access address and a target domain configuration in the embodiment of the present application.
Referring to fig. 2, fig. 2 is a flowchart illustrating another method for obtaining a target access address and a target domain configuration. The method comprises the following steps:
in step 201, the target device traverses the blockchain space through the blockchain domain name service according to at least one domain name and the order of the domain name level of each domain name from high to low, so as to obtain a target blockchain domain corresponding to the target blockchain service.
First, the block chain domain locator provided in the embodiment of the present application is described as follows:
in this embodiment, the blockchain domain locator includes at least one domain name, and each domain name corresponds to a domain name level, where the domain name levels sequentially increase from left to right. The domain name is the name of the blockchain domain, and the domain name level represents the level of the blockchain domain in the blockchain domain space. And the domain name with the lowest domain name level is the domain name corresponding to the target block chain service.
The blockchain domain locator is used to locate a specific blockchain domain from the blockchain domain space. Only one domain name can be located in the first layer of the block chain domain space, and the block chain domain in the N layers needs N domain names to be located.
It should be noted that, since there may be two blockchain domains in the blockchain domain space with the same domain name, when traversing the blockchain domain space, the target blockchain domain needs to be accessed with the complete blockchain domain locator, and cannot be accessed only according to the domain name.
Next, the block chain domain space provided by the embodiment of the present application is described as follows:
as shown in fig. 3, a schematic diagram of a blockchain domain space is shown. In fig. 3, the blockchain domain space includes a tree hierarchy, also referred to as a parent-child relationship, that may be formed by a plurality of blockchain domains, and the relationship represents a parent-child set relationship of interfaces and data accessible to the blockchain domain.
In the embodiment of the present application, in order to reduce the complexity of accessing the blockchain domain, it is convenient for the blockchain application to manage the blockchain domain locator, and the access of the blockchain application to a plurality of blockchain domains is limited in one blockchain domain space.
In practical applications, there may be associations between blockchain domains, and if we consider a blockchain network as a network, different sub-chains or channels can be regarded as local area networks in the blockchain network, so that this manifests itself as a spatial relationship of a tree. By abstracting the space of the blockchain domain, the mapping relation between the blockchain service of the stratum and the blockchain domain can be better managed.
Finally, a process of obtaining a target blockchain domain corresponding to the target blockchain service in the embodiment of the present application is described.
When traversing the block chain domain space, the target device firstly resolves the block chain domain locator through the block chain domain name service to obtain each domain name and the domain name level, then sequentially searches the block chain domain corresponding to each domain name in the block chain domain space based on the sequence of the domain name levels from high to low, and determines the block chain domain corresponding to the domain name with the lowest domain name level in the block chain domain locator as the target block chain domain.
As shown in fig. 4, when accessing yili, for example, the blockchain domain, the locating is performed by using the blockchain domain locator "yili. The block chain domain locator comprises a plurality of domain names which are respectively: scf, sg and yili, wherein the domain name levels of the three domain names are, in order from high to low, scf- > sg- > yili. As shown in fig. 4, the blockchain domain corresponding to each domain name can be determined through traversal, where the blockchain domain yili with the lowest domain name level is the target blockchain domain. It should be noted that, in this embodiment of the present application, the names of the blockchain domains exemplarily shown in fig. 4 do not constitute a limitation of the embodiment of the present application on the names of the blockchain domains, and the names of the blockchain domains may be set based on a user requirement, which is not exhaustive in the present application.
Step 202, the target device obtains a target access address and a target domain configuration of the target blockchain service according to the target blockchain domain through the blockchain domain name service.
Optionally, an access address included in the target blockchain domain may be used as the target access address, and a domain configuration included in the target blockchain domain may be used as the target domain configuration.
Optionally, the target device determines a target access address according to the access address included in each traversed blockchain domain through the blockchain domain name service; and determining the target domain configuration according to the domain configurations included in the traversed block chain domains.
Since in practical applications, not every blockchain domain has to be configured with an access address, in this case, it may happen that the target blockchain domain is not configured with an access address, in this case, the target device may determine the target access address according to the access addresses included in each traversed blockchain domain through the blockchain domain name service.
Optionally, if the target blockchain domain is not configured with an access address, the address of the blockchain domain of the parent stage of the target blockchain domain is used as the access address of the target blockchain domain, and if not, the search is continued upwards. Until a blockchain field is obtained that contains the access address. For example, if sg and yili are both configured with access addresses, yili configured access addresses, i.e., addresses of block chain domains at lower layers, are preferentially used. And if the yili does not configure the access address, the access address configured by the sg is used.
In the embodiment of the present application, the blockchain domain includes domain configuration, and domain configurations of different blockchain domains may include repeated configuration information, such as two channels served by one blockchain, and other configuration information may be completely the same except for different channel names.
Based on this, in the embodiment of the present application, the target device may merge the domain configurations included in each traversed blockchain domain through the blockchain domain name service, so as to obtain the target domain configuration.
The merging mode is to take the union of the domain configurations included in all the traversed blockchain domains. If a certain configuration item is the same, the domain configuration of the blockchain domain with a low domain name level is preferentially used.
The method can reduce the quantity of configuration information included in the domain configuration of each blockchain domain. Each blockchain domain only needs to care about the configuration information associated with the domain, and the final configuration information will merge the configuration information of its ancestor and ancestor together.
Step 203, the target device accesses the target block chain service according to the target access address and the target domain configuration.
After the target access address and the target domain configuration are obtained, the URL (Uniform Resource Locator, chinese: Uniform Resource Locator) of the access layer interface of the block chain accessed by the system through the block chain domain name service may be formed based on the block chain domain Locator and the accessed interface address, and the target domain configuration of the target block chain domain is added in the HTTP Header and encoded using base64, as shown in "GET HTTP: // xxx/blocks/1024Header: DOMAIN-CONF: base64({ custom JSON }) ".
In the embodiment of the application, the target device analyzes the blockchain domain locator through the blockchain domain name service, traverses the blockchain domain space based on the plurality of domain names obtained through analysis and the domain name level of each domain name, and determines the target access address and the target domain configuration according to the access address and the domain configuration included in the traversed blockchain domain, so that the flexibility of obtaining the target access address and the target domain configuration is improved.
In the following, a process of accessing a target block chain service by a target device according to a target access address and a target domain configuration is described:
in the embodiment of the application, based on the blockchain domain name service, the application of the blockchain domain only needs to identify the blockchain domain from the service perspective, and does not need to pay attention to the specific configuration and implementation mode related to the blockchain service. After the operation and maintenance personnel or the blockchain service developer configure the blockchain domain name service, the blockchain domain application can access the blockchain service through the blockchain domain name service.
In order to meet different access requirements of the blockchain application, the blockchain domain name service provides two modes of accessing the blockchain service, namely a proxy mode and a direct connection mode, for the blockchain application, and the two modes are respectively described below.
First, proxy mode.
In the embodiment of the present application, a target device accesses a target blockchain service through a blockchain domain name service, and the method includes the following steps:
calling a block chain domain name service to determine an access interface according to a target access address, configuring the access interface according to target domain configuration, and accessing the target block chain service based on the configured access interface; and forwarding the access result returned by the blockchain service to the blockchain application.
Optionally, in this embodiment of the application, as shown in fig. 5, fig. 5 is a schematic diagram illustrating a blockchain access system, where a blockchain domain name service includes a blockchain domain name resolution module and a blockchain agent module.
The target device obtains a block chain domain locator corresponding to a target block chain service to be accessed through block chain domain application, then analyzes the block chain domain locator through a block chain domain name analysis module and traverses a block chain domain space to obtain a target access address and target domain configuration, then determines an access interface according to the target access address through a block chain agent module, configures the access interface according to the target domain configuration, and accesses the target block chain service based on the configured access interface. Meanwhile, the target device may also receive an access result returned by the blockchain service through the blockchain agent module, and forward the access result to the blockchain application.
In the embodiment of the application, after the target device obtains the target access address and the target domain configuration of the target blockchain service according to the target blockchain domain, the target device may invoke the blockchain domain name service to generate the access log according to the target access address and the target domain configuration.
Optionally, as shown in fig. 5, in the embodiment of the present application, the blockchain domain name service may further include a blockchain log module. After the target device obtains the target access address and the target domain configuration, the target device can also send the target access address and the target domain configuration to the blockchain log module through the blockchain agent module, and then the target device can generate an access log through the blockchain log module.
Second, direct mode.
In an embodiment of the present application, a target device accesses a target blockchain service through a blockchain application, where the method includes the following steps:
and calling the blockchain application to determine an access interface according to the target access address, configuring the access interface according to the target domain configuration, accessing the target blockchain service based on the configured access interface, and acquiring an access result returned by the blockchain service.
Optionally, in this embodiment of the application, as shown in fig. 6, fig. 6 is a schematic diagram illustrating another block chain access system, and the block chain domain name service includes a block chain domain name resolution module.
The target device obtains a block chain domain locator corresponding to a target block chain service to be accessed through a block chain domain application, then analyzes the block chain domain locator through a block chain domain name analysis module and traverses a block chain domain space so as to obtain a target access address and a target domain configuration, and then the target device configures the target access address and the target domain to the block chain application through the block chain domain name analysis module.
The target device directly configures the access interface through the blockchain application, and accesses the blockchain service based on the configured access interface. And the target device can directly receive the access result returned by the blockchain service through the blockchain application.
The embodiment of the application removes the coupling of the blockchain application and the blockchain service by dividing and uniformly managing the blockchain service, and provides a standardized and efficient blockchain service access, management and integration process.
Further, in the embodiment of the present application, the blockchain application may distinguish different blockchain services through a blockchain domain locator identifier, so as to provide a simpler access and configuration means for a blockchain application that depends on multiple blockchain services.
Furthermore, the scheme provided by the embodiment of the application can support the block chain application access multi-chain more easily. And according to the definition of the block chain domain and the design of the block chain domain space, the same set of block chain service interface meeting the block chain application requirements is realized.
Furthermore, the scheme provided by the embodiment of the application is suitable for building the block chain infrastructure of a large-scale organization, and brings more efficient team division of labor and role division for the landing process of the block chain application. For example, a blockchain application developer concentrates on the development of the application layer functions according to business requirements; blockchain service developers can concentrate on the design and development of blockchain services; blockchain operation and maintenance personnel can be interested in the arrangement of blockchain domains and spaces.
It should be understood that although the various steps in the flow charts of fig. 1-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-6 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 7, there is provided a blockchain service access apparatus 700 applied to a target device, where the target device is configured with a blockchain access system, and the blockchain access system includes a blockchain application and a blockchain domain name service, including: a blockchain application module 701, a blockchain domain name service module 702, and an access module 703, wherein:
a block chain application module 701, configured to obtain, through a block chain application, a block chain domain locator corresponding to a target block chain service to be accessed;
a blockchain domain name service module 702, configured to traverse a blockchain domain space according to a blockchain domain locator through a blockchain domain name service to obtain a target blockchain domain corresponding to a target blockchain service, and obtain a target access address and a target domain configuration of the target blockchain service according to the target blockchain domain, where the blockchain domain space includes multiple blockchain domains;
an accessing module 703 is configured to access the target block chain service according to the target access address and the target domain.
In one embodiment, the blockchain domain locator includes at least one domain name, and the blockchain domain name service module 702 is specifically configured to traverse the blockchain space through the blockchain domain name service according to the at least one domain name and a sequence from high to low of the domain name level of each domain name, so as to obtain a target blockchain domain corresponding to the target blockchain service.
In one embodiment, the blockchain domain name service module 702 is specifically configured to determine a target access address according to access addresses included in each traversed blockchain domain; and determining the target domain configuration according to the domain configurations included in the traversed block chain domains.
In an embodiment, the blockchain domain name service module 702 is specifically configured to merge domain configurations included in each traversed blockchain domain to obtain a target domain configuration.
In one embodiment, the blockchain domain name service module 702 is specifically configured to invoke a blockchain domain name service to determine an access interface according to a target access address, configure the access interface according to target domain configuration, and access the target blockchain service based on the configured access interface; and forwarding the access result returned by the blockchain service to the blockchain application.
In an embodiment, the blockchain application module 701 is specifically configured to invoke a blockchain application to determine an access interface according to a target access address, configure the access interface according to target domain configuration, access a target blockchain service based on the configured access interface, and obtain an access result returned by the blockchain service.
In one embodiment, the blockchain domain name service module 702 is specifically configured to invoke the blockchain domain name service to generate an access log according to the target access address and the target domain configuration.
For specific limitations of the blockchain service access device, reference may be made to the above limitations of the blockchain service access method, which is not described herein again. The modules in the blockchain service access device may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a target device is provided, the internal structure of which may be as shown in fig. 8. The target device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the target device is configured to provide computing and control capabilities. The memory of the target device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the target device is used to store data. The network interface of the target device is used for communicating with an external terminal through network connection. The computer program is executed by a processor to implement a blockchain service access method.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is a block diagram of only a portion of the configuration relevant to the present application, and does not constitute a limitation on the target device to which the present application is applied, and that a particular target device may include more or less components than those shown in the drawings, or combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a block chain domain locator corresponding to a target block chain service to be accessed through a block chain application;
traversing a block chain domain space according to a block chain domain locator through a block chain domain name service to obtain a target block chain domain corresponding to a target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and accessing the target block chain service according to the target access address and the target domain configuration.
In one embodiment, the blockchain domain locator includes at least one domain name, and the processor when executing the computer program further performs the steps of: and traversing the block chain space through the block chain domain name service according to at least one domain name and the sequence of the domain name level of each domain name from high to low to obtain a target block chain domain corresponding to the target block chain service.
In one embodiment, the processor, when executing the computer program, further performs the steps of: determining a target access address according to the access addresses included in the traversed block chain domains; and determining the target domain configuration according to the domain configurations included in the traversed block chain domains.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and merging the domain configurations included in the traversed block chain domains to obtain the target domain configuration.
In one embodiment, the processor, when executing the computer program, further performs the steps of: calling a block chain domain name service to determine an access interface according to a target access address, configuring the access interface according to target domain configuration, and accessing the target block chain service based on the configured access interface; and forwarding the access result returned by the blockchain service to the blockchain application.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and calling the blockchain application to determine an access interface according to the target access address, configuring the access interface according to the target domain configuration, accessing the target blockchain service based on the configured access interface, and acquiring an access result returned by the blockchain service.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and calling the domain name service of the block chain to generate an access log according to the target access address and the target domain configuration.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a block chain domain locator corresponding to a target block chain service to be accessed through a block chain application;
traversing a block chain domain space according to a block chain domain locator through a block chain domain name service to obtain a target block chain domain corresponding to a target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and accessing the target block chain service according to the target access address and the target domain configuration.
In one embodiment, the blockchain domain locator includes at least one domain name, the computer program when executed by the processor further performing the steps of: and traversing the block chain space through the block chain domain name service according to at least one domain name and the sequence of the domain name level of each domain name from high to low to obtain a target block chain domain corresponding to the target block chain service.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a target access address according to the access addresses included in the traversed block chain domains; and determining the target domain configuration according to the domain configurations included in the traversed block chain domains.
In one embodiment, the computer program when executed by the processor further performs the steps of: and merging the domain configurations included in the traversed block chain domains to obtain the target domain configuration.
In one embodiment, the computer program when executed by the processor further performs the steps of: calling a block chain domain name service to determine an access interface according to a target access address, configuring the access interface according to target domain configuration, and accessing the target block chain service based on the configured access interface; and forwarding the access result returned by the blockchain service to the blockchain application.
In one embodiment, the computer program when executed by the processor further performs the steps of: and calling the blockchain application to determine an access interface according to the target access address, configuring the access interface according to the target domain configuration, accessing the target blockchain service based on the configured access interface, and acquiring an access result returned by the blockchain service.
In one embodiment, the computer program when executed by the processor further performs the steps of: and calling the domain name service of the block chain to generate an access log according to the target access address and the target domain configuration.
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 hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A blockchain service access method is applied to a target device, the target device is configured with a blockchain access system, the blockchain access system comprises a blockchain application and a blockchain domain name service, and the method comprises the following steps:
acquiring a block chain domain locator corresponding to a target block chain service to be accessed through the block chain application;
traversing a block chain domain space according to the block chain domain locator through the block chain domain name service to obtain a target block chain domain corresponding to the target block chain service, and acquiring a target access address and a target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and accessing the target block chain service according to the target access address and the target domain configuration.
2. The method of claim 1, wherein the blockchain domain locator comprises at least one domain name, and wherein traversing a blockchain domain space according to the blockchain domain locator by the blockchain domain name service to obtain a target blockchain domain corresponding to the target blockchain service comprises:
and traversing the block chain space through the block chain domain name service according to the at least one domain name and the domain name level of each domain name from high to low to obtain a target block chain domain corresponding to the target block chain service.
3. The method of claim 2, wherein the obtaining the target access address and the target domain configuration of the target blockchain service according to the target blockchain domain comprises:
determining the target access address according to the access address included in each traversed block chain domain;
and determining the target domain configuration according to the domain configuration included in each traversed block chain domain.
4. The method of claim 3, wherein determining the target domain configuration according to the domain configurations included in each of the traversed blockchain domains comprises:
and merging the domain configurations included in the traversed block chain domains to obtain the target domain configuration.
5. The method of claim 1, wherein accessing the target blockchain service according to the target access address and the target domain configuration comprises:
calling the block chain domain name service to determine an access interface according to the target access address, configuring the access interface according to the target domain configuration, and accessing the target block chain service based on the configured access interface; and forwarding the access result returned by the blockchain service to the blockchain application.
6. The method of claim 1, wherein accessing the target blockchain service according to the target access address and the target domain configuration comprises:
and calling the block chain application to determine an access interface according to the target access address, configuring the access interface according to the target domain configuration, accessing the target block chain service based on the configured access interface, and acquiring an access result returned by the block chain service.
7. The method of claim 1, wherein after obtaining the target access address and target domain configuration of the target blockchain service according to the target blockchain domain, the method further comprises:
and calling the block chain domain name service to generate an access log according to the target access address and the target domain configuration.
8. A blockchain service access apparatus, applied to a target device configured with a blockchain access system, the blockchain access system including a blockchain application and a blockchain domain name service, the apparatus comprising:
the block chain application module is used for acquiring a block chain domain locator corresponding to a target block chain service to be accessed through the block chain application;
the block chain domain name service module is used for traversing a block chain domain space according to the block chain domain locator through the block chain domain name service to obtain a target block chain domain corresponding to the target block chain service, and acquiring a target access address and target domain configuration of the target block chain service according to the target block chain domain, wherein the block chain domain space comprises a plurality of block chain domains;
and the access module is used for accessing the target block chain service according to the target access address and the target domain configuration.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110961437.1A 2021-08-20 2021-08-20 Block chain service access method, device, computer equipment and storage medium Active CN113726563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110961437.1A CN113726563B (en) 2021-08-20 2021-08-20 Block chain service access method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110961437.1A CN113726563B (en) 2021-08-20 2021-08-20 Block chain service access method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113726563A true CN113726563A (en) 2021-11-30
CN113726563B CN113726563B (en) 2023-10-27

Family

ID=78677148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110961437.1A Active CN113726563B (en) 2021-08-20 2021-08-20 Block chain service access method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113726563B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413229A (en) * 2018-12-20 2019-03-01 全链通有限公司 Domain name analytic method, equipment, system and storage medium
CN109981814A (en) * 2019-03-19 2019-07-05 全链通有限公司 Domain name information inquiry method and system based on block chain network service node
US20190253263A1 (en) * 2018-11-16 2019-08-15 Alibaba Group Holding Limited Cross-chain interactions using a domain name scheme in blockchain systems
US20190253252A1 (en) * 2018-11-16 2019-08-15 Alibaba Group Holding Limited Domain name scheme for cross-chain interactions in blockchain systems
CN112380294A (en) * 2020-12-31 2021-02-19 支付宝(杭州)信息技术有限公司 Block chain cross-chain access method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190253263A1 (en) * 2018-11-16 2019-08-15 Alibaba Group Holding Limited Cross-chain interactions using a domain name scheme in blockchain systems
US20190253252A1 (en) * 2018-11-16 2019-08-15 Alibaba Group Holding Limited Domain name scheme for cross-chain interactions in blockchain systems
CN110199307A (en) * 2018-11-16 2019-09-03 阿里巴巴集团控股有限公司 The domain name scheme across chain interaction is carried out in block catenary system
CN110268677A (en) * 2018-11-16 2019-09-20 阿里巴巴集团控股有限公司 Across chain interaction is carried out using domain name scheme in block catenary system
CN109413229A (en) * 2018-12-20 2019-03-01 全链通有限公司 Domain name analytic method, equipment, system and storage medium
CN109981814A (en) * 2019-03-19 2019-07-05 全链通有限公司 Domain name information inquiry method and system based on block chain network service node
CN112380294A (en) * 2020-12-31 2021-02-19 支付宝(杭州)信息技术有限公司 Block chain cross-chain access method and device

Also Published As

Publication number Publication date
CN113726563B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
US7606813B1 (en) Model consolidation in a database schema
WO2020168692A1 (en) Mass data sharing method, open sharing platform and electronic device
US20070266029A1 (en) Recovery segment identification in a computing infrastructure
CN111970337B (en) P2P network communication construction method, system, medium and terminal under cross-cloud environment
CN102857370A (en) Resource allocating method and device
US7818752B2 (en) Interface for application components
US20120084422A1 (en) Graph Based Flexible Service Discovery and Management System and Method
US11729026B2 (en) Customer activation on edge computing environment
CN112230857B (en) Hybrid cloud system, hybrid cloud disk application method and data storage method
CN113326264A (en) Data processing method, server and storage medium
US20130227171A1 (en) Apparatus and method for interconnecting heterogeneous networks
Bouten et al. Semantic validation of affinity constrained service function chain requests
EP3884641A1 (en) System and method for migrating existing access control list policies to intent based policies and vice versa
Schaffrath et al. A resource description language with vagueness support for multi-provider cloud networks
CN115086166A (en) Computing system, container network configuration method, and storage medium
US8316045B1 (en) Database linking system
CN113726563B (en) Block chain service access method, device, computer equipment and storage medium
CN109739484B (en) Asset relationship model construction system, method and storage medium
US8825901B2 (en) Distributed parallel discovery
CN109286513B (en) Resource deployment method and device
WO2018120222A1 (en) Vnffg management method, device and system
US11792301B1 (en) Parallelized automated creation of proxy manifests
US11528206B2 (en) Identifying and mapping applications to devices in a network
US11916741B1 (en) Discovery of application relationships in clusters
US20240137248A1 (en) Customer activation on edge computing environment

Legal Events

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