A cross-chain resource mapping and management method and system
By establishing resource mapping relationships and metadata catalogs on the blockchain and using K proximity algorithm for classified storage, the cumbersome problems of cross-chain resource perception and positioning process are solved, and fast resource positioning and secure cross-chain resource access are achieved.
Patent Information
- Application Number
- CN202310344417.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2043-04-03
AI Technical Summary
During the blockchain information interaction process, the existing cross-chain resource perception and location process is cumbersome and time-consuming, low-efficiency, and cannot implement a hierarchical cross-chain resource access strategy, which cannot ensure that cross-chain resources are securely accessed.
By establishing a mapping relationship between resource identifiers, resource descriptions, access policy information and resource addresses, a metadata directory of each block of the blockchain is constructed, and a K-neighborship algorithm is used for classification storage to achieve rapid resource positioning and permission authentication.
The positioning speed of cross-chain resources is improved, efficient management and positioning of resources is achieved, and secure access to cross-chain resources is ensured through hierarchical access policies.
Smart Images

Figure CN116361292B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cross-chain resource mapping and management method and system, and belongs to the technical field of blockchain. Background Art
[0002] Blockchain technology has the characteristics of decentralization, immutability, traceability, openness, transparency and collective maintenance. Based on the above characteristics, blockchain is widely used in various fields. However, due to the isolation, closedness and heterogeneity of blockchain, information interaction between blockchains is difficult, which greatly limits the development of blockchain applications. Cross-chain technology can effectively realize information interaction between chains and solve the "data island" problem. It is currently a hot research topic in the field of blockchain technology. The perception and positioning of cross-chain resources can be achieved through resource identifiers, but when users need to interact with multiple chains and multiple resources, they need to traverse each blockchain node in turn. The entire resource perception and positioning process is cumbersome, time-consuming and inefficient. In response to the above problems, CN 112491959A discloses a cross-chain resource exchange method based on the relay chain. By setting the status of the cross-chain transaction and generating a verifiable submission message body, the atomicity of the cross-chain transaction is met, but it is impossible to achieve efficient resource perception and positioning during cross-chain resource exchange. In particular, with the increase of on-chain information, how to perceive cross-chain resources and quickly query and locate cross-chain resources has become an increasingly key issue in the cross-chain; secondly, the cross-chain resource exchange method based on the relay chain disclosed in CN 112491959A does not set a resource access permission policy, cannot implement a hierarchical cross-chain resource access policy, and cannot ensure that cross-chain resources are securely accessed. Summary of the invention
[0003] The technical problem to be solved by the present invention is that in the process of blockchain information interaction, the existing cross-chain resource perception and positioning process is cumbersome, time-consuming and inefficient.
[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0005] A cross-chain resource mapping and management method, comprising the following steps:
[0006] Step 1: Establish a mapping relationship between resource identifier, resource description, access policy information and resource address;
[0007] Step 2: Construct the metadata directory of each block of the blockchain based on the mapping relationship, and store the metadata directory in the metadata directory blockchain. The metadata directory blockchain adjusts the metadata directory content based on the changes in the resources of each block;
[0008] Step 3: Build a training model based on the K-nearest neighbor algorithm, classify the block metadata directory according to the business theme, establish a resource directory based on the classification results and store it in the directory management blockchain; mount the resource metadata directory under the business theme of the resource directory.
[0009] Step 4: In the relay chain mode, when a cross-chain request occurs, the first blockchain parses the resource request for the resource directory management blockchain of the cross-chain resource, and quickly searches in the resource directory according to the business subject based on the parsing result. If the relevant resource is found, the resource address is located and the cross-chain target object is preliminarily determined based on the mapping relationship between the resource information and the resource address in the resource metadata directory; at the same time, the first blockchain sends the generated modified copy of the metadata directory to the relay chain;
[0010] Step 5: The second blockchain generates a copy of the metadata directory of the block where the cross-chain resource is located, changes the generated copy of the metadata directory according to the cross-chain resource request information, and then sends the changed metadata directory to the relay chain. The relay chain locks the first blockchain metadata directory copy and the second blockchain metadata directory copy. When both parties of the cross-chain pass the authority authentication, the relay chain unlocks the first blockchain metadata directory and the second blockchain metadata directory and overwrites the original metadata directory. The resource directory management blockchain listens to the authentication pass information and updates the resource directory.
[0011] The aforementioned cross-chain resource mapping and management method further includes the following steps:
[0012] Step 6: The resource directory saves the hash value of each block metadata directory and traverses the resource directory. When the metadata directory hash value is different from the corresponding metadata hash value saved in the resource directory, the resource directory content at the corresponding location is updated.
[0013] A cross-chain resource mapping and management system, including the following modules:
[0014] Mapping relationship establishment module: establishes the mapping relationship between resource identifier, resource description, access policy information and resource address;
[0015] Metadata directory construction module: constructs the metadata directory of each block of the blockchain based on the mapping relationship, and stores the metadata directory in the metadata directory blockchain. The metadata directory blockchain adjusts the metadata directory content based on the changes in the resources of each block;
[0016] Classification storage module: Build a training model based on the K-nearest neighbor algorithm, classify the block metadata directory according to the business theme, establish a resource directory based on the classification results and store it in the directory management blockchain; mount the resource metadata directory under the business theme of the resource directory.
[0017] Cross-chain request module: In the relay chain mode, when a cross-chain request occurs, the first blockchain senses the cross-chain resource through the resource directory. The resource directory management blockchain parses the resource request and quickly searches the resource directory according to the business subject based on the parsing result. If the relevant resource is found, the resource address is located and the cross-chain target object is preliminarily determined based on the mapping relationship between the resource information and the resource address in the resource metadata directory. At the same time, the first blockchain sends the generated modified copy of the metadata directory to the relay chain.
[0018] Permission authentication module: The second blockchain generates a copy of the metadata directory of the block where the cross-chain resource is located, changes the generated copy of the metadata directory according to the cross-chain resource request information, and then sends the changed metadata directory to the relay chain. The relay chain locks the first blockchain metadata directory copy and the second blockchain metadata directory copy. When both parties of the cross-chain pass the permission authentication, the relay chain unlocks the first blockchain metadata directory and the second blockchain metadata directory and overwrites the original metadata directory. The resource directory management blockchain listens to the authentication pass information and updates the resource directory.
[0019] The aforementioned cross-chain resource mapping and management system also includes the following modules:
[0020] Resource directory update module: The resource directory saves the hash value of each block metadata directory, traverses the resource directory, and when the metadata directory hash value is different from the corresponding metadata hash value saved in the resource directory, the resource directory content at the corresponding location is updated.
[0021] A computer storage medium, used to store the functional modules of the above-mentioned cross-chain resource mapping and management system.
[0022] The beneficial effects achieved by the present invention are as follows: the present invention constructs a description of each block resource, introduces a mapping relationship between a resource description and a resource address, and forms a block metadata directory, which is conducive to statistics and management of block resources and improves the positioning speed of cross-chain resources; the K-nearest neighbor algorithm is used to train a metadata directory classification model to ensure that the metadata directory is accurately and quickly classified according to the business theme to form a cross-chain resource directory, which is conducive to unified and efficient management and positioning of resources.
[0023] At the same time, the present invention determines whether the resource directory needs to be updated based on whether the metadata directory hash value is consistent with the metadata directory hash value stored in the resource directory, so as to ensure that the resource directory is quickly updated. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 This is a flow chart of the cross-chain resource mapping and management method of the present invention. DETAILED DESCRIPTION
[0025] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0026] The present invention adopts the following technical solutions to achieve the above-mentioned purpose:
[0027] A cross-chain resource mapping and management method, comprising the following steps:
[0028] Step 1: Establish a mapping relationship between resource identifier, resource description, access policy information and resource address; the resource description includes resource type, resource quantity and size, etc.;
[0029] The process of establishing the mapping relationship includes the following steps:
[0030] (1) Complete the registration of cross-chain resources, which include resource type, chain identifier, metadata information and access policy, and generate a unique identifier for the resource; the metadata includes a resource hash value generated by a HASH algorithm;
[0031] (2) Resource locking: Lock cross-chain resources on the chain to prevent tampering or reuse during cross-chain transfer. Use randomly generated public keys and smart contracts to lock cross-chain resources. The smart contract will unlock the resources only after the cross-chain resource requester passes the authority authentication.
[0032] (3) Cross-chain resource mapping: Map cross-chain resources on the relay chain, that is, associate the unique identifier of the resource on the relay chain with the address on the original chain, so as to verify and search during cross-chain transfer. The cross-chain resource mapping must satisfy the resource address address = F(x, y, s), where x is the unique identifier, y is the resource description, s is the access policy, and F represents the mapping function between resources and addresses. The unique identifier, resource description and access policy of the resource are used as input, and the output is the resource address. The F function can be implemented by setting a specific HASH function; the HASH function ensures a one-to-one correspondence between the resource address and the resource, that is, there is no situation where different resources point to the same resource address.
[0033] Step 2: Based on the mapping relationship, the metadata directory of each block of the blockchain is constructed, and the metadata directory is stored in the metadata directory blockchain. The metadata directory blockchain adjusts the metadata directory content based on the changes in the resources of each block;
[0034] The process of adjusting the content of the metadata directory is as follows: according to the smart contract, the changes of resources in the blockchain are monitored and the corresponding information of the directory is updated. The resources include block height, transaction hash, asset quantity, etc. When new resource attributes are added to the metadata directory, new fields are added for the corresponding attributes; when certain resources are no longer used or deleted, the fields corresponding to the corresponding resources are deleted from the metadata directory; when the resource attribute type changes, the data type of the corresponding field in the metadata directory is modified; when the field order of the resource changes, the field order in the metadata directory is adjusted. The automatic update of the metadata directory content is realized through the above-mentioned smart contract, thereby maintaining the consistency between the metadata directory and the actual resources.
[0035] Step 3: Build a training model based on the K-nearest neighbor algorithm to classify the block metadata directory according to the business theme, establish a resource directory based on the classification results and store it in the directory management blockchain; mount the resource metadata directory under the business theme of the resource directory and arrange it in a set order. The directory management blockchain is used to maintain and manage the resource directory; the metadata directory adjusts the priority of the metadata directory under the corresponding business entity according to the effective number of times the resource recorded in its own directory is accessed, that is, after each effective resource access, the priority of the metadata directory recording the corresponding resource is increased by 1 to improve efficient resource retrieval in most scenarios.
[0036] Design a resource directory storage structure based on a tree structure, classify and store metadata directories by business subject, set a priority number for each metadata directory, and adjust the priority of the metadata directory under the corresponding business subject according to the effective number of resource accesses, that is, after each effective resource access, the priority of the metadata directory recording the corresponding resource is increased by 1 to improve efficient resource retrieval in most scenarios. The effective resource access refers to the legal and compliant access to resources by cross-chain requesters. To ensure the security and integrity of the resource directory, the directory management blockchain uses log recording to monitor and record the access and operation of the resource directory. By monitoring and recording the access and operation of the resource directory through log recording, malicious users can be effectively prevented from illegally accessing and tampering with the resource directory, thereby ensuring the security and integrity of the resource directory.
[0037] Step 4: In the relay chain mode, when a cross-chain request occurs, the first blockchain senses the cross-chain resource through the resource directory. The resource directory management blockchain parses the resource request and quickly searches the resource directory according to the business subject based on the parsing result. If the relevant resource is found, the resource address is located and the cross-chain target object is preliminarily determined based on the mapping relationship between the resource information and the resource address in the resource metadata directory. At the same time, the first blockchain sends the generated modified copy of the metadata directory to the relay chain. On the contrary, if the resource directory does not have the unique identifier of the corresponding resource, the query result is returned to the first blockchain, and the generated copy of the metadata directory is destroyed.
[0038] Step 5: The second blockchain generates a copy of the metadata directory of the block where the cross-chain resource is located, and changes the generated copy of the metadata directory according to the cross-chain resource request information; the cross-chain resource request information includes the number and type of resources requested by the resource requester; correspondingly, if the cross-chain resource requester sends a cross-chain resource request information, such as a certain type of currency needs to be traded, then the metadata directory copy generated by the second blockchain needs to subtract the value of this type of currency recorded in this directory, and then send the changed metadata directory to the relay chain, and the relay chain locks the first blockchain metadata directory copy and the second blockchain metadata directory copy;
[0039] When both parties of the cross-chain pass the authority authentication, the relay chain unlocks the metadata directory of the first blockchain and the metadata directory of the second blockchain and overwrites the original metadata directory. The resource directory management blockchain listens to the authentication information and updates the resource directory. If the authority authentication fails, the copies of the metadata directory of the first blockchain and the second blockchain are destroyed.
[0040] The process of cross-chain authentication is as follows: the access policy of the cross-chain resource is called by the smart contract deployed on the relay chain to determine whether the first blockchain has the permission to access the resource. The access policy specifies which users or nodes can access the cross-chain resource and how to verify the identity of the visitor;
[0041] When the first blockchain initiates a cross-chain resource request, the relay chain verifies the identity of the visitor based on the signature on the resource request;
[0042] When the first blockchain initiates a cross-chain request, it signs its own private key. The verification node on the relay chain receives the request and verifies the validity of the request, and then sends the corresponding signature information to the second blockchain for verification. If the verification is successful, a confirmation message is sent to the verification node on the relay chain.
[0043] When the identity authentication is passed, the smart contract determines whether it has the authority to access the data based on the role and time access policy. The roles include ordinary resource access, medium resource access and high resource access, providing hierarchical resource access levels, setting time tokens, and providing the cross-chain resource requester with a valid time T for resource access rights; when the resource requester passes the identity authentication, the role level of the requester is determined according to the smart contract to determine its access to the resource information corresponding to its level, and then a time token is provided to the legitimate resource requester to meet the user's resource access rights within time T. When the time token expires, it no longer has access to the resource information; by setting role levels and time tokens, the smart contract can manage resource access rights in a hierarchical manner according to different roles, provide time tokens to legitimate resource requesters, and guarantee their resource access rights within time T, thereby preventing illegal access requests and improving resource security.
[0044] Step 6: To ensure the timeliness of the resource directory and rapid resource location, the resource directory is updated regularly. The resource directory saves the hash value of each block metadata directory and traverses the resource directory. When the metadata directory hash value is different from the corresponding metadata hash value saved in the resource directory, the resource directory content at the corresponding location is updated. By updating the resource directory regularly, the metadata information in the resource directory can be updated in time, thereby ensuring the timeliness and reliability of the resource directory.
[0045] A cross-chain resource mapping and management system, including the following modules:
[0046] Mapping relationship establishment module: establishes the mapping relationship between resource identifier, resource description, access policy information and resource address;
[0047] Metadata directory construction module: Based on the mapping relationship, the metadata directory of each block of the blockchain is constructed, and the metadata directory is stored in the metadata directory blockchain. The metadata directory blockchain adjusts the metadata directory content based on the changes in the resources of each block;
[0048] Classification storage module: Build a training model based on the K-nearest neighbor algorithm, classify the block metadata directory according to the business theme, establish a resource directory based on the classification results and store it in the directory management blockchain; mount the resource metadata directory under the business theme of the resource directory and arrange it in the set order; the metadata directory adjusts the priority of the metadata directory under the corresponding business subject according to the effective number of times the resource recorded in its own directory is accessed, that is, after each effective resource access, the priority of the metadata directory recording the corresponding resource is increased by 1, so as to improve efficient resource retrieval in most scenarios;
[0049] Cross-chain request module: In the relay chain mode, when a cross-chain request occurs, the first blockchain senses the cross-chain resource through the resource directory. The resource directory management blockchain parses the resource request and quickly searches the resource directory according to the business subject based on the parsing result. If the relevant resource is found, the resource address is located and the cross-chain target object is preliminarily determined based on the mapping relationship between the resource information and the resource address in the resource metadata directory. At the same time, the first blockchain sends the generated modified copy of the metadata directory to the relay chain.
[0050] Permission authentication module: The second blockchain generates a copy of the metadata directory of the block where the cross-chain resource is located, changes the generated copy of the metadata directory, and then sends the changed metadata directory to the relay chain. The relay chain locks the first blockchain metadata directory copy and the second blockchain metadata directory copy. When both parties of the cross-chain pass the permission authentication, the relay chain unlocks the first blockchain metadata directory and the second blockchain metadata directory and overwrites the original metadata directory. The resource directory management blockchain listens to the authentication pass information and updates the resource directory.
[0051] The aforementioned cross-chain resource mapping and management system also includes the following modules:
[0052] Resource directory update module: The resource directory saves the hash value of each block metadata directory, traverses the resource directory, and when the metadata directory hash value is different from the corresponding metadata hash value saved in the resource directory, the resource directory content at the corresponding location is updated.
[0053] A computer storage medium, used to store the functional modules of the above-mentioned cross-chain resource mapping and management system.
[0054] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0055] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0056] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0057] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0058] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A cross-chain resource mapping and management method, characterized in that: The following steps are involved: Step 1: Establish a mapping relationship between resource identifier, resource description, access policy information and resource address; The resource description includes resource type and resource quantity; the process of establishing the mapping relationship includes the following steps: (1) Complete the registration of cross-chain resources, which include resource type, chain identifier, metadata information and access policy, and generate a unique identifier for the resource; the metadata includes a resource hash value generated by a HASH algorithm; (2) Locking cross-chain resources on the chain where they are located; (3) Mapping the cross-chain resources on the relay chain, that is, associating the unique identifier of the resource on the relay chain with the address on the original chain. The cross-chain resource mapping satisfies the resource address address = F (x, y, s), where x is the unique identifier, y is the resource description, s is the access policy, and F represents the mapping function between resources and addresses; Step 2: Build the metadata directory of each block of the blockchain based on the mapping relationship, and store the metadata directory in the metadata directory blockchain. The metadata directory blockchain adjusts the metadata directory content based on the changes in the resources of each block; use randomly generated public keys and smart contracts to lock cross-chain resources. After the cross-chain resource requester passes the authority authentication, the smart contract unlocks the resources; Step 3: Build a training model based on the K-nearest neighbor algorithm, classify the block metadata directory according to the business theme, establish a resource directory based on the classification results and store it in the directory management blockchain; mount the resource metadata directory under the business theme of the resource directory; Step 4: In the relay chain mode, when a cross-chain request occurs, the first blockchain parses the resource request for the resource directory management blockchain of the cross-chain resource, searches in the resource directory according to the business subject based on the parsing result, and if relevant resources are found, locates the resource address and preliminarily determines the cross-chain target object based on the mapping relationship between the resource information and the resource address in the resource metadata directory; at the same time, the first blockchain sends the generated modified copy of the metadata directory to the relay chain; Step 5: The second blockchain generates a copy of the metadata directory of the block where the cross-chain resource is located, changes the generated copy of the metadata directory according to the cross-chain resource request information, and then sends the changed metadata directory to the relay chain. The relay chain locks the first blockchain metadata directory copy and the second blockchain metadata directory copy. When both parties of the cross-chain pass the authority authentication, the relay chain unlocks the first blockchain metadata directory and the second blockchain metadata directory and overwrites the original metadata directory. The resource directory management blockchain listens to the authentication pass information and updates the resource directory.
2. A cross-chain resource mapping and management method according to claim 1, characterized in that: The following steps are also included: Step 6: When the metadata directory hash value is different from the corresponding metadata hash value stored in the resource directory, update the resource directory content at the corresponding location.
3. A cross-chain resource mapping and management method according to claim 1, characterized in that: In step 2, the process of adjusting the metadata directory content is: monitoring the changes of resources in the blockchain according to the smart contract and updating the corresponding information of the directory, wherein the resources include block height, transaction hash, and asset quantity; When new resource attributes are added to the metadata catalog, new fields are added for the corresponding attributes; When some resources are no longer used or deleted, the fields corresponding to the corresponding resources will be deleted from the metadata directory; When the resource attribute type changes, the data type of the corresponding field in the metadata directory is modified; When the field order of a resource changes, adjust the field order in the metadata catalog.
4. A cross-chain resource mapping and management method according to claim 1, characterized in that: In step three, a tree-structured resource directory storage structure is designed, metadata directories are classified and stored by business subject, a priority number is set for each metadata directory, and the priority of the metadata directory under the corresponding business entity is adjusted according to the effective number of resource accesses.
5. A cross-chain resource mapping and management method according to claim 1, characterized in that: In step 5, the process of cross-chain authentication is as follows: The access policy of the cross-chain resource is called by the smart contract deployed on the relay chain to determine whether the first blockchain has the authority to access the resource; When the first blockchain initiates a cross-chain resource request, the relay chain verifies the identity of the visitor based on the signature on the resource request; When the first blockchain initiates a cross-chain request, it signs its own private key. The verification node on the relay chain receives the request and verifies the validity of the request, and then sends the corresponding signature information to the second blockchain for verification. If the verification is successful, a confirmation message is sent to the verification node on the relay chain. Once identity authentication is passed, the smart contract determines whether the resource requester has permission to access the data based on the role and time access policy.
6. A cross-chain resource mapping and management system, characterized in that: Includes the following modules: Mapping relationship establishment module: establishes the mapping relationship between resource identifier, resource description, access policy information and resource address; The resource description includes resource type and resource quantity; the process of establishing the mapping relationship includes the following steps: (1) Complete the registration of cross-chain resources, which include resource type, chain identifier, metadata information and access policy, and generate a unique identifier for the resource; the metadata includes a resource hash value generated by a HASH algorithm; (2) Locking cross-chain resources on the chain where they are located; (3) Mapping the cross-chain resources on the relay chain, that is, associating the unique identifier of the resource on the relay chain with the address on the original chain. The cross-chain resource mapping satisfies the resource address address = F (x, y, s), where x is the unique identifier, y is the resource description, s is the access policy, and F represents the mapping function between resources and addresses; Metadata directory construction module: builds the metadata directory of each block of the blockchain based on the mapping relationship, and stores the metadata directory in the metadata directory blockchain. The metadata directory blockchain adjusts the metadata directory content based on the changes in the resources of each block; uses randomly generated public keys and smart contracts to lock cross-chain resources. After the cross-chain resource requester passes the authority authentication, the smart contract unlocks the resources; Classification storage module: build a training model based on the K-nearest neighbor algorithm, classify the block metadata directory according to the business theme, establish a resource directory based on the classification results and store it in the directory management blockchain; mount the resource metadata directory under the business theme of the resource directory; Cross-chain request module: In the relay chain mode, when a cross-chain request occurs, the first blockchain senses the cross-chain resource through the resource directory. The resource directory management blockchain parses the resource request and quickly searches the resource directory according to the business subject based on the parsing result. If the relevant resource is found, the resource address is located and the cross-chain target object is preliminarily determined based on the mapping relationship between the resource information and the resource address in the resource metadata directory. At the same time, the first blockchain sends the generated modified copy of the metadata directory to the relay chain. Permission authentication module: The second blockchain generates a copy of the metadata directory of the block where the cross-chain resource is located, changes the generated copy of the metadata directory according to the cross-chain resource request information, and then sends the changed metadata directory to the relay chain. The relay chain locks the first blockchain metadata directory copy and the second blockchain metadata directory copy. When both parties of the cross-chain pass the permission authentication, the relay chain unlocks the first blockchain metadata directory and the second blockchain metadata directory and overwrites the original metadata directory. The resource directory management blockchain listens to the authentication pass information and updates the resource directory.
7. A cross-chain resource mapping and management system according to claim 6, characterized in that: Also includes the following modules: Resource directory update module: The resource directory saves the hash value of each block metadata directory, traverses the resource directory, and when the metadata directory hash value is different from the corresponding metadata hash value saved in the resource directory, the resource directory content at the corresponding location is updated.
8. A computer storage medium for storing the functional module of a cross-chain resource mapping and management system as described in any one of claims 6 or 7.
Citation Information
Patent Citations
Cross-chain docking method and system of directory block chain combined trusted repeater
CN113450119A
Block chain cross-chain data processing method, relay chain, application chain and cross-chain network
CN114615095A