Cross-chain method and system between block chains

By obtaining and analyzing the deployment and calling information of fields on the chain, identifying life cycle boundaries and sorting out conflicting field paths, the problem of weak field structure abstraction ability in cross-chain communication in the existing technology is solved, and more efficient and stable cross-chain path recognition and configuration is achieved.

CN119996428AActive Publication Date: 2025-05-13BEIJING SHENZHOU BANGBANG TECH SERVICE CO LTD

Patent Information

Application Number
CN202510444279.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-13
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

When existing cross-chain communication technologies handle cross-chain transaction synchronization, the on-chain field structure abstraction ability is weak, making it difficult to accurately identify life cycle boundaries, resulting in lack of context information support for field conflict judgments, resulting in path redundancy and misjudgment, affecting the efficiency of cross-chain paths and the stability of transaction execution.

Method used

By obtaining the deployment block height, call start and end height and contract name of the field on the chain, combined with the call sequence number within the contract, the position range of the field in the on-chain structure is determined, and the field call boundary association information is generated. Then, based on this information, the transaction type, status data items and write order numbers of fields in the source chain and the target chain are extracted, the life cycle overlap and sequence differences are judged, and the conflict field paths are sorted into the field path conflict record list. Next, check whether the associated fields appear together in the configured cross-chain protocol structure, generate a cross-chain protocol exclusion path set, filter the available field combinations of target chains, and generate a recommended cross-chain field structure sequence.

Benefits of technology

It realizes accurate identification of life cycle boundaries, enhances field positioning and context association capabilities, improves field consistency control, filters out field combinations that match structural continuity, enhances field adaptability of target chains, improves cross-link path recognition efficiency and configuration accuracy, and ensures the stability and verification of data coordination between chains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996428A_ABST
    Figure CN119996428A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cross-chain communication, in particular to a cross-chain method and system between block chains, and the method comprises the following steps: obtaining a position range on a field chain, generating call boundary information, extracting a transaction state and sequence judgment conflict, sorting a field path list, checking a protocol structure to generate an exclusion path, and screening a recommended field structure sequence. A communication identifier is generated and written into a configuration table, and path identification number items are formed. According to the method and the device, the position range of the field in the on-chain structure is constructed, so that the life cycle boundary is accurately identified, the field positioning and context association capability is enhanced, the conflict path is judged based on comparison of the transaction type and the state data, the field consistency control is improved, the structure continuity matching field combination is screened, and the target chain field adaptability is enhanced; and the communication path identifier is generated in combination with the structural abstract, so that the cross-chain path identification efficiency and configuration accuracy are improved, and the stability and verifiability of inter-chain data collaboration are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cross-chain communication technology, and in particular to a cross-chain method and system between blockchains. Background Art

[0002] The field of cross-chain communication technology includes data interaction and information sharing mechanisms between multiple distributed ledgers or blockchain systems. The core content of this technology is to achieve interoperability between different blockchain networks, ensuring that multiple independent ledgers can achieve asset transfer, information verification and protocol coordination without relying on centralized institutions. Cross-chain communication relies on cryptographic mechanisms to build a trusted relay system or verification mechanism. By designing atomic exchange protocols, relay chain solutions, side chain mechanisms, hash locking mechanisms, etc., various on-chain systems can achieve data consistency and transaction validity while maintaining independence. This field also includes cross-chain identity authentication, transaction order coordination, consensus protocol mapping, etc. The technical system covers communication structure design, encryption verification structure, inter-chain state synchronization mechanism, transaction identification mechanism and cross-chain operation log management.

[0003] Among them, a cross-chain method between blockchains refers to an operational process for achieving transaction information synchronization between two or more heterogeneous blockchain systems. This method mainly addresses the problem that inter-chain data transfer cannot communicate directly, covering technical matters such as inter-chain transaction identification based on preset verification rules, transmission of cross-chain request information through relay chains, verification of target chain status using hash time lock mechanism, authentication of inter-chain transaction validity using digital signatures, and setting a unified transaction format for data encapsulation and transmission. This method usually completes the inter-chain transaction initiation, verification and response process through a predefined structured communication protocol to ensure that each cross-chain request has a verifiable transaction source, confirmation by a legitimate recipient, and a complete execution record.

[0004] The existing technology has the problem of weak abstraction ability of on-chain field structure in the process of handling transaction synchronization in cross-chain communication, and it is difficult to accurately identify the life cycle boundary from the field call level, resulting in a lack of context-dependent information support in field conflict judgment, resulting in path redundancy and configuration misjudgment. Since inter-chain field identification mostly relies on transaction format unification or hash lock verification mechanism, there is a lack of linkage analysis of the relationship between field structure order and state data, which often causes consistency risks such as data coverage and field loss in the cross-chain process. Most of the existing methods are centered on transaction initiation and response, ignoring the differences in structural distribution formed by field state changes in different chains, making it difficult to achieve adaptation and screening of field combinations on the target chain side, reducing the efficiency of cross-chain paths and the stability of transaction execution. For example, in the process of multi-field cross-validation, the correspondence between the conflicting field path and the protocol structure cannot be identified, which can easily lead to repeated verification or misjudgment of channel construction, affecting the coherence and accuracy of cross-chain transaction flow. The above problems limit the ability of existing cross-chain communication mechanisms to expand in complex structure synchronization, multi-field collaboration and configuration path identification. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a cross-chain method and system between blockchains.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a cross-chain method between blockchains, comprising the following steps: S1: Get the current on-chain field deployment block height, call start and end heights, and contract name, combine the call sequence number in the contract, determine the location range of the field in the on-chain structure, and generate field call boundary association information; S2: Based on the field call boundary association information, extract the field transaction type, state data item and write sequence number in the source chain and the target chain, determine the life cycle overlap and sequence difference, and organize the conflicting field paths into a field path conflict record list; S3: According to the field path conflict record list, check whether the associated fields appear together in the configured cross-chain protocol structure. If so, mark the corresponding communication structure and generate a cross-chain protocol exclusion path set; S4: Call the cross-chain protocol exclusion path set, extract the available field combinations of the target chain, and screen the field combinations with continuous and consistent structure of the source chain according to the difference between the call sequence number and the verification identifier, and generate a recommended cross-chain field structure sequence; S5: Call the recommended cross-chain field structure sequence, extract the main field name and sequence number, generate a structure summary and combine it with the field name to form a communication path identifier, write it into the protocol configuration table, and generate an inter-chain path identification number item.

[0007] As a further solution of the present invention, the field call boundary association information includes the deployment block height, the earliest call height, the call end height, the contract name, and the call sequence number; the field path conflict record list includes the transaction type, the binding status data item, the write sequence number, the life cycle intersection information, and the sequence difference information; the cross-chain protocol exclusion path set includes the communication structure tag, the protocol path exclusion item, and the cross-chain structure filtering rule; the recommended cross-chain field structure sequence includes the verification identification Boolean value, the structure continuity parameter, and the distribution pattern feature; the inter-chain path identification number item includes the main field name, the sequence number list, the structure summary, the communication path identification, and the protocol configuration table information.

[0008] As a further solution of the present invention, the specific steps of S1 are: S101: Obtain the deployment block height of the contract to which the field belongs, the block heights of the first and last calls of the field, calculate the block offset values ​​of the first and last calls in combination with the call sequence number, and generate the field call block offset interval value; S102: calling the block offset interval value according to the field, screening the data fields whose numbers are not less than the field number within the corresponding block range, counting the number of fields and the number difference, and generating the field number interval span value; S103: Based on the field call block offset interval value and the field number interval span value, the field number and block height are extracted, the difference between adjacent field numbers and heights is averaged, and the field call boundary association value is obtained.

[0009] As a further solution of the present invention, the specific steps of S2 are: S201: Based on the field call boundary association value, extract the transaction type, binding state data item and write sequence number of the field in the source chain and the target chain, identify the field path and the number accordingly, and generate the field transaction sequence annotation quantity; S202: calling the field transaction sequence annotation quantity, performing a path cross comparison on the write sequence numbers in the source chain and the target chain, extracting the field paths with inconsistent write sequences and their number difference values, and generating a field path sequence difference value set; S203: According to the field path sequence difference value set, identifying a combination of lifecycle intersection and sequence difference in the field path, and obtaining a field path conflict record list.

[0010] As a further solution of the present invention, the specific calculation formula for extracting the field paths with inconsistent writing order and their number difference values ​​is: ; in, Represents the first The source chain path and The order difference weighted offset value of the target chain path, Represents the target chain The write order number of the field path, The source chain The sum of the boundary call weights of all fields corresponding to the field paths in the target chain, Representative The source chain field is The call weight value between the target chain fields, Representative The total number of binding state data items in the source chain for the field path, Represents the source chain The write order number of the field path, The number of field paths in the target chain.

[0011] As a further solution of the present invention, the specific steps of S3 are: S301: Obtain the field path conflict record list and the cross-chain protocol structure, and based on the field path in the conflict record, detect whether the field path co-occurs with the conflicting field in the cross-chain protocol structure. If so, mark the corresponding communication field combination position and generate a field co-occurrence communication position information set; S302: calling the communication field combination position in the field co-occurrence communication position information set, performing intersection comparison with the configured field set in the protocol structure, screening the communication structure where at least two fields in the conflicting field exist at the same time, calculating the field intersection ratio, and obtaining a high co-occurrence field path structure set; S303: According to the field path distribution in the high coexistence field path structure set, extract the field combination that overlaps with the conflict record list field path, determine whether it co-occurs repeatedly in all protocol structures, build an exclusion field path index set, and generate a cross-chain protocol exclusion path set.

[0012] As a further solution of the present invention, the specific steps of S4 are: S401: calling the field path and the target chain path in the cross-chain protocol exclusion path set, extracting the logically continuous field combination in the target chain, recording the field distribution position and calling sequence, and generating the field sequence difference value by comparing the sequence difference and displacement direction of the field combination; S402: Based on the field sequence difference value and the field call sequence number, extract the field including the verification identification Boolean value, compare the position difference of the field in the target chain and the source chain, select the field combination whose sequence offset is less than the position difference threshold, and generate a Boolean field offset matching value; S403: According to the Boolean field offset matching value and the source chain structure continuity rule, the order and distribution trend of the field combination are compared, the combination that meets the field offset direction and structural hierarchy requirements is screened, the field arrangement stability is calculated, and a recommended cross-chain field structure sequence is generated.

[0013] As a further solution of the present invention, the specific formula for screening the combination that meets the field offset direction and structure level requirements is: ; Among them, S represents the field arrangement stability, Representative The offset of the field combination, Represents the target offset of this field combination. Representative The structural complexity of the combination of fields, Representative The length of the field combination, Represents the source chain structure level of this field combination, Representative The target chain structure level of the field combination, Representative The weighted index of the combination of fields, Represents the total number of field combinations.

[0014] As a further solution of the present invention, the specific steps of S5 are: S501: Obtain the recommended cross-chain field structure sequence, extract the field name and the sequence number, select each field from the structure sequence in turn, extract the corresponding name and number, form a corresponding list of the main field name and the sequence number, generate a string of concatenated numbers, and obtain a field number list; S502: Based on the field number list, the field names and numbers are combined to generate a structure summary of the field names and numbers, the numbers and names of each field are sequentially concatenated into a set of data, and all fields are summarized to generate a complete structure summary to obtain a structure summary list; S503: According to the structure summary list, the structure summary list is combined with the main field name to generate a communication path identifier, and the generated communication path identifier is written into the protocol configuration table to obtain an inter-chain path identification number item.

[0015] A cross-chain system between blockchains, including: The on-chain field information collection module obtains the deployment block height, earliest call height, call end height and contract name of the field in the blockchain, combines the call sequence number of the field in the contract structure, builds the position range of the field in the on-chain structure, and generates field call boundary association information; The field conflict detection module extracts the transaction type, binding status data item and write sequence number of the fields in the source chain and the target chain based on the field call boundary association information, compares the consistency of the life cycle intersection and the write sequence, determines the conflicting field path combination, and organizes and generates a field path conflict record list; The cross-chain protocol matching module checks whether the associated fields co-appear in the configured cross-chain protocol structure according to the field path conflict record list, and if so, marks the corresponding communication structure and generates a cross-chain protocol exclusion path set; The field matching and screening module calls the cross-chain protocol exclusion path set, extracts the available field combinations in the target chain, and judges the position difference and matching degree according to the calling sequence number of the field and the Boolean value of the verification identifier, screens the field combinations that match the continuity and distribution pattern of the source chain structure, and generates a recommended cross-chain field structure sequence; The cross-chain path identification module calls the recommended cross-chain field structure sequence, extracts the main field name and the sequential number list, concatenates the numbers and generates a structure summary, combines the structure summary with the field name, writes it into the protocol configuration table, and generates an inter-chain path identification number item.

[0016] Compared with the prior art, the advantages and positive effects of the present invention are: In the present invention, by constructing the position range of the field in the on-chain structure, accurate identification of the life cycle boundary is achieved, the field positioning and context association capabilities are enhanced, the conflict path is determined based on the transaction type and status data comparison, the field consistency control is improved, the structural continuity matching field combination is screened, the target chain field adaptability is enhanced, and the communication path identifier is generated in combination with the structure summary, the cross-chain path identification efficiency and configuration accuracy are improved, and the stability and verifiability of inter-chain data collaboration are achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the steps of the present invention.

[0018] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0020] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0021] See also Figure 1 , a cross-chain method between blockchains, comprising the following steps: S1: Get the deployment block height, earliest call height, call end height and contract name of the field on the current chain, combine the call sequence number of the field in the contract structure, build the position range of the field in the chain structure, and generate field call boundary association information; S2: Based on the field call boundary association information, the transaction type, binding status data items and write sequence numbers of the fields in the source chain and the target chain are extracted to determine the situation where the life cycle crosses and the write sequence are inconsistent, and the conflicting field paths are combined and sorted into a field path conflict record list; S3: According to the field path conflict record list, check whether the associated fields appear together in the configured cross-chain protocol structure. If so, mark the corresponding communication structure and generate a cross-chain protocol exclusion path set; S4: Call the cross-chain protocol exclusion path set, extract the available field combinations in the target chain, perform position difference and matching degree judgment on the field call sequence number and the verification identification Boolean value, screen the field combination that matches the continuity and distribution pattern of the source chain structure, and generate the recommended cross-chain field structure sequence; S5: Call the recommended cross-chain field structure sequence, extract the main field name and sequential number list, concatenate the numbers and generate a structure summary, combine the structure summary and the field name as a communication path identifier, write it into the protocol configuration table, and generate an inter-chain path identification number item.

[0022] The field call boundary association information includes the deployment block height, the earliest call height, the call end height, the contract name, and the call sequence number. The field path conflict record list includes the transaction type, binding status data item, write sequence number, life cycle intersection information, and sequence difference information. The cross-chain protocol exclusion path set includes communication structure tags, protocol path exclusion items, and cross-chain structure filtering rules. The recommended cross-chain field structure sequence includes verification identification Boolean value, structure continuity parameter, and distribution pattern characteristics. The inter-chain path identification number item includes the main field name, sequence number list, structure summary, communication path identification, and protocol configuration table information.

[0023] The specific steps of S1 are: S101: Obtain the deployment block height of the contract to which the field belongs, the block heights of the first and last calls of the field, calculate the block offset values ​​of the first and last calls in combination with the call sequence number, and generate the field call block offset interval value; When obtaining the deployment block height, earliest call height, call end height and contract name of the field on the chain, first extract its deployment transaction record according to the contract name of the target contract, and obtain the block number where it is deployed as the deployment height of the field, and then extract the transaction information of the first call of the field in the blockchain one by one, confirm the block number where it first appears in the call log as the earliest call height, and continue to track the subsequent call transactions of the field on the blockchain backwards until the last transaction block number where it no longer appears is used as the call end height of the field. At the same time, combine the field in the smart contract source code structure to obtain the last transaction block number where it appears. The current sequence number is used to build the numbering information of the field in the structure definition. For example, field A in contract X is deployed in block 12000, the first call is 12500, and the last call is 13200. The sequence number in the contract structure is 5. Then field A can be associated with the block height sequence 12500 to 13200, indicating that the field is in the 5th position in the on-chain contract structure, and its active call interval is from 12500 to 13200 blocks. By performing the same operation on all fields, the correspondence between the field structure sequence number and the deployment and call height is established, and finally the call height interval data is generated.

[0024] S102: calling the block offset interval value according to the field, selecting the data field whose number is not less than the field number within the corresponding block range, counting the number of fields and the number difference, and generating the field number interval span value; Based on the call height interval data, the three data of the field's deployment block height, earliest call height and call end height are extracted to identify the field call time span. For example, field B is deployed at block 14000, the earliest call is 14400, and the call ends at 15000. It can be judged that the field has been called after 400 blocks since deployment, and has been called for 600 blocks thereafter. In this process, the structural sequence number of the field is matched with the call time interval. Taking number 8 corresponding to the interval 14400 to 15000 as an example, the field is at the 8th position in the structure, and its call cycle spans 600 blocks. By establishing a corresponding set of such numbers and intervals for all fields, a call time range table indexed by the sequence number is constructed. At the same time, the fields are classified according to the time interval between the start and end of the call. Fields that start calling within 100 blocks after deployment are classified as short-delay fields, and fields that continue to call for more than 1000 blocks are classified as long-lifecycle fields. After integration, the position interval information of the field in the contract is finally generated.

[0025] S103: extracting the field number and block height based on the field call block offset interval value and the field number interval span value, averaging the adjacent field numbers and height differences, and obtaining the field call boundary association value; According to the position interval information of the field in the contract, the blockchain node data interface is called to extract the node number information involved in each field during the call period. Within the call interval of the field, the transaction data associated with the field is queried block by block. The relevant node number is identified through the execution node information in the transaction record, and the participation frequency of each node and the corresponding block range are counted. For example, the call interval of field C is 16000 to 17000 blocks. Within this interval, the transactions processed by nodes 03, 07 and 11 all contain the call content of field C, among which node 03 processed 20 transactions from 16000 to 16200, node 07 processed 15 transactions from 16300 to 16500, and node 11 processed 30 transactions from 16600 to 17000. In this way, the field structure number, call interval and corresponding node information are composed into a multi-dimensional mapping table. After repeating this process for all fields, a boundary relationship set between the field number and the call node is formed, and finally the field call boundary association information is generated.

[0026] The specific steps of S2 are: S201: based on the field call boundary association value, extract the transaction type, binding state data item and write sequence number of the fields in the source chain and the target chain, identify the field path and the number accordingly, and generate the field transaction sequence annotation quantity; Based on the field call boundary correlation value, we first collect the call status of each field path from the source chain and the target chain, and compare the call frequency of each field in the target chain with its total call frequency in the whole chain to measure the concentration of the field in the cross-chain call. For example, if a field is called 3 times in the target chain and its total call frequency is 10 times, then its call boundary correlation is 0.3, indicating that the field has a medium-intensity call dependency in the target chain. Then, we extract the transaction type and binding status data items for each field path. The transaction type is directly read from the operation type indicated in the operation record log. If the field is "written" in the on-chain data record, it is marked as T2, and "read" is marked as T1. The binding status is determined by the field Whether there is a unique binding identifier in the business binding mapping table is determined. If a binding relationship exists, it is set to 1, otherwise it is 0. The write sequence number is sorted according to the system timestamp of the time when the field is first written to the chain. The numbers are numbered from early to late, and the number values ​​are incremented in sequence in the form of natural numbers. For example, if the first write time of field A is earlier than that of field B, then A is numbered 1 and B is 2. Finally, the field path, transaction type, binding status, and write sequence number are formed into a combined identifier to constitute the complete structural information of the field path. For example, the field " / Account / Create / User Information" has a write transaction type, a binding status of 1, and a sequence number of 5, then the information is encapsulated and recorded according to the structure, and finally all field path structure information is summarized to generate the field transaction sequence annotation quantity.

[0027] S202: calling the field transaction sequence annotation quantity, performing a path cross comparison on the write sequence numbers in the source chain and the target chain, extracting the field paths with inconsistent write sequences and their number difference values, and generating a field path sequence difference value set; The specific calculation formula for extracting the field paths with inconsistent writing order and their number difference values ​​is: ; in, Represents the first The source chain path and The order difference weighted offset value of the target chain path, Represents the target chain The write order number of the field path, The source chain The sum of the boundary call weights of all fields corresponding to the field paths in the target chain, Representative The source chain field is The call weight value between the target chain fields, Representative The total number of binding state data items in the source chain for the field path, Represents the source chain The write order number of the field path, is the number of field paths in the target chain; This formula is used to calculate the weighted offset value of the sequence difference between the source chain field path and the target chain field path. This formula comprehensively considers the write sequence number of the target chain field, the call weight between the source chain and target chain fields, and the number of binding state data items of the source chain field.

[0028] First define the following parameters: : The first in the target chain The order in which the field path is written is the 4th one. .

[0029] : Indicates the first The sum of the call weights between the source chain field " / business / data" and all the field paths in the target chain. If the call weights of the source chain field " / business / data" and the target chains " / finance / approval / submission" and " / finance / approval / record" are 0.3 and 0.7 respectively, the sum is 1.0.

[0030] : Indicates the first The number of bound state data items for a field path. For example, if the " / business / data" field is bound to 5 different states during the business process, then .

[0031] :Source chain The writing order number of the field path. For example, the source chain field path " / business / data" is written into the system in the second place, then .

[0032] : The total number of field paths in the target chain. For example, if there are 10 field paths in the target chain, then .

[0033] In practice, these parameters are obtained through system log analysis (write sequence number), API call statistics (call weight), and system configuration files (number of binding status data items).

[0034] The derivation is carried out with a numerical example, and the settings are as follows: ; ,but ; ; ; Substitute into the formula to calculate: ; The calculation process shows that the source chain and the target chain and The weighted offset value of the order difference of the field paths is 1.33. This result shows that after considering the weighting of call frequency and binding state complexity, there is a significant deviation in the data writing order of the two field paths, which reflects that the writing order of the target chain path is ahead of the source chain. The calculation of this deviation can help analyze potential synchronization problems in the data flow or optimize the data processing process.

[0035] The result shows that there is a large order difference between the two field paths, which may affect the consistency and efficiency of data processing. It is necessary to further analyze the actual impact of this deviation on the business process and adjust the data management strategy accordingly.

[0036] S203: According to the field path sequence difference value set, identifying a combination of life cycle intersection and sequence difference in the field path, and obtaining a list of field path conflict records; According to the field path sequence difference value set, further analyze whether the field path meets the conditions of life cycle intersection and sequence number difference at the same time. The basis for judging life cycle intersection is that the same field path or the same type of field has different transaction type records in the source chain and the target chain, that is, one is a write type and the other is a read type. For example, if the path " / report / generate / project information" is marked as write (T2) in the source chain and read (T1) in the target chain, it is considered that there is a life cycle intersection. Combined with the corresponding write sequence number difference value, it is judged whether it exceeds the preset threshold. The threshold setting refers to the corresponding value of 95% of the write time interval in the business chain. Number change range: If the number difference of 95% of the fields in the business does not exceed 3 during the continuous writing process, the path pairs with number difference values ​​greater than 3 can be judged as sequence conflicts. For example, a field is numbered 3 in the source chain and 8 in the target chain, with a difference of 5, which exceeds the judgment threshold. In addition, the field type has a life cycle intersection, so the path combination is judged to have a conflict. Similarly, the entire path difference value set is traversed to screen out the field path combinations that meet the above two conditions at the same time, and they are sorted and merged to record their path identifiers, transaction type distribution, number difference values ​​and life cycle intersection status, and finally summarize them to form a list of field path conflict records.

[0037] The specific steps of S3 are: S301: Obtain a list of field path conflict records and a cross-chain protocol structure, and based on the field path in the conflict record, detect whether the field path co-occurs with the conflicting field in the cross-chain protocol structure. If so, mark the corresponding communication field combination position and generate a field co-occurrence communication position information set; First, it is necessary to extract the field path from the cross-chain protocol structure. The field path represents the relationship between each data field in the protocol and other fields. For example, in the data exchange between blockchains, each block data contains multiple fields, such as "transaction ID", "sender address", "receiver address", "amount", etc. Each field may conflict with other fields. Then, based on the field path in the conflict record, it is necessary to compare the field path in the protocol structure to find out whether the conflicting fields appear at the same position at the same time. For example, if there is a field path "transaction ID-sender address" in the conflict record, and the protocol structure also contains "transaction ID-sender address", it can be determined that this field path has a conflict and is marked as a communication field combination position. The marking of this position is helpful for subsequent intersection comparison and conflict detection. Next, a field co-occurrence communication position information set is generated, which records the combination positions of all conflicting fields and the co-occurrence relationship between them, so that the subsequent steps can further filter out the high co-occurrence path of the conflicting field path based on this information set. For example, if certain field paths appear multiple times in the protocol structure, and these field paths co-occur in multiple protocol structures, they need to be specially marked and their specific locations recorded in the information set.

[0038] S302: calling the communication field combination position in the field co-occurrence communication position information set, performing intersection comparison with the configured field set in the protocol structure, screening the communication structure where at least two fields in the conflicting field exist at the same time, calculating the field intersection ratio, and obtaining a high co-occurrence field path structure set; First, it is necessary to extract the communication field combination positions from the field co-occurrence communication position information set. These positions include the field positions that co-occur with the conflicting fields. Then, these positions are compared with the configured field set in the protocol structure, that is, to check whether these field combination positions appear in the protocol structure at the same time. For example, the protocol may have configured the field path "transaction ID-receiver address", and the field path in the conflict record is "transaction ID-sender address". If the "transaction ID" field co-occurs in multiple paths, it means that these fields have an intersection and need further analysis. During the comparison process, the intersection method is used to ensure that only fields that appear in multiple field paths at the same time are included in the screening range. Then, based on the intersection results, the field intersection ratio is calculated. This ratio indicates the degree of coexistence of the conflicting fields in the protocol structure. The calculation formula can be: intersection ratio = number of intersection fields / total number of fields. For example, if in a certain protocol structure, the field "transaction ID" and the field "sender address" appear in 3 different field paths at the same time, and the total number of these field paths is 5, then the intersection ratio is 3 / 5=0.6. Finally, the obtained high co-occurrence field path structure set contains field paths with a high degree of field co-occurrence, which provides a basis for subsequent analysis.

[0039] S303: According to the field path distribution in the high coexistence field path structure set, extract the field combination that overlaps with the conflict record list field path, determine whether it co-occurs repeatedly in all protocol structures, build an exclusion field path index set, and generate a cross-chain protocol exclusion path set; First, it is necessary to analyze the distribution of field paths in the high coexistence field path structure set and extract the field combinations that overlap with the field paths in the conflict record list. For example, if the conflict record list contains the field path "transaction ID-recipient address" and the high coexistence field path structure set also contains the field path of "transaction ID-recipient address", then this field combination needs to be extracted and further analyzed. Next, it is necessary to determine whether these field combinations are repeated in all protocol structures, that is, whether they appear frequently in multiple protocols. If a field combination appears multiple times in different protocol structures, it indicates that it has a strong co-occurrence relationship in these protocols. To this end, the frequency of occurrence of these field combinations in different protocols can be counted to determine their repeated co-occurrence. For example, if the field path "transaction ID-recipient address" exists in 10 protocol structures, it can be identified as a repeated co-occurrence field combination. Based on this analysis result, an exclusion field path index set is constructed to record these field paths that appear frequently in multiple protocols, and finally generate a cross-chain protocol exclusion path set, which contains all the path information to be excluded, so that these paths can be avoided in subsequent operations or protocol configurations.

[0040] The specific steps of S4 are: S401: Call the field path and the target chain path in the cross-chain protocol exclusion path set, extract the logically continuous field combination in the target chain, record the field distribution position and call sequence, and generate the field sequence difference value by comparing the sequence difference and displacement direction of the field combination; First, obtain the logically continuous field combination in the target chain. According to the design structure of the target chain, extract these fields and record their distribution positions in the target chain and their calling order. For example, assuming that the field combination of the target chain is field A, field B, and field C, and their positions in the chain are 1, 2, and 3, then the combination order of these three fields in the target chain is 1, 2, and 3. Next, perform field combination order difference analysis. In this process, it is necessary to calculate the field combination order difference between the target chain and the source chain, that is, the order of the fields in the target chain is compared with the order of the fields in the source chain. Based on the difference between the positions of the fields in the source chain and the target chain, calculate the order difference and displacement direction of the field combination. If the field combination of the source chain is field X, field Y, and field Z, and their order is 1, 3, and 2, the field order difference is 1-2=-1 (the order difference between field X and field Y), and the order difference between field Z and other fields is -1, then the field sequence difference value is generated, that is, -1, -1. Finally, the difference value is an important indicator of the field combination difference, which is used for subsequent screening and optimization of field combinations. The generated field sequence difference values ​​can help evaluate the matching degree of cross-chain protocol paths.

[0041] S402: extracting fields including verification identification Boolean values ​​based on the field sequence difference value and the field call sequence number, comparing the position difference of the fields in the target chain and the source chain, screening field combinations whose sequence offset is less than the position difference threshold, and generating a Boolean field offset matching value; First, all fields containing verification identification Boolean values ​​are extracted from the target chain. The verification identification field is usually a control tag field used for inter-chain communication. The value of the identification field is Boolean type (true / false). These fields are included in the field combination of the target chain and the source chain. Next, compare the position difference of these fields in the target chain and the source chain. The position difference can be numerically compared by the position of the fields in the two chains. Assuming that the positions of field A and field B of the target chain are 2 and 4 in the target chain, and 3 and 5 in the source chain, the position difference is 1 and 1. If the difference is less than the set position difference threshold (such as setting the threshold to 2), it can be determined to meet the position matching requirements and filter out the qualified field combinations. Further, for each group of field combinations, calculate the field combination whose sequence offset is less than the position difference threshold, and generate a Boolean field offset matching value based on this result. For example, if the threshold is 2 and the sequence offset of the field combination is 1, the combination passes the screening and the Boolean field offset matching value is 1; in this way, the field combination that matches the sequence between the source chain and the target chain can be accurately screened.

[0042] S403: According to the Boolean field offset matching value and the source chain structure continuity rule, the order and distribution trend of the field combination are compared, the combination that meets the field offset direction and structure level requirements is selected, the field arrangement stability is calculated, and the recommended cross-chain field structure sequence is generated; The specific formula for screening combinations that meet the field offset direction and structure level requirements is: ; Among them, S represents the field arrangement stability, Representative The offset of the field combination, Represents the target offset of this field combination. Representative The structural complexity of the combination of fields, Representative The length of the field combination, Represents the source chain structure level of this field combination, Representative The target chain structure level of the field combination, Representative The weighted index of the combination of fields, Represents the total number of field combinations; Parameter analysis: : No. The offset of a field combination indicates the offset of the field in the source chain structure. It is obtained by comparing the difference between the source chain field and the target chain field in the corresponding position. The value of the offset is usually obtained by monitoring and calculating the field position. It is assumed that this value is the actual measured offset, such as the difference recorded in the field position on the chain.

[0043] : The target offset of this field combination, indicating the position of this field in the target chain. It is determined by data collection, monitoring or target field position planning according to the design of the target chain. Assuming that the field position in the target chain has been pre-set and obtained through analysis, its value is assumed to be the standard position where the target field should be located.

[0044] : No. The structural complexity of the combination of fields indicates the complexity of the field in the chain structure. The structural complexity can be quantified by factors such as the relevance of the fields in the chain and the number of nested layers of the fields. For example, if the field involves more data conversion within the chain or has multiple associated fields, the complexity is correspondingly higher. Assume that the value obtained by the chain structure analysis tool is 3.

[0045] : No. The length of a field combination, indicating the data length or field sequence length involved in the field. The length is calculated based on the number of characters in the data field, the amount of data represented by the field, etc. Assume that the length of this field is 50 (unit: characters).

[0046] : The source chain structure level of this field combination, indicating the structural position level of this field in the source chain. It is obtained through the source chain structure diagram and field classification standards. The fields at the lower level represent basic data, and the fields at the higher level represent more complex data structures. Assuming its value is 2, it means that the field is at the second level.

[0047] : The target chain structure level of this field combination, indicating the structural position level of this field in the target chain. Similar to the source chain, it is obtained by analyzing the target chain structure diagram. Assume that the level of this field in the target chain is 3.

[0048] : No. The weighted index of a field combination is used to adjust the weight of the field in the calculation. The weighting is set based on factors such as historical data and field usage frequency. Assume that the weighted index is 1.2.

[0049] : The total number of field combinations, which indicates the number of field combinations involved in the analysis. Assume that there are 5 field combinations involved in the calculation.

[0050] Specific calculation derivation process: According to the above analysis, we can use the actual numbers to calculate the formula. Suppose we calculate the first field combination (i.e. ) is calculated, assuming the relevant parameters are as follows: ; ; ; ; ; ; ; Substitute these values ​​into the formula to calculate the contribution of the first field combination: ; ; ; ; ; ; ; Final result explanation: Calculated , indicating that the field arrangement stability contribution value of the first field combination is 23.48. This value reflects the stability of the field combination. A higher value indicates that the field has a higher stability in the chain. Factors such as offset, structural complexity, length, and hierarchy jointly affect the stability of the field. This result will continue to be used to calculate the total stability of all field combinations.

[0051] Instructions for setting parameter weights in the formula calculation process: The difference in offset ( ) directly affects the matching degree of the field position in the chain. Field combinations with larger offsets require more adjustments to adapt to the target chain structure.

[0052] Structural complexity ( ) reflects the complexity of the field itself. Fields with higher complexity require greater weights in the calculation to reflect their influence.

[0053] Field length ( ) and structural levels ( ) The position and depth of the field in the chain affect it, with longer and deeper fields generally having more associations and influences.

[0054] Weighted Index ( ) is set based on the performance and usage frequency of the field combination in historical data. Field combinations with larger weights usually require higher exponents to adjust their calculation results.

[0055] Further derivation: If you continue with other field combinations (such as ), substitute the parameters of each field combination, and finally calculate the stability value of all field combinations, and then sum these values ​​to get the total field arrangement stability value.

[0056] The specific steps of S5 are: S501: Obtain a recommended cross-chain field structure sequence, extract the field name and sequence number, select each field from the structure sequence in turn, extract the corresponding name and number, form a corresponding list of primary field names and sequence numbers, generate a string of concatenated numbers, and obtain a field number list;

[0057] When obtaining the recommended cross-chain field structure sequence, it is first necessary to obtain the defined cross-chain field structure from the cross-chain system. These structures may include multiple fields and their associated sequence numbers. Each field represents a data item in the cross-chain transaction process, and the sequence number is used to identify the order of the fields. During the execution process, all field data are first extracted from the cross-chain field structure sequence. Each field usually contains a unique field name and a corresponding sequence number. The field name may include identifying information such as "chain ID" and "transaction type". Next, the name and sequence number of each field are extracted in turn to generate a field number list, which pairs the field name with the sequence number to form a field data set. For example, assuming that the cross-chain field sequence contains the field names "transaction type" and "chain ID", and their sequence numbers are 1 and 2, the generated field number list may be [1: transaction type, 2: chain ID]. The key to this step is to extract the sequence number and name of the field in this list in turn, and splice them into a number string to form a complete field number list, which is convenient for subsequent processing and application. The final result generates a field number list for the next step.

[0058] S502: Based on the field number list, the field names and numbers are combined to generate a structure summary of the field names and numbers, the numbers and names of each field are sequentially concatenated into a set of data, and all fields are summarized to generate a complete structure summary to obtain a structure summary list; Based on the field number list generated above, the number and name of each field need to be combined to generate a structure summary. The core of this process is to generate structured data corresponding to the field by combining the field number and name into a summary in a specific order. Each data item is spliced ​​by the field number and the field name to form a structure summary. For example, based on the field number list [1: transaction type, 2: chain ID] extracted in the previous step, the structure summary can be created as "1_transaction type_2_chain ID", where "1" represents the number of the transaction type, and the subsequent field names and numbers are combined in sequence and connected with underscores, and the final generated structure summary is "1_transaction type_2_chain ID". By performing this splicing process in sequence, the numbers and names of all fields are integrated one by one into a structure summary list containing complete data. This process not only helps manage cross-chain field information, but also provides a clear and orderly field combination for the subsequent communication path identification generation. In this step, the data of each field is precisely spliced ​​and arranged in sequence, and finally a comprehensive structure summary list is generated to provide data support for the subsequent path identification generation.

[0059] S503: According to the structure summary list, the structure summary list is combined with the main field name to generate a communication path identifier, and the generated communication path identifier is written into the protocol configuration table to obtain an inter-chain path identification number item; Next, according to the generated structure summary list, each structure summary is combined with the corresponding main field name to generate the final communication path identifier. At this time, the communication path identifier is not only composed of the field name, but also takes into account the sequential numbering of the field to ensure that the order and name of each field can clearly indicate the specific location and function of the field. For example, assuming that the structure summary obtained above is "1_transaction type_2_chain ID", the main field name may be "transaction information" or "cross-chain transaction". The communication path identifier will be combined with these elements, such as "transaction information_1_transaction type_2_chain ID" to form a unique communication identifier. The generated communication path identifier is written into the protocol configuration table to ensure that each field in the cross-chain system can be accurately identified by a specific identifier and mapped to the corresponding inter-chain communication path. Finally, the generated inter-chain path identification number item provides clear path identification information for the cross-chain protocol to identify the specific data flow path in the cross-chain transaction. This process involves accurate mapping and configuration of field names, numbers and their combinations, so as to ensure that data can flow efficiently between different chains.

[0060] See also Figure 2 , a cross-chain system between blockchains, including: The on-chain field information collection module obtains the deployment block height, earliest call height, call end height and contract name of the field in the blockchain, combines the call sequence number of the field in the contract structure, builds the position range of the field in the on-chain structure, and generates field call boundary association information; The field conflict detection module extracts the transaction type, binding status data item and write sequence number of the fields in the source chain and the target chain based on the field call boundary association information, compares the consistency of the life cycle intersection and the write sequence, determines the conflicting field path combination, and organizes and generates a list of field path conflict records; The cross-chain protocol matching module checks whether the associated fields co-appear in the configured cross-chain protocol structure according to the field path conflict record list. If so, it marks the corresponding communication structure and generates a cross-chain protocol exclusion path set; The field matching and filtering module calls the cross-chain protocol exclusion path set, extracts the available field combinations in the target chain, and judges the position difference and matching degree according to the calling sequence number of the field and the Boolean value of the verification identifier, filters the field combinations that match the continuity and distribution pattern of the source chain structure, and generates a recommended cross-chain field structure sequence; The cross-chain path identification module calls the recommended cross-chain field structure sequence, extracts the main field name and sequential number list, concatenates the numbers and generates a structure summary, combines the structure summary with the field name, writes it into the protocol configuration table, and generates an inter-chain path identification number item.

[0061] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A cross-chain method between blockchains, characterized in that: The following steps are involved: S1: Get the current on-chain field deployment block height, call start and end heights, and contract name, combine the call sequence number in the contract, determine the location range of the field in the on-chain structure, and generate field call boundary association information; S2: Based on the field call boundary association information, extract the field transaction type, state data item and write sequence number in the source chain and the target chain, determine the life cycle overlap and sequence difference, and organize the conflicting field paths into a field path conflict record list; S3: According to the field path conflict record list, check whether the associated fields appear together in the configured cross-chain protocol structure. If so, mark the corresponding communication structure and generate a cross-chain protocol exclusion path set; S4: Call the cross-chain protocol exclusion path set, extract the available field combinations of the target chain, and screen the field combinations with continuous and consistent distribution of the source chain structure according to the difference between the call sequence number and the verification identifier, and generate a recommended cross-chain field structure sequence; S5: Call the recommended cross-chain field structure sequence, extract the main field name and sequence number, generate a structure summary and combine it with the field name to form a communication path identifier, write it into the protocol configuration table, and generate an inter-chain path identification number item.

2. The cross-chain method between blockchains according to claim 1, characterized in that: The field call boundary association information includes the deployment block height, the earliest call height, the call end height, the contract name, and the call sequence number. The field path conflict record list includes the transaction type, the binding status data item, the write sequence number, the life cycle intersection information, and the sequence difference information. The cross-chain protocol exclusion path set includes the communication structure tag, the protocol path exclusion item, and the cross-chain structure filtering rule. The recommended cross-chain field structure sequence includes the verification identification Boolean value, the structure continuity parameter, and the distribution mode feature. The inter-chain path identification number item includes the main field name, the sequence number list, the structure summary, the communication path identification, and the protocol configuration table information.

3. The cross-chain method between blockchains according to claim 1, characterized in that: The specific steps of S1 are: S101: Obtain the deployment block height of the contract to which the field belongs, the block heights of the first and last calls of the field, calculate the block offset values ​​of the first and last calls in combination with the call sequence number, and generate the field call block offset interval value; S102: calling the block offset interval value according to the field, screening the data fields whose numbers are not less than the field number within the corresponding block range, counting the number of fields and the number difference, and generating the field number interval span value; S103: Based on the field call block offset interval value and the field number interval span value, the field number and block height are extracted, the difference between adjacent field numbers and heights is averaged, and the field call boundary association value is obtained.

4. The cross-chain method between blockchains according to claim 3, characterized in that: The specific steps of S2 are: S201: Based on the field call boundary association value, extract the transaction type, binding state data item and write sequence number of the field in the source chain and the target chain, identify the field path and the number accordingly, and generate the field transaction sequence annotation quantity; S202: calling the field transaction sequence annotation quantity, performing a path cross comparison on the write sequence numbers in the source chain and the target chain, extracting the field paths with inconsistent write sequences and their number difference values, and generating a field path sequence difference value set; S203: According to the field path sequence difference value set, identifying a combination of lifecycle intersection and sequence difference in the field path, and obtaining a field path conflict record list.

5. The cross-chain method between blockchains according to claim 4, characterized in that: The specific calculation formula for extracting the field paths with inconsistent writing order and their number difference values ​​is: ; in, Represents the first The source chain path and The order difference weighted offset value of the target chain path, Represents the target chain The write order number of the field path, The source chain The sum of the boundary call weights of all fields corresponding to the field paths in the target chain, Representative The source chain field is The call weight value between the target chain fields, Representative The total number of binding state data items in the source chain for the field path, Represents the source chain The write order number of the field path, The number of field paths in the target chain.

6. The cross-chain method between blockchains according to claim 4, characterized in that: The specific steps of S3 are: S301: Obtain the field path conflict record list and the cross-chain protocol structure, and based on the field path in the conflict record, detect whether the field path co-occurs with the conflicting field in the cross-chain protocol structure. If so, mark the corresponding communication field combination position and generate a field co-occurrence communication position information set; S302: calling the communication field combination position in the field co-occurrence communication position information set, performing intersection comparison with the configured field set in the protocol structure, screening the communication structure where at least two fields in the conflicting field exist at the same time, calculating the field intersection ratio, and obtaining a high co-occurrence field path structure set; S303: According to the field path distribution in the high coexistence field path structure set, extract the field combination that overlaps with the conflict record list field path, determine whether it co-occurs repeatedly in all protocol structures, build an exclusion field path index set, and generate a cross-chain protocol exclusion path set.

7. The cross-chain method between blockchains according to claim 6, characterized in that: The specific steps of S4 are: S401: calling the field path and the target chain path in the cross-chain protocol exclusion path set, extracting the logically continuous field combination in the target chain, recording the field distribution position and calling sequence, and generating the field sequence difference value by comparing the sequence difference and displacement direction of the field combination; S402: Based on the field sequence difference value and the field call sequence number, extract the field including the verification identification Boolean value, compare the position difference of the field in the target chain and the source chain, select the field combination whose sequence offset is less than the position difference threshold, and generate a Boolean field offset matching value; S403: According to the Boolean field offset matching value and the source chain structure continuity rule, the order and distribution trend of the field combination are compared, the combination that meets the field offset direction and structural hierarchy requirements is screened, the field arrangement stability is calculated, and a recommended cross-chain field structure sequence is generated.

8. The cross-chain method between blockchains according to claim 7, characterized in that: The specific formula for screening the combination that meets the field offset direction and structure level requirements is: ; Among them, S represents the field arrangement stability, Representative The offset of the field combination, Represents the target offset of this field combination. Representative The structural complexity of the combination of fields, Representative The length of the field combination, Represents the source chain structure level of this field combination, Representative The target chain structure level of the field combination, Representative The weighted index of the combination of fields, Represents the total number of field combinations.

9. The cross-chain method between blockchains according to claim 7, characterized in that: The specific steps of S5 are: S501: Obtain the recommended cross-chain field structure sequence, extract the field name and sequence number, select each field from the structure sequence in turn, extract the corresponding name and number, form a corresponding list of primary field names and sequence numbers, generate a string of concatenated numbers, and obtain a field number list; S502: Based on the field number list, the field names and numbers are combined to generate a structure summary of the field names and numbers, the numbers and names of each field are sequentially concatenated into a set of data, and all fields are summarized to generate a complete structure summary to obtain a structure summary list; S503: According to the structure summary list, the structure summary list is combined with the main field name to generate a communication path identifier, and the generated communication path identifier is written into the protocol configuration table to obtain an inter-chain path identification number item.

10. A cross-chain system between blockchains, characterized in that: According to a cross-chain method between blockchains according to any one of claims 1 to 9, the system comprises: The on-chain field information collection module obtains the deployment block height, earliest call height, call end height and contract name of the field in the blockchain, combines the call sequence number of the field in the contract structure, builds the position range of the field in the on-chain structure, and generates field call boundary association information; The field conflict detection module extracts the transaction type, binding status data item and write sequence number of the fields in the source chain and the target chain based on the field call boundary association information, compares the consistency of the life cycle intersection and the write sequence, determines the conflicting field path combination, and organizes and generates a field path conflict record list; The cross-chain protocol matching module checks whether the associated fields co-appear in the configured cross-chain protocol structure according to the field path conflict record list, and if so, marks the corresponding communication structure and generates a cross-chain protocol exclusion path set; The field matching and screening module calls the cross-chain protocol exclusion path set, extracts the available field combinations in the target chain, and judges the position difference and matching degree according to the calling sequence number of the field and the Boolean value of the verification identifier, screens the field combinations that match the continuity and distribution pattern of the source chain structure, and generates a recommended cross-chain field structure sequence; The cross-chain path identification module calls the recommended cross-chain field structure sequence, extracts the main field name and the sequential number list, concatenates the numbers and generates a structure summary, combines the structure summary with the field name, writes it into the protocol configuration table, and generates an inter-chain path identification number item.

Citation Information

Patent Citations

  • Cross-chain intercommunication method and system

    CN112887380A

  • Data consistency maintenance method for realizing cross-chain interoperation

    CN112965985A

  • Non-account balance mode block chain asset cross-chain security monitoring system and method

    CN119494660A

  • Method and System to Implement an NFT Architecture Framework for Bitcoin Inscriptions, Ordinals and Smart Contracts Interworking with a Cross-Chain Communications Network of Bridges, Substrates, and Parachains, Off-Chain IPFS Decentralized Smart Contract Storage, Zero Trust Security Framework, Bitcoin NFT Tokenization, Bitcoin NFT Copyright Ownership and Validation using DRM, Open AI Applications for Smart Contracts, and WebRTC-QUIC Secure Video and Messaging Communications

    US20240370865A1

Cited By

  • Multi-party participation automatic settlement method and system based on block chain

    CN120725666A