+

CN114793244B - Resource processing method, device, equipment and medium for block chain - Google Patents

Resource processing method, device, equipment and medium for block chain Download PDF

Info

Publication number
CN114793244B
CN114793244B CN202210666699.XA CN202210666699A CN114793244B CN 114793244 B CN114793244 B CN 114793244B CN 202210666699 A CN202210666699 A CN 202210666699A CN 114793244 B CN114793244 B CN 114793244B
Authority
CN
China
Prior art keywords
resource
domain name
information
blockchain
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210666699.XA
Other languages
Chinese (zh)
Other versions
CN114793244A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210666699.XA priority Critical patent/CN114793244B/en
Publication of CN114793244A publication Critical patent/CN114793244A/en
Application granted granted Critical
Publication of CN114793244B publication Critical patent/CN114793244B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

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

Abstract

本公开提供了一种区块链的资源处理方法、装置、设备和介质,涉及计算机技术领域,尤其涉及区块链技术领域。该方法应用于资源解析系统,具体实现方案为:获取链资源处理请求;根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;基于所述资源信息响应所述链资源处理请求。本公开的技术方案实现了多链之间的数据资源的相互定位和获取,以及对多链数据资源的维护和管理。

Figure 202210666699

The present disclosure provides a resource processing method, device, device and medium of a blockchain, which relate to the field of computer technology, and in particular, to the technical field of blockchain. The method is applied to a resource analysis system, and the specific implementation scheme is: obtaining a chain resource processing request; according to the chain resource processing request, based on the information of resource data stored in the resource storage network, perform resource information query to determine resource information; wherein , the resource storage network is a decentralized storage network; the resource data is an accessible resource provided in the blockchain network; and the chain resource processing request is responded to based on the resource information. The technical solution of the present disclosure realizes the mutual positioning and acquisition of data resources between multiple chains, as well as the maintenance and management of the data resources of multiple chains.

Figure 202210666699

Description

一种区块链的资源处理方法、装置、设备和介质A resource processing method, device, device and medium of a blockchain

技术领域technical field

本公开涉及计算机技术领域,尤其涉及区块链技术。The present disclosure relates to the field of computer technology, and in particular, to blockchain technology.

背景技术Background technique

近年来,随着区块链行业的蓬勃发展,产生了很多的区块链网络,无论是采用相同框架的同构区块链,还是采用不同框架的异构区块链,彼此之间都很难寻找和定位到彼此的数据资源,造成了众多的数据孤岛,严重阻碍了数据要素的流通。In recent years, with the vigorous development of the blockchain industry, many blockchain networks have emerged, whether they are homogeneous blockchains using the same framework or heterogeneous blockchains using different frameworks, they are very different from each other. It is difficult to find and locate each other's data resources, resulting in numerous data islands, which seriously hinders the circulation of data elements.

因此,迫切需要一个解决方案能够系统地解决多链之间互相定位到彼此数据资源的问题。Therefore, there is an urgent need for a solution that can systematically solve the problem of locating each other's data resources between multiple chains.

发明内容SUMMARY OF THE INVENTION

本公开提供了一种区块链的资源处理方法、装置、设备和介质,以实现多链之间的数据资源的相互定位和获取,以及对多链数据资源的维护和管理。The present disclosure provides a resource processing method, device, device and medium of a blockchain, so as to realize mutual positioning and acquisition of data resources between multiple chains, and maintenance and management of data resources of multiple chains.

根据本公开的一方面,提供了一种区块链的资源处理方法,应用于资源解析系统,所述方法包括:According to an aspect of the present disclosure, a method for processing resources of a blockchain is provided, which is applied to a resource parsing system, and the method includes:

获取链资源处理请求;Get chain resources to process requests;

根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;According to the chain resource processing request, based on the information of the resource data stored in the resource storage network, the resource information query is performed to determine the resource information; wherein, the resource storage network is a decentralized storage network; the resource data is a district Accessible resources provided in the blockchain network;

基于所述资源信息响应所述链资源处理请求。The chain resource processing request is responded to based on the resource information.

根据本公开的另一方面,提供了一种区块链的资源处理方法,应用于资源存储网络,所述方法包括:According to another aspect of the present disclosure, a method for processing resources of a blockchain is provided, which is applied to a resource storage network, and the method includes:

获取资源信息处理请求;所述资源信息处理请求基于链资源处理请求而确定;Obtain a resource information processing request; the resource information processing request is determined based on the chain resource processing request;

根据所述资源信息处理请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;According to the resource information processing request and the information of the resource data stored in the resource storage network, query the resource information to determine the resource information;

基于所述资源信息响应所述资源信息处理请求;所述资源数据为区块链网络中提供的可访问资源。The resource information processing request is responded to based on the resource information; the resource data is an accessible resource provided in the blockchain network.

根据本公开的另一方面,提供了一种区块链的资源处理方法,应用于区块链节点,所述方法包括:According to another aspect of the present disclosure, a method for processing resources of a blockchain is provided, applied to a blockchain node, and the method includes:

在识别到跨链资源的信息获取需求时,产生链资源处理请求;When the need for information acquisition of cross-chain resources is identified, a chain resource processing request is generated;

将所述链资源处理请求发送给资源解析系统,以请求所述资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;Send the chain resource processing request to the resource analysis system to request the resource analysis system to query the resource information based on the information of the resource data stored in the resource storage network to determine the resource information; wherein, the resource storage network is Decentralized storage network; the resource data are accessible resources provided in the blockchain network;

接收所述资源解析系统反馈的资源信息。Resource information fed back by the resource parsing system is received.

根据本公开的另一方面,提供了一种区块链的资源处理装置,配置于资源解析系统,所述装置包括:According to another aspect of the present disclosure, there is provided a block chain resource processing device configured in a resource analysis system, the device comprising:

处理请求获取模块,用于获取链资源处理请求;The processing request acquisition module is used to acquire chain resources to process requests;

资源信息确定模块,用于根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;A resource information determination module, configured to query the resource information based on the information of the resource data stored in the resource storage network according to the chain resource processing request to determine the resource information; wherein, the resource storage network is a decentralized storage network ; the resource data is an accessible resource provided in the blockchain network;

处理请求响应模块,用于基于所述资源信息响应所述链资源处理请求。A processing request response module, configured to respond to the chain resource processing request based on the resource information.

根据本公开的另一方面,提供了一种区块链的资源处理装置,应用于资源存储网络,所述装置包括:According to another aspect of the present disclosure, there is provided a block chain resource processing device applied to a resource storage network, the device comprising:

信息处理请求获取模块,用于获取资源信息处理事务请求;所述资源信息处理事务请求基于链资源处理请求而确定;an information processing request acquisition module for acquiring resource information processing transaction requests; the resource information processing transaction requests are determined based on the chain resource processing requests;

资源信息确定模块,用于根据所述资源信息处理事务请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;a resource information determination module, configured to process a transaction request according to the resource information and the information of the resource data stored in the resource storage network, to query the resource information to determine the resource information;

信息处理请求响应模块,用于基于所述资源信息响应所述资源信息处理事务请求;所述资源数据为区块链网络中提供的可访问资源。An information processing request response module, configured to respond to the resource information processing transaction request based on the resource information; the resource data is an accessible resource provided in the blockchain network.

根据本公开的另一方面,提供了一种区块链的资源处理装置,应用于区块链节点,所述装置包括:According to another aspect of the present disclosure, there is provided a resource processing device for a blockchain, which is applied to a blockchain node, and the device includes:

处理请求产生模块,用于在识别到跨链资源的信息获取需求时,产生链资源处理请求;The processing request generation module is used to generate a chain resource processing request when the information acquisition requirement of the cross-chain resource is identified;

处理请求发送模块,用于将所述链资源处理请求发送给资源解析系统,以请求所述资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;A processing request sending module, configured to send the chain resource processing request to the resource analysis system, to request the resource analysis system to perform resource information query based on the information of the resource data stored in the resource storage network to determine the resource information; wherein , the resource storage network is a decentralized storage network; the resource data is an accessible resource provided in the blockchain network;

资源信息接收模块,用于接收所述资源解析系统反馈的资源信息。A resource information receiving module, configured to receive resource information fed back by the resource parsing system.

根据本公开的另一方面,还提供了一种电子设备,包括:According to another aspect of the present disclosure, there is also provided an electronic device, comprising:

至少一个处理器;以及at least one processor; and

与至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行本公开实施例所提供的任意一种区块链的资源处理方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute any one of the methods for processing resources of the blockchain provided by the embodiments of the present disclosure.

根据本公开的另一方面,还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,计算机指令用于使计算机执行本公开实施例所提供的任意一种区块链的资源处理方法。According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause the computer to execute any one of the blockchain resources provided by the embodiments of the present disclosure. Approach.

根据本公开的另一方面,还提供了一种计算机程序产品,包括计算机程序,计算机程序在被处理器执行时实现本公开实施例所提供的任意一种区块链的资源处理方法。According to another aspect of the present disclosure, a computer program product is also provided, including a computer program, which, when executed by a processor, implements any one of the blockchain resource processing methods provided by the embodiments of the present disclosure.

根据本公开的技术,实现了多链之间的数据资源的相互定位和获取,以及对多链数据资源的维护和管理。According to the technology of the present disclosure, the mutual positioning and acquisition of data resources between multiple chains, and the maintenance and management of the data resources of multiple chains are realized.

应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or critical features of embodiments of the disclosure, nor is it intended to limit the scope of the disclosure. Other features of the present disclosure will become readily understood from the following description.

附图说明Description of drawings

附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used for better understanding of the present solution, and do not constitute a limitation to the present disclosure. in:

图1是根据本公开实施例提供的一种区块链的资源处理方法的示意图;FIG. 1 is a schematic diagram of a method for processing resources of a blockchain according to an embodiment of the present disclosure;

图2是根据本公开实施例提供的另一种区块链的资源处理方法的示意图;FIG. 2 is a schematic diagram of another method for processing resources of a blockchain according to an embodiment of the present disclosure;

图3是根据本公开实施例提供的又一种区块链的资源处理方法的示意图;3 is a schematic diagram of yet another method for processing resources of a blockchain provided according to an embodiment of the present disclosure;

图4是根据本公开实施例提供的又一种区块链的资源处理方法的示意图;4 is a schematic diagram of yet another method for processing resources of a blockchain provided according to an embodiment of the present disclosure;

图5是根据本公开实施例提供的又一种区块链的资源处理方法的示意图;5 is a schematic diagram of yet another method for processing resources of a blockchain according to an embodiment of the present disclosure;

图6是根据本公开实施例提供的一种区块链的资源处理装置的结构图;6 is a structural diagram of a resource processing apparatus of a blockchain provided according to an embodiment of the present disclosure;

图7是根据本公开实施例提供的一种区块链的资源处理装置的结构图;7 is a structural diagram of a resource processing apparatus of a blockchain provided according to an embodiment of the present disclosure;

图8是根据本公开实施例提供的一种区块链的资源处理装置的结构图;8 is a structural diagram of a resource processing apparatus for a blockchain provided according to an embodiment of the present disclosure;

图9是用来实现本公开实施例的区块链的资源处理的方法的电子设备的框图。FIG. 9 is a block diagram of an electronic device used to implement the method for resource processing of a blockchain according to an embodiment of the present disclosure.

具体实施方式Detailed ways

以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.

本公开的技术方案适用于在区块链网络中实现资源数据的定位和访问。随着区块链技术的发展,出现了越来越多的跨链网络。即在区块链网络中部署有多条区块链,各条区块链中设置有不同的可访问资源。因此,需要提供一种通用、扩展性强的方案,能够实现在区块链网络中进行资源数据的定位、获取和管理维护。本公开的技术方案,在区块链网络的基础上,设置了资源解析系统和资源存储网络。资源存储网络为去中心化存储网络,优选是采用区块链技术实现,主要用于存储和维护区块链网络中各种资源数据的关联信息。资源解析系统用于在区块链网络和资源存储网络之间,提供资源信息解析查询的服务。下面详细介绍具体技术方案。The technical solution of the present disclosure is suitable for realizing the location and access of resource data in a blockchain network. With the development of blockchain technology, more and more cross-chain networks have emerged. That is, there are multiple blockchains deployed in the blockchain network, and different accessible resources are set in each blockchain. Therefore, it is necessary to provide a general and highly scalable solution that can realize the location, acquisition, management and maintenance of resource data in the blockchain network. In the technical solution of the present disclosure, on the basis of the blockchain network, a resource analysis system and a resource storage network are set up. The resource storage network is a decentralized storage network, preferably implemented with blockchain technology, and is mainly used to store and maintain the associated information of various resource data in the blockchain network. The resource analysis system is used to provide the service of resource information analysis and query between the blockchain network and the resource storage network. The specific technical solutions are described in detail below.

图1是根据本公开实施例提供的一种区块链的资源处理方法的示意图,本公开实施例可适用于多链之间进行资源数据相互定位和获取的情况。该方法可由一种区块链的资源处理装置来执行,该装置可采用硬件和/或软件的方式来实现,可配置于电子设备中,该电子设备可以为资源解析系统。参考图1,该方法应用于资源解析系统,该方法具体包括如下:FIG. 1 is a schematic diagram of a method for processing resources of a blockchain according to an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of mutual positioning and acquisition of resource data between multiple chains. The method can be executed by a resource processing device of a blockchain, and the device can be implemented by means of hardware and/or software, and can be configured in an electronic device, and the electronic device can be a resource analysis system. Referring to Figure 1, the method is applied to a resource parsing system, and the method specifically includes the following:

S110、获取链资源处理请求。S110. Obtain a chain resource processing request.

其中,链资源处理请求可以是跨链获取数据资源、查询域名或查询权限等对信息进行处理的请求。链资源处理请求可以由任意跨链资源使用者直接发起,例如,链资源处理请求的发起方可以是区块链节点。The chain resource processing request may be a request for processing information such as cross-chain acquisition of data resources, query of domain names, or query authority. The chain resource processing request can be directly initiated by any cross-chain resource user. For example, the initiator of the chain resource processing request can be a blockchain node.

在一个可选实施例中,获取链资源处理请求包括:获取区块链节点发起的链资源处理请求;其中,链资源处理请求基于区块链客户端发起的事务请求而产生。In an optional embodiment, acquiring a chain resource processing request includes: acquiring a chain resource processing request initiated by a blockchain node; wherein the chain resource processing request is generated based on a transaction request initiated by a blockchain client.

示例性的,跨链资源使用者可以根据实际需求,通过区块链客户端发起跨链资源获取或资源处理等事务请求,并将该事务请求作为链资源处理请求发送至资源解析系统。区块链节点中可配置有资源解析系统的访问地址,从而可向资源解析系统直接发起链资源处理请求。Exemplarily, the cross-chain resource user can initiate transaction requests such as cross-chain resource acquisition or resource processing through the blockchain client according to actual needs, and send the transaction request to the resource resolution system as a chain resource processing request. The access address of the resource resolution system can be configured in the blockchain node, so that the chain resource processing request can be directly initiated to the resource resolution system.

本可选实施例通过获取基于区块链客户端发起的事务请求,得到链资源处理请求的方式,实现了区块链上的跨链资源使用者对链资源获取等相关请求的直接发起,提高了链上跨链资源使用者的便利性。In this optional embodiment, by obtaining the transaction request initiated by the blockchain client, the method of obtaining the chain resource processing request realizes that the cross-chain resource user on the blockchain directly initiates the chain resource acquisition and other related requests, and improves the It improves the convenience of users of cross-chain resources on the chain.

S120、根据链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。S120. According to the chain resource processing request, based on the information of the resource data stored in the resource storage network, perform resource information query to determine the resource information.

其中,资源存储网络可以为去中心化存储网络,例如,资源存储网络可以为基于区块链技术实现的去中心化存储网络。资源数据可以为区块链网络中提供的可访问资源,资源信息可以为可访问资源的关联信息。The resource storage network may be a decentralized storage network, for example, the resource storage network may be a decentralized storage network based on blockchain technology. The resource data can be the accessible resources provided in the blockchain network, and the resource information can be the associated information of the accessible resources.

示例性的,资源解析系统可以根据链资源处理请求,向资源存储网络发起资源信息的获取请求;资源存储网络接收到资源信息的获取请求后,根据获取请求,基于网络中存储的资源数据的信息,进行资源信息查询,从而确定与获取请求对应的资源信息。Exemplarily, the resource analysis system can process the request according to the chain resource, and initiate a resource information acquisition request to the resource storage network; after the resource storage network receives the resource information acquisition request, according to the acquisition request, based on the information of the resource data stored in the network. , to query the resource information to determine the resource information corresponding to the acquisition request.

可以理解的是,资源存储网络可以是基于区块链技术实现的区块链网络。因此,资源解析系统可以通过向资源存储网络发起事务请求的方式获取资源信息。从而既保证资源解析系统能够可靠、无篡改的存储资源数据的信息,也可保证对资源信息的查询处理等操作是可靠的。It can be understood that the resource storage network can be a blockchain network implemented based on blockchain technology. Therefore, the resource resolution system can obtain resource information by initiating a transaction request to the resource storage network. Therefore, it can not only ensure that the resource analysis system can store the information of resource data reliably and without tampering, but also ensure that operations such as query processing of resource information are reliable.

在一个可选实施例中,根据链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据链资源处理请求,产生资源信息处理事务请求;将资源信息处理事务请求向资源存储网络发起,以请求资源存储网络处理资源信息处理事务请求,并反馈资源信息;其中,资源存储网络是基于区块链技术实现的区块链网络。In an optional embodiment, according to the chain resource processing request, based on the information of the resource data stored in the resource storage network, performing a resource information query to determine the resource information includes: generating a resource information processing transaction request according to the chain resource processing request; The resource information processing transaction request is initiated to the resource storage network to request the resource storage network to process the resource information processing transaction request, and to feed back the resource information; wherein, the resource storage network is a blockchain network implemented based on blockchain technology.

其中,资源信息处理事务请求可以是由资源解析系统对链资源处理请求进行请求解析或转换后得到的,用于向区块链网络发起的事务请求。The resource information processing transaction request may be obtained by request analysis or conversion of the chain resource processing request by the resource analysis system, and is used for the transaction request initiated to the blockchain network.

示例性的,若资源存储网络为基于区块链技术实现的区块链网络,则资源解析系统在获取到资源处理请求后,对资源处理请求进行解析或转换,得到资源信息处理事务请求;资源解析系统向资源存储网络发起资源信息处理事务请求,资源存储网络在获取到资源信息处理事务请求后,基于网络中存储的资源数据的信息,进行资源信息查询,从而确定资源信息。Exemplarily, if the resource storage network is a blockchain network implemented based on blockchain technology, the resource parsing system parses or converts the resource processing request after obtaining the resource processing request, and obtains the resource information processing transaction request; The parsing system initiates a resource information processing transaction request to the resource storage network. After acquiring the resource information processing transaction request, the resource storage network performs resource information query based on the information of the resource data stored in the network to determine the resource information.

本可选实施例,资源解析系统可装配有资源存储网络的区块链客户端,从而通过根据链资源处理请求,产生资源信息处理事务请求,并向资源存储网络发起资源信息处理事务请求的方式,实现了对基于区块链技术实现的资源存储网络的事务请求的发起,从而实现了对基于区块链技术实现的资源存储网络生成的资源信息的获取。In this optional embodiment, the resource analysis system may be equipped with a blockchain client of the resource storage network, so as to generate a resource information processing transaction request by processing the request according to the chain resource, and initiate a resource information processing transaction request to the resource storage network. , which realizes the initiation of transaction requests for the resource storage network based on the blockchain technology, thereby realizing the acquisition of resource information generated by the resource storage network based on the blockchain technology.

S130、基于资源信息响应链资源处理请求。S130, responding to the chain resource processing request based on the resource information.

示例性的,资源解析系统可以在获取到资源存储系统确定的资源信息后,将资源信息反馈至链资源处理请求的发起方。Exemplarily, after acquiring the resource information determined by the resource storage system, the resource resolution system may feed back the resource information to the initiator of the chain resource processing request.

在一个可选实施例中,资源解析系统可以基于区块链客户端发起事务请求,从而将资源信息反馈至跨链资源使用者的所属区块链节点。或者,可以直接将资源信息反馈给链资源处理请求的发起方。In an optional embodiment, the resource analysis system may initiate a transaction request based on the blockchain client, thereby feeding back resource information to the blockchain node to which the cross-chain resource user belongs. Alternatively, the resource information can be directly fed back to the initiator of the chain resource processing request.

本公开实施例方案通过根据获取的链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,从而确定资源信息,并基于资源信息响应链资源处理请求。上述方案由去中心化存储网络对多链数据资源进行维护和管理,通过资源解析系统从去中心化存储网络中获取资源信息,并反馈给跨链资源使用者,实现了多链之间的数据资源的相互定位和获取;由去中心化存储网络对多链的数据资源进行存储和维护,能够有效防止数据资源被篡改,且能维持更新;本公开的技术方案通用性强、安全可靠性高。The solutions of the embodiments of the present disclosure determine resource information by querying the resource information based on the information of the resource data stored in the resource storage network according to the obtained chain resource processing request, and responding to the chain resource processing request based on the resource information. The above scheme maintains and manages multi-chain data resources by the decentralized storage network, obtains resource information from the decentralized storage network through the resource analysis system, and feeds it back to the cross-chain resource users, realizing the data between multiple chains. Mutual positioning and acquisition of resources; multi-chain data resources are stored and maintained by a decentralized storage network, which can effectively prevent data resources from being tampered with and can be maintained and updated; the technical solution disclosed in the present invention has strong versatility and high security and reliability .

在上述各技术方案的基础上,本公开还提供了一个可选实施例,在该实施例中,对资源信息的确定过程进行优化,以实现根据不同的对链资源处理请求进行处理的方式,确定资源信息。需要说明的是,在本公开实施例中未详述部分,可参见其他实施例中的相关表述,在此不再赘述。On the basis of the above technical solutions, the present disclosure also provides an optional embodiment, in this embodiment, the determination process of resource information is optimized, so as to realize the processing of chain resource processing requests according to different methods, Determine resource information. It should be noted that, for the parts that are not described in detail in the embodiments of the present disclosure, reference may be made to related expressions in other embodiments, and details are not described herein again.

参见图2所示的一种区块链的资源处理方法,包括:Referring to a resource processing method of a blockchain shown in Figure 2, it includes:

S210、获取链资源处理请求。S210. Obtain the chain resource processing request.

S220、通过资源解析系统中的域名解析器,根据链资源处理请求确定目标域名服务器。S220: Determine the target domain name server according to the chain resource processing request through the domain name resolver in the resource resolution system.

其中,域名解析器可以用于对域名进行解析并转换成IP(Internet Protocol,网际互连协议)地址,域名解析器的地址可以预先在区块链节点中进行注册,以供后续区块链节点能够根据预先注册的域名解析器的地址向域名解析器发起链资源处理请求。因此,区块链节点中可以部署有至少一个域名解析器的地址。Among them, the domain name resolver can be used to parse the domain name and convert it into an IP (Internet Protocol, Internet Protocol) address, and the address of the domain name resolver can be pre-registered in the blockchain node for subsequent blockchain nodes. A chain resource processing request can be initiated to the domain name resolver according to the address of the pre-registered domain name resolver. Therefore, the address of at least one domain name resolver can be deployed in the blockchain node.

域名解析器可以管理两类信息,第一类可以为请求数据及请求对应的状态信息,第二类可以为开放查询权限的域名服务器。其中,请求数据可以包括正在查询的域名、节点地址和资源名称等。状态信息可以是查询状态,例如可以包括查询中、查询失败和查询成功等。The domain name resolver can manage two types of information, the first type can be the request data and the status information corresponding to the request, and the second type can be the domain name server with open query authority. The request data may include the domain name, node address and resource name being queried. The status information may be the query status, for example, may include querying, querying failed, querying successful, and the like.

其中,域名服务器可以是负责管理包括域名空间和资源信息记录的数据库。该数据库可以被划分成多个称为区域(zone)的部分,每个域名服务器可以存储一个或多个区域。域名服务器收到资源信息处理请求后,通过检索本地的区域中的数据来给出响应结果。The domain name server may be a database responsible for managing the domain name space and resource information records. The database can be divided into sections called zones, and each domain name server can store one or more zones. After the domain name server receives the resource information processing request, it retrieves the data in the local area to give the response result.

可以理解的是,资源存储网络可以按区域将资源数据或资源信息授权给域名服务器。其中,区域的划分方式例如可以是按照国家地区划分;也可以是按照城市区域划分,如:A市区域或B市区域;还可以按照企业划分,例如,A企业对应一台域名服务器,B企业对应一台域名服务器等。本实施例对区域的划分方式不作限定。把划分后的区域授权给区域服务器后,即可通过该区域服务器查询划分区域内的数据资源的定位等相关数据。It can be understood that the resource storage network can authorize the resource data or resource information to the domain name server by region. Among them, the division method of regions may be, for example, by country or region; or by city area, such as: A city area or B city area; or by enterprise, for example, A company corresponds to a domain name server, and B company corresponds to a domain name server. Corresponding to a domain name server, etc. This embodiment does not limit the division manner of the area. After the divided area is authorized to the area server, the relevant data such as the location of the data resources in the divided area can be queried through the area server.

可以理解的是,为增强域名服务器的健壮性,可以提升域名服务器存储区域的冗余度,即多个不同的域名服务器可以存储相同的区域,从而使得多个域名服务器均能够对涉及目标区域的查询做出响应。It can be understood that in order to enhance the robustness of the domain name server, the redundancy of the storage area of the domain name server can be improved, that is, multiple different domain name servers can store the same area, so that multiple domain name servers can query response.

为实现域名服务器的负载均衡,当某台域名服务器包含的域名空间和资源记录的数据库过于庞大时,为提升效率,可以将其划分为多个区域,每个区域彼此独立,不存在重合的内容。然后将部分区域传输给其它的域名服务器来实现负载均衡。In order to achieve load balancing of domain name servers, when a domain name server contains a large database of domain name space and resource records, in order to improve efficiency, it can be divided into multiple areas, each area is independent of each other, and there is no overlapping content. . Then transfer some areas to other domain name servers to achieve load balancing.

为了提升管理效率,也可以将多台域名服务器进行合并,对这些域名服务器所存储的区域进行去重后,统一集中到单台域名服务器中进行存储和管理。In order to improve management efficiency, multiple domain name servers can also be merged, and the areas stored by these domain name servers can be de-duplicated, and then centralized in a single domain name server for storage and management.

需要说明的是,在域名解析器向域名服务器发起资源信息处理请求之前,需要获取到至少一台具有访问权限的域名服务器。其中,目标域名服务器可以是域名解析器从获取到的至少一台具有访问权限的域名服务器中,任意选取的一台或多台域名服务器。域名解析器对目标域名服务器的选取方式可以是采用随机选取规则随机选取域名服务器,也可以是优先访问离自己物理距离较近的域名服务器,还可以是访问延迟最低的域名服务器等。It should be noted that, before the domain name resolver initiates a resource information processing request to the domain name server, at least one domain name server with access rights needs to be obtained. The target domain name server may be one or more domain name servers arbitrarily selected by the domain name resolver from at least one domain name server with access authority obtained. The domain name resolver selects the target domain name server by randomly selecting the domain name server according to the random selection rule, or by preferentially accessing the domain name server with a closer physical distance to itself, or by the domain name server with the lowest access delay.

在一个可选实施例中,通过域名解析器,根据链资源处理请求确定目标域名服务器包括:通过域名解析器,根据链资源处理请求,在域名解析器已发现的域名服务器中,确定目标域名服务器。In an optional embodiment, determining the target domain name server according to the chain resource processing request by the domain name resolver includes: using the domain name resolver to process the request according to the chain resource, and determining the target domain name server among the domain name servers discovered by the domain name resolver .

其中,已发现的域名服务器可以是在域名解析器处理请求过程中,逐步累计确定的至少一台可被访问的域名服务器。Wherein, the discovered domain name server may be at least one accessible domain name server that is gradually accumulated and determined during the process of processing the request by the domain name resolver.

可选的,域名解析器向域名服务器发起请求的方式可以是域名解析器会对发起方发起的链资源处理请求进行分析,如果未查询到与链资源处理请求对应的资源信息,或者资源信息不够完整,区域解析器会将链资源处理请求转换成域名服务器可以解析的规范请求,查找开放查询权限的域名服务器,并向其发起请求。Optionally, the way that the domain name resolver initiates the request to the domain name server may be that the domain name resolver analyzes the chain resource processing request initiated by the initiator. If the resource information corresponding to the chain resource processing request is not queried, or the resource information is insufficient Complete, the zone resolver will convert the chain resource processing request into a canonical request that the domain name server can parse, find the domain name server with open query authority, and initiate a request to it.

S230、通过域名解析器,向目标域名服务器发起资源信息处理请求;其中,资源信息处理请求用于请求目标域名服务器,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。S230, through the domain name resolver, initiate a resource information processing request to the target domain name server; wherein, the resource information processing request is used to request the target domain name server to query the resource information based on the information of the resource data stored in the resource storage network to determine the resource information.

示例性的,域名解析器可以直接向目标域名服务器发起资源信息处理请求,也可以将资源信息处理请求进行广播,以供目标域名服务器监听到资源信息处理请求后获取。Exemplarily, the domain name resolver may directly initiate a resource information processing request to the target domain name server, or may broadcast the resource information processing request for the target domain name server to obtain after monitoring the resource information processing request.

可以理解的是,目标域名服务器在无法对资源信息处理请求进行响应时,可以向域名解析器反馈资源解析系统中,域名解析器未发现的其他的域名服务器。需要说明的是,在一台新的域名服务器加入至资源解析系统时,需要获取到至少一个域名服务器的地址,从而建立关联关系。It can be understood that when the target domain name server cannot respond to the resource information processing request, it can feed back to the domain name resolver other domain name servers that are not found by the domain name resolver in the resource resolution system. It should be noted that, when a new domain name server is added to the resource resolution system, the address of at least one domain name server needs to be obtained, so as to establish an association relationship.

在一个可选实施例中,接收目标域名服务器反馈的资源信息之前,还包括:通过域名解析器,如果接收到目标域名服务器反馈的可选域名服务器连接地址,则根据可选域名服务器连接地址与对应的域名服务器建立连接,并更新作为新的目标域名服务器,继续执行发起资源信息处理请求的操作,直至接收到资源信息或失败结果;其中,链资源的地址空间划分为多个域,每个域名服务器用于查询一个或多个域中资源信息。In an optional embodiment, before receiving the resource information fed back by the target domain name server, the method further includes: by using the domain name resolver, if the optional domain name server connection address fed back by the target domain name server is received, according to the optional domain name server connection address and The corresponding domain name server establishes a connection, and updates it as a new target domain name server, and continues to perform the operation of initiating the resource information processing request until the resource information or failure result is received; wherein, the address space of the chain resource is divided into multiple domains, each Domain name servers are used to query resource information in one or more domains.

其中,可选域名服务器可以是与目标域名服务器具有关联关系的,且域名解析器未能主动发现的域名服务器。The optional domain name server may be a domain name server that is associated with the target domain name server and that the domain name resolver fails to actively discover.

示例性的,在域名解析器向目标域名服务器发送资源信息处理请求后,若目标域名服务器的本地缓存中没有对应的资源信息,或者无法响应该资源信息处理请求时,目标域名服务器可以查询与自身具有关联关系的其他域名服务器,并从其他域名服务器中确定可选域名服务器,将可选域名服务器连接地址发送给域名解析器。域名解析器根据可选域名服务器连接地址与对应的域名服务器建立连接,并更新作为新的目标域名服务器,继续执行发起资源信息处理请求的操作,直至接收到资源信息或失败结果。Exemplarily, after the domain name resolver sends a resource information processing request to the target domain name server, if there is no corresponding resource information in the local cache of the target domain name server, or if the resource information processing request cannot be responded to, the target domain name server can query and Other domain name servers with associated relationship, and determine the optional domain name server from other domain name servers, and send the optional domain name server connection address to the domain name resolver. The domain name resolver establishes a connection with the corresponding domain name server according to the optional domain name server connection address, and updates it as a new target domain name server, and continues to perform the operation of initiating the resource information processing request until the resource information or failure result is received.

可选的,目标域名服务器确定可选域名服务器的方式可以是通过DHT(Distributed Hash Table,分布式哈希表)技术,分布式哈希表来实现对数据资源的递归定位与查询;也可以通过选择性的记录相临近的其它域名服务器所存储的区域的摘要信息来实现。Optionally, the way for the target domain name server to determine the optional domain name server may be through DHT (Distributed Hash Table, distributed hash table) technology, distributed hash table to achieve recursive location and query of data resources; It is implemented by selectively recording the summary information of the zone stored by other neighboring domain name servers.

链资源的地址空间划分为多个区域(zone),每个域名服务器用于查询一个或多个区域中资源信息;域名服务器收到资源信息处理请求后,可以通过检索本地区域中的数据来给出响应结果。The address space of chain resources is divided into multiple zones, and each domain name server is used to query resource information in one or more zones; after the domain name server receives the resource information processing request, it can retrieve the data in the local zone to give Response result.

本可选实施例通过接收目标域名服务器反馈的可选域名服务器连接地址,与可选域名服务器建立连接,实现了域名解析器对可访问到的域名服务器的不断扩充,为域名解析器提供更多的可选空间,从而提高了域名解析器和域名服务器对请求进行处理的效率。This optional embodiment establishes a connection with the optional domain name server by receiving the connection address of the optional domain name server fed back by the target domain name server, so as to realize the continuous expansion of the accessible domain name servers by the domain name resolver, and provide the domain name resolver with more The optional space of the domain name resolver and the domain name server improves the processing efficiency of the request.

可以理解的是,资源解析系统中可以包括至少一台域名解析器,在一台新的域名解析器加入至资源解析系统时,需要获取资源解析系统中至少一个域名解析器的地址,从而建立关联关系。因此,当区块链节点向域名解析器发起链资源处理请求时,如果通过域名解析器确定资源信息查询失败,则确定其他的可选域名解析器。It can be understood that the resource resolution system may include at least one domain name resolver. When a new domain name resolver is added to the resource resolution system, it is necessary to obtain the address of at least one domain name resolver in the resource resolution system to establish an association relationship. . Therefore, when the blockchain node initiates a chain resource processing request to the domain name resolver, if it is determined by the domain name resolver that the resource information query fails, other optional domain name resolvers are determined.

在一个可选实施例中,根据链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询之后,还包括:如果通过域名解析器,确定资源信息查询失败,则确定其他的可选域名解析器,并将可选域名解析器的连接地址反馈给链资源处理请求的发起方,以供发起方向可选域名解析器重新发起链资源处理请求。In an optional embodiment, after the resource information query is performed based on the information of the resource data stored in the resource storage network according to the chain resource processing request, the method further includes: if it is determined that the resource information query fails through the domain name resolver, determining other The optional domain name resolver, and feed back the connection address of the optional domain name resolver to the initiator of the chain resource processing request, so that the initiator can re-initiate the chain resource processing request to the optional domain name resolver.

其中,可选域名解析器可以是资源解析系统部署的与当前处理请求的域名解析器具有关联关系的其他可访问的域名解析器。The optional domain name resolver may be other accessible domain name resolvers deployed by the resource resolution system and having an associated relationship with the domain name resolver currently processing the request.

示例性的,如果域名解析器根据链资源处理请求,对资源信息的查询失败,则可以确定其他的可选域名解析服务器,并将可选域名解析器的连接地址反馈给链资源处理请求的发起方,从而使得发起方重新根据可选域名解析器发起链资源处理请求。此外,链资源请求的发起方还可以对可选域名解析器的连接地址进行存储,以便后续能够根据可选域名解析器发起请求。Exemplarily, if the domain name resolver processes the request according to the chain resource and fails to query the resource information, other optional domain name resolution servers can be determined, and the connection address of the optional domain name resolver is fed back to the initiator of the chain resource processing request. so that the initiator can re-initiate the chain resource processing request according to the optional domain name resolver. In addition, the initiator of the chain resource request can also store the connection address of the optional domain name resolver, so that subsequent requests can be initiated according to the optional domain name resolver.

本可选实施例通过确定其他的可选域名解析器的连接地址,由请求发起方与可选域名解析器建立连接,实现了请求发起方可以对可访问到的域名解析器的不断扩充,为请求发起方提供更多的可选空间,从而提高了域名解析器和域名服务器对请求进行处理的效率。In this optional embodiment, by determining the connection addresses of other optional domain name resolvers, the request initiator establishes a connection with the optional domain name resolver, so that the request initiator can continuously expand the accessible domain name resolvers, which is The request initiator provides more optional space, thereby improving the efficiency of the request processing by the domain name resolver and the domain name server.

可以理解的是,为提高请求被应答的可能性,减小请求耗用的时间,避免过量请求导致域名服务器过载。如果域名解析器需要访问域名服务器时,对于每个要处理的链资源处理请求,进行状态字段的标记。域名解析器在响应链资源处理请求时生成请求对应的超时时间,在域名解析器和域名服务器在处理资源信息处理请求时,如果处理时间在超时时间到达前未完成,则会强制结束并返回对应的错误信息给发起方。It can be understood that, in order to increase the possibility of the request being answered, reduce the time consumed by the request, and avoid overloading the domain name server due to excessive requests. If the domain name resolver needs to access the domain name server, the status field is marked for each chain resource processing request to be processed. The domain name resolver generates a timeout period corresponding to the request when responding to the chain resource processing request. When the domain name resolver and the domain name server process the resource information processing request, if the processing time is not completed before the timeout period arrives, it will be forced to end and the corresponding response will be returned. error message to the initiator.

可选的,为提高域名解析器对域名服务器的选取效率,可以对资源解析系统中的域名服务器进行预先分组,由域名解析器对资源信息处理请求进行广播,每次广播请求时只选择其中一组,从而提高选择服务器的效率。域名服务器执行查询的过程中,当查询到结果或者异常终止时,会将查询结果或查询到可访问的可选域名服务器返回给资源解析器。Optionally, in order to improve the selection efficiency of the domain name server by the domain name resolver, the domain name servers in the resource resolution system can be pre-grouped, and the domain name resolver broadcasts the resource information processing request, and only one of them is selected for each broadcast request. group, thereby improving the efficiency of server selection. In the process of query execution by the domain name server, when the query result is found or abnormally terminated, the query result or the accessible optional domain name server will be returned to the resource resolver.

S240、通过域名解析器,接收目标域名服务器反馈的资源信息。S240, through the domain name resolver, receive the resource information fed back by the target domain name server.

在一个具体实施例中,域名服务器在获取到链资源处理请求后,在本地缓存中查看是否存在与链资源处理请求相对应的资源信息。若存在,则将本地缓存中的资源信息直接反馈至发起方;若不存在,则采用一定的规则,如随机选取规则,从可访问的域名服务器集合中选取至少一个域名服务器,并向选中的域名服务器发送资源信息处理请求,直到存在一个域名服务器反馈响应结果。资源解析器分析该响应结果,如果响应成功,则将响应的资源信息反馈至发起方。如果该响应包含其他授权的域名服务器,则缓存域名服务器相关信息。如果响应包含域名服务器授权错误、服务器故障或者其他异常,从本地缓存信息中删除该域名服务器信息,并重新选取域名服务器。如果所挑选的域名服务器均无法处理该资源信息处理请求,且总重试次数未到达阈值上限,则从域名服务器集合中选取其他域名服务器再次发起请求,若总重试次数达到阈值上限,则向发起方返回错误。In a specific embodiment, after acquiring the chain resource processing request, the domain name server checks whether there is resource information corresponding to the chain resource processing request in the local cache. If it exists, the resource information in the local cache will be directly fed back to the initiator; if it does not exist, certain rules, such as random selection rules, will select at least one domain name server from the set of accessible domain name servers, and report to the selected one. The domain name server sends a resource information processing request until a domain name server returns a response result. The resource parser analyzes the response result, and if the response is successful, feeds back the resource information of the response to the initiator. If the response contains other authorized nameservers, cache nameserver related information. If the response contains a domain name server authorization error, a server failure, or other anomalies, delete the domain name server information from the locally cached information, and re-select the domain name server. If none of the selected domain name servers can process the resource information processing request, and the total number of retries does not reach the upper limit of the threshold, other domain name servers are selected from the set of domain name servers to initiate the request again. If the total number of retries reaches the upper limit of the threshold, the request will be sent to the The initiator returned an error.

在一个可选实施例中,通过域名解析器,接收目标域名服务器反馈的资源信息之后,还包括:通过域名解析器,对资源信息进行下述至少一项检查:合法性检查、有效性检查和匹配性检查。In an optional embodiment, after receiving the resource information fed back by the target domain name server through the domain name resolver, the method further includes: through the domain name resolver, performing at least one of the following checks on the resource information: validity check, validity check and Consistency check.

域名解析器对资源信息的合法性的检查可以包括:响应结果中需要包含域名服务器的权威身份信息,且需要验证通过。同时响应结果的数据结构体需要符合表述规范。The check of the legitimacy of the resource information by the domain name resolver may include: the response result needs to contain the authoritative identity information of the domain name server, and needs to pass the verification. At the same time, the data structure of the response result needs to conform to the representation specification.

域名解析器对资源信息的有效性的检查可以包括:如果响应到达时间超过了发送请求时设置的超时时间,应当抛弃这个响应结果。The check of the validity of the resource information by the domain name resolver may include: if the response arrival time exceeds the timeout time set when sending the request, the response result should be discarded.

域名解析器对资源信息的有效性的检查可以包括:对每个请求生成唯一的ID(Identity document,身份标识号),并在发送的请求中包含该ID。域名服务器返回的响应结果中也应包含该ID。域名解析器负责确认响应结果中的的ID与请求的ID是否匹配,从而验证资源信息的有效性。The checking of the validity of the resource information by the domain name resolver may include: generating a unique ID (Identity document, identification number) for each request, and including the ID in the sent request. This ID should also be included in the response returned by the domain name server. The domain name resolver is responsible for confirming whether the ID in the response result matches the requested ID, so as to verify the validity of the resource information.

本可选实施例通过对资源信息进行合法性、有效性和匹配性检查,提高了获取到的资源信息的安全性,避免了获取到的资源信息存在安全问题而对请求发起方造成损失情况的方生。This optional embodiment improves the security of the acquired resource information by checking the legality, validity and matching of the resource information, and avoids the situation that the acquired resource information has security problems and causes losses to the requesting party. Fang Sheng.

S250、基于资源信息响应链资源处理请求。S250. Respond to the chain resource processing request based on the resource information.

可以理解的是,域名解析器接收到链资源处理请求后,根据链资源处理请求确定目标域名服务器,并向目标域名服务器发起资源信息处理请求,由目标域名服务器基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。在上述过程中,域名解析器可能需要连续访问多个域名服务器,才能够找到能够处理资源信息处理请求的目标域名服务器。此外,目标域名服务器同样需要将该资源信息处理请求发至资源存储网络进行处理并反馈资源信息。然而,上述过程中增加了域名解析器和域名服务器的负载,且转发请求和反馈结果的过程降低了对资源信息的获取效率,从而降低了资源解析系统的性能。因此,在对链资源处理请求进行处理的过程中,可以对资源存储网络反馈的资源信息进行本地存储。It can be understood that after receiving the chain resource processing request, the domain name resolver determines the target domain name server according to the chain resource processing request, and initiates a resource information processing request to the target domain name server. The target domain name server stores the resource data stored in the network based on the resource data. information, perform resource information query to determine resource information. In the above process, the domain name resolver may need to continuously access multiple domain name servers in order to find a target domain name server capable of processing the resource information processing request. In addition, the target domain name server also needs to send the resource information processing request to the resource storage network for processing and feedback the resource information. However, the above process increases the load of the domain name resolver and the domain name server, and the process of forwarding requests and feeding back results reduces the efficiency of obtaining resource information, thereby reducing the performance of the resource resolution system. Therefore, in the process of processing the chain resource processing request, the resource information fed back by the resource storage network can be locally stored.

在一个可选实施例中,根据链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据链资源处理请求,在本地缓存中进行资源信息的查询;如果在本地缓存中查询到资源信息,则确定为资源信息;如果在本地缓存中未查询到资源信息,则向资源存储网络发起资源信息处理请求,以进行资源信息查询,并确定资源信息。In an optional embodiment, processing the request according to the chain resource and based on the information of the resource data stored in the resource storage network, performing a resource information query to determine the resource information includes: processing the request according to the chain resource, and performing resource information in a local cache If the resource information is queried in the local cache, it is determined to be resource information; if the resource information is not queried in the local cache, a resource information processing request is initiated to the resource storage network to query the resource information and determine the resource. information.

资源解析系统可以将资源存储网络反馈的资源信息在本地进行存储。示例性的,域名服务器和/或域名解析器可以将获取的资源信息在本地缓存。在获取到资源信息处理请求时,域名解析器在本地缓存中进行资源信息的查询;若域名解析器查询到与资源信息处理请求对应的资源信息,则将该资源信息直接反馈至发起方;若域名解析器未查询到与资源信息处理请求对应的资源信息,则向域名服务器发送资源信息处理请求。The resource resolution system can store the resource information fed back by the resource storage network locally. Exemplarily, the domain name server and/or the domain name resolver may locally cache the acquired resource information. When the resource information processing request is obtained, the domain name resolver queries the resource information in the local cache; if the domain name resolver finds the resource information corresponding to the resource information processing request, the resource information is directly fed back to the initiator; If the domain name resolver fails to find the resource information corresponding to the resource information processing request, it sends the resource information processing request to the domain name server.

域名服务器根据资源信息处理请求,在本地缓存中进行查询,若域名服务器查询到与资源信息处理请求对应的资源信息,则将该资源信息发送至域名解析器,由域名解析器将资源信息反馈至发起方;若域名服务器未查询到与资源信息处理请求对应的资源信息,则向资源存储网络发送资源信息处理请求,以请求资源存储网络对资源信息处理请求进行处理,并反馈资源信息。The domain name server processes the request according to the resource information and performs a query in the local cache. If the domain name server queries the resource information corresponding to the resource information processing request, it sends the resource information to the domain name resolver, and the domain name resolver feeds back the resource information to The initiator; if the domain name server does not find the resource information corresponding to the resource information processing request, it sends the resource information processing request to the resource storage network to request the resource storage network to process the resource information processing request and feed back the resource information.

需要说明的是,资源解析系统对资源信息进行缓存的数据容量较小,但随着缓存的资源信息量不断增加,缓存空间被写满是不可避免的。因此,可以采取一定的更新或淘汰机制,将缓存的资源信息进行定期清除,从而为新获取的资源信息预留出更多的存储空间。It should be noted that the data capacity of the resource information cached by the resource resolution system is small, but as the amount of cached resource information continues to increase, it is inevitable that the cache space will be filled. Therefore, a certain update or elimination mechanism may be adopted to periodically clear the cached resource information, thereby reserving more storage space for newly acquired resource information.

示例性的,可以预先设定更新时间,对更新时间内的资源信息进行保留,对更新时间外的资源信息进行清除。例如,更新时间可以是7天。即,可以定期对本地缓存中超过更新时间7天的资源数据进行清除。Exemplarily, the update time may be preset, the resource information within the update time is retained, and the resource information outside the update time is cleared. For example, the update time can be 7 days. That is, the resource data in the local cache that exceeds the update time for 7 days can be periodically cleared.

本可选实施例通过对获取的资源信息在本地中进行缓存,根据链资源处理请求,可以在本地缓存中进行资源信息的查询,如果在域名解析器和域名服务器的本地缓存中均查询不到,在向资源存储网络发起请求,大幅度提高了对资源信息处理请求的响应速度,减轻了域名解析器和域名服务器的负载,提高了对资源信息的获取效率,从而提高了资源解析系统的性能。In this optional embodiment, the obtained resource information is cached locally, and the resource information can be queried in the local cache according to the chain resource processing request. If the local cache of the domain name resolver and the domain name server cannot be queried , when initiating a request to the resource storage network, the response speed to the resource information processing request is greatly improved, the load of the domain name resolver and the domain name server is reduced, the efficiency of obtaining resource information is improved, and the performance of the resource resolution system is improved. .

本公开实施例通过资源解析系统中的域名解析器,根据链资源处理请求确定目标域名服务器;通过域名解析器,向目标域名服务器发起资源信息处理请求; 通过域名解析器,接收目标域名服务器反馈的资源信息。上述方案通过采用资源解析系统中的域名解析器和/或域名服务器,对链资源处理请求进行处理的方式,提高了对发起方发起的跨链访问数据请求的效率,相比较于由区块链网络直接查询的效率更高。In the embodiment of the present disclosure, the domain name resolver in the resource resolution system determines the target domain name server according to the chain resource processing request; the domain name resolver initiates a resource information processing request to the target domain name server; and the domain name resolver receives feedback from the target domain name server. resource information. The above solution improves the efficiency of the cross-chain access data request initiated by the initiator by using the domain name resolver and/or the domain name server in the resource resolution system to process the chain resource processing request. Network direct query is more efficient.

可以理解的是,资源存储网络可以是基于区块链技术的去中心化存储网络,能够解决区块链空间域名和资源记录的去中心化存储问题。基于去中心化存储技术,能够保证区块链空间域名和资源记录的高可用性和真实性。It can be understood that the resource storage network can be a decentralized storage network based on blockchain technology, which can solve the problem of decentralized storage of domain names and resource records in the blockchain space. Based on decentralized storage technology, it can ensure the high availability and authenticity of blockchain space domain names and resource records.

需要说明的是,跨链资源发起方和提供方需要基于相同的跨链命名协议发起请求,统一的跨链命名协议作为区块链网络间跨链访问资源的互操作性基础。可以通过基于区块链技术的资源存储网络上的智能合约来对全局字典表进行增加和更新等操作。其它区块链节点通过该智能合约来发布资源信息。该全局字典表的实际数据存储于中心化的资源存储网络中。其中,全局字典表可以使用一个全局的编码表,用于区块链网络的定位,在全局声明区块链的属性,如框架类型,名称等用于实现数据互认的基础信息。It should be noted that the initiator and provider of cross-chain resources need to initiate requests based on the same cross-chain naming protocol, and the unified cross-chain naming protocol serves as the interoperability basis for cross-chain access resources between blockchain networks. The global dictionary table can be added and updated through smart contracts on the resource storage network based on blockchain technology. Other blockchain nodes publish resource information through this smart contract. The actual data of the global dictionary table is stored in the centralized resource storage network. Among them, the global dictionary table can use a global coding table for the positioning of the blockchain network, and declare the properties of the blockchain globally, such as frame type, name, etc., which are used to realize the basic information of mutual recognition of data.

在一个可选实施例中,资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;资源定位标识的字符串中包括域名;域名为待访问资源所在区块链节点所属域的域名,资源访问地址中包括待访问资源所在区块链节点的通信地址。In an optional embodiment, the resource information stored in the resource storage network includes: resource location data and resource permission data; the resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; the resource location identifier The string includes the domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located.

其中,链资源的资源定位标识可以是链资源在区块链网络中的定位标志,每个数据资源拥有全局唯一的链资源定位标志。链资源的资源定位标识与资源访问地址之间具有映射关系,可以通过链资源的资源定位标识获取到对应的资源访问地址。The resource location identifier of the chain resource may be the location identifier of the chain resource in the blockchain network, and each data resource has a globally unique location identifier of the chain resource. There is a mapping relationship between the resource location identifier of the chain resource and the resource access address, and the corresponding resource access address can be obtained through the resource location identifier of the chain resource.

其中,待访问资源可以是链资源发起方想要访问或获取的资源。资源权项数据可以包括具有访问链资源权限的区块链节点名称或标识等。The resource to be accessed may be a resource that the originator of the chain resource wants to access or acquire. The resource right item data may include the name or identifier of the blockchain node that has the right to access the chain resource, etc.

跨链资源访问涉及到不同链的数据资源的交互操作,资源定位标识用于实现对这些数据资源的统一定位。在多链构成的区块链网络中,每一条数据资源都有统一且唯一的资源访问地址,该地址与资源定位标识具有映射关系。资源访问地址的协议定义可以预先设定,例如,资源访问地址的协议定义可以为:[链的具体类型:][//链名][子链/侧链/平行链名][/合约名、方法名等参数信息]。Cross-chain resource access involves the interaction of data resources in different chains, and the resource location identifier is used to realize the unified location of these data resources. In a multi-chain blockchain network, each data resource has a unified and unique resource access address, which has a mapping relationship with the resource location identifier. The protocol definition of the resource access address can be preset. For example, the protocol definition of the resource access address can be: [specific type of chain:][//chain name][subchain/sidechain/parachain name][/contract name , method name and other parameter information].

其中,参数项可以包括:资源名称、资源执行参数、跨链请求发起方的账户公钥和跨链请求发起方的签名等。其中,资源执行参数可以包括区块链框架预留参数(默认值可以为default)、待访问资源的智能合约的合约名、待访问资源的智能合约的方法名和合约参数等。The parameter items may include: resource name, resource execution parameters, account public key of the initiator of the cross-chain request, signature of the initiator of the cross-chain request, and the like. The resource execution parameters may include blockchain framework reserved parameters (the default value may be default), the contract name of the smart contract of the resource to be accessed, the method name and contract parameters of the smart contract of the resource to be accessed, etc.

举例说明:假定有一个区块链网络使用名为Xuper的底层框架搭建,名字叫hello_chain。这个网络下面有一条子链/侧链/平行链叫child_chain。在这个child_chain上有一个使用wasm(webassembly)合约虚拟机才能执行的智能合约,智能合约名叫counter,作用为一个简单的计数器。该智能合约提供了两个方法,分别为increase和getNumber。调用increase方法,会使得每次将数值加1。而调用getNumber方法,会返回当前的数值。若存在区块链网络world_chain,想要跨链访问hello_chain网络上的子链child_chain上名为counter的计数器智能合约,并获取当前的数值。则按照之前预先定义的跨链协议生成的资源访问地址可以为:“xuper://hello_chain/child_chain/module=wasm&contract_name=counter&method_name=getNumber”。For example: Suppose there is a blockchain network built using the underlying framework named Xuper, named hello_chain. There is a child chain/sidechain/parachain under this network called child_chain. On this child_chain, there is a smart contract that can only be executed by the wasm (webassembly) contract virtual machine. The smart contract is called counter and acts as a simple counter. The smart contract provides two methods, namely increase and getNumber. Calling the increase method will cause the value to be incremented by 1 each time. And calling the getNumber method will return the current value. If there is a blockchain network world_chain, you want to cross-chain access to the counter smart contract named counter on the child chain child_chain on the hello_chain network, and get the current value. Then the resource access address generated according to the pre-defined cross-chain protocol can be: "xuper://hello_chain/child_chain/module=wasm&contract_name=counter&method_name=getNumber".

其中,xuper表示区块链框架预留参数,即访问的区块链类型为Xuper框架;hello_chain表示待访问资源的链名为hello_chain;child_chain表示待访问资源xuper链的子链名/侧链/平行链名为child_chain;module=wasm表示待访问资源为一个智能合约,且使用的虚拟机为wasm;contract_name=counter表示待访问资源的智能合约的合约名为counter;method_name=getNumber表示待访问资源的智能合约的方法名为getNumber。Among them, xuper represents the reserved parameters of the blockchain framework, that is, the type of blockchain to be accessed is Xuper framework; hello_chain represents the name of the chain of the resource to be accessed is hello_chain; child_chain represents the name of the child chain/sidechain/parallel of the xuper chain of the resource to be accessed The chain name is child_chain; module=wasm indicates that the resource to be accessed is a smart contract, and the virtual machine used is wasm; contract_name=counter indicates that the contract name of the smart contract of the resource to be accessed is counter; method_name=getNumber indicates the smart contract of the resource to be accessed The method of the contract is named getNumber.

在一个可选实施例中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。In an optional embodiment, the domain name space of the blockchain network includes multiple levels, and a tree-like structure is used for domain name storage. The nodes of the tree-like structure are used to store the labels of the corresponding level domain names. Corresponding to the data resources provided, the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure; the domain name labels at each level of the domain name space include, from top to bottom: blockchain architecture name, blockchain Name of the operator to which the network belongs, blockchain name, blockchain node name, and resource name.

其中,区块链网络的域名空间记录了树状结构的域名空间和与这些域名空间关联的数据资源。域名空间树的每个节点(包括叶子,本实施例对节点与叶子不加区别,统一称为“节点”)记录一条数据资源记录。其中,数据资源中可以包括资源类型、访问地址、访问协议、版本号、权限要求。例如,资源类型可以是使用的智能合约的类型,如使用wasm虚拟机的智能合约;访问地址中可以包括IP和端口号等;权限要求例如可以是智能合约中不同方法所对应的不同的权限要求。Among them, the domain name space of the blockchain network records the tree-structured domain name space and the data resources associated with these domain name spaces. Each node of the domain name space tree (including leaves, this embodiment makes no distinction between nodes and leaves, collectively referred to as "nodes") records a data resource record. The data resource may include resource type, access address, access protocol, version number, and permission requirements. For example, the resource type can be the type of the smart contract used, such as the smart contract using the wasm virtual machine; the access address can include IP and port numbers, etc.; the permission requirements can be, for example, different permission requirements corresponding to different methods in the smart contract .

每个节点用于存储对应层级域名的标签,非兄弟节点的标签可以相同,但兄弟节点的标签不同。其中,兄弟节点可以是具有相同父节点的节点。树状结构根节点的标签可以是空标签,即标签长度为零的标签。节点的完整域名是从当前节点到树结构的根路径沿途的各个标签的拼接。Each node is used to store the label of the corresponding hierarchical domain name. The labels of non-sibling nodes can be the same, but the labels of sibling nodes are different. Among them, sibling nodes can be nodes with the same parent node. The label of the root node of the tree structure can be an empty label, that is, a label with a label length of zero. The full domain name of a node is the concatenation of the labels along the path from the current node to the root of the tree structure.

示例性的,域名可以用任意大小写命名或保存,例如可以使用标记“A”生成节点,或使用标记“a”生成节点,但是二者不能作为兄弟标签。在生成完整域名时,可能需要拼接多个标签,此时不同标签可以采用标记符隔开,例如,标记符可以是圆点(“.”)。Exemplarily, the domain name can be named or saved in any case, for example, a node can be generated using the tag "A", or a node can be generated using the tag "a", but the two cannot be used as sibling tags. When generating a complete domain name, it may be necessary to splicing multiple tags. In this case, different tags can be separated by a marker, for example, the marker can be a dot (".").

其中,代表完整域名的字符串可以称为绝对域名。例如,绝对域名可以是“channel.xxxxx.xchannel.”。代表不完整域名的开始标签的字符串可以称为相对域名。例如,绝对域名“channel.xxxxx.xchannel.”中的“channel”可作为一个相对域名。如果某个域名被包含在另一个域名中,则前者是后者的子域名。例如,channel.xxxxx.xchannel是xxxxx.xchannel和xchannel的子域名。Among them, the string representing the complete domain name can be called an absolute domain name. For example, the absolute domain name can be "channel.xxxxx.xchannel.". A string representing the start tag of an incomplete domain name may be referred to as a relative domain name. For example, "channel" in the absolute domain name "channel.xxxxx.xchannel." can be used as a relative domain name. If a domain name is contained within another domain name, the former is a subdomain of the latter. For example, channel.xxxxx.xchannel is a subdomain of xxxxx.xchannel and xchannel.

需要说明的是,发起方所发起的链资源处理请求中的域名可以用标签序列来表示。每个标签可以为一个八位字符长度的字符串,域名的最大总长度被限制不超过255个标签。域名服务器和域名解析器可以采用不区分大小写的方式比较标签。It should be noted that the domain name in the chain resource processing request initiated by the initiator can be represented by a label sequence. Each tag can be an eight-character string, and the maximum total length of the domain name is limited to 255 tags. Nameservers and name resolvers can compare labels in a case-insensitive manner.

域名中可以采用任意大小写字符。但具有相同拼写、不同大小写的域名可以被看作为同一域名,域名的命名以字母开始,以字母或数字结束,中间的字符可以包括字母、数字和连字符等。对域名长度的限制可以是标签长度不大于63个字符。例如,下述字符串标识可以被用于在跨链请求中描述特定的区块链网络:CHANNEL.XXX.XCHANNEL。Any uppercase and lowercase characters can be used in the domain name. However, domain names with the same spelling and different capitalization can be regarded as the same domain name. The name of the domain name starts with a letter and ends with a letter or number, and the characters in the middle can include letters, numbers and hyphens. The limit on the length of the domain name can be that the length of the label is no more than 63 characters. For example, the following string identifier can be used to describe a specific blockchain network in a cross-chain request: CHANNEL.XXX.XCHANNEL.

可选的,本实施例对区块链网络的域名空间所使用的树状结构不做限定,即不限定使用某种特定的树状结构,或必须使用某种特定的方法在树状结构中定位标签,从而提升域名空间的通用性。Optionally, this embodiment does not limit the tree structure used in the domain name space of the blockchain network, that is, it does not limit the use of a specific tree structure, or a specific method must be used in the tree structure. Locate labels to increase the versatility of the domain name space.

其中,每个节点与区块链所提供的数据资源对应,即每个节点可以对应一个域名,每个域名可以与区块链所提供的数据资源相对应,每个数据资源可以对应一条资源记录,每个资源记录可以对应一个资源定位符。Among them, each node corresponds to the data resources provided by the blockchain, that is, each node can correspond to a domain name, each domain name can correspond to the data resources provided by the blockchain, and each data resource can correspond to a resource record , each resource record can correspond to a resource locator.

需要说明的是,域名服务器中可以缓存有关树状结构的域名空间的结构。域名服务器缓存了指定区块链网络的域名空间内的资源记录信息,并定时进行刷新。资源记录信息被存储在基于区块链技术的去中心化资源存储网络中。It should be noted that the domain name server may cache the structure of the domain name space related to the tree structure. The domain name server caches the resource record information in the domain name space of the specified blockchain network and refreshes it regularly. Resource record information is stored in a decentralized resource storage network based on blockchain technology.

在一个可选实施例中,资源查询请求会被域名解析器转发到域名服务器来触发响应。域名服务器可以对资源查询请求进行响应,或者给出发生错误的原因。发起方不会直接将请求发送给域名服务器,而是首先向域名解析器提出资源查询请求。域名解析器将根据某些查询条件,将请求转发给适合处理这些请求的域名服务器,或者给出发生错误的原因。举例说明,假设域名XXXX.XCHANNEL下存在多条链,CHAINX、CHAINY、CHAINZ,这三条链的查询请求可以分别由3台域名服务器ServerX、ServerY、ServerZ分别处理。因此,可以根据具体的链来进行转发对应的请求。例如针对CHAINX.XXXX.XCHANNEL的查询请求,可以根据域名中的“CHAINX”将请求发送给域名服务器ServerX进行处理。In an optional embodiment, the resource query request will be forwarded by the domain name resolver to the domain name server to trigger a response. Domain name servers can respond to resource query requests or give reasons for errors. The initiator does not directly send the request to the domain name server, but first makes a resource query request to the domain name resolver. Depending on certain query conditions, the name resolver will forward the request to a name server suitable for processing the request, or give the reason for the error. For example, assuming that there are multiple chains under the domain name XXXX.XCHANNEL, CHAINX, CHAINY, and CHAINZ, the query requests of these three chains can be processed by three domain name servers ServerX, ServerY, and ServerZ respectively. Therefore, the corresponding request can be forwarded according to a specific chain. For example, for a query request for CHAINX.XXXX.XCHANNEL, the request can be sent to the domain name server ServerX for processing according to "CHAINX" in the domain name.

在一个可选实施例中,区块链网络提供的可访问资源包括:区块链可支持服务和/或区块链可读数据;区块链可支持服务包括下述至少一项:智能合约,和智能合约中可访问的方法程序。In an optional embodiment, the accessible resources provided by the blockchain network include: blockchain-supportable services and/or blockchain-readable data; blockchain-supportable services include at least one of the following: smart contracts , and methods accessible in smart contracts.

可以理解的是,跨链资源发起方可以向资源解析系统发起获取链资源的链资源访问请求、查询域名的域名查询请求以及查询是否链资源访问权限的权限查询请求。It is understandable that the originator of the cross-chain resource can initiate a chain resource access request for obtaining chain resources, a domain name query request for querying a domain name, and a permission query request for querying whether the chain resource has access rights to the resource resolution system.

在一个可选实施例中,若链资源处理请求为链资源访问请求,则根据链资源访问请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据链资源访问请求中的待访问资源的资源定位标识,基于资源存储网络中存储的资源定位数据,进行访问地址查询,以确定资源访问地址;其中,资源访问地址表征待访问资源在区块链网络中的访问入口。In an optional embodiment, if the chain resource processing request is a chain resource access request, then according to the chain resource access request, based on the information of the resource data stored in the resource storage network, the resource information query is performed to determine the resource information including: The resource location identifier of the resource to be accessed in the chain resource access request, based on the resource location data stored in the resource storage network, the access address query is performed to determine the resource access address; wherein, the resource access address represents the resource to be accessed in the blockchain network. access entry in .

其中,链资源访问请求可以是发起方对区块链网络中的链资源的访问或获取请求。The chain resource access request may be an access or acquisition request of the initiator to the chain resource in the blockchain network.

其中,链资源访问请求中可以包括资源定位标识和访问参数,访问参数可以包括下述至少一项:资源名称、资源执行参数、发起方公钥和发起方签名。The chain resource access request may include a resource location identifier and an access parameter, and the access parameter may include at least one of the following: resource name, resource execution parameter, initiator public key, and initiator signature.

资源解析系统根据获取的链资源访问请求,请求资源存储网络根据该链资源访问请求确定资源访问地址。示例性的,资源解析系统可以对获取的链资源访问请求进行解析,从而得到域名解析请求,并向资源存储网络发起域名解析请求。其中,域名解析请求中可以包括待访问资源的资源定位标识和访问参数。资源存储网络基于存储的资源定位数据,根据资源定位标识,查询与资源定位标识具有映射关系的资源访问地址,从而将查询到的资源访问地址基于资源解析系统反馈至发起方。The resource resolution system requests the resource storage network to determine the resource access address according to the chain resource access request according to the obtained chain resource access request. Exemplarily, the resource resolution system may parse the obtained chain resource access request to obtain a domain name resolution request, and initiate a domain name resolution request to the resource storage network. The domain name resolution request may include a resource location identifier and access parameters of the resource to be accessed. Based on the stored resource location data, the resource storage network queries the resource access addresses that have a mapping relationship with the resource location identifiers according to the resource location identifiers, so that the queried resource access addresses are fed back to the initiator based on the resource resolution system.

可选的,当资源解析系统获取到链资源访问请求后,可以通过域名解析器,根据链资源访问请求中的资源定位标识和访问参数,在本地缓存中进行查询,若查询到与资源定位标识符对应的资源访问地址,则可以直接将该资源访问地址反馈给发起方;若未查询到与资源定位标识符对应的资源访问地址,则域名解析器将链资源访问请求进行转换得到域名服务器可识别的域名解析请求,由域名服务器在本地缓存中查询是否存在与域名解析请求对应的资源访问地址,若存在,则直接将查询到的资源访问地址经域名解析器反馈至发起方;若不存在,则由资源存储网络对域名解析请求进行处理从而得到对应的资源访问地址。Optionally, after the resource resolution system obtains the chain resource access request, it can use the domain name resolver to query in the local cache according to the resource location identifier and access parameters in the chain resource access request. If the resource access address corresponding to the resource location identifier is not queried, the domain name resolver converts the chain resource access request to obtain a domain name server that can access the resource. For the identified domain name resolution request, the domain name server queries the local cache whether there is a resource access address corresponding to the domain name resolution request. If there is, the queried resource access address is directly fed back to the initiator through the domain name resolver; , the resource storage network processes the domain name resolution request to obtain the corresponding resource access address.

示例性的,在发起方获取到资源访问地址后,可以通过资源访问地址,确定待访问资源在区块链网络中的访问入口,并通过该访问入口对待访问资源进行访问。Exemplarily, after the initiator obtains the resource access address, the resource access address can be used to determine the access entry of the resource to be accessed in the blockchain network, and to access the resource to be accessed through the access entry.

本可选实施例方案通过链资源访问请求中的待访问资源的资源定位标识,基于资源存储网络中存储的资源定位数据,进行访问地址查询,实现了对资源访问地址的确定,从而实现了发起方能够通过资源访问地址对跨链资源的访问和获取。The solution of this optional embodiment uses the resource location identifier of the resource to be accessed in the chain resource access request, and based on the resource location data stored in the resource storage network, performs access address query, realizes the determination of the resource access address, and realizes the initiation of The party can access and obtain cross-chain resources through the resource access address.

在一个可选实施例中,若链资源处理请求为域名查询请求,则根据域名查询请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据域名查询请求中的资源访问地址,基于资源存储网络中存储的资源定位数据,进行域名查询,以确定资源域名;资源域名为资源访问地址所属域的域名。In an optional embodiment, if the chain resource processing request is a domain name query request, according to the domain name query request, based on the information of the resource data stored in the resource storage network, perform resource information query, to determine the resource information includes: querying according to the domain name For the resource access address in the request, based on the resource location data stored in the resource storage network, a domain name query is performed to determine the resource domain name; the resource domain name is the domain name of the domain to which the resource access address belongs.

其中,域名查询请求可以是发起方发起的对待访问资源所在区块链节点所属域域名的查询请求。The domain name query request may be a query request initiated by the initiator for the domain name of the blockchain node where the resource to be accessed belongs.

其中,域名查询请求中可以包括资源访问地址。资源访问地址中可以包括待访问资源所在区块链节点的通信地址。The domain name query request may include a resource access address. The resource access address may include the communication address of the blockchain node where the resource to be accessed is located.

资源解析系统根据获取的域名查询请求,请求资源存储网络根据该域名查询请求确定资源域名。示例性的,资源解析系统可以对获取的域名查询请求进行解析,并向资源存储网络发起解析后的域名查询请求。其中,域名查询请求中可以包括资源访问地址。资源存储网络基于存储的资源定位数据,根据资源访问地址,进行域名查询,从而将查询到资源访问地址所属域的域名,并作为资源域名基于资源解析系统反馈至发起方。According to the acquired domain name query request, the resource resolution system requests the resource storage network to determine the resource domain name according to the domain name query request. Exemplarily, the resource resolution system may parse the acquired domain name query request, and send the resolved domain name query request to the resource storage network. The domain name query request may include a resource access address. Based on the stored resource location data, the resource storage network performs domain name query according to the resource access address, so that the domain name of the domain to which the resource access address belongs is queried, and is fed back to the initiator as the resource domain name based on the resource resolution system.

可选的,当资源解析系统获取到域名查询请求后,可以通过域名解析器,根据域名查询请求中的资源访问地址,在本地缓存中进行查询,若查询到资源访问地址所属域的域名,则可以直接将该资源域名反馈给发起方;若未查询到资源访问地址所属域的域名,则域名解析器将域名查询请求进行转换得到域名服务器可识别的域名查询请求,由域名服务器在本地缓存中查询是否存在与域名查询请求对应的资源域名,若存在,则直接将查询到的资源域名经域名解析器反馈至发起方;若不存在,则由资源存储网络对域名查询请求进行处理,从而得到资源访问地址所属域的域名。Optionally, after the resource resolution system obtains the domain name query request, it can use the domain name resolver to query the local cache according to the resource access address in the domain name query request. If the domain name of the domain to which the resource access address belongs is queried, then The resource domain name can be directly fed back to the initiator; if the domain name of the domain to which the resource access address belongs is not queried, the domain name resolver converts the domain name query request to obtain a domain name query request recognizable by the domain name server, which is stored in the local cache by the domain name server. Query whether there is a resource domain name corresponding to the domain name query request, and if so, directly feed the queried resource domain name to the initiator through the domain name resolver; if not, the resource storage network will process the domain name query request to obtain The domain name of the domain to which the resource access address belongs.

本可选实施例方案通过域名查询请求中的资源访问地址,基于资源存储网络中存储的资源定位数据,进行域名查询,实现了对资源访问地址所属域的域名的确定。The solution of this optional embodiment uses the resource access address in the domain name query request to perform domain name query based on the resource location data stored in the resource storage network, thereby realizing the determination of the domain name of the domain to which the resource access address belongs.

在一个可选实施例中,若链资源处理请求为权限查询请求,则根据权限查询请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据权限查询请求中的待查询资源的资源访问地址或资源定位标识,基于资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限;资源权限为资源被访问的权限控制信息。In an optional embodiment, if the chain resource processing request is a permission query request, according to the permission query request, based on the information of the resource data stored in the resource storage network, perform resource information query to determine the resource information includes: querying according to the permission The resource access address or resource location identifier of the resource to be queried in the request is based on the resource permission data stored in the resource storage network, and the permission query is performed to determine the resource permission; the resource permission is the permission control information of the resource being accessed.

其中,权限查询请求可以是发起方发起的区块链网络中的链资源的可被访问权限的查询请求。例如,若发起方想要获取区块链网络的链资源A,则可以预先查询是否具有对链资源A的获取或访问权限,也即链资源A是否对发起方授权,是否允许发起方访问。资源权限可以为资源被访问的权限控制信息。Wherein, the permission query request may be a query request for the access permission of the chain resources in the blockchain network initiated by the initiator. For example, if the initiator wants to obtain the chain resource A of the blockchain network, it can query in advance whether it has the right to obtain or access the chain resource A, that is, whether the chain resource A authorizes the initiator and allows the initiator to access. The resource permission can be the permission control information that the resource is accessed.

其中,权限查询请求中可以包括待查询资源的资源访问地址或资源定位标识。资源权限数据中可以包括资源被访问的权限控制信息,例如,具有访问链资源权限的区块链节点名称或标识等。The permission query request may include a resource access address or a resource location identifier of the resource to be queried. The resource permission data may include permission control information about the resource being accessed, for example, the name or identifier of the blockchain node that has permission to access the chain resource.

资源解析系统根据获取的权限查询请求,请求资源存储网络根据该权限查询请求确定资源权限。示例性的,资源解析系统可以对获取的权限查询请求进行解析,并向资源存储网络发起解析后的权限查询请求。其中,权限查询请求中可以包括待查询资源的资源访问地址或资源定位标识。资源存储网络基于存储的资源权限数据,根据资源访问地址或资源定位标识,查询该资源定位标识或资源访问地址关联的资源是否具有访问权限,从而将查询得到的资源权限结果基于资源解析系统反馈至发起方。The resource analysis system requests the resource storage network to determine resource permissions according to the obtained permission query request according to the obtained permission query request. Exemplarily, the resource parsing system may parse the acquired permission query request, and send the parsed permission query request to the resource storage network. The permission query request may include a resource access address or a resource location identifier of the resource to be queried. Based on the stored resource permission data, the resource storage network queries whether the resource associated with the resource location identifier or resource access address has access permission according to the resource access address or resource location identifier, so that the resource permission result obtained by the query is fed back to the resource parsing system. Initiator.

可选的,当资源解析系统获取到权限查询请求后,可以通过域名解析器,根据权限查询请求中的资源定位标识和资源访问地址,在本地缓存中进行权限查询,若查询到与权限查询请求对应的资源权限,则可以直接将该资源权限反馈给发起方;若未查询到与权限查询请求对应的资源权限,则域名解析器将权限查询请求进行转换得到域名服务器可识别的权限查询请求,由域名服务器在本地缓存中进行权限查询,若查询到与权限查询请求对应的资源权限,则可以直接将该资源权限反馈给发起方;若未查询到与权限查询请求对应的资源权限,则基于资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限。Optionally, after the resource resolution system obtains the permission query request, it can use the domain name resolver to perform permission query in the local cache according to the resource location identifier and resource access address in the permission query request. The corresponding resource permission can be directly fed back to the initiator; if the resource permission corresponding to the permission query request is not queried, the domain name resolver converts the permission query request to obtain a permission query request identifiable by the domain name server. The domain name server performs the permission query in the local cache. If the resource permission corresponding to the permission query request is queried, the resource permission can be directly fed back to the initiator; if the resource permission corresponding to the permission query request is not queried, the resource permission will be based on The resource permission data stored in the resource storage network is queried to determine the resource permission.

示例性的,在发起方获取到资源权限后,可以根据资源权限结果确定是否能够访问待查询资源。若资源权限未发起方具有访问权限,则可以通过资源访问地址,确定待查询资源在区块链网络中的访问入口,并通过该访问入口对待查询资源进行访问。Exemplarily, after the initiator acquires the resource permission, it can determine whether the resource to be queried can be accessed according to the resource permission result. If the resource authority does not have the access authority, the resource access address can be used to determine the access entry of the resource to be queried in the blockchain network, and the resource to be queried can be accessed through the access entry.

本可选实施例方案通过根据权限查询请求中的待查询资源的资源访问地址或资源定位标识,基于资源存储网络中存储的资源权限数据,进行权限查询,实现了对资源权限的确定,从而实现了发起方对是否具有对待查询资源的访问权限的确定。The solution of this optional embodiment implements the determination of the resource authority by performing authority query based on the resource authority data stored in the resource storage network according to the resource access address or resource location identifier of the resource to be queried in the authority query request, thereby realizing Determines whether the initiator has access to the resource to be queried.

图3是根据本公开实施例提供的一种区块链的资源处理方法的示意图,本公开实施例可适用于多链之间进行数据资源相互定位和获取的情况。该方法可由一种区块链的资源处理装置来执行,该装置可采用硬件和/或软件的方式来实现,可配置于电子设备中,该电子设备可以为资源存储网络。参考图3,该方法应用于资源存储网络,该方法具体包括如下:FIG. 3 is a schematic diagram of a method for processing resources of a blockchain according to an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of mutual positioning and acquisition of data resources between multiple chains. The method can be executed by a resource processing apparatus of a blockchain, and the apparatus can be implemented by means of hardware and/or software, and can be configured in an electronic device, and the electronic device can be a resource storage network. Referring to Figure 3, the method is applied to a resource storage network, and the method specifically includes the following:

S310、获取资源信息处理请求;资源信息处理请求基于链资源处理请求而确定。S310. Obtain a resource information processing request; the resource information processing request is determined based on the chain resource processing request.

其中,链资源处理请求可以是跨链获取数据资源、查询域名或查询权限的请求。资源信息处理请求可以是由资源解析系统对链资源处理请求进行解析或转换后的处理请求。其中,链资源处理请求可以基于区块链客户端发起的事务请求而产生。The chain resource processing request may be a request for cross-chain acquisition of data resources, query of domain name or query authority. The resource information processing request may be a processing request after parsing or converting the chain resource processing request by the resource parsing system. Among them, the chain resource processing request can be generated based on the transaction request initiated by the blockchain client.

可以理解的是,资源存储网络为去中心化存储网络,资源存储网络既可以为基于区块链技术实现的区块链网络,也可以为基于其他技术实现的普通的分布式网络。当资源存储网络为基于区块链技术实现的区块链网络时,资源解析系统可以通过向资源存储网络发起事务请求的方式获取资源信息。It can be understood that the resource storage network is a decentralized storage network, and the resource storage network can be either a blockchain network implemented based on blockchain technology, or an ordinary distributed network implemented based on other technologies. When the resource storage network is a blockchain network based on blockchain technology, the resource resolution system can obtain resource information by initiating transaction requests to the resource storage network.

在一个可选实施例中,资源存储网络是基于区块链技术实现的区块链网络,则获取资源信息处理请求包括:获取区块链客户端发起的资源信息处理事务请求,作为资源信息处理请求。In an optional embodiment, the resource storage network is a blockchain network implemented based on the blockchain technology, and obtaining the resource information processing request includes: obtaining the resource information processing transaction request initiated by the blockchain client, and processing it as the resource information ask.

其中,资源信息处理事务请求可以是由资源解析系统对链资源处理请求进行请求解析或转换后得到的,用于向区块链网络发起的事务请求。The resource information processing transaction request may be obtained by request analysis or conversion of the chain resource processing request by the resource analysis system, and is used for the transaction request initiated to the blockchain network.

示例性的,若资源存储网络为基于区块链技术实现的区块链网络,则资源解析系统在获取到资源处理请求后,对资源处理请求进行解析或转换,得到资源信息处理事务请求;资源解析系统向资源存储网络发起资源信息处理事务请求,资源存储网络在获取到资源信息处理事务请求后,基于网络中存储的资源数据的信息,进行资源信息查询,从而确定资源信息。Exemplarily, if the resource storage network is a blockchain network implemented based on blockchain technology, the resource parsing system parses or converts the resource processing request after obtaining the resource processing request, and obtains the resource information processing transaction request; The parsing system initiates a resource information processing transaction request to the resource storage network. After acquiring the resource information processing transaction request, the resource storage network performs resource information query based on the information of the resource data stored in the network to determine the resource information.

本可选实施例通过将区块链客户端发起的资源信息处理事务请求,作为资源信息处理请求的方式,实现了对基于区块链技术实现的资源存储网络的事务请求的发起,从而实现了对基于区块链技术实现的资源存储网络生成的资源信息的获取。This optional embodiment uses the resource information processing transaction request initiated by the blockchain client as the resource information processing request method, and realizes the initiation of the transaction request for the resource storage network based on the blockchain technology, thereby realizing the The acquisition of resource information generated by the resource storage network based on blockchain technology.

可以理解的是,资源信息处理请求可以是资源解析系统中域名解析器或域名服务器在本地缓存中未查询到后发起。资源解析系统获取链资源处理请求,通过资源解析系统中的域名解析器,根据链资源处理请求确定目标域名服务器;通过域名解析器,向目标域名服务器发起资源信息处理请求;目标域名服务器向资源存储网络发起请求,请求基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。It can be understood that the resource information processing request may be initiated after the domain name resolver or domain name server in the resource resolution system fails to query the local cache. The resource resolution system obtains the chain resource processing request, and determines the target domain name server according to the chain resource processing request through the domain name resolver in the resource resolution system; through the domain name resolver, a resource information processing request is initiated to the target domain name server; the target domain name server sends the resource storage The network initiates a request to request information based on resource data stored in the resource storage network, and perform resource information query to determine resource information.

域名解析器可以根据链资源处理请求,在本地缓存中进行资源信息的查询;如果域名解析器在本地缓存中查询到资源信息,则确定为资源信息;如果在本地缓存中未查询到资源信息,则向域名服务器发起资源信息处理请求;如果域名服务器在本地缓存中查询到资源信息,则确定为资源信息;如果在本地缓存中未查询到资源信息,则向资源存储网络发起资源信息处理请求,以进行资源信息查询并确定资源信息。因此,资源信息处理请求可以是由域名解析器或域名服务器发起。The domain name resolver can process the request according to the chain resource and query the resource information in the local cache; if the domain name resolver queries the resource information in the local cache, it is determined as resource information; if the resource information is not queried in the local cache, Then initiate a resource information processing request to the domain name server; if the domain name server queries the resource information in the local cache, it is determined to be resource information; if the resource information is not queried in the local cache, it initiates a resource information processing request to the resource storage network, to perform resource information query and determine resource information. Therefore, the resource information processing request may be initiated by a domain name resolver or a domain name server.

在一个可选实施例中,获取资源信息处理请求包括:获取资源解析系统中域名解析器或域名服务器发起的资源信息处理请求。In an optional embodiment, acquiring the resource information processing request includes: acquiring a resource information processing request initiated by a domain name resolver or a domain name server in the resource resolution system.

其中,域名解析器可以用于对域名进行解析并转换成IP(Internet Protocol,网际互连协议)地址,域名解析器的地址可以预先在区块链节点中进行注册,以供后续区块链节点能够根据预先注册的域名解析器的地址向域名解析器发起链资源处理请求。因此,区块链节点中可以部署有至少一个域名解析器的地址。Among them, the domain name resolver can be used to parse the domain name and convert it into an IP (Internet Protocol, Internet Protocol) address, and the address of the domain name resolver can be pre-registered in the blockchain node for subsequent blockchain nodes. A chain resource processing request can be initiated to the domain name resolver according to the address of the pre-registered domain name resolver. Therefore, the address of at least one domain name resolver can be deployed in the blockchain node.

其中,域名服务器可以是负责管理包括域名空间和资源信息记录的数据库。该数据库可以被划分成多个称为区域(zone)的部分,每个域名服务器可以存储一个或多个区域。域名服务器收到资源信息处理请求后,通过检索本地的区域中的数据来给出响应结果。The domain name server may be a database responsible for managing the domain name space and resource information records. The database can be divided into sections called zones, and each domain name server can store one or more zones. After the domain name server receives the resource information processing request, it retrieves the data in the local area to give the response result.

S320、根据资源信息处理请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。S320. According to the resource information processing request and the information of the resource data stored in the resource storage network, query the resource information to determine the resource information.

其中,资源存储网络可以为去中心化存储网络,例如,资源存储网络可以为基于区块链技术实现的去中心化存储网络。资源数据可以为区块链网络中提供的可访问资源,资源信息可以为可访问资源的关联信息。The resource storage network may be a decentralized storage network, for example, the resource storage network may be a decentralized storage network based on blockchain technology. The resource data can be the accessible resources provided in the blockchain network, and the resource information can be the associated information of the accessible resources.

示例性的,资源解析系统可以根据链资源处理请求,向资源存储网络发起资源信息的获取请求;资源存储网络接收到资源信息的获取请求后,根据获取请求,基于网络中存储的资源数据的信息,进行资源信息查询,从而确定与获取请求对应的资源信息。Exemplarily, the resource analysis system can process the request according to the chain resource, and initiate a resource information acquisition request to the resource storage network; after the resource storage network receives the resource information acquisition request, according to the acquisition request, based on the information of the resource data stored in the network. , to query the resource information to determine the resource information corresponding to the acquisition request.

S330、基于资源信息响应资源信息处理请求;资源数据为区块链网络中提供的可访问资源,资源信息为可访问资源的关联信息。S330, responding to the resource information processing request based on the resource information; the resource data is an accessible resource provided in the blockchain network, and the resource information is associated information of the accessible resource.

示例性的,资源解析系统可以在获取到资源存储系统确定的资源信息后,将资源信息反馈至链资源处理请求的发起方。Exemplarily, after acquiring the resource information determined by the resource storage system, the resource resolution system may feed back the resource information to the initiator of the chain resource processing request.

可选的,资源解析系统可以基于区块链客户端发起事务请求,从而将资源信息反馈至跨链资源使用者的所属区块链节点。Optionally, the resource resolution system may initiate a transaction request based on the blockchain client, so as to feed back resource information to the blockchain node to which the cross-chain resource user belongs.

本公开实施例方案通过根据获取的资源信息处理请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;基于资源信息响应资源信息处理请求。上述方案由去中心化存储网络对多链数据资源进行维护和管理,通过资源解析系统从去中心化存储网络中获取资源信息,并反馈给跨链资源使用者,实现了多链之间的数据资源的相互定位和获取;基于域名机制进行管理,使得区块链节点能够灵活发布对外链提供的数据资源,并进行管理。由去中心化存储网络对多链的数据资源进行存储和维护,能够有效防止数据资源被篡改,且能维持更新;本公开的技术方案通用性强、安全可靠性高。The solution of the embodiment of the present disclosure determines the resource information by querying the resource information according to the obtained resource information processing request and the information of the resource data stored in the resource storage network; and responding to the resource information processing request based on the resource information. The above scheme maintains and manages multi-chain data resources by the decentralized storage network, obtains resource information from the decentralized storage network through the resource analysis system, and feeds it back to the cross-chain resource users, realizing the data between multiple chains. Mutual positioning and acquisition of resources; management based on the domain name mechanism enables blockchain nodes to flexibly publish and manage data resources provided by external chains. The multi-chain data resources are stored and maintained by the decentralized storage network, which can effectively prevent the data resources from being tampered with and can be maintained and updated; the technical solution of the present disclosure has strong versatility and high security and reliability.

在上述各技术方案的基础上,本公开还提供了一个可选实施例,在该实施例中,完善了区块链节点如何在资源存储网络中进行资源注册的过程。需要说明的是,在本公开实施例中未详述部分,可参见其他实施例中的相关表述,在此不再赘述。On the basis of the above technical solutions, the present disclosure also provides an optional embodiment, in which the process of how a blockchain node performs resource registration in a resource storage network is improved. It should be noted that, for the parts that are not described in detail in the embodiments of the present disclosure, reference may be made to related expressions in other embodiments, and details are not described herein again.

参见图4所示的一种区块链的资源处理方法,包括:Referring to a resource processing method of a blockchain shown in Figure 4, it includes:

S410、接收区块链节点发起的资源注册请求。S410. Receive a resource registration request initiated by the blockchain node.

可以理解的是,资源存储网络中可以包括三类节点,分别为数据持有节点、存储节点和区块链节点。其中,数据持有节点是数据的归属方,一般是某个区块链网络的有存储需求的参与者。参与者可以将自己的区块链网络所对应的区块链空间域名、资源记录信息和访问授权控制信息进行加密、切分、副本制作后分发到存储节点。存储节点有丰富的闲置的存储资源,可以提供存储服务;通过应答数据持有节点的挑战证明自己持有数据分片。区块链节点构成区块链域名网络,支撑整个资源存储网络的去中心化治理。资源存储网络的区块链节点中可部署用于注册维护资源信息的一个或多个智能合约。例如,用于资源注册的智能合约中,可维护全局字典表,即一个全局的编码表,用于区块链网络中资源数据的定位,在全局声明区块链的属性,如框架类型,名称等用于实现数据互认的基础信息。全局字典表可以用智能合约的形式存在于区块链上,以便区块链网络中能够采用统一的命名方式为资源数据的定位标识进行编码。资源存储网络中部署的智能合约,还可以对资源存储网络中所有的存储节点进行健康度检查,并给出衡量结果。衡量指标例如包括:副本保持证明挑战成功比例和有效心跳频率。智能合约会根据衡量结果采用不同的策略,例如:健康,推荐持有数据;中等,可以持有数据;不健康,可能无法持有数据。在条件允许的情况下,智能合约会调度存储网络,将数据分片从中等健康节点/不健康节点迁移到健康节点。It can be understood that the resource storage network can include three types of nodes, namely data holding nodes, storage nodes and blockchain nodes. Among them, the data holding node is the owner of the data, and is generally a participant in a blockchain network with storage requirements. Participants can encrypt, segment, and copy the blockchain space domain name, resource record information and access authorization control information corresponding to their own blockchain network and distribute them to storage nodes. The storage node has abundant idle storage resources and can provide storage services; it proves that it holds the data shards by responding to the challenge of the data holding node. Blockchain nodes constitute a blockchain domain name network, supporting the decentralized governance of the entire resource storage network. One or more smart contracts for registering and maintaining resource information can be deployed in the blockchain nodes of the resource storage network. For example, in a smart contract used for resource registration, a global dictionary table, that is, a global coding table, can be maintained for locating resource data in the blockchain network, and globally declaring the properties of the blockchain, such as frame type, name and other basic information used to realize mutual recognition of data. The global dictionary table can exist on the blockchain in the form of smart contracts, so that the blockchain network can use a unified naming method to encode the location identifier of resource data. The smart contracts deployed in the resource storage network can also check the health of all storage nodes in the resource storage network and give the measurement results. Metrics include, for example, replica retention proof challenge success ratio and effective heartbeat frequency. Smart contracts will adopt different strategies according to the measurement results, such as: healthy, data is recommended to be held; medium, data can be held; unhealthy, data may not be held. When conditions permit, the smart contract will schedule the storage network to migrate data shards from moderately healthy nodes/unhealthy nodes to healthy nodes.

其中,区块链节点可以是跨链资源访问请求的数据发起方,也可以是跨链资源的数据持有者。其中,资源注册请求可以是数据持有者想要将自身资源注册并存储至资源存储网络中而发起的请求。Among them, the blockchain node can be the data initiator of the cross-chain resource access request, or the data holder of the cross-chain resource. The resource registration request may be a request initiated by the data holder who wants to register and store its own resources in the resource storage network.

示例性的,数据持有者可以通过区块链客户端向资源存储网络发起资源注册请求,以供跨链资源发起方对注册的资源数据进行访问或获取。Exemplarily, the data holder can initiate a resource registration request to the resource storage network through the blockchain client, so that the cross-chain resource initiator can access or obtain the registered resource data.

S420、将资源注册请求中的资源数据的关联信息存储在资源存储网络中;其中,关联信息包括下述至少一项:资源定位数据和资源权限数据。S420. Store the association information of the resource data in the resource registration request in the resource storage network; wherein the association information includes at least one of the following: resource location data and resource permission data.

其中,资源数据可以为区块链节点所提供的可访问资源。关联信息可以包括资源定位数据和资源权限数据。Among them, the resource data can be the accessible resources provided by the blockchain nodes. The associated information may include resource location data and resource permission data.

其中,资源定位数据可以包括链资源的资源定位标识与资源访问地址之间的映射关系。资源权限数据中可以包括资源被访问的权限控制信息,例如,具有访问链资源权限的区块链节点名称或标识等。The resource location data may include a mapping relationship between resource location identifiers of chain resources and resource access addresses. The resource permission data may include permission control information about the resource being accessed, for example, the name or identifier of the blockchain node that has permission to access the chain resource.

可以理解的是,在资源存储网络对注册的区块链节点的资源数据进行管理过程中,区块链节点可以对自身注册的资源数据进行增删改查操作,相应的,资源存储网络也可以主动向注册资源数据的区块链节点发起更新资源数据的请求,从而实现对区块链节点的资源数据的及时更新。It can be understood that in the process of managing the resource data of the registered blockchain nodes by the resource storage network, the blockchain nodes can add, delete, modify and check the resource data registered by themselves. Correspondingly, the resource storage network can also actively A request to update the resource data is initiated to the blockchain node that registers the resource data, so as to realize the timely update of the resource data of the blockchain node.

可以理解的是,为确保数据持有节点在资源注册过程中,资源数据的安全性,可以将资源注册请求中的资源数据进行加密处理。It can be understood that, in order to ensure the security of the resource data of the data holding node during the resource registration process, the resource data in the resource registration request may be encrypted.

在一个可选实施例中,将资源注册请求中的资源数据的关联信息存储在资源存储网络中包括:将资源注册请求中的资源数据的关联信息,进行加密和分片,以形成加密分片副本;将加密分片副本,分别存储在资源存储网络中的存储节点中。In an optional embodiment, storing the associated information of the resource data in the resource registration request in the resource storage network includes: encrypting and fragmenting the associated information of the resource data in the resource registration request to form encrypted fragments Copies; the encrypted shard copies are stored in the storage nodes in the resource storage network respectively.

数据持有节点可以将请求注册的资源数据的关联信息进行加密、切分、副本复制和随机分组,以形成加密分片副本;资源存储网络可以针对不同存储节点加密后生成加密分片副本,分发到不同的存储节点中进行存储。采用这种加密存储的方式,能够保证每个存储节点存储的分片都不相同,存储节点之间无法复用同一个存储证明,从而能够有效抵御单副本攻击。多副本多地存储的方式使得存储网络具备故障自愈能力。攻击者无法通过存储节点获取资源数据明文,多个存储节点同时获取数据也需要巨大的成本。The data holding node can encrypt, segment, duplicate and randomly group the associated information of the resource data requested for registration to form encrypted shard copies; the resource storage network can encrypt different storage nodes to generate encrypted shard copies and distribute them. to different storage nodes for storage. Using this encrypted storage method can ensure that the shards stored by each storage node are different, and the same storage proof cannot be reused between storage nodes, which can effectively resist single-copy attacks. The multi-copy multi-location storage method enables the storage network to have fault self-healing capability. An attacker cannot obtain the plaintext of resource data through the storage node, and it also requires huge costs for multiple storage nodes to obtain data at the same time.

本可选实施例通过将资源注册请求中的资源数据的关联信息,进行加密和分片,以形成加密分片副本;将加密分片副本,分别存储在资源存储网络中的存储节点中,提高了数据持有节点在资源注册过程中资源数据的安全性,避免了攻击者对存储节点的资源数据明文进行攻击。This optional embodiment encrypts and shards the associated information of the resource data in the resource registration request to form encrypted shard copies; and stores the encrypted shard copies in storage nodes in the resource storage network, thereby improving The security of the resource data of the data holding node during the resource registration process is prevented, and the attackers are prevented from attacking the plaintext of the resource data of the storage node.

需要说明的是,防止存储作弊的机制可以是数据持有节点发布挑战到区块链网络,存储节点提交存储证明到区块链网络以应答挑战,智能合约对应答信息进行自动化验证,如果通过,可证明存储节点保存着加密切片。It should be noted that the mechanism to prevent storage cheating can be that the data holding node issues a challenge to the blockchain network, the storage node submits the storage proof to the blockchain network to answer the challenge, and the smart contract automatically verifies the response information. Provable storage nodes hold encrypted slices.

可选的,资源存储网络可以按照存储证明机制,向各存储节点发起存储证明保持请求,并接收存储节点基于所存储的资源信息反馈的存储证明。Optionally, the resource storage network may initiate a storage certificate retention request to each storage node according to a storage certificate mechanism, and receive a storage certificate fed back by the storage node based on the stored resource information.

可以理解的是,区块链网络的数据持有节点可以选择将自己的域名和资源数据的授权给资源解析系统,从而可以便于发起方能够通过资源解析系统访问到授权的资源信息。It can be understood that the data holding node of the blockchain network can choose to authorize its own domain name and resource data to the resource resolution system, so that the initiator can access the authorized resource information through the resource resolution system.

在一个可选实施例中,基于资源存储网络所部署的授权合约,将所存储的部分或全部资源数据的资源信息,授权给资源解析系统进行查询。In an optional embodiment, based on the authorization contract deployed by the resource storage network, the resource information of part or all of the stored resource data is authorized to the resource analysis system for query.

其中,授权合约可以是具有能够处理授权资源数据或域名等相关功能的智能合约。Among them, the authorization contract can be a smart contract with related functions that can process authorized resource data or domain names.

区块链网络的数据持有节点可以选择将包含有自己域名和资源数据的数据文件授权给资源解析系统中的某个域名服务器。且该授权行为可以通过资源存储网络中所部署的用于授权的智能合约完成。当资源信息被授权后,指定的域名服务器将有能力从去资源储网络中提取对应的资源信息密文,从而完成对资源信息的解密操作,得到原始的资源信息。The data holding node of the blockchain network can choose to authorize the data file containing its own domain name and resource data to a certain domain name server in the resource resolution system. And the authorization behavior can be completed through the smart contract for authorization deployed in the resource storage network. When the resource information is authorized, the designated domain name server will have the ability to extract the corresponding resource information ciphertext from the resource-removing storage network, so as to complete the decryption operation of the resource information and obtain the original resource information.

可选的,如果一个域名及其对应的资源数据被授权给至少一个域名服务器进行使用,那么该信息就可以被跨链资源使用者通过资源解析系统访问到。相反的,如果任何域名服务器都没有被授权使用一个域名及其对应的资源数据,那么该信息会从资源存储网络中隐藏,不能被用户使用资源解析系统访问到;如果存在本地缓存中,那么会在缓存期结束后隐藏。Optionally, if a domain name and its corresponding resource data are authorized to be used by at least one domain name server, the information can be accessed by cross-chain resource users through the resource resolution system. On the contrary, if any domain name server is not authorized to use a domain name and its corresponding resource data, the information will be hidden from the resource storage network and cannot be accessed by users using the resource resolution system; if it exists in the local cache, it will be Hide after the cache period expires.

本可选实施例通过基于资源存储网络所部署的授权合约,将所存储的部分或全部资源数据的资源信息,授权给资源解析系统进行查询,实现了对资源数据的数据持有节点进行授权,从而便于发起方能够通过资源解析系统访问到授权的资源信息。In this optional embodiment, the resource information of some or all of the stored resource data is authorized to the resource analysis system for query based on the authorization contract deployed on the resource storage network, so as to realize the authorization of the data holding node of the resource data. Therefore, it is convenient for the initiator to access the authorized resource information through the resource resolution system.

S430、获取资源信息处理请求;资源信息处理请求基于链资源处理请求而确定。S430. Obtain a resource information processing request; the resource information processing request is determined based on the chain resource processing request.

S440、根据资源信息处理请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。S440. According to the resource information processing request and the information of the resource data stored in the resource storage network, query the resource information to determine the resource information.

S450、基于资源信息响应资源信息处理请求;资源数据为区块链网络中提供的可访问资源,资源信息为可访问资源的关联信息。S450 , responding to the resource information processing request based on the resource information; the resource data is the accessible resource provided in the blockchain network, and the resource information is the associated information of the accessible resource.

需要说明的是,S410-S420在本实施例中的执行顺序可以是在S430、S440和S450任意步骤之前,也可以是在S430、S440和S450任意步骤之间,还可以是在S430、S440和S450任意步骤之后,本实施例对此不进行限定。It should be noted that the execution sequence of S410-S420 in this embodiment may be before any steps of S430, S440 and S450, or between any steps of S430, S440 and S450, or between steps S430, S440 and S450. After any step of S450, this embodiment does not limit this.

本公开实施例方案通过接收区块链节点发起的资源注册请求,将资源注册请求中的资源数据的关联信息存储在资源存储网络中,实现了区块链节点在资源存储网络中对自身的资源数据的注册,从而便于跨链资源使用者对已注册的资源数据的获取。由去中心化的资源存储网络对区块链节点注册的资源数据进行存储和维护,能够有效防止资源数据被篡改,且能维持更新。By receiving the resource registration request initiated by the blockchain node, the solution of the embodiment of the present disclosure stores the associated information of the resource data in the resource registration request in the resource storage network, so that the blockchain node in the resource storage network can monitor its own resources in the resource storage network. Data registration, so as to facilitate the acquisition of registered resource data by cross-chain resource users. The resource data registered by the blockchain nodes is stored and maintained by the decentralized resource storage network, which can effectively prevent the resource data from being tampered with and can be maintained and updated.

需要说明的是,跨链资源发起方和提供方需要基于相同的跨链命名协议发起请求,统一的跨链命名协议作为区块链网络间跨链访问资源的互操作性基础。It should be noted that the initiator and provider of cross-chain resources need to initiate requests based on the same cross-chain naming protocol, and the unified cross-chain naming protocol serves as the interoperability basis for cross-chain access resources between blockchain networks.

在一个可选实施例中,资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;资源定位标识的字符串中包括域名;域名为待访问资源所在区块链节点所属域的域名,资源访问地址中包括待访问资源所在区块链节点的通信地址。In an optional embodiment, the resource information stored in the resource storage network includes: resource location data and resource permission data; the resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; the resource location identifier The string includes the domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located.

其中,链资源的资源定位标识可以是链资源在区块链网络中的定位标志,每个数据资源拥有全局唯一的链资源定位标志。链资源的资源定位标识与资源访问地址之间具有映射关系,可以通过链资源的资源定位标识获取到对应的资源访问地址。The resource location identifier of the chain resource may be the location identifier of the chain resource in the blockchain network, and each data resource has a globally unique location identifier of the chain resource. There is a mapping relationship between the resource location identifier of the chain resource and the resource access address, and the corresponding resource access address can be obtained through the resource location identifier of the chain resource.

其中,待访问资源可以是链资源发起方想要访问或获取的资源。资源权项数据可以包括具有访问链资源权限的区块链节点名称或标识等。The resource to be accessed may be a resource that the originator of the chain resource wants to access or acquire. The resource right item data may include the name or identifier of the blockchain node that has the right to access the chain resource, etc.

跨链资源访问涉及到不同链的数据资源的交互操作,资源定位标识用于实现对这些数据资源的统一定位。在多链构成的区块链网络中,每一条数据资源都有统一且唯一的资源访问地址,该地址与资源定位标识具有映射关系。资源访问地址的协议定义可以预先设定,例如,资源访问地址的协议定义可以为:[链的具体类型:][//链名][子链/侧链/平行链名][/合约名、方法名等参数信息]。Cross-chain resource access involves the interaction of data resources in different chains, and the resource location identifier is used to realize the unified location of these data resources. In a multi-chain blockchain network, each data resource has a unified and unique resource access address, which has a mapping relationship with the resource location identifier. The protocol definition of the resource access address can be preset. For example, the protocol definition of the resource access address can be: [specific type of chain:][//chain name][subchain/sidechain/parachain name][/contract name , method name and other parameter information].

其中,参数项可以包括:资源名称、资源执行参数、跨链请求发起方的账户公钥和跨链请求发起方的签名等。其中,资源执行参数可以包括区块链框架预留参数(默认值可以为default)、待访问资源的智能合约的合约名、待访问资源的智能合约的方法名和合约参数等。The parameter items may include: resource name, resource execution parameters, account public key of the initiator of the cross-chain request, signature of the initiator of the cross-chain request, and the like. The resource execution parameters may include blockchain framework reserved parameters (the default value may be default), the contract name of the smart contract of the resource to be accessed, the method name and contract parameters of the smart contract of the resource to be accessed, etc.

在一个可选实施例中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。In an optional embodiment, the domain name space of the blockchain network includes multiple levels, and a tree-like structure is used for domain name storage. The nodes of the tree-like structure are used to store the labels of the corresponding level domain names. Corresponding to the data resources provided, the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure; the domain name labels at each level of the domain name space include, from top to bottom: blockchain architecture name, blockchain Name of the operator to which the network belongs, blockchain name, blockchain node name, and resource name.

其中,区块链网络的域名空间记录了树状结构的域名空间和与这些域名空间关联的数据资源。域名空间树的每个节点(包括叶子,本实施例对节点与叶子不加区别,统一称为“节点”)记录一条数据资源记录。其中,数据资源中可以包括资源类型、访问地址、访问协议、版本号、权限要求。例如,资源类型可以是使用的智能合约的类型,如使用wasm虚拟机的智能合约;访问地址中可以包括IP和端口号等;权限要求例如可以是智能合约中不同方法所对应的不同的权限要求。Among them, the domain name space of the blockchain network records the tree-structured domain name space and the data resources associated with these domain name spaces. Each node of the domain name space tree (including leaves, this embodiment makes no distinction between nodes and leaves, collectively referred to as "nodes") records a data resource record. The data resource may include resource type, access address, access protocol, version number, and permission requirements. For example, the resource type can be the type of the smart contract used, such as the smart contract using the wasm virtual machine; the access address can include IP and port numbers, etc.; the permission requirements can be, for example, different permission requirements corresponding to different methods in the smart contract .

每个节点用于存储对应层级域名的标签,非兄弟节点的标签可以相同,但兄弟节点的标签不同。其中,兄弟节点可以是具有相同父节点的节点。树状结构根节点的标签可以是空标签,即标签长度为零的标签。节点的完整域名是从当前节点到树结构的根路径沿途的各个标签的拼接。Each node is used to store the label of the corresponding hierarchical domain name. The labels of non-sibling nodes can be the same, but the labels of sibling nodes are different. Among them, sibling nodes can be nodes with the same parent node. The label of the root node of the tree structure can be an empty label, that is, a label with a label length of zero. The full domain name of a node is the concatenation of the labels along the path from the current node to the root of the tree structure.

示例性的,域名可以用任意大小写命名或保存,例如可以使用标记“A”生成节点,或使用标记“a”生成节点,但是二者不能作为兄弟标签。在生成完整域名时,可能需要拼接多个标签,此时不同标签可以采用标记符隔开,例如,标记符可以是圆点(“.”)。Exemplarily, the domain name can be named or saved in any case, for example, a node can be generated using the tag "A", or a node can be generated using the tag "a", but the two cannot be used as sibling tags. When generating a complete domain name, it may be necessary to splicing multiple tags. In this case, different tags can be separated by a marker, for example, the marker can be a dot (".").

需要说明的是,发起方所发起的链资源处理请求中的域名可以用标签序列来表示。每个标签可以为一个八位字符长度的字符串,域名的最大总长度被限制不超过255个标签。域名服务器和域名解析器可以采用不区分大小写的方式比较标签。It should be noted that the domain name in the chain resource processing request initiated by the initiator can be represented by a label sequence. Each tag can be an eight-character string, and the maximum total length of the domain name is limited to 255 tags. Nameservers and name resolvers can compare labels in a case-insensitive manner.

域名中可以采用任意大小写字符。但具有相同拼写、不同大小写的域名可以被看作为同一域名,域名的命名以字母开始,以字母或数字结束,中间的字符可以包括字母、数字和连字符等。对域名长度的限制可以是标签长度不大于63个字符。Any uppercase and lowercase characters can be used in the domain name. However, domain names with the same spelling and different capitalization can be regarded as the same domain name. The name of the domain name starts with a letter and ends with a letter or number, and the characters in the middle can include letters, numbers and hyphens. The limit on the length of the domain name can be that the length of the label is no more than 63 characters.

可选的,本实施例对区块链网络的域名空间所使用的树状结构不做限定,即不限定使用某种特定的树状结构,或必须使用某种特定的方法在树状结构中定位标签,从而提升域名空间的通用性。Optionally, this embodiment does not limit the tree structure used in the domain name space of the blockchain network, that is, it does not limit the use of a specific tree structure, or a specific method must be used in the tree structure. Locate labels to increase the versatility of the domain name space.

其中,每个节点与区块链所提供的数据资源对应,即每个节点可以对应一个域名,每个域名可以与区块链所提供的数据资源相对应,每个数据资源可以对应一条资源记录,每个资源记录可以对应一个资源定位符。Among them, each node corresponds to the data resources provided by the blockchain, that is, each node can correspond to a domain name, each domain name can correspond to the data resources provided by the blockchain, and each data resource can correspond to a resource record , each resource record can correspond to a resource locator.

需要说明的是,域名服务器中可以缓存有关树状结构的域名空间的结构。域名服务器缓存了指定区块链网络的域名空间内的资源记录信息,并定时进行刷新。资源记录信息被存储在基于区块链技术的去中心化资源存储网络中。It should be noted that the domain name server may cache the structure of the domain name space related to the tree structure. The domain name server caches the resource record information in the domain name space of the specified blockchain network and refreshes it regularly. Resource record information is stored in a decentralized resource storage network based on blockchain technology.

在一个可选实施例中,区块链网络提供的可访问资源包括:区块链可支持服务和/或区块链可读数据;区块链可支持服务包括下述至少一项:智能合约和智能合约中可访问的方法程序。In an optional embodiment, the accessible resources provided by the blockchain network include: blockchain-supportable services and/or blockchain-readable data; blockchain-supportable services include at least one of the following: smart contracts and methods accessible in smart contracts.

可以理解的是,资源解析系统向资源存储网络发起的资源信息处理请求可以是解析域名获取资源的域名解析请求、查询域名的域名查询请求以及查询是否链资源访问权限的权限查询请求。It can be understood that the resource information processing request initiated by the resource resolution system to the resource storage network may be a domain name resolution request for obtaining resources by analyzing a domain name, a domain name query request for querying a domain name, and a permission query request for querying whether to link resource access rights.

在一个可选实施例中,若资源信息处理请求为域名解析请求,则根据域名解析请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据域名解析请求中的待解析域名,和资源存储网络中存储的资源定位数据,进行域名所对应的资源访问地址查询,以确定资源访问地址。In an optional embodiment, if the resource information processing request is a domain name resolution request, the resource information query is performed according to the domain name resolution request and the information of the resource data stored in the resource storage network, so as to determine the resource information including: according to the domain name resolution The domain name to be resolved in the request and the resource location data stored in the resource storage network are used to query the resource access address corresponding to the domain name to determine the resource access address.

其中,资源信息处理请求可以是资源解析系统对链资源访问请求进行解析或转换后得到的获取资源信息的请求。The resource information processing request may be a request for obtaining resource information obtained after the resource resolution system parses or converts the chain resource access request.

其中,域名解析请求可以是对域名进行解析获取对应的资源访问地址的请求。域名解析请求中可以包括待解析域名。The domain name resolution request may be a request for obtaining a corresponding resource access address by analyzing a domain name. The domain name resolution request may include the domain name to be resolved.

其中,资源访问地址表征待访问资源在区块链网络中的访问入口。资源定位数据可以包括链资源的资源定位标识与资源访问地址之间的映射关系。The resource access address represents the access entry of the resource to be accessed in the blockchain network. The resource location data may include a mapping relationship between resource location identifiers of chain resources and resource access addresses.

资源存储网络可以根据获取的域名解析请求,进行资源访问地址查询,从而确定资源访问地址。示例性的,资源存储网络根据存储的资源定位数据中资源定位标识与资源访问地址之间的映射关系,对待解析域名所对应的资源访问地址进行查询,从而确定资源访问地址。其中,资源定位标识的字符串中包括域名,因此,可以通过待解析域名确定对应的资源定位标识,从而根据资源定位标识确定资源访问地址。The resource storage network can query the resource access address according to the acquired domain name resolution request, so as to determine the resource access address. Exemplarily, the resource storage network determines the resource access address by querying the resource access address corresponding to the domain name to be resolved according to the mapping relationship between the resource location identifier and the resource access address in the stored resource location data. The character string of the resource locating identifier includes a domain name. Therefore, the corresponding resource locating identifier can be determined through the domain name to be resolved, so that the resource access address can be determined according to the resource locating identifier.

资源存储网络可以基于资源解析系统将资源访问地址反馈至发起方,在发起方获取到资源访问地址后,可以通过资源访问地址,确定待访问资源在区块链网络中的访问入口,并通过该访问入口对待访问资源进行访问。The resource storage network can feed back the resource access address to the initiator based on the resource resolution system. After the initiator obtains the resource access address, the resource access address can be used to determine the access entry of the resource to be accessed in the blockchain network, and through the resource access address. The access portal accesses the resource to be accessed.

本可选实施例通过根据域名解析请求中的待解析域名,和资源存储网络中存储的资源定位数据,进行域名所对应的资源访问地址查询,以确定资源访问地址,实现了对域名解析请求的处理,从而便于发起方能够通过资源访问地址进行跨链资源的访问和获取。In this optional embodiment, the resource access address corresponding to the domain name is queried according to the domain name to be resolved in the domain name resolution request and the resource location data stored in the resource storage network, so as to determine the resource access address, thereby realizing the resolution of the domain name resolution request. processing, so that the initiator can access and obtain cross-chain resources through the resource access address.

在一个可选实施例中,若资源信息处理请求为域名查询请求,则根据域名查询请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据域名查询请求中的待查询地址,和资源存储网络中存储的资源定位数据,进行地址所对应的域名查询,以确定资源域名。In an optional embodiment, if the resource information processing request is a domain name query request, the resource information query is performed according to the domain name query request and the information of the resource data stored in the resource storage network, so as to determine the resource information including: querying according to the domain name The address to be queried in the request and the resource location data stored in the resource storage network are used to query the domain name corresponding to the address to determine the resource domain name.

其中,域名查询请求可以是对待访问资源所在区块链节点所属域域名的查询请求。The domain name query request may be a query request for the domain name of the domain name to which the blockchain node where the resource to be accessed belongs.

其中,域名查询请求中可以包括资源访问地址。资源访问地址中可以包括待访问资源所在区块链节点的通信地址。The domain name query request may include a resource access address. The resource access address may include the communication address of the blockchain node where the resource to be accessed is located.

资源存储网络可以根据获取的域名查询请求,进行域名查询,从而确定资源域名。示例性的,资源存储网络可以根据存储的资源定位数据中的资源定位标识和资源访问地址之间的映射关系,对待查询地址所对应的域名进行查询,从而确定资源域名。The resource storage network can perform a domain name query according to the obtained domain name query request, thereby determining the resource domain name. Exemplarily, the resource storage network may query the domain name corresponding to the address to be queried according to the mapping relationship between the resource location identifier and the resource access address in the stored resource location data, thereby determining the resource domain name.

本可选实施例通过根据域名查询请求中的待查询地址,和资源存储网络中存储的资源定位数据,进行地址所对应的域名查询,实现了对待查询地址所属域的资源域名的确定。In this optional embodiment, the domain name corresponding to the address is searched according to the address to be searched in the domain name search request and the resource location data stored in the resource storage network, thereby realizing the determination of the resource domain name of the domain to which the address to be searched belongs.

在一个可选实施例中,若资源信息处理请求为权限查询请求,则根据权限查询请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:根据权限查询请求中的待查询资源的资源访问地址或资源定位标识,和资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限;其中,资源权限为资源被访问的权限控制信息。In an optional embodiment, if the resource information processing request is a permission query request, the resource information query is performed according to the permission query request and the information of the resource data stored in the resource storage network, so as to determine the resource information including: querying according to the permission The resource access address or resource location identifier of the resource to be queried in the request, and the resource permission data stored in the resource storage network, perform permission query to determine the resource permission; where the resource permission is the permission control information of the resource being accessed.

其中,权限查询请求可以是发起方发起的区块链网络中的链资源的可被访问权限的查询请求。例如,若发起方想要获取区块链网络的链资源A,则可以预先查询是否具有对链资源A的获取或访问权限,也即链资源A是否对发起方授权,是否允许发起方访问。资源权限可以为资源被访问的权限控制信息。Wherein, the permission query request may be a query request for the access permission of the chain resources in the blockchain network initiated by the initiator. For example, if the initiator wants to obtain the chain resource A of the blockchain network, it can query in advance whether it has the right to obtain or access the chain resource A, that is, whether the chain resource A authorizes the initiator and allows the initiator to access. The resource permission can be the permission control information that the resource is accessed.

其中,权限查询请求中可以包括待查询资源的资源访问地址或资源定位标识。资源权限数据中可以包括资源被访问的权限控制信息,例如,具有访问链资源权限的区块链节点名称或标识等。The permission query request may include a resource access address or a resource location identifier of the resource to be queried. The resource permission data may include permission control information about the resource being accessed, for example, the name or identifier of the blockchain node that has permission to access the chain resource.

资源存储网络可以根据该权限查询请求,基于存储的资源权限数据,确定资源权限。示例性的,资源解析系统可以向资源存储网络发起权限查询请求。其中,权限查询请求中可以包括待查询资源的资源访问地址或资源定位标识。资源存储网络基于存储的资源权限数据,根据资源访问地址或资源定位标识,查询该资源定位标识或资源访问地址关联的资源是否具有访问权限,从而将查询得到的资源权限结果基于资源解析系统反馈至发起方。The resource storage network can determine the resource permission based on the stored resource permission data according to the permission query request. Exemplarily, the resource analysis system may initiate a permission query request to the resource storage network. The permission query request may include a resource access address or a resource location identifier of the resource to be queried. Based on the stored resource permission data, the resource storage network queries whether the resource associated with the resource location identifier or resource access address has access permission according to the resource access address or resource location identifier, so that the resource permission result obtained by the query is fed back to the resource parsing system. Initiator.

示例性的,在发起方获取到资源权限后,可以根据资源权限结果确定是否能够访问待查询资源。若资源权限未发起方具有访问权限,则可以通过资源访问地址,确定待查询资源在区块链网络中的访问入口,并通过该访问入口对待查询资源进行访问。Exemplarily, after the initiator acquires the resource permission, it can determine whether the resource to be queried can be accessed according to the resource permission result. If the resource authority does not have the access authority, the resource access address can be used to determine the access entry of the resource to be queried in the blockchain network, and the resource to be queried can be accessed through the access entry.

本可选实施例方案通过根据权限查询请求中的待查询资源的资源访问地址或资源定位标识,基于资源存储网络中存储的资源权限数据,进行权限查询,实现了对资源权限的确定,从而实现了发起方对是否具有对待查询资源的访问权限的确定。The solution of this optional embodiment implements the determination of the resource authority by performing authority query based on the resource authority data stored in the resource storage network according to the resource access address or resource location identifier of the resource to be queried in the authority query request, thereby realizing Determines whether the initiator has access to the resource to be queried.

图5是根据本公开实施例提供的一种区块链的资源处理方法的示意图,本公开实施例可适用于多链之间进行数据资源相互定位和获取的情况。该方法可由一种区块链的资源处理装置来执行,该装置可采用硬件和/或软件的方式来实现,可配置于电子设备中,该电子设备可以为区块链节点。参考图5,该方法应用于区块链节点,该方法具体包括如下:FIG. 5 is a schematic diagram of a method for processing resources of a blockchain according to an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of mutual positioning and acquisition of data resources between multiple chains. The method can be executed by a resource processing device of a blockchain, and the device can be implemented by means of hardware and/or software, and can be configured in an electronic device, and the electronic device can be a blockchain node. Referring to Figure 5, the method is applied to a blockchain node, and the method specifically includes the following:

S510、在识别到跨链资源的信息获取需求时,产生链资源处理请求。S510 , generating a chain resource processing request when an information acquisition requirement of a cross-chain resource is identified.

其中,跨链资源的信息获取需求可以是由跨链资源使用者所属区块链节点发起的。链资源处理请求可以是跨链获取数据资源、查询域名或查询权限的请求。Among them, the information acquisition requirement of the cross-chain resource may be initiated by the blockchain node to which the cross-chain resource user belongs. The chain resource processing request can be a cross-chain request to obtain data resources, query domain names, or query permissions.

示例性的,跨链资源使用者可以通过区块链节点的客户端,主动发起链资源处理请求。Exemplarily, the cross-chain resource user can actively initiate a chain resource processing request through the client of the blockchain node.

可以理解的是,链资源处理请求还可以是区块链节点处理事务请求过程中产生的。当区块链节点处理事务请求过程中需要访问链资源数据时,可以由区块链节点中部署的专用于处理链资源请求的智能合约,对事务请求进行处理。It can be understood that the chain resource processing request may also be generated during the process of the blockchain node processing the transaction request. When a blockchain node needs to access chain resource data in the process of processing a transaction request, the transaction request can be processed by a smart contract deployed in the blockchain node dedicated to processing chain resource requests.

在一个可选实施例中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括:在执行区块链客户端发起的业务处理事务请求时,识别到跨链资源的信息获取需求,则根据待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求。In an optional embodiment, when an information acquisition requirement of a cross-chain resource is identified, generating a chain resource processing request includes: when a business processing transaction request initiated by the blockchain client is executed, identifying the information acquisition of the cross-chain resource demand, then according to the resource location identifier of the resource to be accessed, based on the resource parsing contract, a chain resource processing request is generated.

其中,业务处理事务请求可以是用户根据自身需求通过区块链客户端发起的事务请求。Among them, the business processing transaction request may be a transaction request initiated by the user through the blockchain client according to their own needs.

资源解析合约可以是在业务处理事务请求执行过程中,遇到需要访问或获取其他链上资源数据时所需调用的智能合约。The resource resolution contract can be a smart contract that needs to be called when it encounters the need to access or obtain other on-chain resource data during the execution of business processing transaction requests.

示例性的,用户可以根据实际需求向区块链客户端发起业务处理事务情趣,区块链节点在执行业务处理事务请求的过程中,若识别到跨链资源的信息获取需求时,则可以对部署在区块链中的资源解析合约进行调用;根据业务处理事务请求中所携带的待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求。Exemplarily, a user can initiate a business processing transaction interest to the blockchain client according to actual needs. During the process of executing a business processing transaction request, if the blockchain node recognizes the need for information acquisition of cross-chain resources, it can The resource resolution contract deployed in the blockchain is called; according to the resource location identifier of the resource to be accessed carried in the business processing transaction request, based on the resource resolution contract, a chain resource processing request is generated.

本可选实施例通过在执行区块链客户端发起的业务处理事务请求时,根据待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求。上述方案通过在执行业务处理事务请求过程中产生链资源处理请求得方式,实现了对链资源处理请求生成方式的综合考虑,提高了链资源处理请求生成方式的全面性。This optional embodiment generates a chain resource processing request based on the resource resolution contract according to the resource location identifier of the resource to be accessed when executing the business processing transaction request initiated by the blockchain client. The above solution realizes the comprehensive consideration of the generation method of the chain resource processing request by generating the chain resource processing request in the process of executing the business processing transaction request, and improves the comprehensiveness of the generation method of the chain resource processing request.

可以理解的是,区块链节点可以将链资源处理请求发送至资源解析系统,由资源解析系统对链资源处理请求进行处理。因此,在区块链节点的资源解析合约中可以配置有至少一个可被访问的域名解析器地址,并通过域名解析器地址向域名解析器发起请求。It can be understood that the blockchain node can send the chain resource processing request to the resource resolution system, and the resource resolution system processes the chain resource processing request. Therefore, at least one accessible domain name resolver address can be configured in the resource resolution contract of the blockchain node, and a request can be made to the domain name resolver through the domain name resolver address.

在一个可选实施例中,根据待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求包括:根据待访问资源的资源定位标识,基于资源解析合约中配置的域名解析器地址,产生目标地址为域名解析器的链资源处理请求。In an optional embodiment, generating the chain resource processing request based on the resource resolution contract according to the resource location identifier of the resource to be accessed includes: according to the resource location identifier of the resource to be accessed, based on the domain name resolver address configured in the resource resolution contract, Generate a chain resource processing request with the target address of the domain name resolver.

其中,资源解析合约中可以预先配置至少一个可被访问的域名解析器地址,且在后续执行链资源处理请求过程中,资源解析合约中的域名解析器地址可以不断更新。Among them, at least one accessible domain name resolver address can be pre-configured in the resource resolution contract, and in the subsequent execution chain resource processing request process, the domain name resolver address in the resource resolution contract can be continuously updated.

其中,域名解析器地址可以是资源解析系统中域名解析器得通信地址,可以基于该域名解析器地址,访问到相应的域名解析器。The domain name resolver address may be a communication address obtained by the domain name resolver in the resource resolution system, and a corresponding domain name resolver may be accessed based on the domain name resolver address.

其中,目标地址可以是从至少一个域名解析器地址中确定得能够对链资源处理请求进行处理的域名解析器地址。The target address may be a domain name resolver address determined from at least one domain name resolver address that can process the chain resource processing request.

示例性的,区块链节点可以根据待访问资源的资源定位标识,由资源解析合约根据资源定位标识的字符串中的域名,从配置的域名解析器地址中选取目标地址,并基于该目标地址向域名解析器发起链资源处理请求。Exemplarily, the blockchain node can select the target address from the configured domain name resolver addresses according to the resource location identifier of the resource to be accessed, and the resource resolution contract can select the target address from the configured domain name resolver address according to the domain name in the string identified by the resource location identifier, and based on the target address. Initiate a chain resource processing request to the domain name resolver.

本可选实施例通过根据待访问资源的资源定位标识,基于资源解析合约中配置的域名解析器地址,产生目标地址为域名解析器的链资源处理请求,实现了对用于处理链资源处理请求的域名解析器地址的确定,便于后续通过确定的域名解析器地址向域名解析器发送链资源处理请求。This optional embodiment generates a chain resource processing request whose target address is the domain name resolver based on the resource location identifier of the resource to be accessed and the address of the domain name resolver configured in the resource resolution contract, thereby realizing the processing request for processing chain resources. The determination of the address of the domain name resolver is convenient for subsequently sending a chain resource processing request to the domain name resolver through the determined address of the domain name resolver.

S520、将链资源处理请求发送给资源解析系统,以请求资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。S520. Send the chain resource processing request to the resource analysis system, so as to request the resource analysis system to perform resource information query based on the information of the resource data stored in the resource storage network to determine the resource information.

其中,资源解析系统可以包括域名解析器和域名服务器。域名解析器可以对链资源处理请求进行解析,或转换成域名服务器可以识别并处理的资源信息处理请求。The resource resolution system may include a domain name resolver and a domain name server. The domain name resolver can parse the chain resource processing request, or convert it into a resource information processing request that the domain name server can recognize and process.

其中,资源存储网络为去中心化存储网络;资源数据为区块链网络中提供的可访问资源,资源信息为所述可访问资源的关联信息。The resource storage network is a decentralized storage network; the resource data is the accessible resources provided in the blockchain network, and the resource information is the associated information of the accessible resources.

其中,资源数据可以为区块链网络中提供的可访问资源,资源信息可以为可访问资源的关联信息。The resource data may be the accessible resources provided in the blockchain network, and the resource information may be the associated information of the accessible resources.

示例性的,区块链节点将链资源处理请求发送给资源解析系统,资源解析系统通过域名解析器,根据链资源处理请求确定目标域名服务器;通过域名解析器,向目标域名服务器发起资源信息处理请求;目标域名服务基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息。资源存储网络将资源信息反馈至资源解析系统,以通过资源解析系统将资源信息反馈至发起链资源处理请求的区块链节点。Exemplarily, the blockchain node sends the chain resource processing request to the resource resolution system, and the resource resolution system determines the target domain name server according to the chain resource processing request through the domain name resolver, and initiates resource information processing to the target domain name server through the domain name resolver. request; the target domain name service performs resource information query based on the information of the resource data stored in the resource storage network to determine the resource information. The resource storage network feeds back the resource information to the resource analysis system, so that the resource information is fed back to the blockchain node that initiates the chain resource processing request through the resource analysis system.

S530、接收资源解析系统反馈的资源信息。S530. Receive resource information fed back by the resource analysis system.

示例性的,可以通过区块链客户获取资源解析系统反馈的资源信息。Exemplarily, the resource information fed back by the resource resolution system can be obtained through the blockchain client.

本公开实施例通过在识别到跨链资源的信息获取需求时,产生链资源处理请求;将链资源处理请求发送给资源解析系统,以请求资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;接收资源解析系统反馈的资源信息。上述方案由去中心化存储网络对多链数据资源进行维护和管理,通过资源解析系统从去中心化存储网络中获取资源信息,并反馈给跨链资源使用者,实现了多链之间的数据资源的相互定位和获取;由去中心化存储网络对多链的数据资源进行存储和维护,能够有效防止数据资源被篡改,且能维持更新;本公开的技术方案通用性强、安全可靠性高。The embodiment of the present disclosure generates a chain resource processing request when identifying a cross-chain resource information acquisition requirement, and sends the chain resource processing request to the resource analysis system to request the resource analysis system based on the information of the resource data stored in the resource storage network , query the resource information to determine the resource information; receive the resource information fed back by the resource analysis system. The above scheme maintains and manages multi-chain data resources by the decentralized storage network, obtains resource information from the decentralized storage network through the resource analysis system, and feeds it back to the cross-chain resource users, realizing the data between multiple chains. Mutual positioning and acquisition of resources; multi-chain data resources are stored and maintained by a decentralized storage network, which can effectively prevent data resources from being tampered with and can be maintained and updated; the technical solution disclosed in the present invention has strong versatility and high security and reliability .

可以理解的是,区块链节点可以是跨链资源访问请求的数据发起方,也可以是跨链资源的数据持有者。当区块链节点想要在资源存储网络中发布自身的资源注册请求时,可以在资源存储网络中注册可以被访问或获取的相关资源数据。It is understandable that a blockchain node can be the data initiator of the cross-chain resource access request, or the data holder of the cross-chain resource. When a blockchain node wants to publish its own resource registration request in the resource storage network, it can register the relevant resource data that can be accessed or obtained in the resource storage network.

在一个可选实施例中,向资源存储网络发起资源注册请求;其中,资源注册请求中包括本地区块链节点所提供可访问资源的资源定位数据和资源权限数据。In an optional embodiment, a resource registration request is initiated to the resource storage network; wherein, the resource registration request includes resource location data and resource permission data of the accessible resources provided by the local blockchain node.

其中,资源注册请求可以是区块链节点想要将自身资源注册并存储至资源存储网络中而发起的请求。The resource registration request may be a request initiated by a blockchain node to register and store its own resources in the resource storage network.

其中,可访问资源可以是区块链节点对外提供的可以被访问获取的资源数据。Wherein, the accessible resource may be the resource data provided by the blockchain node that can be accessed and acquired.

其中,资源定位数据可以包括链资源的资源定位标识与资源访问地址之间的映射关系。资源权限数据中可以包括资源被访问的权限控制信息,例如,具有访问链资源权限的区块链节点名称或标识等。The resource location data may include a mapping relationship between resource location identifiers of chain resources and resource access addresses. The resource permission data may include permission control information about the resource being accessed, for example, the name or identifier of the blockchain node that has permission to access the chain resource.

示例性的,数据持有者可以通过区块链客户端向资源存储网络发起资源注册请求。Exemplarily, the data holder may initiate a resource registration request to the resource storage network through the blockchain client.

本可选实施例通过向资源存储网络发起资源注册请求,将资源注册请求中的资源数据的关联信息存储在资源存储网络中,实现了区块链节点在资源存储网络中对自身的资源数据的注册,从而便于跨链资源使用者对已注册的资源数据的获取。由去中心化的资源存储网络对区块链节点注册的资源数据进行存储和维护,能够有效防止资源数据被篡改,且能维持更新。In this optional embodiment, by initiating a resource registration request to the resource storage network, and storing the associated information of the resource data in the resource registration request in the resource storage network, the blockchain node in the resource storage network realizes the information about its own resource data in the resource storage network. Registration, so as to facilitate cross-chain resource users to obtain the registered resource data. The resource data registered by the blockchain nodes is stored and maintained by the decentralized resource storage network, which can effectively prevent the resource data from being tampered with and can be maintained and updated.

需要说明的是,跨链资源发起方和提供方需要基于相同的跨链命名协议发起请求,统一的跨链命名协议作为区块链网络间跨链访问资源的互操作性基础。It should be noted that the initiator and provider of cross-chain resources need to initiate requests based on the same cross-chain naming protocol, and the unified cross-chain naming protocol serves as the interoperability basis for cross-chain access resources between blockchain networks.

在一个可选实施例中,资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;资源定位标识的字符串中包括域名;域名为待访问资源所在区块链节点所属域的域名,资源访问地址中包括待访问资源所在区块链节点的通信地址。In an optional embodiment, the resource information stored in the resource storage network includes: resource location data and resource permission data; the resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; the resource location identifier The string includes the domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located.

其中,链资源的资源定位标识可以是链资源在区块链网络中的定位标志,每个数据资源拥有全局唯一的链资源定位标志。链资源的资源定位标识与资源访问地址之间具有映射关系,可以通过链资源的资源定位标识获取到对应的资源访问地址。The resource location identifier of the chain resource may be the location identifier of the chain resource in the blockchain network, and each data resource has a globally unique location identifier of the chain resource. There is a mapping relationship between the resource location identifier of the chain resource and the resource access address, and the corresponding resource access address can be obtained through the resource location identifier of the chain resource.

其中,待访问资源可以是链资源发起方想要访问或获取的资源。资源权项数据可以包括具有访问链资源权限的区块链节点名称或标识等。The resource to be accessed may be a resource that the originator of the chain resource wants to access or acquire. The resource right item data may include the name or identifier of the blockchain node that has the right to access the chain resource, etc.

跨链资源访问涉及到不同链的数据资源的交互操作,资源定位标识用于实现对这些数据资源的统一定位。在多链构成的区块链网络中,每一条数据资源都有统一且唯一的资源访问地址,该地址与资源定位标识具有映射关系。资源访问地址的协议定义可以预先设定,例如,资源访问地址的协议定义可以为:[链的具体类型:][//链名][子链/侧链/平行链名][/合约名、方法名等参数信息]。Cross-chain resource access involves the interaction of data resources in different chains, and the resource location identifier is used to realize the unified location of these data resources. In a multi-chain blockchain network, each data resource has a unified and unique resource access address, which has a mapping relationship with the resource location identifier. The protocol definition of the resource access address can be preset. For example, the protocol definition of the resource access address can be: [specific type of chain:][//chain name][subchain/sidechain/parachain name][/contract name , method name and other parameter information].

其中,参数项可以包括:资源名称、资源执行参数、跨链请求发起方的账户公钥和跨链请求发起方的签名等。其中,资源执行参数可以包括区块链框架预留参数(默认值可以为default)、待访问资源的智能合约的合约名、待访问资源的智能合约的方法名和合约参数等。The parameter items may include: resource name, resource execution parameters, account public key of the initiator of the cross-chain request, signature of the initiator of the cross-chain request, and the like. The resource execution parameters may include blockchain framework reserved parameters (the default value may be default), the contract name of the smart contract of the resource to be accessed, the method name and contract parameters of the smart contract of the resource to be accessed, etc.

在一个可选实施例中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。In an optional embodiment, the domain name space of the blockchain network includes multiple levels, and a tree-like structure is used for domain name storage. The nodes of the tree-like structure are used to store the labels of the corresponding level domain names. Corresponding to the data resources provided, the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure; the domain name labels at each level of the domain name space include, from top to bottom: blockchain architecture name, blockchain Name of the operator to which the network belongs, blockchain name, blockchain node name, and resource name.

其中,区块链网络的域名空间记录了树状结构的域名空间和与这些域名空间关联的数据资源。域名空间树的每个节点(包括叶子,本实施例对节点与叶子不加区别,统一称为“节点”)记录一条数据资源记录。其中,数据资源中可以包括资源类型、访问地址、访问协议、版本号、权限要求。例如,资源类型可以是使用的智能合约的类型,如使用wasm虚拟机的智能合约;访问地址中可以包括IP和端口号等;权限要求例如可以是智能合约中不同方法所对应的不同的权限要求。Among them, the domain name space of the blockchain network records the tree-structured domain name space and the data resources associated with these domain name spaces. Each node of the domain name space tree (including leaves, this embodiment makes no distinction between nodes and leaves, collectively referred to as "nodes") records a data resource record. The data resource may include resource type, access address, access protocol, version number, and permission requirements. For example, the resource type can be the type of the smart contract used, such as the smart contract using the wasm virtual machine; the access address can include IP and port numbers, etc.; the permission requirements can be, for example, different permission requirements corresponding to different methods in the smart contract .

每个节点用于存储对应层级域名的标签,非兄弟节点的标签可以相同,但兄弟节点的标签不同。其中,兄弟节点可以是具有相同父节点的节点。树状结构根节点的标签可以是空标签,即标签长度为零的标签。节点的完整域名是从当前节点到树结构的根路径沿途的各个标签的拼接。Each node is used to store the label of the corresponding hierarchical domain name. The labels of non-sibling nodes can be the same, but the labels of sibling nodes are different. Among them, sibling nodes can be nodes with the same parent node. The label of the root node of the tree structure can be an empty label, that is, a label with a label length of zero. The full domain name of a node is the concatenation of the labels along the path from the current node to the root of the tree structure.

示例性的,域名可以用任意大小写命名或保存,例如可以使用标记“A”生成节点,或使用标记“a”生成节点,但是二者不能作为兄弟标签。在生成完整域名时,可能需要拼接多个标签,此时不同标签可以采用标记符隔开,例如,标记符可以是圆点(“.”)。Exemplarily, the domain name can be named or saved in any case, for example, a node can be generated using the tag "A", or a node can be generated using the tag "a", but the two cannot be used as sibling tags. When generating a complete domain name, it may be necessary to splicing multiple tags. In this case, different tags can be separated by a marker, for example, the marker can be a dot (".").

需要说明的是,发起方所发起的链资源处理请求中的域名可以用标签序列来表示。每个标签可以为一个八位字符长度的字符串,域名的最大总长度被限制不超过255个标签。域名服务器和域名解析器可以采用不区分大小写的方式比较标签。It should be noted that the domain name in the chain resource processing request initiated by the initiator can be represented by a label sequence. Each tag can be an eight-character string, and the maximum total length of the domain name is limited to 255 tags. Nameservers and name resolvers can compare labels in a case-insensitive manner.

域名中可以采用任意大小写字符。但具有相同拼写、不同大小写的域名可以被看作为同一域名,域名的命名以字母开始,以字母或数字结束,中间的字符可以包括字母、数字和连字符等。对域名长度的限制可以是标签长度不大于63个字符。Any uppercase and lowercase characters can be used in the domain name. However, domain names with the same spelling and different capitalization can be regarded as the same domain name. The name of the domain name starts with a letter and ends with a letter or number, and the characters in the middle can include letters, numbers and hyphens. The limit on the length of the domain name can be that the length of the label is no more than 63 characters.

可选的,本实施例对区块链网络的域名空间所使用的树状结构不做限定,即不限定使用某种特定的树状结构,或必须使用某种特定的方法在树状结构中定位标签,从而提升域名空间的通用性。Optionally, this embodiment does not limit the tree structure used in the domain name space of the blockchain network, that is, it does not limit the use of a specific tree structure, or a specific method must be used in the tree structure. Locate labels to increase the versatility of the domain name space.

其中,每个节点与区块链所提供的数据资源对应,即每个节点可以对应一个域名,每个域名可以与区块链所提供的数据资源相对应,每个数据资源可以对应一条资源记录,每个资源记录可以对应一个资源定位符。Among them, each node corresponds to the data resources provided by the blockchain, that is, each node can correspond to a domain name, each domain name can correspond to the data resources provided by the blockchain, and each data resource can correspond to a resource record , each resource record can correspond to a resource locator.

需要说明的是,域名服务器中可以缓存有关树状结构的域名空间的结构。域名服务器缓存了指定区块链网络的域名空间内的资源记录信息,并定时进行刷新。资源记录信息被存储在基于区块链技术的去中心化资源存储网络中。It should be noted that the domain name server may cache the structure of the domain name space related to the tree structure. The domain name server caches the resource record information in the domain name space of the specified blockchain network and refreshes it regularly. Resource record information is stored in a decentralized resource storage network based on blockchain technology.

在一个可选实施例中,区块链网络提供的可访问资源包括:区块链可支持服务和/或区块链可读数据;区块链可支持服务包括下述至少一项:智能合约,和智能合约中可访问的方法程序。In an optional embodiment, the accessible resources provided by the blockchain network include: blockchain-supportable services and/or blockchain-readable data; blockchain-supportable services include at least one of the following: smart contracts , and methods accessible in smart contracts.

可以理解的是,区块链节点产生的链资源处理请求可以包括跨链资源访问的链资源访问请求、跨链资源查询域名的域名查询请求和跨链资源查询权限的权限查询请求。It can be understood that the chain resource processing request generated by the blockchain node may include a chain resource access request for cross-chain resource access, a domain name query request for cross-chain resource query domain name, and a permission query request for cross-chain resource query permission.

在一个可选实施例中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括:在识别到跨链资源的访问需求时,产生链资源访问请求;链资源访问请求中包括待访问资源的资源定位标识;相应的,资源信息为资源访问地址,则接收资源解析系统反馈的资源信息之后,还包括:根据资源访问地址发起跨链的资源访问事务请求。In an optional embodiment, when an information acquisition requirement of a cross-chain resource is identified, generating a chain resource processing request includes: when an access requirement for a cross-chain resource is identified, generating a chain resource access request; the chain resource access request includes: Resource location identifier of the resource to be accessed; correspondingly, if the resource information is a resource access address, after receiving the resource information fed back by the resource resolution system, the method further includes: initiating a cross-chain resource access transaction request according to the resource access address.

其中,链资源的资源定位标识可以是链资源在区块链网络中的定位标志,每个数据资源拥有全局唯一的链资源定位标志。链资源的资源定位标识与资源访问地址之间具有映射关系,可以通过链资源的资源定位标识获取到对应的资源访问地址。The resource location identifier of the chain resource may be the location identifier of the chain resource in the blockchain network, and each data resource has a globally unique location identifier of the chain resource. There is a mapping relationship between the resource location identifier of the chain resource and the resource access address, and the corresponding resource access address can be obtained through the resource location identifier of the chain resource.

其中,资源访问事务请求可以是区块链节点向资源信息所在区块链网络发起的访问或获取资源的事务请求。The resource access transaction request may be a transaction request initiated by the blockchain node to the blockchain network where the resource information is located to access or acquire the resource.

示例性,区块链节点若识别到跨链资源的访问需求,则产生链资源访问请求,并将该链资源访问请求向资源解析系统发起;资源解析系统根据链资源访问请求中的待访问资源的资源定位标识,基于资源存储网络中存储的资源定位数据,进行访问地址查询,以确定资源访问地址;其中,资源访问地址表征待访问资源在区块链网络中的访问入口。区块链获取到资源解析网络反馈的资源访问地址之后,根据资源访问地址发起跨链的资源访问事务请求。Exemplarily, if the blockchain node recognizes the access requirement of cross-chain resources, it will generate a chain resource access request, and initiate the chain resource access request to the resource resolution system; Based on the resource location data stored in the resource storage network, the access address query is performed to determine the resource access address; wherein, the resource access address represents the access entry of the resource to be accessed in the blockchain network. After the blockchain obtains the resource access address fed back by the resource resolution network, it initiates a cross-chain resource access transaction request according to the resource access address.

本可选实施例通过在识别到跨链资源的访问需求时,产生链资源访问请求,并接收资源解析系统反馈的资源信息之后,根据资源访问地址发起跨链的资源访问事务请求,实现了发起方通过资源访问地址对跨链资源的访问和获取。In this optional embodiment, when a cross-chain resource access requirement is identified, a chain resource access request is generated, and after receiving the resource information fed back by the resource resolution system, a cross-chain resource access transaction request is initiated according to the resource access address, thereby realizing the initiation of a cross-chain resource access transaction request. The party can access and obtain cross-chain resources through the resource access address.

在一个可选实施例中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括下述至少一项:在识别到跨链资源的域名查询需求时,产生域名查询请求;域名查询请求中包括待访问资源的资源访问地址;和在识别到跨链资源的权限查询需求时,产生权限查询请求;权限查询请求中包括待访问资源的资源定位标识或资源访问地址。In an optional embodiment, when an information acquisition requirement of a cross-chain resource is identified, generating a chain resource processing request includes at least one of the following: when a domain name query requirement of a cross-chain resource is identified, a domain name query request is generated; The query request includes the resource access address of the resource to be accessed; and when the permission query requirement of the cross-chain resource is identified, a permission query request is generated; the permission query request includes the resource location identifier or resource access address of the resource to be accessed.

其中,域名查询请求可以是发起方发起的对待访问资源所在区块链节点所属域域名的查询请求。The domain name query request may be a query request initiated by the initiator for the domain name of the blockchain node where the resource to be accessed belongs.

其中,域名查询请求中可以包括资源访问地址。资源访问地址中可以包括待访问资源所在区块链节点的通信地址。The domain name query request may include a resource access address. The resource access address may include the communication address of the blockchain node where the resource to be accessed is located.

示例性的,区块链节点若识别到跨链资源的域名查询需求时,则产生域名查询请求,并将该域名查询请求向资源解析系统发起;资源解析系统根据获取的域名查询请求,请求资源存储网络根据该域名查询请求确定资源域名。具体的,资源解析系统可以对获取的域名查询请求进行解析,并向资源存储网络发起解析后的域名查询请求。其中,域名查询请求中可以包括资源访问地址。资源存储网络基于存储的资源定位数据,根据资源访问地址,进行域名查询,从而将查询到资源访问地址所属域的域名,并作为资源域名基于资源解析系统反馈至区块链节点。Exemplarily, if the blockchain node recognizes the domain name query requirement of cross-chain resources, it will generate a domain name query request, and initiate the domain name query request to the resource resolution system; the resource resolution system requests the resource according to the obtained domain name query request. The storage network determines the resource domain name according to the domain name query request. Specifically, the resource resolution system can parse the acquired domain name query request, and send the parsed domain name query request to the resource storage network. The domain name query request may include a resource access address. Based on the stored resource location data, the resource storage network performs domain name query according to the resource access address, so that the domain name of the domain to which the resource access address belongs is queried, and is fed back to the blockchain node as the resource domain name based on the resource resolution system.

其中,权限查询请求可以是区块链节点发起的区块链网络中的链资源的可被访问权限的查询请求。例如,若发起方想要获取区块链网络的链资源A,则可以预先查询是否具有对链资源A的获取或访问权限,也即链资源A是否对发起方授权,是否允许发起方访问。资源权限可以为资源被访问的权限控制信息。Wherein, the permission query request may be a query request for the access permission of the chain resource in the blockchain network initiated by the blockchain node. For example, if the initiator wants to obtain the chain resource A of the blockchain network, it can query in advance whether it has the right to obtain or access the chain resource A, that is, whether the chain resource A authorizes the initiator and allows the initiator to access. The resource permission can be the permission control information that the resource is accessed.

其中,权限查询请求中可以包括待查询资源的资源访问地址或资源定位标识。资源权限数据中可以包括资源被访问的权限控制信息,例如,具有访问链资源权限的区块链节点名称或标识等。The permission query request may include a resource access address or a resource location identifier of the resource to be queried. The resource permission data may include permission control information about the resource being accessed, for example, the name or identifier of the blockchain node that has permission to access the chain resource.

示例性的,区块链节点若识别到跨链资源的权限查询需求时,则产生权限查询请求,并将该权限查询请求向资源解析系统发起;资源解析系统根据获取的权限查询请求,请求资源存储网络根据该权限查询请求确定资源权限。具体的,资源解析系统可以对获取的权限查询请求进行解析,并向资源存储网络发起解析后的权限查询请求。其中,权限查询请求中可以包括待查询资源的资源访问地址或资源定位标识。资源存储网络基于存储的资源权限数据,根据资源访问地址或资源定位标识,查询该资源定位标识或资源访问地址关联的资源是否具有访问权限,从而将查询得到的资源权限结果基于资源解析系统反馈至区块链节点。Exemplarily, if the blockchain node recognizes the permission query requirement of cross-chain resources, it generates a permission query request, and initiates the permission query request to the resource analysis system; the resource analysis system requests the resource according to the obtained permission query request. The storage network determines the resource permission according to the permission query request. Specifically, the resource analysis system can analyze the obtained permission query request, and send the parsed permission query request to the resource storage network. The permission query request may include a resource access address or a resource location identifier of the resource to be queried. Based on the stored resource permission data, the resource storage network queries whether the resource associated with the resource location identifier or resource access address has access permission according to the resource access address or resource location identifier, so that the resource permission result obtained by the query is fed back to the resource parsing system. blockchain node.

本可选实施例通过在识别跨链资源的信息获取需求时,产生域名查询请求或权限查询请求,实现了对资源访问地址所属域的域名的确定,以及实现了发起方对是否具有对待查询资源的访问权限的确定。This optional embodiment realizes the determination of the domain name of the domain to which the resource access address belongs by generating a domain name query request or a permission query request when identifying the information acquisition requirement of the cross-chain resource, and realizes the initiator's ability to determine whether the resource to be queried is available or not. determination of access rights.

图6是根据本公开实施例提供的一种区块链的资源处理装置的示意图,本实施例可适用于多链之间进行数据资源相互定位和获取的应用场景,该装置配置于电子设备中,可实现本公开任意实施例所述的区块链的资源处理方法。该电子设备可以为资源解析系统,参考图6,该区块链的资源处理装置600具体包括如下:FIG. 6 is a schematic diagram of a resource processing apparatus of a blockchain provided according to an embodiment of the present disclosure. This embodiment is applicable to an application scenario of mutual positioning and acquisition of data resources between multiple chains, and the apparatus is configured in an electronic device. , the resource processing method of the blockchain described in any embodiment of the present disclosure can be implemented. The electronic device may be a resource analysis system. Referring to FIG. 6 , the resource processing apparatus 600 of the blockchain specifically includes the following:

处理请求获取模块601,用于获取链资源处理请求;A processing request obtaining module 601, used for obtaining a chain resource processing request;

资源信息确定模块602,用于根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;The resource information determination module 602 is configured to perform a resource information query based on the information of the resource data stored in the resource storage network according to the chain resource processing request to determine the resource information; wherein, the resource storage network is a decentralized storage network; the resource data is an accessible resource provided in the blockchain network;

处理请求响应模块603,用于基于所述资源信息响应所述链资源处理请求。A processing request response module 603, configured to respond to the chain resource processing request based on the resource information.

本公开实施例方案通过根据获取的链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,从而确定资源信息,并基于资源信息响应链资源处理请求。上述方案由去中心化存储网络对多链数据资源进行维护和管理,通过资源解析系统从去中心化存储网络中获取资源信息,并反馈给跨链资源使用者,实现了多链之间的数据资源的相互定位和获取;由去中心化存储网络对多链的数据资源进行存储和维护,能够有效防止数据资源被篡改,且能维持更新;本公开的技术方案通用性强、安全可靠性高。The solutions of the embodiments of the present disclosure determine resource information by querying the resource information based on the information of the resource data stored in the resource storage network according to the obtained chain resource processing request, and responding to the chain resource processing request based on the resource information. The above scheme maintains and manages multi-chain data resources by the decentralized storage network, obtains resource information from the decentralized storage network through the resource analysis system, and feeds it back to the cross-chain resource users, realizing the data between multiple chains. Mutual positioning and acquisition of resources; multi-chain data resources are stored and maintained by a decentralized storage network, which can effectively prevent data resources from being tampered with and can be maintained and updated; the technical solution disclosed in the present invention has strong versatility and high security and reliability .

在一种可选的实施方式中,所述处理请求获取模块601,具体用于:In an optional implementation manner, the processing request obtaining module 601 is specifically configured to:

获取区块链节点发起的链资源处理请求;其中,所述链资源处理请求基于区块链客户端发起的事务请求而产生。Obtain the chain resource processing request initiated by the blockchain node; wherein, the chain resource processing request is generated based on the transaction request initiated by the blockchain client.

在一种可选的实施方式中,所述资源信息确定模块602,包括:In an optional implementation manner, the resource information determining module 602 includes:

事务请求产生单元,用于根据所述链资源处理请求,产生资源信息处理事务请求;a transaction request generating unit, configured to process the request according to the chain resource, and generate resource information to process the transaction request;

资源信息反馈单元,用于将所述资源信息处理事务请求向所述资源存储网络发起,以请求所述资源存储网络处理所述资源信息处理事务请求,并反馈资源信息;其中,所述资源存储网络是基于区块链技术实现的区块链网络。a resource information feedback unit, configured to initiate the resource information processing transaction request to the resource storage network, so as to request the resource storage network to process the resource information processing transaction request and feed back resource information; wherein, the resource storage network The network is a blockchain network implemented based on blockchain technology.

在一种可选的实施方式中,所述资源信息确定模块602,包括:In an optional implementation manner, the resource information determining module 602 includes:

目标域名服务器确定单元,用于通过所述资源解析系统中的域名解析器,根据所述链资源处理请求确定目标域名服务器;a target domain name server determination unit, configured to determine a target domain name server according to the chain resource processing request through the domain name resolver in the resource resolution system;

第一资源信息确定单元,用于通过域名解析器,向所述目标域名服务器发起资源信息处理请求;其中,所述资源信息处理请求用于请求所述目标域名服务器,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;The first resource information determination unit is configured to initiate a resource information processing request to the target domain name server through a domain name resolver; wherein, the resource information processing request is used to request the target domain name server, based on the data stored in the resource storage network. Resource data information, query resource information to determine resource information;

资源信息接收单元,用于通过域名解析器,接收所述目标域名服务器反馈的资源信息。The resource information receiving unit is configured to receive the resource information fed back by the target domain name server through the domain name resolver.

在一种可选的实施方式中,所述目标域名服务器确定单元,包括:In an optional implementation manner, the target domain name server determination unit includes:

目标域名服务器确定子单元,用于通过域名解析器,根据所述链资源处理请求,在所述域名解析器已发现的域名服务器中,确定目标域名服务器;The target domain name server determination subunit is used to process the request according to the chain resource through the domain name resolver, and determine the target domain name server among the domain name servers discovered by the domain name resolver;

相应的,所述资源信息确定模块602,还包括:Correspondingly, the resource information determining module 602 further includes:

目标域名服务器更新单元,用于通过域名解析器,接收所述目标域名服务器反馈的资源信息之前,通过所述域名解析器,如果接收到所述目标域名服务器反馈的可选域名服务器连接地址,则根据所述可选域名服务器连接地址与对应的域名服务器建立连接,并更新作为新的目标域名服务器,继续执行发起资源信息处理请求的操作,直至接收到资源信息或失败结果;其中,链资源的地址空间划分为多个域,每个域名服务器用于查询一个或多个域中资源信息。The target domain name server updating unit is configured to, through the domain name resolver, before receiving the resource information fed back by the target domain name server, pass the domain name resolver, if the optional domain name server connection address fed back by the target domain name server is received, then Establish a connection with the corresponding domain name server according to the optional domain name server connection address, and update it as a new target domain name server, and continue to perform the operation of initiating the resource information processing request until the resource information or failure result is received; The address space is divided into multiple domains, and each domain name server is used to query resource information in one or more domains.

在一种可选的实施方式中,所述资源信息确定模块602,还包括:In an optional implementation manner, the resource information determining module 602 further includes:

可选域名解析器确定单元,用于在根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询之后,如果通过所述域名解析器,确定资源信息查询失败,则确定其他的可选域名解析器,并将所述可选域名解析器的连接地址反馈给所述链资源处理请求的发起方,以供所述发起方向所述可选域名解析器重新发起链资源处理请求。An optional domain name resolver determination unit, configured to perform resource information query based on the resource data information stored in the resource storage network according to the chain resource processing request, if the domain name resolver is passed, it is determined that the resource information query fails , other optional domain name resolvers are determined, and the connection address of the optional domain name resolver is fed back to the initiator of the chain resource processing request for the initiator to re-initiate the optional domain name resolver The chain resource handles the request.

在一种可选的实施方式中,所述资源信息确定模块602,还包括:In an optional implementation manner, the resource information determining module 602 further includes:

资源信息检查单元,用于在通过域名解析器,接收所述目标域名服务器反馈的资源信息之后,通过所述域名解析器,对所述资源信息进行下述至少一项检查:合法性检查、有效性检查和匹配性检查。The resource information checking unit is configured to, after receiving the resource information fed back by the target domain name server through the domain name resolver, perform at least one of the following checks on the resource information through the domain name resolver: validity checking, valid sex check and match check.

在一个可选的实施方式中,所述资源信息确定模块602,包括:In an optional implementation manner, the resource information determining module 602 includes:

资源信息查询单元,用于根据所述链资源处理请求,在本地缓存中进行资源信息的查询;a resource information query unit, configured to process the request according to the chain resource, and query the resource information in the local cache;

第二资源信息确定单元,用于如果在本地缓存中查询到资源信息,则确定为所述资源信息;a second resource information determining unit, configured to determine the resource information as the resource information if the resource information is queried in the local cache;

第三资源信息确定单元,用于如果在本地缓存中未查询到资源信息,则向所述资源存储网络发起资源信息处理请求,以进行资源信息查询,并确定资源信息。The third resource information determining unit is configured to initiate a resource information processing request to the resource storage network to query the resource information and determine the resource information if the resource information is not queried in the local cache.

在一个可选的实施方式中,所述链资源处理请求为链资源访问请求,则所述资源信息确定模块602,包括:In an optional implementation manner, the chain resource processing request is a chain resource access request, and the resource information determining module 602 includes:

资源访问地址确定单元,用于根据所述链资源访问请求中的待访问资源的资源定位标识,基于所述资源存储网络中存储的资源定位数据,进行访问地址查询,以确定资源访问地址;其中,所述资源访问地址表征待访问资源在区块链网络中的访问入口。a resource access address determination unit, configured to perform an access address query based on the resource location identifier of the resource to be accessed in the chain resource access request and based on the resource location data stored in the resource storage network to determine the resource access address; wherein , the resource access address represents the access entry of the resource to be accessed in the blockchain network.

在一个可选的实施方式中,所述链资源访问请求中包括资源定位标识和访问参数,所述访问参数包括下述至少一项:资源名称、资源执行参数、发起方公钥和发起方签名。In an optional embodiment, the chain resource access request includes a resource location identifier and an access parameter, and the access parameter includes at least one of the following: resource name, resource execution parameter, initiator public key, and initiator signature .

在一个可选的实施方式中,所述链资源处理请求为域名查询请求,则所述资源信息确定模块602,包括:In an optional implementation manner, the chain resource processing request is a domain name query request, and the resource information determining module 602 includes:

资源域名确定单元,用于根据所述域名查询请求中的资源访问地址,基于资源存储网络中存储的资源定位数据,进行域名查询,以确定资源域名;所述资源域名为资源访问地址所属域的域名。A resource domain name determining unit, configured to perform a domain name query based on the resource location data stored in the resource storage network according to the resource access address in the domain name query request to determine the resource domain name; the resource domain name is the domain name of the domain to which the resource access address belongs. domain name.

在一个可选的实施方式中,所述链资源处理请求为权限查询请求,则所述资源信息确定模块602,包括:In an optional implementation manner, the chain resource processing request is a permission query request, and the resource information determining module 602 includes:

资源权限确定单元,用于根据所述权限查询请求中的待查询资源的资源访问地址或资源定位标识,基于资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限;所述资源权限为资源被访问的权限控制信息。a resource permission determination unit, configured to perform a permission query based on the resource permission data stored in the resource storage network according to the resource access address or resource location identifier of the resource to be queried in the permission query request to determine the resource permission; the resource Permission is the permission control information for the resource to be accessed.

在一个可选的实施方式中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;In an optional implementation manner, the resource information stored in the resource storage network includes: resource location data and resource permission data;

资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address;

所述资源定位标识的字符串中包括域名;所述域名为所述待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located.

在一个可选的实施方式中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,所述树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;In an optional embodiment, the domain name space of the blockchain network includes multiple levels, and a tree-like structure is used to store domain names. The nodes of the tree-like structure are used to store labels corresponding to the domain names of the levels. Each node is associated with a domain name. Corresponding to the data resources provided by the blockchain, the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure;

所述域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。The domain name labels at each level of the domain name space include, from top to bottom, the name of the blockchain architecture, the name of the operator to which the blockchain network belongs, the name of the blockchain, the name of the blockchain node and the name of the resource.

在一个可选的实施方式中,区块链网络提供的可访问资源包括:区块链可支持服务和/或区块链可读数据;In an optional embodiment, the accessible resources provided by the blockchain network include: blockchain-supportable services and/or blockchain-readable data;

所述区块链可支持服务包括下述至少一项:智能合约,和智能合约中的可访问的方法程序。The blockchain-supportable service includes at least one of the following: a smart contract, and an accessible method program in the smart contract.

本公开实施例的技术方案所提供的一种区块链的资源处理装置可执行本公开任意实施例所提供的区块链的资源处理方法,具备执行区块链的资源处理方法相应的功能模块和有益效果。A block chain resource processing apparatus provided by the technical solutions of the embodiments of the present disclosure can execute the block chain resource processing method provided by any embodiment of the present disclosure, and has functional modules corresponding to executing the block chain resource processing method. and beneficial effects.

图7是根据本公开实施例提供的一种区块链的资源处理装置的示意图,本实施例可适用于多链之间进行数据资源相互定位和获取的应用场景,该装置配置于电子设备中,可实现本公开任意实施例所述的区块链的资源处理方法。该电子设备可以为资源存储网络,参考图7,该区块链的资源处理装置700具体包括如下:FIG. 7 is a schematic diagram of a resource processing apparatus of a blockchain provided according to an embodiment of the present disclosure. This embodiment is applicable to an application scenario of mutual positioning and acquisition of data resources between multiple chains, and the apparatus is configured in an electronic device. , the resource processing method of the blockchain described in any embodiment of the present disclosure can be implemented. The electronic device may be a resource storage network. Referring to FIG. 7 , the resource processing apparatus 700 of the blockchain specifically includes the following:

信息处理请求获取模块701,用于获取资源信息处理请求;所述资源信息处理请求基于链资源处理请求而确定;an information processing request obtaining module 701, configured to obtain a resource information processing request; the resource information processing request is determined based on the chain resource processing request;

资源信息确定模块702,用于根据所述资源信息处理请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;A resource information determination module 702, configured to query the resource information according to the resource information processing request and the information of the resource data stored in the resource storage network to determine the resource information;

信息处理请求响应模块703,用于基于所述资源信息响应所述资源信息处理请求;所述资源数据为区块链网络中提供的可访问资源。The information processing request response module 703 is configured to respond to the resource information processing request based on the resource information; the resource data is an accessible resource provided in the blockchain network.

本公开实施例方案通过根据获取的资源信息处理请求,和资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;基于资源信息响应资源信息处理请求。上述方案由去中心化存储网络对多链数据资源进行维护和管理,通过资源解析系统从去中心化存储网络中获取资源信息,并反馈给跨链资源使用者,实现了多链之间的数据资源的相互定位和获取;基于域名机制进行管理,使得区块链节点能够灵活发布对外链提供的数据资源,并进行管理。由去中心化存储网络对多链的数据资源进行存储和维护,能够有效防止数据资源被篡改,且能维持更新;本公开的技术方案通用性强、安全可靠性高。The solution of the embodiment of the present disclosure determines the resource information by querying the resource information according to the obtained resource information processing request and the information of the resource data stored in the resource storage network; and responding to the resource information processing request based on the resource information. The above scheme maintains and manages multi-chain data resources by the decentralized storage network, obtains resource information from the decentralized storage network through the resource analysis system, and feeds it back to the cross-chain resource users, realizing the data between multiple chains. Mutual positioning and acquisition of resources; management based on the domain name mechanism enables blockchain nodes to flexibly publish and manage data resources provided by external chains. The multi-chain data resources are stored and maintained by the decentralized storage network, which can effectively prevent the data resources from being tampered with and can be maintained and updated; the technical solution of the present disclosure has strong versatility and high security and reliability.

在一个可选实施例中,所述信息处理请求获取模块701,包括:In an optional embodiment, the information processing request acquisition module 701 includes:

资源信息处理请求获取单元,用于获取资源解析系统中域名解析器或域名服务器发起的资源信息处理请求。The resource information processing request obtaining unit is used to obtain the resource information processing request initiated by the domain name resolver or the domain name server in the resource resolution system.

在一个可选实施例中,所述资源存储网络是基于区块链技术实现的区块链网络,则所述信息处理请求获取模块701,包括:In an optional embodiment, the resource storage network is a blockchain network implemented based on blockchain technology, and the information processing request acquisition module 701 includes:

事务请求获取单元,用于获取区块链客户端发起的资源信息处理事务请求,作为资源信息处理请求。The transaction request obtaining unit is used to obtain the resource information processing transaction request initiated by the blockchain client as the resource information processing request.

在一个可选实施例中,所述资源信息处理请求为域名解析请求,则所述资源信息确定模块702,包括:In an optional embodiment, the resource information processing request is a domain name resolution request, and the resource information determining module 702 includes:

资源访问地址确定单元,用于根据所述域名解析请求中的待解析域名,和所述资源存储网络中存储的资源定位数据,进行域名所对应的资源访问地址查询,以确定资源访问地址。The resource access address determination unit is configured to query the resource access address corresponding to the domain name according to the domain name to be resolved in the domain name resolution request and the resource location data stored in the resource storage network to determine the resource access address.

在一个可选实施例中,所述资源信息处理请求为域名查询请求,则所述资源信息确定模块702,包括:In an optional embodiment, the resource information processing request is a domain name query request, and the resource information determining module 702 includes:

资源域名确定单元,用于根据所述域名查询请求中的待查询地址,和所述资源存储网络中存储的资源定位数据,进行地址所对应的域名查询,以确定资源域名。The resource domain name determining unit is configured to query the domain name corresponding to the address according to the address to be queried in the domain name query request and the resource location data stored in the resource storage network to determine the resource domain name.

在一个可选实施例中,所述资源信息处理请求为权限查询请求,则所述资源信息确定模块702,包括:In an optional embodiment, the resource information processing request is a permission query request, and the resource information determining module 702 includes:

资源权项确定单元,用于根据所述权限查询请求中的待查询资源的资源访问地址或资源定位标识,和所述资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限;其中,所述资源权限为资源被访问的权限控制信息。a resource right item determination unit, configured to perform a rights query to determine resource rights according to the resource access address or resource location identifier of the resource to be queried in the rights query request and the resource rights data stored in the resource storage network; Wherein, the resource permission is permission control information of the resource being accessed.

在一个可选实施例中,所述区块链的资源处理装置700,还包括:In an optional embodiment, the resource processing apparatus 700 of the blockchain further includes:

注册请求接收模块,用于接收区块链节点发起的资源注册请求;The registration request receiving module is used to receive the resource registration request initiated by the blockchain node;

资源存储模块,用于将所述资源注册请求中的资源数据的关联信息存储在所述资源存储网络中;其中,所述关联信息包括下述至少一项:资源定位数据和资源权限数据。A resource storage module, configured to store the associated information of the resource data in the resource registration request in the resource storage network; wherein the associated information includes at least one of the following: resource location data and resource permission data.

在一个可选实施例中,所述资源存储模块,包括:In an optional embodiment, the resource storage module includes:

加密分片副本形成单元,用于将所述资源注册请求中的资源数据的关联信息,进行加密和分片,以形成加密分片副本;an encrypted shard copy forming unit, configured to encrypt and shard the associated information of the resource data in the resource registration request to form an encrypted shard copy;

资源存储单元,用于将所述加密分片副本,分别存储在所述资源存储网络中的存储节点中。A resource storage unit, configured to store the encrypted shard copies in storage nodes in the resource storage network respectively.

在一个可选实施例中,所述区块链的资源处理装置700,还包括:In an optional embodiment, the resource processing apparatus 700 of the blockchain further includes:

保持请求发起模块,用于按照存储证明机制,向各存储节点发起存储证明保持请求,并接收存储节点基于所存储的资源信息反馈的存储证明。The holding request initiating module is used to initiate a storage certificate holding request to each storage node according to the storage certificate mechanism, and receive the storage certificate fed back by the storage node based on the stored resource information.

在一个可选实施例中,所述区块链的资源处理装置700,还包括:In an optional embodiment, the resource processing apparatus 700 of the blockchain further includes:

资源信息授权模块,用于基于所述资源存储网络所部署的授权合约,将所存储的部分或全部资源数据的资源信息,授权给资源解析系统进行查询。The resource information authorization module is used to authorize the resource information of part or all of the stored resource data to the resource analysis system for query based on the authorization contract deployed by the resource storage network.

在一个可选实施例中,资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;In an optional embodiment, the resource location data includes: a mapping relationship between resource location identifiers of chain resources and resource access addresses;

所述资源定位标识的字符串中包括域名;所述域名为所述待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located.

在一个可选实施例中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,所述树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;In an optional embodiment, the domain name space of the blockchain network includes multiple levels, and a tree-like structure is used for domain name storage. The nodes of the tree-like structure are used to store labels of corresponding level domain names, and each node is associated with a block. Corresponding to the data resources provided by the chain, the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure;

所述域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。The domain name labels at each level of the domain name space include, from top to bottom, the name of the blockchain architecture, the name of the operator to which the blockchain network belongs, the name of the blockchain, the name of the blockchain node and the name of the resource.

在一个可选实施例中,区块链网络提供的资源包括:区块链可支持服务和/或区块链可读数据;In an optional embodiment, the resources provided by the blockchain network include: blockchain-supportable services and/or blockchain-readable data;

所述区块链可支持服务包括下述至少一项:智能合和智能合约中可访问的方法程序。The blockchain-supportable service includes at least one of the following: a smart contract and a method program accessible in a smart contract.

本公开实施例的技术方案所提供的一种区块链的资源处理装置可执行本公开任意实施例所提供的区块链的资源处理方法,具备执行区块链的资源处理方法相应的功能模块和有益效果。A block chain resource processing apparatus provided by the technical solutions of the embodiments of the present disclosure can execute the block chain resource processing method provided by any embodiment of the present disclosure, and has functional modules corresponding to executing the block chain resource processing method. and beneficial effects.

图8是根据本公开实施例提供的一种区块链的资源处理装置的示意图,本实施例可适用于多链之间进行数据资源相互定位和获取的应用场景,该装置配置于电子设备中,可实现本公开任意实施例所述的区块链的资源处理方法。该电子设备可以为区块链节点,参考图8,该区块链的资源处理装置800具体包括如下:FIG. 8 is a schematic diagram of a resource processing apparatus of a blockchain provided according to an embodiment of the present disclosure. This embodiment is applicable to an application scenario of mutual positioning and acquisition of data resources between multiple chains, and the apparatus is configured in an electronic device. , the resource processing method of the blockchain described in any embodiment of the present disclosure can be implemented. The electronic device may be a blockchain node. Referring to FIG. 8 , the resource processing apparatus 800 of the blockchain specifically includes the following:

处理请求产生模块801,用于在识别到跨链资源的信息获取需求时,产生链资源处理请求;The processing request generation module 801 is used to generate a chain resource processing request when identifying the information acquisition requirement of the cross-chain resource;

处理请求发送模块802,用于将所述链资源处理请求发送给资源解析系统,以请求所述资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;A processing request sending module 802, configured to send the chain resource processing request to the resource analysis system, so as to request the resource analysis system to perform resource information query based on the information of the resource data stored in the resource storage network to determine the resource information; Wherein, the resource storage network is a decentralized storage network; the resource data is an accessible resource provided in the blockchain network;

资源信息接收模块803,用于接收所述资源解析系统反馈的资源信息。The resource information receiving module 803 is configured to receive the resource information fed back by the resource resolution system.

本公开实施例通过在识别到跨链资源的信息获取需求时,产生链资源处理请求;将链资源处理请求发送给资源解析系统,以请求资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;接收资源解析系统反馈的资源信息。上述方案由去中心化存储网络对多链数据资源进行维护和管理,通过资源解析系统从去中心化存储网络中获取资源信息,并反馈给跨链资源使用者,实现了多链之间的数据资源的相互定位和获取;由去中心化存储网络对多链的数据资源进行存储和维护,能够有效防止数据资源被篡改,且能维持更新;本公开的技术方案通用性强、安全可靠性高。The embodiment of the present disclosure generates a chain resource processing request when identifying a cross-chain resource information acquisition requirement, and sends the chain resource processing request to the resource analysis system to request the resource analysis system based on the information of the resource data stored in the resource storage network , query the resource information to determine the resource information; receive the resource information fed back by the resource analysis system. The above scheme maintains and manages multi-chain data resources by the decentralized storage network, obtains resource information from the decentralized storage network through the resource analysis system, and feeds it back to the cross-chain resource users, realizing the data between multiple chains. Mutual positioning and acquisition of resources; multi-chain data resources are stored and maintained by a decentralized storage network, which can effectively prevent data resources from being tampered with and can be maintained and updated; the technical solution disclosed in the present invention has strong versatility and high security and reliability .

在一个可选实施例中,所述处理请求产生模块801,包括:In an optional embodiment, the processing request generating module 801 includes:

访问请求生成单元,用于在识别到跨链资源的访问需求时,产生链资源访问请求;所述链资源访问请求中包括待访问资源的资源定位标识;an access request generating unit, configured to generate a chain resource access request when an access requirement of a cross-chain resource is identified; the chain resource access request includes a resource location identifier of the resource to be accessed;

相应的,所述资源信息为资源访问地址,则所述区块链的资源处理装置800,还包括:Correspondingly, if the resource information is a resource access address, the resource processing device 800 of the blockchain further includes:

事务请求发起模块,用于接收所述资源解析系统反馈的资源信息之后, 根据所述资源访问地址发起跨链的资源访问事务请求。A transaction request initiating module is configured to initiate a cross-chain resource access transaction request according to the resource access address after receiving the resource information fed back by the resource resolution system.

在一个可选实施例中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括下述至少一项:In an optional embodiment, when an information acquisition requirement of a cross-chain resource is identified, generating a chain resource processing request includes at least one of the following:

在识别到跨链资源的域名查询需求时,产生域名查询请求;所述域名查询请求中包括待访问资源的资源访问地址;和When identifying the domain name query requirement of the cross-chain resource, a domain name query request is generated; the domain name query request includes the resource access address of the resource to be accessed; and

在识别到跨链资源的权限查询需求时,产生权限查询请求;所述权限查询请求中包括待访问资源的资源定位标识或资源访问地址。When a permission query requirement of a cross-chain resource is identified, a permission query request is generated; the permission query request includes a resource location identifier or a resource access address of the resource to be accessed.

在一个可选实施例中,所述区块链的资源处理装置800,还包括:In an optional embodiment, the resource processing apparatus 800 of the blockchain further includes:

注册请求发起模块,用于向资源存储网络发起资源注册请求;其中,所述资源注册请求中包括本地区块链节点所提供可访问资源的资源定位数据和资源权限数据。A registration request initiating module is used to initiate a resource registration request to the resource storage network; wherein, the resource registration request includes resource location data and resource permission data of the accessible resources provided by the local blockchain node.

在一个可选实施例中,处理请求产生模块801,包括:In an optional embodiment, the processing request generating module 801 includes:

处理请求产生单元,用于在执行区块链客户端发起的业务处理事务请求时,识别到跨链资源的信息获取需求,则根据待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求。The processing request generation unit is used to identify the information acquisition requirements of cross-chain resources when executing the business processing transaction request initiated by the blockchain client, and then generate chain resources based on the resource location identifier of the resource to be accessed and based on the resource parsing contract. Process the request.

在一个可选实施例中,所述处理请求产生单元,包括:In an optional embodiment, the processing request generating unit includes:

处理请求产生子单元,用于根据待访问资源的资源定位标识,基于资源解析合约中配置的域名解析器地址,产生目标地址为域名解析器的链资源处理请求。The processing request generating subunit is used to generate a chain resource processing request with the target address of the domain name resolver based on the resource location identifier of the resource to be accessed and the domain name resolver address configured in the resource resolution contract.

在一个可选实施例中,资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;In an optional embodiment, the resource location data includes: a mapping relationship between resource location identifiers of chain resources and resource access addresses;

所述资源定位标识的字符串中包括域名;所述域名为所述待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located.

在一个可选实施例中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,所述树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;In an optional embodiment, the domain name space of the blockchain network includes multiple levels, and a tree-like structure is used for domain name storage. The nodes of the tree-like structure are used to store labels of corresponding level domain names, and each node is associated with a block. Corresponding to the data resources provided by the chain, the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure;

所述域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。The domain name labels at each level of the domain name space include, from top to bottom, the name of the blockchain architecture, the name of the operator to which the blockchain network belongs, the name of the blockchain, the name of the blockchain node and the name of the resource.

在一个可选实施例中,区块链网络提供的资源包括:区块链可支持服务和/或区块链可读数据;In an optional embodiment, the resources provided by the blockchain network include: blockchain-supportable services and/or blockchain-readable data;

所述区块链可支持服务包括下述至少一项:智能合约,和智能合约中的可访问方法程序。The blockchain-supportable service includes at least one of the following: a smart contract, and an accessible method program in the smart contract.

本公开实施例的技术方案所提供的一种区块链的资源处理装置可执行本公开任意实施例所提供的区块链的资源处理方法,具备执行区块链的资源处理方法相应的功能模块和有益效果。A block chain resource processing apparatus provided by the technical solutions of the embodiments of the present disclosure can execute the block chain resource processing method provided by any embodiment of the present disclosure, and has functional modules corresponding to executing the block chain resource processing method. and beneficial effects.

本公开的技术方案中,所涉及的资源信息的收集、存储、使用、加工、传输、提供和公开等处理,均符合相关法律法规的规定,且不违背公序良俗。In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of resource information involved are all in compliance with relevant laws and regulations, and do not violate public order and good customs.

根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

图9示出了可以用来实施本公开的实施例的示例电子设备900的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。FIG. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.

如图9所示,设备900包括计算单元901,其可以根据存储在只读存储器(ROM)902中的计算机程序或者从存储单元908加载到随机访问存储器(RAM)903中的计算机程序,来执行各种适当的动作和处理。在RAM 903中,还可存储设备900操作所需的各种程序和数据。计算单元901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。As shown in FIG. 9 , the device 900 includes a computing unit 901 that can be executed according to a computer program stored in a read only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903 Various appropriate actions and handling. In the RAM 903, various programs and data necessary for the operation of the device 900 can also be stored. The computing unit 901 , the ROM 902 , and the RAM 903 are connected to each other through a bus 904 . An input/output (I/O) interface 905 is also connected to bus 904 .

设备900中的多个部件连接至I/O接口905,包括:输入单元906,例如键盘、鼠标等;输出单元907,例如各种类型的显示器、扬声器等;存储单元908,例如磁盘、光盘等;以及通信单元909,例如网卡、调制解调器、无线通信收发机等。通信单元909允许设备900通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Various components in the device 900 are connected to the I/O interface 905, including: an input unit 906, such as a keyboard, mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk, etc. ; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

计算单元901可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元901的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元901执行上文所描述的各个方法和处理,例如区块链的资源处理方法。例如,在一些实施例中,区块链的资源处理方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元908。在一些实施例中,计算机程序的部分或者全部可以经由ROM 902和/或通信单元909而被载入和/或安装到设备900上。当计算机程序加载到RAM 903并由计算单元901执行时,可以执行上文描述的区块链的资源处理方法的一个或多个步骤。备选地,在其他实施例中,计算单元901可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行区块链的资源处理方法。Computing unit 901 may be various general-purpose and/or special-purpose processing components with processing and computing capabilities. Some examples of computing units 901 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 executes the various methods and processes described above, such as the resource processing method of the blockchain. For example, in some embodiments, the resource processing method of the blockchain may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 908 . In some embodiments, part or all of the computer program may be loaded and/or installed on device 900 via ROM 902 and/or communication unit 909 . When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the resource processing method of the blockchain described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the resource processing method of the blockchain by any other suitable means (eg, by means of firmware).

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、复杂可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein above may be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips system (SOC), complex programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.

用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer or other programmable data processing apparatus, such that the program code, when executed by the processor or controller, performs the functions/functions specified in the flowcharts and/or block diagrams. Action is implemented. The program code may execute entirely on the machine, partly on the machine, partly on the machine and partly on a remote machine as a stand-alone software package or entirely on the remote machine or server.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having: a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user computer having a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。服务器也可以为分布式系统的服务器,或者是结合了区块链的服务器。A computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the traditional physical host and VPS services, which are difficult to manage and weak in business scalability. defect. The server can also be a server of a distributed system, or a server combined with a blockchain.

人工智能是研究使计算机来模拟人的某些思维过程和智能行为(如学习、推理、思考、规划等)的学科,既有硬件层面的技术也有软件层面的技术。人工智能硬件技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理等技术;人工智能软件技术主要包括计算机视觉技术、语音识别技术、自然语言处理技术及机器学习/深度学习技术、大数据处理技术、知识图谱技术等几大方向。Artificial intelligence is the study of making computers to simulate certain thinking processes and intelligent behaviors of people (such as learning, reasoning, thinking, planning, etc.), both hardware-level technology and software-level technology. AI hardware technologies generally include technologies such as sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing; AI software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, and machine learning/depth Learning technology, big data processing technology, knowledge graph technology and other major directions.

云计算(cloud computing),指的是通过网络接入弹性可扩展的共享物理或虚拟资源池,资源可以包括服务器、操作系统、网络、软件、应用和存储设备等,并可以按需、自服务的方式对资源进行部署和管理的技术体系。通过云计算技术,可以为人工智能、区块链等技术应用、模型训练提供高效强大的数据处理能力。Cloud computing refers to accessing an elastically scalable shared physical or virtual resource pool through a network. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be self-service on demand and on demand. A technical system for deploying and managing resources in a way. Through cloud computing technology, it can provide efficient and powerful data processing capabilities for artificial intelligence, blockchain and other technical applications and model training.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开提供的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions provided in the present disclosure can be achieved, no limitation is imposed herein.

上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure should be included within the protection scope of the present disclosure.

Claims (39)

1.一种区块链的资源处理方法,应用于资源解析系统,所述方法包括:1. A resource processing method of a blockchain, applied to a resource parsing system, the method comprising: 获取链资源处理请求;Get chain resources to process requests; 根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;According to the chain resource processing request, based on the information of the resource data stored in the resource storage network, the resource information query is performed to determine the resource information; wherein, the resource storage network is a decentralized storage network; the resource data is a district Accessible resources provided in the blockchain network; 基于所述资源信息响应所述链资源处理请求;responding to the chain resource processing request based on the resource information; 其中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;Wherein, the resource information stored in the resource storage network includes: resource location data and resource permission data; 资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; 所述资源定位标识的字符串中包括域名;所述域名为待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located. 2.根据权利要求1所述的方法,其中,获取链资源处理请求包括:2. The method according to claim 1, wherein obtaining the chain resource processing request comprises: 获取区块链节点发起的链资源处理请求;其中,所述链资源处理请求基于区块链客户端发起的事务请求而产生。Obtain the chain resource processing request initiated by the blockchain node; wherein, the chain resource processing request is generated based on the transaction request initiated by the blockchain client. 3.根据权利要求1所述的方法,其中,根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:3. The method according to claim 1, wherein, according to the chain resource processing request, based on the information of the resource data stored in the resource storage network, the resource information query is performed to determine the resource information comprising: 根据所述链资源处理请求,产生资源信息处理事务请求;Generate a resource information processing transaction request according to the chain resource processing request; 将所述资源信息处理事务请求向所述资源存储网络发起,以请求所述资源存储网络处理所述资源信息处理事务请求,并反馈资源信息;其中,所述资源存储网络是基于区块链技术实现的区块链网络。Initiating the resource information processing transaction request to the resource storage network to request the resource storage network to process the resource information processing transaction request and to feed back resource information; wherein the resource storage network is based on blockchain technology Implemented blockchain network. 4.根据权利要求1所述的方法,其中,根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:4. The method according to claim 1, wherein, according to the chain resource processing request, based on the information of the resource data stored in the resource storage network, the resource information query is performed to determine the resource information comprising: 通过所述资源解析系统中的域名解析器,根据所述链资源处理请求确定目标域名服务器;Determine the target domain name server according to the chain resource processing request through the domain name resolver in the resource resolution system; 通过域名解析器,向所述目标域名服务器发起资源信息处理请求;其中,所述资源信息处理请求用于请求所述目标域名服务器,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;Through the domain name resolver, a resource information processing request is initiated to the target domain name server; wherein, the resource information processing request is used to request the target domain name server to perform resource information query based on the information of resource data stored in the resource storage network , to determine resource information; 通过域名解析器,接收所述目标域名服务器反馈的资源信息。Through the domain name resolver, the resource information fed back by the target domain name server is received. 5.根据权利要求4所述的方法,其中,通过域名解析器,根据所述链资源处理请求确定目标域名服务器包括:5. The method according to claim 4, wherein, by the domain name resolver, determining the target domain name server according to the chain resource processing request comprises: 通过域名解析器,根据所述链资源处理请求,在所述域名解析器已发现的域名服务器中,确定目标域名服务器;Through the domain name resolver, the request is processed according to the chain resource, and the target domain name server is determined among the domain name servers discovered by the domain name resolver; 相应的,通过域名解析器,接收所述目标域名服务器反馈的资源信息之前,还包括:Correspondingly, before receiving the resource information fed back by the target domain name server through the domain name resolver, the method further includes: 通过所述域名解析器,如果接收到所述目标域名服务器反馈的可选域名服务器连接地址,则根据所述可选域名服务器连接地址与对应的域名服务器建立连接,并更新作为新的目标域名服务器,继续执行发起资源信息处理请求的操作,直至接收到资源信息或失败结果;其中,链资源的地址空间划分为多个域,每个域名服务器用于查询一个或多个域中资源信息。Through the domain name resolver, if an optional domain name server connection address fed back by the target domain name server is received, a connection is established with the corresponding domain name server according to the optional domain name server connection address, and updated as a new target domain name server , continue to perform the operation of initiating the resource information processing request until the resource information or failure result is received; wherein, the address space of the chain resource is divided into multiple domains, and each domain name server is used to query the resource information in one or more domains. 6.根据权利要求4所述的方法,根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询之后,还包括:6. The method according to claim 4, after the resource information query is performed based on the information of the resource data stored in the resource storage network according to the chain resource processing request, further comprising: 如果通过所述域名解析器,确定资源信息查询失败,则确定其他的可选域名解析器,并将所述可选域名解析器的连接地址反馈给所述链资源处理请求的发起方,以供所述发起方向所述可选域名解析器重新发起链资源处理请求。If it is determined that the resource information query fails through the domain name resolver, other optional domain name resolvers are determined, and the connection address of the optional domain name resolver is fed back to the initiator of the chain resource processing request for The initiator re-initiates the chain resource processing request to the optional domain name resolver. 7.根据权利要求4所述的方法,其中,通过域名解析器,接收所述目标域名服务器反馈的资源信息之后,还包括:7. The method according to claim 4, wherein, after receiving the resource information fed back by the target domain name server through a domain name resolver, the method further comprises: 通过所述域名解析器,对所述资源信息进行下述至少一项检查:合法性检查、有效性检查和匹配性检查。Through the domain name resolver, at least one of the following checks is performed on the resource information: validity check, validity check and matching check. 8.根据权利要求1所述的方法,其中,根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:8. The method according to claim 1, wherein, according to the chain resource processing request, based on the information of the resource data stored in the resource storage network, the resource information query is performed to determine the resource information comprising: 根据所述链资源处理请求,在本地缓存中进行资源信息的查询;According to the chain resource processing request, query the resource information in the local cache; 如果在本地缓存中查询到资源信息,则确定为所述资源信息;If the resource information is queried in the local cache, it is determined to be the resource information; 如果在本地缓存中未查询到资源信息,则向所述资源存储网络发起资源信息处理请求,以进行资源信息查询,并确定资源信息。If the resource information is not queried in the local cache, a resource information processing request is initiated to the resource storage network to query the resource information and determine the resource information. 9.根据权利要求1-8任一所述的方法,其中,所述链资源处理请求为链资源访问请求,则根据所述链资源访问请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:9. The method according to any one of claims 1-8, wherein the chain resource processing request is a chain resource access request, then according to the chain resource access request, based on the information of the resource data stored in the resource storage network, Perform resource information query to determine resource information including: 根据所述链资源访问请求中的待访问资源的资源定位标识,基于所述资源存储网络中存储的资源定位数据,进行访问地址查询,以确定资源访问地址;其中,所述资源访问地址表征待访问资源在区块链网络中的访问入口。According to the resource location identifier of the resource to be accessed in the chain resource access request, based on the resource location data stored in the resource storage network, an access address query is performed to determine the resource access address; wherein, the resource access address represents the resource access address to be accessed. The access entry for accessing resources in the blockchain network. 10.根据权利要求9所述的方法,其中,所述链资源访问请求中包括资源定位标识和访问参数,所述访问参数包括下述至少一项:资源名称、资源执行参数、发起方公钥和发起方签名。10. The method according to claim 9, wherein the chain resource access request includes a resource location identifier and an access parameter, and the access parameter includes at least one of the following: resource name, resource execution parameter, initiator public key signed with the originator. 11.根据权利要求1-8任一所述的方法,其中,所述链资源处理请求为域名查询请求,则根据所述域名查询请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:11. The method according to any one of claims 1-8, wherein the chain resource processing request is a domain name query request, then according to the domain name query request, based on the information of the resource data stored in the resource storage network, the resource is processed. Information queries to determine resource information include: 根据所述域名查询请求中的资源访问地址,基于资源存储网络中存储的资源定位数据,进行域名查询,以确定资源域名;所述资源域名为资源访问地址所属域的域名。According to the resource access address in the domain name query request, based on the resource location data stored in the resource storage network, a domain name query is performed to determine the resource domain name; the resource domain name is the domain name of the domain to which the resource access address belongs. 12.根据权利要求1-8任一所述的方法,其中,所述链资源处理请求为权限查询请求,则根据所述权限查询请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:12. The method according to any one of claims 1-8, wherein the chain resource processing request is a permission query request, then according to the permission query request, based on the information of the resource data stored in the resource storage network, the resource is processed. Information queries to determine resource information include: 根据所述权限查询请求中的待查询资源的资源访问地址或资源定位标识,基于资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限;所述资源权限为资源被访问的权限控制信息。According to the resource access address or resource location identifier of the resource to be queried in the permission query request, and based on the resource permission data stored in the resource storage network, a permission query is performed to determine the resource permission; the resource permission is the permission of the resource to be accessed control information. 13.根据权利要求1所述的方法,其中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,所述树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;13. The method according to claim 1, wherein the domain name space of the blockchain network includes multiple levels, and a tree structure is used for domain name storage, and the nodes of the tree structure are used to store labels corresponding to the level domain names, and each Each node corresponds to the data resources provided by the blockchain, and the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure; 所述域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。The domain name labels at each level of the domain name space include, from top to bottom, the name of the blockchain architecture, the name of the operator to which the blockchain network belongs, the name of the blockchain, the name of the blockchain node and the name of the resource. 14.根据权利要求13所述的方法,其中,区块链网络提供的可访问资源包括:区块链可支持服务和/或区块链可读数据;14. The method of claim 13, wherein the accessible resources provided by the blockchain network include: blockchain-enabled services and/or blockchain-readable data; 所述区块链可支持服务包括下述至少一项:智能合约,和智能合约中可访问的方法程序。The blockchain-supportable service includes at least one of the following: a smart contract, and a method program accessible in the smart contract. 15.一种区块链的资源处理方法,应用于资源存储网络,所述资源存储网络为去中心化存储网络,所述方法包括:15. A method for processing resources of a blockchain, applied to a resource storage network, the resource storage network being a decentralized storage network, the method comprising: 获取资源信息处理请求;所述资源信息处理请求基于链资源处理请求而确定;Obtain a resource information processing request; the resource information processing request is determined based on the chain resource processing request; 根据所述资源信息处理请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;According to the resource information processing request and the information of the resource data stored in the resource storage network, query the resource information to determine the resource information; 基于所述资源信息响应所述资源信息处理请求;所述资源数据为区块链网络中提供的可访问资源;Responding to the resource information processing request based on the resource information; the resource data is an accessible resource provided in the blockchain network; 其中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;Wherein, the resource information stored in the resource storage network includes: resource location data and resource permission data; 资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; 所述资源定位标识的字符串中包括域名;所述域名为待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located. 16.根据权利要求15所述的方法,其中,获取资源信息处理请求包括:16. The method according to claim 15, wherein obtaining the resource information processing request comprises: 获取资源解析系统中域名解析器或域名服务器发起的资源信息处理请求。Obtain the resource information processing request initiated by the domain name resolver or domain name server in the resource resolution system. 17.根据权利要求15所述的方法,其中,所述资源存储网络是基于区块链技术实现的区块链网络,则获取资源信息处理请求包括:17. The method according to claim 15, wherein the resource storage network is a blockchain network implemented based on blockchain technology, and the request for obtaining resource information processing comprises: 获取区块链客户端发起的资源信息处理事务请求,作为资源信息处理请求。Obtain the resource information processing transaction request initiated by the blockchain client as a resource information processing request. 18.根据权利要求15-17任一所述的方法,其中,所述资源信息处理请求为域名解析请求,则根据所述域名解析请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:18. The method according to any one of claims 15-17, wherein the resource information processing request is a domain name resolution request, then according to the domain name resolution request and the information of the resource data stored in the resource storage network, Perform resource information query to determine resource information including: 根据所述域名解析请求中的待解析域名,和所述资源存储网络中存储的资源定位数据,进行域名所对应的资源访问地址查询,以确定资源访问地址。According to the domain name to be resolved in the domain name resolution request and the resource location data stored in the resource storage network, query the resource access address corresponding to the domain name to determine the resource access address. 19.根据权利要求15-17任一所述的方法,其中,所述资源信息处理请求为域名查询请求,则根据所述域名查询请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:19. The method according to any one of claims 15-17, wherein the resource information processing request is a domain name query request, then according to the domain name query request and the information of the resource data stored in the resource storage network, Perform resource information query to determine resource information including: 根据所述域名查询请求中的待查询地址,和所述资源存储网络中存储的资源定位数据,进行地址所对应的域名查询,以确定资源域名。According to the address to be queried in the domain name query request and the resource location data stored in the resource storage network, a domain name query corresponding to the address is performed to determine the resource domain name. 20.根据权利要求15-17任一所述的方法,其中,所述资源信息处理请求为权限查询请求,则根据所述权限查询请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息包括:20. The method according to any one of claims 15-17, wherein the resource information processing request is a permission query request, then according to the permission query request and the information of the resource data stored in the resource storage network, Perform resource information query to determine resource information including: 根据所述权限查询请求中的待查询资源的资源访问地址或资源定位标识,和所述资源存储网络中存储的资源权限数据,进行权限查询,以确定资源权限;其中,所述资源权限为资源被访问的权限控制信息。According to the resource access address or resource location identifier of the resource to be queried in the permission query request, and the resource permission data stored in the resource storage network, a permission query is performed to determine the resource permission; wherein the resource permission is a resource Access control information. 21.根据权利要求15-17任一所述的方法,还包括:21. The method of any of claims 15-17, further comprising: 接收区块链节点发起的资源注册请求;Receive resource registration requests initiated by blockchain nodes; 将所述资源注册请求中的资源数据的关联信息存储在所述资源存储网络中;其中,所述关联信息包括下述至少一项:资源定位数据和资源权限数据。The associated information of the resource data in the resource registration request is stored in the resource storage network; wherein, the associated information includes at least one of the following: resource location data and resource permission data. 22.根据权利要求21所述的方法,其中,将所述资源注册请求中的资源数据的关联信息存储在所述资源存储网络中包括:22. The method according to claim 21, wherein storing the associated information of the resource data in the resource registration request in the resource storage network comprises: 将所述资源注册请求中的资源数据的关联信息,进行加密和分片,以形成加密分片副本;encrypting and sharding the associated information of the resource data in the resource registration request to form an encrypted shard copy; 将所述加密分片副本,分别存储在所述资源存储网络中的存储节点中。The encrypted slice copies are respectively stored in storage nodes in the resource storage network. 23.根据权利要求22所述的方法,还包括:23. The method of claim 22, further comprising: 按照存储证明机制,向各存储节点发起存储证明保持请求,并接收存储节点基于所存储的资源信息反馈的存储证明。According to the storage proof mechanism, initiate a storage proof retention request to each storage node, and receive the storage proof fed back by the storage node based on the stored resource information. 24.根据权利要求15所述的方法,还包括:24. The method of claim 15, further comprising: 基于所述资源存储网络所部署的授权合约,将所存储的部分或全部资源数据的资源信息,授权给资源解析系统进行查询。Based on the authorization contract deployed by the resource storage network, the resource information of part or all of the stored resource data is authorized to the resource analysis system for query. 25.根据权利要求15所述的方法,其中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,所述树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;25. The method according to claim 15, wherein the domain name space of the blockchain network includes multiple levels, and a tree structure is used for domain name storage, and the nodes of the tree structure are used to store labels corresponding to the level domain names, and each Each node corresponds to the data resources provided by the blockchain, and the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure; 所述域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。The domain name labels at each level of the domain name space include, from top to bottom, the name of the blockchain architecture, the name of the operator to which the blockchain network belongs, the name of the blockchain, the name of the blockchain node and the name of the resource. 26.根据权利要求25所述的方法,其中,区块链网络提供的资源包括:区块链可支持服务和/或区块链可读数据;26. The method of claim 25, wherein the resources provided by the blockchain network include: blockchain-enabled services and/or blockchain-readable data; 所述区块链可支持服务包括下述至少一项:智能合约和智能合约中可访问的方法程序。The blockchain-supportable services include at least one of the following: a smart contract and a method program accessible in the smart contract. 27.一种区块链的资源处理方法,应用于区块链节点,所述方法包括:27. A method for processing resources of a blockchain, applied to a blockchain node, the method comprising: 在识别到跨链资源的信息获取需求时,产生链资源处理请求;When the need for information acquisition of cross-chain resources is identified, a chain resource processing request is generated; 将所述链资源处理请求发送给资源解析系统,以请求所述资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;Send the chain resource processing request to the resource analysis system to request the resource analysis system to query the resource information based on the information of the resource data stored in the resource storage network to determine the resource information; wherein, the resource storage network is Decentralized storage network; the resource data are accessible resources provided in the blockchain network; 接收所述资源解析系统反馈的资源信息;receiving resource information fed back by the resource parsing system; 其中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;Wherein, the resource information stored in the resource storage network includes: resource location data and resource permission data; 资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; 所述资源定位标识的字符串中包括域名;所述域名为待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located. 28.根据权利要求27所述的方法,其中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括:28. The method according to claim 27, wherein, when the information acquisition requirement of the cross-chain resource is identified, generating the chain resource processing request comprises: 在识别到跨链资源的访问需求时,产生链资源访问请求;所述链资源访问请求中包括待访问资源的资源定位标识;When the access requirement of the cross-chain resource is identified, a chain resource access request is generated; the chain resource access request includes the resource location identifier of the resource to be accessed; 相应的,所述资源信息为资源访问地址,则接收所述资源解析系统反馈的资源信息之后,还包括:Correspondingly, if the resource information is a resource access address, after receiving the resource information fed back by the resource resolution system, the method further includes: 根据所述资源访问地址发起跨链的资源访问事务请求。A cross-chain resource access transaction request is initiated according to the resource access address. 29.根据权利要求27所述的方法,其中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括下述至少一项:29. The method according to claim 27, wherein, when the information acquisition requirement of the cross-chain resource is identified, generating a chain resource processing request comprises at least one of the following: 在识别到跨链资源的域名查询需求时,产生域名查询请求;所述域名查询请求中包括待访问资源的资源访问地址;和generating a domain name query request when identifying a domain name query requirement for a cross-chain resource; the domain name query request includes the resource access address of the resource to be accessed; and 在识别到跨链资源的权限查询需求时,产生权限查询请求;所述权限查询请求中包括待访问资源的资源定位标识或资源访问地址。When a permission query requirement of a cross-chain resource is identified, a permission query request is generated; the permission query request includes a resource location identifier or a resource access address of the resource to be accessed. 30.根据权利要求27所述的方法,还包括:30. The method of claim 27, further comprising: 向资源存储网络发起资源注册请求;其中,所述资源注册请求中包括本地区块链节点所提供可访问资源的资源定位数据和资源权限数据。A resource registration request is initiated to the resource storage network; wherein, the resource registration request includes resource location data and resource permission data of the accessible resources provided by the local blockchain node. 31.根据权利要求27所述的方法,其中,在识别到跨链资源的信息获取需求时,产生链资源处理请求包括:31. The method according to claim 27, wherein, when an information acquisition requirement of a cross-chain resource is identified, generating a chain resource processing request comprises: 在执行区块链客户端发起的业务处理事务请求时,识别到跨链资源的信息获取需求,则根据待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求。When the business processing transaction request initiated by the blockchain client is executed, the information acquisition requirement of the cross-chain resource is identified, and the chain resource processing request is generated based on the resource location identifier of the resource to be accessed and the resource parsing contract. 32.根据权利要求31所述的方法,其中,根据待访问资源的资源定位标识,基于资源解析合约,产生链资源处理请求包括:32. The method according to claim 31, wherein, according to the resource location identifier of the resource to be accessed, and based on the resource parsing contract, generating the chain resource processing request comprises: 根据待访问资源的资源定位标识,基于资源解析合约中配置的域名解析器地址,产生目标地址为域名解析器的链资源处理请求。According to the resource location identifier of the resource to be accessed, based on the domain name resolver address configured in the resource resolution contract, a chain resource processing request with the target address of the domain name resolver is generated. 33.根据权利要求27所述的方法,其中,区块链网络的域名空间包括多个层级,采用树状结构进行域名存储,所述树状结构的节点用于存储对应层级域名的标签,每个节点与区块链所提供的数据资源对应,每个节点的域名包括从当前节点至树状结构根节点路径上的标签组合;33. The method according to claim 27, wherein the domain name space of the blockchain network includes a plurality of levels, and a tree structure is used for domain name storage, and the nodes of the tree structure are used to store labels corresponding to the level domain names. Each node corresponds to the data resources provided by the blockchain, and the domain name of each node includes the label combination on the path from the current node to the root node of the tree structure; 所述域名空间的各层级域名标签,从上至下包括:区块链架构名称、区块链网络所属运营商名称、区块链名称、区块链节点名称和资源名称。The domain name labels at each level of the domain name space include, from top to bottom, the name of the blockchain architecture, the name of the operator to which the blockchain network belongs, the name of the blockchain, the name of the blockchain node and the name of the resource. 34.根据权利要求33所述的方法,其中,区块链网络提供的资源包括:区块链可支持服务和/或区块链可读数据;34. The method of claim 33, wherein the resources provided by the blockchain network include: blockchain-enabled services and/or blockchain-readable data; 所述区块链可支持服务包括下述至少一项:智能合约,和智能合约中可访问的方法程序。The blockchain-supportable service includes at least one of the following: a smart contract, and a method program accessible in the smart contract. 35.一种区块链的资源处理装置,配置于资源解析系统,所述装置包括:35. A resource processing device of a blockchain, configured in a resource parsing system, the device comprising: 处理请求获取模块,用于获取链资源处理请求;The processing request acquisition module is used to acquire chain resources to process requests; 资源信息确定模块,用于根据所述链资源处理请求,基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;A resource information determination module, configured to query the resource information based on the information of the resource data stored in the resource storage network according to the chain resource processing request to determine the resource information; wherein, the resource storage network is a decentralized storage network ; the resource data is an accessible resource provided in the blockchain network; 处理请求响应模块,用于基于所述资源信息响应所述链资源处理请求;a processing request response module, configured to respond to the chain resource processing request based on the resource information; 其中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;Wherein, the resource information stored in the resource storage network includes: resource location data and resource permission data; 资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; 所述资源定位标识的字符串中包括域名;所述域名为待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located. 36.一种区块链的资源处理装置,应用于资源存储网络,所述资源存储网络为去中心化存储网络,所述装置包括:36. A resource processing device of a blockchain, applied to a resource storage network, the resource storage network being a decentralized storage network, the device comprising: 信息处理请求获取模块,用于获取资源信息处理请求;所述资源信息处理请求基于链资源处理请求而确定;an information processing request acquisition module, configured to acquire a resource information processing request; the resource information processing request is determined based on the chain resource processing request; 资源信息确定模块,用于根据所述资源信息处理请求,和所述资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;a resource information determination module, configured to query the resource information according to the resource information processing request and the information of the resource data stored in the resource storage network to determine the resource information; 信息处理请求响应模块,用于基于所述资源信息响应所述资源信息处理请求;所述资源数据为区块链网络中提供的可访问资源;an information processing request response module, configured to respond to the resource information processing request based on the resource information; the resource data is an accessible resource provided in the blockchain network; 其中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;Wherein, the resource information stored in the resource storage network includes: resource location data and resource permission data; 资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; 所述资源定位标识的字符串中包括域名;所述域名为待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located. 37.一种区块链的资源处理装置,应用于区块链节点,所述装置包括:37. A resource processing device of a blockchain, applied to a blockchain node, the device comprising: 处理请求产生模块,用于在识别到跨链资源的信息获取需求时,产生链资源处理请求;The processing request generation module is used to generate a chain resource processing request when the information acquisition requirement of the cross-chain resource is identified; 处理请求发送模块,用于将所述链资源处理请求发送给资源解析系统,以请求所述资源解析系统基于资源存储网络中存储的资源数据的信息,进行资源信息查询,以确定资源信息;其中,所述资源存储网络为去中心化存储网络;所述资源数据为区块链网络中提供的可访问资源;A processing request sending module, configured to send the chain resource processing request to the resource analysis system, to request the resource analysis system to perform resource information query based on the information of the resource data stored in the resource storage network to determine the resource information; wherein , the resource storage network is a decentralized storage network; the resource data is an accessible resource provided in the blockchain network; 资源信息接收模块,用于接收所述资源解析系统反馈的资源信息;a resource information receiving module, configured to receive resource information fed back by the resource parsing system; 其中,所述资源存储网络中存储的资源信息包括:资源定位数据和资源权限数据;Wherein, the resource information stored in the resource storage network includes: resource location data and resource permission data; 资源定位数据包括:链资源的资源定位标识与资源访问地址之间的映射关系;The resource location data includes: the mapping relationship between the resource location identifier of the chain resource and the resource access address; 所述资源定位标识的字符串中包括域名;所述域名为待访问资源所在区块链节点所属域的域名,所述资源访问地址中包括待访问资源所在区块链节点的通信地址。The character string of the resource location identifier includes a domain name; the domain name is the domain name of the domain to which the blockchain node where the resource to be accessed belongs, and the resource access address includes the communication address of the blockchain node where the resource to be accessed is located. 38.一种电子设备,包括:38. An electronic device comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-14或15-26或27-34中任一项所述的区块链的资源处理方法。the memory stores instructions executable by the at least one processor to enable the at least one processor to execute claims 1-14 or 15-26 or 27 The resource processing method of the blockchain according to any one of -34. 39.一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使计算机执行根据权利要求1-14或15-26或27-34中任一项所述的区块链的资源处理方法。39. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a region according to any one of claims 1-14 or 15-26 or 27-34 The resource handling method of the blockchain.
CN202210666699.XA 2022-06-14 2022-06-14 Resource processing method, device, equipment and medium for block chain Active CN114793244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210666699.XA CN114793244B (en) 2022-06-14 2022-06-14 Resource processing method, device, equipment and medium for block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210666699.XA CN114793244B (en) 2022-06-14 2022-06-14 Resource processing method, device, equipment and medium for block chain

Publications (2)

Publication Number Publication Date
CN114793244A CN114793244A (en) 2022-07-26
CN114793244B true CN114793244B (en) 2022-10-04

Family

ID=82463242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210666699.XA Active CN114793244B (en) 2022-06-14 2022-06-14 Resource processing method, device, equipment and medium for block chain

Country Status (1)

Country Link
CN (1) CN114793244B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115442158B (en) * 2022-11-07 2023-03-21 易方信息科技股份有限公司 Network request method, system, storage medium and terminal equipment
CN116028530A (en) * 2022-12-14 2023-04-28 北京百度网讯科技有限公司 Object resource reading method, device, electronic device and readable storage medium
CN116260789B (en) * 2023-03-10 2025-06-13 网易(杭州)网络有限公司 A domain name registration method, device, equipment and storage medium based on blockchain
CN116566945A (en) * 2023-03-27 2023-08-08 中国互联网络信息中心 Access method, device, electronic device and storage medium of decentralized application

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522330A (en) * 2018-10-18 2019-03-26 上海达家迎信息科技有限公司 Cloud platform data processing method, device, equipment and medium based on block chain
WO2019196825A1 (en) * 2018-04-13 2019-10-17 贵州白山云科技股份有限公司 Resource acquisition method and system based on block chain network, storage medium, and computer device
CN110941611A (en) * 2019-11-06 2020-03-31 四川长虹电器股份有限公司 Identification analysis system implementation method based on block chain technology and identification coding technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019196825A1 (en) * 2018-04-13 2019-10-17 贵州白山云科技股份有限公司 Resource acquisition method and system based on block chain network, storage medium, and computer device
CN109522330A (en) * 2018-10-18 2019-03-26 上海达家迎信息科技有限公司 Cloud platform data processing method, device, equipment and medium based on block chain
CN110941611A (en) * 2019-11-06 2020-03-31 四川长虹电器股份有限公司 Identification analysis system implementation method based on block chain technology and identification coding technology

Also Published As

Publication number Publication date
CN114793244A (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN114793244B (en) Resource processing method, device, equipment and medium for block chain
US8321503B2 (en) Context-specific network resource addressing model for distributed services
CN112187967B (en) Identification analysis method and device for whole networking
US8645550B2 (en) Database virtualization
CN110019211A (en) The methods, devices and systems of association index
CN113094334B (en) Digital service method, device, equipment and storage medium based on distributed storage
CN112765169A (en) Data processing method, device, equipment and storage medium
CN114979070A (en) Industrial internet identification analysis caching system and method based on edge calculation
CN114567553A (en) Equipment network access method and device based on industrial Internet identification analysis system
CN117668560A (en) Model training, plug-in prediction methods, devices, equipment, media and products
CN113704222A (en) Method and device for processing service request
CN116775712A (en) Method, device, electronic equipment, distributed system and storage medium for inquiring linked list
CN112148728B (en) Method, apparatus and computer program product for information processing
Schales et al. FCCE: highly scalable distributed feature collection and correlation engine for low latency big data analytics
CN115622976A (en) Domain name management system, domain name registration and resolution method, device, equipment and medium
CN106992999B (en) A cross-server data communication processing method
CN117082106B (en) Multi-level data networking methods, systems, devices and equipment for government cloud environments
US8281000B1 (en) Variable-length nonce generation
CN106959975B (en) Transcoding resource cache processing method, device and equipment
CN103957252A (en) Method and system for obtaining log of cloud storage system
CN117544593A (en) Identification analysis method, device, equipment and storage medium
CN115396183B (en) User identity recognition method and device
CN115567289B (en) Malicious domain name detection method and system based on federal graph model under encryption DNS protocol
CN114448703B (en) Request processing method, request processing device, electronic equipment and storage medium
CN113839940A (en) URL pattern tree-based defense method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载