A data interaction method based on on-chain and off-chain collaboration of blockchain

By performing data storage encryption, permission management and synchronization status analysis in the collaborative data interaction on and off the blockchain, the problem of data synchronization in the existing technology that cannot be analyzed is solved, and the security of data storage and collaboration efficiency are improved.

CN118296079BActive Publication Date: 2024-10-22STATE GRID SHANDONG ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410454517.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2024-10-22
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

The existing technology cannot perform synchronization status analysis on data synchronization methods, resulting in the inability to adapt the synchronization characteristics of different data types, and the synchronization processing security and efficiency of on-chain and off-chain data collaboration are low.

Method used

Adopting a blockchain-based on-chain and off-chain collaborative data interaction method, through the storage management, encryption processing, and access rights management of off-chain data, and the synchronization management and synchronization status analysis of the on-chain and off-chain collaborative data, Generate scheduled weight values, real-time weight values, on-demand weight values ​​and triggered weight values, and randomly select synchronization methods to improve data synchronization efficiency.

Benefits of technology

It improves the storage security of off-chain data, avoids cross-level access through legal access level determination, improves data application security, optimizes data synchronization methods through synchronization status analysis, and improves data collaboration efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118296079B_ABST
    Figure CN118296079B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of blockchain data interaction and relates to data analysis technology. It is used to solve the problem that the data interaction method in the prior art cannot perform synchronization status analysis on the data synchronization method. Specifically, it is a data interaction method based on on-chain and off-chain collaboration of blockchain, comprising the following steps: managing the storage method of off-chain data: dividing the off-chain data into private data and shared data according to the usage type, establishing a distributed database cluster for storage of private data, providing a secure connection between multiple nodes for shared data, and performing decentralized indexing in combination with available data; encrypting the processing object according to the key S1-S2; the present invention can scramble and reorganize the data according to the key in the form of S1-S2 to obtain encrypted data, so that the security of the off-chain data during storage is improved, and multiple encryption logics are obtained by permutation and combination of scrambling features and reorganization features, thereby further improving the storage security of the off-chain data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of blockchain data interaction and relates to data analysis technology, specifically a data interaction method based on on-chain and off-chain collaboration of blockchain. Background Art

[0002] Blockchain technology has the characteristic that data cannot be tampered with, ensuring the integrity and reliability of data. This is of great value in the fields of finance and supply chain, and can reduce the risk of fraud and improve data security. Blockchain technology realizes the transmission of trust through decentralization and consensus mechanism. This reduces the trust cost between participants and promotes cross-organizational and cross-industry cooperation and transactions.

[0003] The data interaction method in the prior art is unable to analyze the synchronization status of the data synchronization method, resulting in the inability to adapt the synchronization characteristics of different data types, and the low security and efficiency of the collaborative synchronization processing of on-chain and off-chain data.

[0004] In view of the above technical problems, this application proposes a solution. Summary of the invention

[0005] The purpose of the present invention is to provide a data interaction method based on on-chain and off-chain collaboration of blockchain, which is used to solve the problem that the data interaction method in the prior art cannot perform synchronization status analysis on the data synchronization mode;

[0006] The technical problem to be solved by the present invention is: how to provide a data interaction method based on on-chain and off-chain collaboration of the blockchain that can perform synchronization status analysis on the data synchronization mode.

[0007] The purpose of the present invention can be achieved through the following technical solutions:

[0008] A data interaction method based on on-chain and off-chain collaboration of blockchain, comprising the following steps:

[0009] Step 1: Manage the storage method of off-chain data;

[0010] Step 2: Store and encrypt off-chain data: Mark the off-chain data to be stored as the processing object, generate the key of the off-chain data in the form of S1-S2, S1 represents the scrambling feature of the encryption process, S2 represents the reorganization feature of the encryption process, the value of S1 is any integer in the range of [5, 100], and the value range of S2 is Q and H. The processing object is encrypted according to the key S1-S2 to obtain encrypted data, and the processing object is stored off-chain in the form of encrypted data;

[0011] Step 3: Manage access rights to off-chain stored data;

[0012] Step 4: Manage the synchronization method of collaborative data on and off the chain: When users upload data for blockchain storage, they can choose a synchronization method to synchronize data;

[0013] Step 5: Analyze the synchronization status of the collaborative data on and off the chain and obtain the timing weight value, real-time weight value, on-demand weight value and trigger weight value. Set the randomly selected weights of the timing synchronization, real-time synchronization, on-demand synchronization and trigger in the next analysis cycle as the timing weight value, real-time weight value, on-demand weight value and trigger weight value respectively.

[0014] As a preferred embodiment of the present invention, in step one, the specific process of managing the storage method of off-chain data includes: dividing the off-chain data into private data and shared data according to the usage type, establishing a distributed database cluster for storage of private data, providing a secure connection between multiple nodes for shared data, and combining available data for decentralized indexing.

[0015] As a preferred embodiment of the present invention, in step 2, the specific process of encrypting the processing object includes: setting the value of S1 to n, the character string formed by the first character to the nth character in the processing object data group constitutes the first decomposition group, the character string formed by the n+1th character to the 2*nth character in the processing object data group constitutes the second decomposition group, and so on, until all characters in the processing object data group are divided into decomposition groups; when the value of S2 is Q, the first characters of all decomposition groups are arranged in the order of the composition time of the decomposition groups to obtain the first reconstruction group, the second characters of all decomposition groups are arranged in the order of the composition of the decomposition groups to obtain the second reconstruction group, and so on, until all the characters of all decomposition groups are divided into reconstruction groups, and the character strings in the reconstruction groups are arranged in the order of the composition time of the reconstruction groups to obtain encrypted data.

[0016] As a preferred embodiment of the present invention, in step three, the specific process of performing access permission management on off-chain stored data includes: assigning a legal access level to the off-chain stored data, obtaining the access permission level of the visitor when the off-chain stored data receives an access request, comparing the access permission level of the visitor with the legal access level of the off-chain stored data, and determining whether the access request is approved based on the comparison result.

[0017] As a preferred embodiment of the present invention, the specific process of comparing the visitor's access permission level with the legal access level of the off-chain stored data includes: if the visitor's access permission level is lower than the legal access level of the off-chain stored data, the access request is determined to be rejected, an abnormal access signal is generated and the abnormal access signal is sent to the administrator's mobile phone terminal; if the visitor's access permission level is not lower than the legal access level of the off-chain stored data, the access request is determined to be accepted, a legal access signal is generated and the legal access signal is sent to the administrator's mobile phone terminal.

[0018] As a preferred implementation of the present invention, in step four, the synchronization mode includes scheduled synchronization, real-time synchronization, on-demand synchronization and trigger synchronization. When the user does not make an independent selection of the synchronization mode, a synchronization mode is randomly selected from scheduled synchronization, real-time synchronization, on-demand synchronization and trigger synchronization for data synchronization processing.

[0019] As a preferred embodiment of the present invention, in step five, the specific process of performing synchronization status analysis on the collaborative data on and off the chain includes: generating an analysis cycle, obtaining the loss value DS, efficiency value XL and abnormal value YC of the collaborative data on and off the chain within the analysis cycle; obtaining the synchronization coefficient TB of the collaborative data on and off the chain within the analysis cycle by numerically calculating the loss value DS, efficiency value XL and abnormal value YC; obtaining the timing weight value, real-time weight value, on-demand weight value and trigger weight value by the synchronization coefficient TB corresponding to the data processing process that uses timing synchronization, real-time synchronization, on-demand synchronization and trigger synchronization to perform data synchronization processing within the analysis cycle.

[0020] As a preferred implementation mode of the present invention, the loss value DS is the number of times data loss occurs when the collaborative data on the chain and the chain are collaboratively processed within the analysis period, the efficiency value XL is the ratio of the data processing amount to the total processing time when the collaborative data on the chain and the chain are collaboratively processed within the analysis period, and the abnormal value YC is the number of times abnormal access signals are generated when the collaborative data on the chain and the chain are collaboratively processed within the analysis period.

[0021] As a preferred embodiment of the present invention, the process of obtaining the timing weight value, real-time weight value, on-demand weight value and trigger weight value includes: marking the synchronization coefficient TB corresponding to the data processing process that uses timing synchronization, real-time synchronization, on-demand synchronization and trigger synchronization for data synchronization processing within the analysis period as the timing coefficient, real-time coefficient, on-demand coefficient and trigger coefficient respectively, marking the sum of the timing coefficient, real-time coefficient, on-demand coefficient and trigger coefficient as a statistical value, and marking the ratio of the numerical value of the timing coefficient, real-time coefficient, on-demand coefficient and trigger coefficient to the statistical value as the timing weight value, real-time weight value, on-demand weight value and trigger weight value respectively.

[0022] As a preferred embodiment of the present invention, it is applied to a data interaction system based on on-chain and off-chain collaboration of blockchain, including a server, wherein the server is communicatively connected with a storage management module, a permission management module, a synchronization management module and a synchronization analysis module;

[0023] The storage management module is used to manage the storage mode and encrypt the storage of off-chain data;

[0024] The permission management module is used to manage access rights to off-chain stored data;

[0025] The synchronization management module is used to manage the collaborative data on and off the chain in a synchronous manner;

[0026] The synchronization analysis module is used to perform synchronization status analysis on the collaborative data on and off the chain and to set numerical values ​​for the random selection weights of each synchronization mode in the next analysis cycle according to the synchronization status analysis results.

[0027] The present invention has the following beneficial effects:

[0028] 1. Perform storage encryption on off-chain data, scramble and reorganize the data according to the key in the form of S1-S2 to obtain encrypted data, so that the security of off-chain data during storage can be improved, and multiple encryption logics are obtained through the permutation and combination of scrambling features and reorganization features, further improving the storage security of off-chain data;

[0029] 2. Manage access rights for off-chain stored data. After assigning a legal access level to off-chain stored data, each time a data access request is received, the legality of the access is determined by comparing the legal access level with the access permission level, thereby preventing off-chain stored data from being accessed beyond the level and improving data application security.

[0030] 3. Perform synchronization status analysis on the collaborative data on and off the chain, and obtain the synchronization coefficient based on comprehensive analysis and calculation of multiple status parameters of the collaborative data during the analysis period. Then, the values ​​of the synchronization coefficients corresponding to different synchronization methods are used as the randomly selected weights of the synchronization methods in the next analysis period for numerical allocation, so that the data synchronization method can be aligned with the actual synchronization status, thereby improving data collaboration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 This is a flow chart of a method according to Embodiment 1 of the present invention;

[0033] Figure 2 This is a system block diagram of Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0034] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Embodiment 1

[0036] like Figure 1 As shown, a data interaction method based on on-chain and off-chain collaboration of blockchain includes the following steps:

[0037] Step 1: Manage the storage method of off-chain data: divide off-chain data into private data and shared data according to usage type, establish a distributed database cluster for private data storage, provide secure connections between multiple nodes for shared data, combine available data for decentralized indexing, and use hashing locally as a way to reference data by content in this technology, so as to achieve efficient data storage and transmission between on-chain and off-chain systems, and reduce transmission delays and network burden;

[0038] Step 2: Store and encrypt off-chain data: Mark the off-chain data to be stored as the processing object, and generate the key of the off-chain data in the form of S1-S2. S1 represents the scrambling feature of the encryption process, and S2 represents the reorganization feature of the encryption process. The value of S1 is any integer in the range of [5, 100], and the value range of S2 is Q and H. The processing object is encrypted according to the key S1-S2: Set the value of S1 to n, and the string formed by the first character to the nth character in the processing object data group constitutes the first decomposition group, and the string formed by the n+1th character to the 2*nth character in the processing object data group constitutes the second decomposition group, and so on, until all characters in the processing object data group are divided into decomposition groups. group; when the value of S2 is Q, the first characters of all decomposition groups are arranged in the order of the composition time of the decomposition groups to obtain the first reconstruction group, and the second characters of all decomposition groups are arranged in the order of the composition of the decomposition groups to obtain the second reconstruction group, and so on, until all the characters of the decomposition groups are divided into reconstruction groups, and the strings in the reconstruction groups are arranged in the order of the composition time of the reconstruction groups to obtain encrypted data, and the processing objects are stored off-chain in the form of encrypted data; data is scrambled and reorganized according to the keys in the form of S1-S2 to obtain encrypted data, so that the security of off-chain data during storage is improved, and multiple encryption logics are obtained by the arrangement and combination of scrambling features and reorganization features, which further improves the storage security of off-chain data.

[0039] Step 3: Manage access rights for off-chain stored data: assign a legal access level to off-chain stored data. When the off-chain stored data receives an access request, obtain the visitor's access level and compare the visitor's access level with the legal access level of the off-chain stored data: if the visitor's access level is lower than the legal access level of the off-chain stored data, the access request is deemed to be rejected, an abnormal access signal is generated and sent to the administrator's mobile terminal; if the visitor's access level is not lower than the legal access level of the off-chain stored data, the access request is deemed to be accepted, a legal access signal is generated and sent to the administrator's mobile terminal; after assigning a legal access level to the off-chain stored data, each time a data access request is received, the legality of the access is determined by comparing the legal access level with the access level, thereby preventing off-chain stored data from being accessed beyond its level and improving data application security;

[0040] Step 4: Manage the synchronization method of the collaborative data on and off the chain: When users upload data for blockchain storage, they can choose a synchronization method to synchronize the data. The synchronization methods include scheduled synchronization, real-time synchronization, on-demand synchronization, and trigger synchronization. If the user does not choose the synchronization method on his own, a synchronization method is randomly selected from scheduled synchronization, real-time synchronization, on-demand synchronization, and trigger synchronization to synchronize the data; scheduled synchronization means that the on-chain and off-chain systems can set scheduled tasks to synchronize data at predetermined time intervals. This synchronization strategy is suitable for scenarios with low data update frequency and low real-time requirements; real-time synchronization means that the on-chain and off-chain systems can provide API call interfaces (such as RESTful This synchronization strategy is suitable for scenarios where the system cannot actively access data, or the data is updated frequently and the real-time requirements are high; on-demand synchronization means that the on-chain and off-chain collaborative systems can synchronize data when needed. For example, when the off-chain system needs to verify a certain on-chain data, it can actively request the on-chain data and verify it. This synchronization strategy is suitable for scenarios where the data synchronization requirements are relatively scattered and the real-time requirements are moderate; trigger synchronization means that the on-chain smart contract can set a trigger mechanism. When the on-chain data changes, the corresponding off-chain operation is triggered. The off-chain system can also set a similar trigger mechanism to synchronize the off-chain data changes to the chain in real time. This two-way trigger mechanism helps to achieve real-time synchronization of on-chain and off-chain data.

[0041] Step 5: Analyze the synchronization status of the collaborative data on and off the chain: generate an analysis cycle, obtain the loss value DS, efficiency value XL and abnormal value YC of the collaborative data on and off the chain during the analysis cycle, the loss value DS is the number of times data loss occurs when the collaborative data on and off the chain are collaboratively processed during the analysis cycle, the efficiency value XL is the ratio of the data processing volume to the total processing time when the collaborative data on and off the chain are collaboratively processed during the analysis cycle, and the abnormal value YC is the number of times abnormal access signals are generated when the collaborative data on and off the chain are collaboratively processed during the analysis cycle; the synchronization coefficient TB of the collaborative data on and off the chain during the analysis cycle is obtained by the formula TB=m1*XL-m2*DS-m3*YC, where m1, m2 and m3 are all proportional coefficients, and m1>m2>m3>1; the data synchronization processing is performed by timed synchronization, real-time synchronization, on-demand synchronization and trigger synchronization during the analysis cycle The synchronization coefficient TB corresponding to the data processing process is marked as a timing coefficient, a real-time coefficient, an on-demand coefficient and a trigger coefficient, and the sum of the timing coefficient, the real-time coefficient, the on-demand coefficient and the trigger coefficient is marked as a statistical value. The ratios of the numerical values ​​of the timing coefficient, the real-time coefficient, the on-demand coefficient and the trigger coefficient to the statistical value are marked as a timing weight value, a real-time weight value, an on-demand weight value and a trigger weight value, respectively. The randomly selected weights of the timing synchronization, real-time synchronization, on-demand synchronization and the trigger in the next analysis period are set to the timing weight value, the real-time weight value, the on-demand weight value and the trigger weight value, respectively. The synchronization coefficient is obtained by comprehensive analysis and calculation based on multiple state parameters of the collaborative data in the analysis period, so that the value of the synchronization coefficient corresponding to different synchronization methods is assigned as the randomly selected weight of the synchronization method in the next analysis period, so that the data synchronization method can be aligned with the actual synchronization state, thereby improving the data collaboration efficiency.

[0042] Embodiment 2

[0043] like Figure 2 As shown, a data interaction system based on on-chain and off-chain collaboration of blockchain includes a server, and the server is communicatively connected with a storage management module, a permission management module, a synchronization management module and a synchronization analysis module.

[0044] The storage management module is used to manage the storage method of off-chain data and perform encrypted storage processing;

[0045] The permission management module is used to manage access rights to off-chain storage data;

[0046] The synchronization management module is used to manage the collaborative data on and off the chain in a synchronous manner;

[0047] The synchronization analysis module is used to perform synchronization status analysis on the collaborative data on and off the chain and to set the numerical values ​​of the random selection weights of each synchronization method in the next analysis cycle according to the synchronization status analysis results.

[0048] A data interaction method based on on-chain and off-chain collaboration of blockchain. When working, the storage mode of off-chain data is managed: the off-chain data is divided into private data and shared data according to the usage type; the off-chain data is stored and encrypted: the off-chain data to be stored is marked as a processing object, the key of the off-chain data is generated in the form of S1-S2, the processing object is encrypted according to the key S1-S2, and the access permission management is performed on the off-chain stored data: a legal access level is assigned to the off-chain stored data, when the off-chain stored data receives an access request, the access permission level of the visitor is obtained, the access permission level of the visitor is compared with the legal access level of the off-chain stored data, and the legality of the access behavior is determined by the comparison result; the synchronization mode management and synchronization status analysis of the on-chain and off-chain collaborative data are performed.

[0049] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

[0050] The above formulas are obtained by collecting a large amount of data for software simulation and selecting a formula close to the real value. The coefficients in the formula are set by technicians in this field according to the actual situation; for example: formula TB=m1*XL-m2*DS-m3*YC; technicians in this field collect multiple groups of sample data and set corresponding synchronization coefficients for each group of sample data; substitute the set synchronization coefficients and the collected sample data into the formula, any three formulas constitute a three-variable linear equation group, screen the calculated coefficients and take the average, and obtain the values ​​of m1, m2 and m3 as 2.85, 2.12 and 1.63 respectively;

[0051] The size of the coefficient is to quantify each parameter to obtain a specific value for subsequent comparison. The size of the coefficient depends on the amount of sample data and the preliminary setting of the corresponding synchronization coefficient for each set of sample data by technical personnel in this field; as long as it does not affect the proportional relationship between the parameter and the quantized value, such as the synchronization coefficient is proportional to the efficiency value.

[0052] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0053] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A data interaction method based on on-chain and off-chain collaboration of blockchain, characterized in that: The following steps are involved: Step 1: Manage the storage method of off-chain data; Step 2: Store and encrypt off-chain data: Mark the off-chain data to be stored as the processing object, generate the key of the off-chain data in the form of S1-S2, S1 represents the scrambling feature of the encryption process, S2 represents the reorganization feature of the encryption process, the value of S1 is any integer in the range of [5, 100], and the value range of S2 is Q and H. The processing object is encrypted according to the key S1-S2 to obtain encrypted data, and the processing object is stored off-chain in the form of encrypted data; Step 3: Manage access rights to off-chain stored data; Step 4: Manage the synchronization method of collaborative data on and off the chain: When users upload data for blockchain storage, they can choose a synchronization method to synchronize data; Step 5: Analyze the synchronization status of the collaborative data on and off the chain and obtain the timing weight value, real-time weight value, on-demand weight value and trigger weight value, and set the random selection weights of the timing synchronization, real-time synchronization, on-demand synchronization and trigger in the next analysis cycle as the timing weight value, real-time weight value, on-demand weight value and trigger weight value respectively; In step 5, the specific process of performing synchronization status analysis on the on-chain and off-chain collaborative data includes: generating an analysis cycle, obtaining the loss value DS, efficiency value XL and abnormal value YC of the on-chain and off-chain collaborative data within the analysis cycle; obtaining the synchronization coefficient TB of the on-chain and off-chain collaborative data within the analysis cycle by numerically calculating the loss value DS, efficiency value XL and abnormal value YC; obtaining the timing weight value, real-time weight value, on-demand weight value and trigger weight value through the synchronization coefficient TB corresponding to the data processing process of data synchronization processing using timing synchronization, real-time synchronization, on-demand synchronization and trigger synchronization within the analysis cycle; The loss value DS is the number of times data loss occurs when collaborative data on and off the chain is collaboratively processed within the analysis cycle. The efficiency value XL is the ratio of the data processing volume to the total processing time when collaborative data on and off the chain is collaboratively processed within the analysis cycle. The abnormal value YC is the number of times abnormal access signals are generated when collaborative data on and off the chain is collaboratively processed within the analysis cycle. The process of obtaining the timing weight value, real-time weight value, on-demand weight value and trigger weight value includes: marking the synchronization coefficient TB corresponding to the data processing process that uses timing synchronization, real-time synchronization, on-demand synchronization and trigger synchronization for data synchronization processing within the analysis period as the timing coefficient, real-time coefficient, on-demand coefficient and trigger coefficient respectively, marking the sum of the timing coefficient, real-time coefficient, on-demand coefficient and trigger coefficient as a statistical value, and marking the ratio of the numerical value of the timing coefficient, real-time coefficient, on-demand coefficient and trigger coefficient to the statistical value as the timing weight value, real-time weight value, on-demand weight value and trigger weight value respectively.

2. According to claim 1, a data interaction method based on blockchain on-chain and off-chain collaboration is characterized in that: In step one, the specific process of managing the storage method of off-chain data includes: dividing the off-chain data into private data and shared data according to the usage type, establishing a distributed database cluster for storage of private data, providing a secure connection between multiple nodes for shared data, and combining available data for decentralized indexing.

3. According to claim 2, a data interaction method based on blockchain on-chain and off-chain collaboration is characterized in that: In step 2, the specific process of encrypting the processing object includes: setting the value of S1 to n, the character string formed by the first character to the nth character in the processing object data group constitutes the first decomposition group, the character string formed by the n+1th character to the 2*nth character in the processing object data group constitutes the second decomposition group, and so on, until all characters in the processing object data group are divided into decomposition groups; when the value of S2 is Q, the first characters of all decomposition groups are arranged in the time sequence of the decomposition group to obtain the first reconstruction group, the second characters of all decomposition groups are arranged in the time sequence of the decomposition group to obtain the second reconstruction group, and so on, until all the characters of all decomposition groups are divided into reconstruction groups, and the character strings in the reconstruction groups are arranged in the time sequence of the reconstruction groups to obtain encrypted data.

4. According to claim 3, a data interaction method based on blockchain on-chain and off-chain collaboration is characterized in that: In step three, the specific process of access permission management for off-chain stored data includes: assigning a legal access level to the off-chain stored data, obtaining the visitor's access permission level when the off-chain stored data receives an access request, comparing the visitor's access permission level with the legal access level of the off-chain stored data, and determining whether the access request is approved based on the comparison result.

5. According to claim 4, a data interaction method based on blockchain on-chain and off-chain collaboration is characterized in that: The specific process of comparing the visitor's access permission level with the legal access level of the off-chain stored data includes: if the visitor's access permission level is lower than the legal access level of the off-chain stored data, the access request is judged to be rejected, an abnormal access signal is generated and the abnormal access signal is sent to the administrator's mobile terminal; if the visitor's access permission level is not lower than the legal access level of the off-chain stored data, the access request is judged to be approved, a legal access signal is generated and the legal access signal is sent to the administrator's mobile terminal.

6. According to claim 5, a data interaction method based on blockchain on-chain and off-chain collaboration is characterized in that: In step 4, the synchronization modes include scheduled synchronization, real-time synchronization, on-demand synchronization and trigger synchronization. When the user does not make an independent selection of the synchronization mode, a synchronization mode is randomly selected from scheduled synchronization, real-time synchronization, on-demand synchronization and trigger synchronization for data synchronization processing.

7. A data interaction method based on on-chain and off-chain collaboration of blockchain according to any one of claims 1 to 6, characterized in that: Applicable to a data interaction system based on on-chain and off-chain collaboration of blockchain, including a server, wherein the server is communicatively connected with a storage management module, a permission management module, a synchronization management module and a synchronization analysis module; The storage management module is used to manage the storage mode and encrypt the storage of off-chain data; The permission management module is used to manage access rights to off-chain stored data; The synchronization management module is used to manage the collaborative data on and off the chain in a synchronous manner; The synchronization analysis module is used to perform synchronization status analysis on the collaborative data on and off the chain and to set numerical values ​​for the random selection weights of each synchronization mode in the next analysis cycle according to the synchronization status analysis results.