An on-chain off-chain collaborative computing method and system for blockchain

CN118035351BActive Publication Date: 2026-10-16LINGSHU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410167611.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-05
Publication Date
2026-10-16
Estimated Expiration
2044-02-05

AI Technical Summary

Technical Problem

[0005]本申请主要解决了现有技术无法实时处理数据具有延迟,不满足实时性,只利用链上导致资源浪费资源利用不充分,数据安全性较低,数据处理效率较低

Benefits of technology

[0009] This application provides an on-chain and off-chain collaborative computing method and system for blockchain, relating to the field of blockchain technology. The method includes: acquiring multiple processing items that are processed according to a preset contract; acquiring the target data to be processed; performing dimensionality reduction processing on the data blocks within the target blockchain; then analyzing the processing complexity and importance of the multiple processing items; analyzing the similarity between real-time data and data within the dimensionality reduction dataset of the multiple items; calculating the total importance; making on-chain and off-chain collaborative computing decisions; and performing collaborative computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118035351B_ABST
    Figure CN118035351B_ABST
Patent Text Reader

Abstract

The application provides an on-chain and off-chain collaborative computing method and system for a blockchain, and relates to the technical field of the blockchain. The method comprises the following steps: obtaining a plurality of processing items for processing data according to a preset contract, obtaining target data to be processed, performing dimension reduction processing according to data blocks in a target blockchain, then analyzing the processing complexity and processing importance of the plurality of processing items, analyzing the similarity of real-time data and data in a plurality of item dimension reduction data sets, calculating total importance, making an on-chain and off-chain collaborative computing decision, and performing collaborative computing. The application mainly solves the problems that the prior art cannot process data in real time, has a delay, does not meet real-time performance, only uses the on-chain, causes resource waste and insufficient resource utilization, has low data security, and has low data processing efficiency. The computing complexity of each item is researched, complexity adaptability balancing calculation is performed by means of an access decomposition module, and collaborative verification is performed by means of a collaborative mechanism, so that the execution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of blockchain technology, specifically to an on-chain and off-chain collaborative computing method and system for blockchain. Background Technology

[0002] With the widespread application of blockchain technology, people have gradually realized that traditional blockchain computing methods have some problems, such as low computing efficiency, insufficient privacy protection, and resource waste. Therefore, it is necessary to develop a more efficient, secure, and sustainable computing method. Traditional blockchain computing methods perform all computing tasks on-chain, resulting in low computing efficiency and difficulty in meeting the needs of large-scale applications. As the scale of blockchain networks expands, the resources required for on-chain computing also increase, leading to resource waste. Different blockchain networks need to interact and cooperate on data, but traditional blockchain technology struggles to achieve this goal.

[0003] However, in the process of implementing the technical solution of the invention in the embodiments of this application, it was found that the above-mentioned technology has at least the following technical problems:

[0004] Existing technologies cannot process data in real time due to latency, fail to meet real-time requirements, rely solely on on-chain data, resulting in resource waste and underutilization, low data security, and low data processing efficiency. Summary of the Invention

[0005] This application primarily addresses the problems of existing technologies, such as inability to process data in real time (due to latency), failure to meet real-time requirements, resource waste and underutilization due to relying solely on on-chain data, low data security, and low data processing efficiency.

[0006] In view of the above problems, this application provides an on-chain and off-chain collaborative computing method and system for blockchain. In a first aspect, this application provides an on-chain and off-chain collaborative computing method for blockchain, the method comprising: interacting with a target blockchain to obtain multiple processing items that are processed according to a preset contract on the target blockchain; obtaining target data to be processed on the current target blockchain, wherein the target data includes multiple real-time data contents corresponding to multiple real-time processing items; and performing dimensionality reduction processing on the historical processing data of the multiple processing items according to data blocks within the target blockchain to obtain multiple item dimensionality reduction datasets. Based on the dimensionality reduction datasets of the multiple items, the processing complexity and importance of the multiple processing items are analyzed to obtain the multiple item complexity and multiple item importance. By analyzing the similarity between the multiple real-time data contents and the data within the multiple item dimensionality reduction datasets, the multiple data complexity and multiple data importance of the multiple real-time data contents are obtained. Based on the multiple real-time item complexity and multiple real-time item importance of the multiple real-time processing items, and combined with the multiple data complexity and multiple data importance, the total complexity and total importance of the multiple real-time data contents are calculated. On-chain and off-chain collaborative computing decisions are then performed to obtain a collaborative decision-making scheme for collaborative computing.

[0007] Secondly, this application provides an on-chain and off-chain collaborative computing system for blockchain, the system comprising: a processing item acquisition module, which interacts with a target blockchain to acquire multiple processing items that perform data processing on the target blockchain according to a preset contract; a target data acquisition module, which acquires target data to be processed on the target blockchain, wherein the target data includes multiple real-time data contents corresponding to multiple real-time processing items; a dimensionality reduction dataset acquisition module, which performs dimensionality reduction processing on the historical processing data of the multiple processing items based on data blocks within the target blockchain to obtain multiple item dimensionality reduction datasets; and a processing item analysis module, which uses... Based on the dimensionality reduction dataset of the multiple items, the processing complexity and importance of the multiple processing items are analyzed to obtain the multiple item complexity and multiple item importance; a real-time content data acquisition module is used to obtain the multiple data complexity and multiple data importance of the multiple real-time data content by analyzing the similarity of the data within the multiple real-time data content and the multiple item dimensionality reduction dataset; a collaborative decision-making scheme acquisition module is used to calculate the total complexity and total importance of the multiple real-time data content based on the multiple real-time item complexity and multiple real-time item importance of the multiple real-time processing items, combined with the multiple data complexity and multiple data importance, to perform on-chain and off-chain collaborative computing decisions, obtain a collaborative decision-making scheme, and perform collaborative computing.

[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0009] This application provides an on-chain and off-chain collaborative computing method and system for blockchain, relating to the field of blockchain technology. The method includes: acquiring multiple processing items that are processed according to a preset contract; acquiring the target data to be processed; performing dimensionality reduction processing on the data blocks within the target blockchain; then analyzing the processing complexity and importance of the multiple processing items; analyzing the similarity between real-time data and data within the dimensionality reduction dataset of the multiple items; calculating the total importance; making on-chain and off-chain collaborative computing decisions; and performing collaborative computing.

[0010] This application primarily addresses the shortcomings of existing technologies, such as latency in real-time data processing, failure to meet real-time requirements, resource waste and underutilization due to relying solely on on-chain data, low data security, and low data processing efficiency. It investigates the computational complexity of each item, integrates a decomposition module for adaptive complexity balancing, and employs a collaborative verification mechanism to improve execution efficiency.

[0011] The above description is merely an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0013] Figure 1 This application provides a schematic flowchart of an on-chain and off-chain collaborative computing method for blockchain.

[0014] Figure 2 This application provides a flowchart illustrating a method for dimensionality reduction in an on-chain and off-chain collaborative computing approach for blockchain.

[0015] Figure 3 This application provides a schematic flowchart of a method for dimensionality reduction optimization in an on-chain and off-chain collaborative computing method for blockchain.

[0016] Figure 4 This application provides a schematic diagram of the structure of an on-chain and off-chain collaborative computing system for blockchain.

[0017] Figure labeling: Processing item acquisition module 10, target data acquisition module 20, dimensionality reduction dataset acquisition module 30, processing item analysis module 40, real-time content data acquisition module 50, collaborative decision-making scheme acquisition module 60. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] This application primarily addresses the shortcomings of existing technologies, such as latency in real-time data processing, failure to meet real-time requirements, resource waste and underutilization due to relying solely on on-chain data, low data security, and low data processing efficiency. It investigates the computational complexity of each item, integrates a decomposition module for adaptive complexity balancing, and employs a collaborative verification mechanism to improve execution efficiency.

[0020] To better understand the above technical solution, the following will provide a detailed description of the solution in conjunction with the accompanying drawings and specific implementation methods:

[0021] Example 1, as Figure 1 This illustrates an on-chain and off-chain collaborative computing method for blockchain, the method comprising:

[0022] Interact with the target blockchain to obtain multiple processing items on the target blockchain that perform data processing according to a preset contract;

[0023] Specifically, this involves interacting with the target blockchain and acquiring multiple processing items that perform data processing according to a pre-defined contract on the target blockchain. Connecting to the target blockchain involves using appropriate tools or libraries, such as blockchain client libraries or smart contract development frameworks, to establish a connection. Identifying processing items involves parsing the smart contract on the target blockchain to identify the multiple processing items it contains. Each processing item represents a specific computational task or operation. Pre-defined contracts and smart contracts: Pre-defined contracts are a form of smart contract that defines the rules and logic for data processing on the blockchain according to specific computational rules. These computational rules include data consensus, storage and computation methods, and mechanisms for rewarding or penalizing multiple nodes. Smart contracts execute the pre-defined rules and logic on the blockchain to ensure the integrity and correctness of data processing. They can automatically execute corresponding operations, such as rewards, penalties, or data verification, based on the pre-defined computational rules. Within a pre-defined contract, multiple computational contents are contained, which can be considered as multiple processing items. Each processing item represents a specific computational task, which is processed on the blockchain in a certain order and logic.

[0024] Obtain the target data to be processed in the target blockchain, wherein the target data includes multiple real-time data contents corresponding to multiple real-time processing items;

[0025] Specifically, to obtain the target data to be processed on the current target blockchain, it is first necessary to clarify the definition and relationship between target data and real-time processing items. Target data refers to the data that needs to be processed and manipulated on the target blockchain, which typically originates from various transactions and events. Target data can take many forms, including but not limited to transaction data, account information, and smart contract states. Real-time processing items refer to real-time processing tasks or operations related to the target data. These processing items are usually defined by smart contracts and executed according to preset logic and rules. Real-time processing items may include operations such as verifying transactions, updating account states, and triggering smart contract events. The target data to be processed is read from the target blockchain. This can be accomplished by sending appropriate requests or queries to obtain the data content related to the real-time processing items. The integrity and validity of the read target data are verified. Based on the logic and rules of the real-time processing items, the filtered target data is processed accordingly. This may include performing calculations, verifications, transformations, or other operations. To save computing power on the blockchain and improve computational efficiency, data is partitioned, and less important data requiring large computational loads is processed off-chain. This method optimizes decision-making to improve the reliability and rationality of collaborative computing decisions.

[0026] Based on the data blocks within the target blockchain, the historical processing data of the multiple processing items are subjected to dimensionality reduction processing to obtain multiple item dimensionality reduction datasets;

[0027] Specifically, after acquiring historical processing data for multiple processing items on the target blockchain, dimensionality reduction can lower the dimensionality of high-dimensional data for more intuitive presentation and interpretation. First, historical processing data is collected from the target blockchain. This data is typically stored in data blocks, with corresponding data records for each processing item. Before dimensionality reduction, the data needs preprocessing, including cleaning, format conversion, and outlier handling. This ensures the accuracy and consistency of the data for subsequent analysis. By allocating data probabilities according to the proportion of identical data occurrences in the historical processing data for each processing item, multiple item data probability distributions can be generated. This probability distribution reflects the relative frequency and importance of each processing item across different data. A comprehensive understanding of the historical processing data for each processing item is crucial. Identifying the data's characteristics, patterns, and distribution allows for the selection of appropriate dimensionality reduction techniques: Choose a suitable dimensionality reduction method based on the data's characteristics and requirements. For example, Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), and t-SNE are commonly used dimensionality reduction techniques. These methods can reduce high-dimensional data to low-dimensionality while preserving important features and structure. The selected dimensionality reduction method is used to optimize the data. During dimensionality reduction, it's crucial to preserve the key features of the original dataset while reducing dimensionality and redundant information. The goal of this step is to maximize the preservation of the data's inherent structure and relationships while reducing the data volume. The optimized data is then evaluated and validated. By comparing the data before and after dimensionality reduction, it's possible to check whether key features and information were effectively preserved. Evaluation metrics such as the proportion of retained variance and the proportion of variance explained by each feature can be used to measure the effectiveness of dimensionality reduction. Through these steps, dimensionality reduction optimization can be achieved, reducing the amount of data to be processed while preserving the key features of the original dataset. This helps improve the efficiency and accuracy of data analysis, providing more valuable support for subsequent applications or decision-making.

[0028] Based on the dimensionality reduction dataset of the multiple items, analyze the processing complexity and processing importance of the multiple processing items to obtain the complexity and importance of the multiple items;

[0029] Specifically, after obtaining multiple dimensionality-reduced datasets, further analysis of processing complexity and importance is necessary. Data processing complexity analysis includes: Calculating processing time: Analyzing the processing time of each item, including execution time, waiting time, and response time. By comparing the processing times of different items, their complexity can be initially assessed. Evaluating the resources consumed by each item during execution, such as CPU utilization, memory usage, and disk I / O. This resource consumption data reflects the complexity and load of the processing. Analyzing the dependencies between items to understand which items are related or interdependent. Complex dependencies may imply higher processing complexity. Analyzing the amount of data involved and the frequency of processing for each item. Larger data volumes and higher processing frequencies may indicate higher importance for the item. Assessing the importance of each item based on its value and impact on the business process. For example, critical business logic, data validation, and core transactions may have higher importance. Assessing the tolerance of each item for errors or anomalies. If a processing item has a significant impact on the business or its errors are intolerable, its importance is higher. Integrate the analysis results of processing complexity and importance to create a view of the complexity and importance of multiple items. This can be achieved by creating tables, charts, or dashboards to visually represent the results. For example, for each processing item, record its processing time, including execution, waiting, and response times. Based on actual needs and experience, set a time threshold to differentiate between simple and complex processing items. For example, if the average processing time of a processing item exceeds the threshold, it is considered to have high complexity. Map processing time to complexity; generally, longer times indicate higher complexity. Based on the analysis results, processing items can be prioritized, resources allocated, or optimization strategies formulated. For example, give more attention and resources to high-importance and high-complexity processing items, prioritizing or optimizing these key aspects. The analysis results can also be used to improve data processing workflows, enhance system performance and stability, and develop long-term development strategies.

[0030] By analyzing the similarity between the multiple real-time data contents and the data within the multiple item dimensionality reduction datasets, the multiple data complexities and multiple data importance of the multiple real-time data contents are obtained;

[0031] Specifically, key features are extracted from real-time data content and the dimensionality-reduced dataset. These features should represent the main characteristics and attributes of the data. Appropriate similarity metrics, such as cosine similarity and Euclidean distance, are used to calculate the similarity between the real-time data content and the data within the dimensionality-reduced dataset. Cluster analysis is performed based on the similarity matrix to divide the real-time data content into different clusters. High similarity within a cluster indicates a relatively simple data structure, while large differences between clusters indicate a complex data structure. Outliers or anomalies are identified by comparing the similarity between the real-time data and the dimensionality-reduced dataset. Outliers typically represent high data complexity and require further analysis and processing. Appropriate weights are assigned to the real-time data content based on the similarity calculation results. Higher weights indicate greater similarity between the data and the dimensionality-reduced dataset, meaning the data is more important. The importance of the real-time data content is assessed in conjunction with business logic and actual needs. For example, key business parameters and data influencing decision-making may have higher importance. The results of similarity calculation, cluster analysis, anomaly detection, and weight assignment are integrated to form multiple views of data complexity and importance. This helps to gain a more comprehensive understanding of the complexity and importance of the data.

[0032] Based on the complexity and importance of the multiple real-time processing items, and combined with the complexity and importance of the multiple data, the total complexity and total importance of the multiple real-time data contents are calculated. On-chain and off-chain collaborative computing decisions are then made to obtain a collaborative decision-making scheme and perform collaborative computing.

[0033] Specifically, the total complexity is calculated using a weighted average method based on the complexity of the real-time processing item, the complexity of the data itself, and other relevant factors. The weights can be adjusted according to the actual situation to reflect the degree of influence of different factors on the total complexity. In addition to the complexity of individual processing items and data, the overall complexity of the processing flow also needs to be considered. For example, some processing items may be interconnected or interdependent, increasing the complexity of the entire process. The assessment of total importance needs to comprehensively consider the importance of real-time processing items, the importance of the data, and other relevant business factors. These factors may include the impact of data on business decisions, and the potential losses caused by missing or incorrect data. Similar to the calculation of total complexity, the assessment of total importance can also use a weighted average method, adjusting the weights of different factors according to actual needs. On-chain and off-chain collaborative computing means the need for information sharing and integration between different systems or entities. This requires ensuring data consistency and understandability so that different systems or entities can make decisions based on the same facts. In on-chain and off-chain collaborative computing, the real-time nature of data and processing latency need to be considered. For scenarios with high real-time requirements, it is necessary to optimize the data processing flow, reduce latency, and ensure that real-time data can be processed and applied in a timely manner. When developing collaborative decision-making solutions, the calculation results of total complexity and total importance should be fully considered. Prioritize real-time data with high importance and complexity, and allocate resources rationally to meet the collaborative computing needs both on-chain and off-chain. After implementation, the collaborative decision-making solution should be continuously monitored for effectiveness, with feedback and adjustments made based on actual operational conditions. This helps to continuously improve the collaborative decision-making solution, enhancing its accuracy and effectiveness. Collaborative computing often involves collaboration between multiple departments or organizations. Ensuring effective communication and collaboration between departments / organizations is crucial to ensuring consistency and accuracy in data processing and decision-making. As business needs and the technological environment change, collaborative computing solutions also require continuous optimization and improvement. This includes updating data processing workflows, improving model algorithms, and adjusting resource allocation to adapt to the ever-changing environment and requirements.

[0034] Furthermore, the method of this application, obtaining the target data to be processed in the target blockchain, includes:

[0035] Obtain the target data to be processed in the current target blockchain;

[0036] According to the preset contract, the target data is divided to obtain multiple real-time processing items and multiple real-time data contents, wherein the multiple real-time processing items are included within the multiple processing items.

[0037] Specifically, using appropriate tools or technologies, data to be processed is crawled from the target blockchain. This includes interaction with the blockchain, ensuring compliance with its specifications and security protocols. Data relevant to the target is filtered from the crawled data. This requires defining appropriate filtering conditions and standards based on business needs and data processing objectives. The validity and accuracy of the filtered data are verified. Since data on the blockchain is public and transparent, the verification process includes confirming data consistency, integrity, and source. The verified data is then categorized and organized according to business logic and data processing requirements for subsequent processing and analysis. Next, the target data is divided according to a pre-defined contract to obtain multiple real-time processing items and real-time data content. The target data is mapped to corresponding processing items and data content according to the rules defined in the contract. This includes operations such as data splitting, reorganization, and filtering to meet the data processing requirements in the contract. Multiple real-time processing items specified in the contract are identified, ensuring their accuracy and completeness. Simultaneously, the relationships between processing items are ensured to facilitate subsequent processes and handling. Real-time data content is extracted from the divided data. This content should correspond to the processing items and meet the needs of real-time processing.

[0038] Furthermore, such as Figure 2 As shown, the method of this application performs dimensionality reduction processing on the historical processing data of the multiple processing items based on the data blocks within the target blockchain to obtain a dimensionality-reduced dataset of multiple items, including:

[0039] Based on the data blocks within the target blockchain that are processed and stored according to the preset contract, a historical data block set is extracted and divided according to the multiple processing items to obtain multiple item datasets;

[0040] Within each item dataset, multiple item data probability distributions are calculated based on the proportion of each data occurrence, where the proportion of each data occurrence is proportional to the data probability.

[0041] Based on the probability distribution of the multiple item data, the multiple item datasets are subjected to dimensionality reduction processing to obtain the multiple item dimensionality-reduced datasets.

[0042] Specifically, based on the data blocks stored and processed according to a pre-defined contract on the target blockchain, a historical data block set is extracted. This includes crawling, filtering, and organizing the data blocks on the blockchain to ensure that the obtained data block set is consistent with the requirements of the pre-defined contract. Next, the historical data block set is divided according to multiple processing items to obtain multiple itemized datasets. This step, based on the rules or logic defined in the pre-defined contract, splits the data block set into multiple itemized datasets for subsequent processing and analysis. Within each itemized dataset, the probability distribution of multiple itemized data is calculated based on the proportion of each data occurrence. The proportion of each data occurrence is directly proportional to its probability; that is, the higher the frequency of occurrence, the higher its corresponding probability value. Dimensionality reduction based on the probability distribution of multiple itemized data is an effective data processing method that can help us extract key features from the data, reduce data complexity, and improve the efficiency of data processing and data mining. The probability distribution of multiple itemized data is then analyzed. Visualization tools such as histograms, scatter plots, and box plots can be used to observe the data distribution and understand the characteristics of data dispersion, outliers, etc. An appropriate dimensionality reduction method is selected based on the characteristics of the data's probability distribution. Common dimensionality reduction methods include Principal Component Analysis (PCA), Linear Discriminant Analysis (LDA), and Multidimensional Scaling (MDS). A selected dimensionality reduction method is used to process multiple itemsets. During processing, appropriate parameters need to be set to ensure optimal dimensionality reduction results. For example, in PCA, the number of principal components needs to be selected to retain the main features of the data. After dimensionality reduction, the effect is evaluated. By comparing the data before and after dimensionality reduction, it can be observed whether the reduced data retains the key features of the original data and whether the reduced data has better interpretability and understandability. In the context of blockchain, dimensionality reduction helps simplify data complexity, improve processing efficiency, and maintain data representativeness.

[0043] Furthermore, such as Figure 3 As shown, the method of this application performs dimensionality reduction processing on the multiple item datasets based on the probability distribution of the multiple item data, including:

[0044] Based on the number of data to be reduced in dimensionality, data is randomly selected from the first item in a dataset to generate the first dimensionality-reduced dataset.

[0045] Within the first dimensionality reduction dataset, the probability distribution of the first dimensionality reduction data is calculated based on the proportion of each data point.

[0046] The first dimensionality reduction feature retention rate is calculated based on the probability distribution of the first dimensionality reduction item data and the probability distribution of the item data of the first item dataset.

[0047] Continue to randomly generate item-reduced dimensionality datasets from the first item dataset, and optimize to obtain the item-reduced dimensionality dataset with the highest dimensionality reduction feature retention.

[0048] The multiple item datasets are subjected to dimensionality reduction optimization to obtain the multiple item dimensionality-reduced datasets.

[0049] Specifically, firstly, based on the required number of data items for dimensionality reduction, data is randomly selected from the first itemized dataset among multiple itemized datasets to generate the first dimensionality-reduced dataset. Random selection ensures data diversity and representativeness. Next, within the first dimensionality-reduced dataset, the probability distribution of the first dimensionality-reduced itemized data is calculated based on the proportion of each data point's occurrence. Each data point is counted or statistically analyzed to calculate its frequency in the dimensionality-reduced dataset. The higher the frequency of occurrence, the higher the importance or distribution of that data point. The proportion of each data point's occurrence is obtained. Based on the proportion of each data point's occurrence, its probability distribution can be calculated. The probability distribution reflects the likelihood or frequency of each data point's occurrence in the dimensionality-reduced dataset. Finally, based on the probability distribution of the first dimensionality-reduced itemized data and the itemized data probability distribution of the original first itemized dataset, the first dimensionality-reduced feature retention rate is calculated. The first itemized dataset is statistically analyzed by calculating the frequency of each data item. This frequency is then divided by the total number of items in the dataset to obtain the probability distribution of the reduced dimensionality. The feature retention rate can be calculated as: Feature Retention Rate = (Probability Distribution of Reduced Dimensionality Dataset / Probability Distribution of Original Dataset) × 100%. Next, multiple itemized datasets are randomly generated from the first dataset, and optimization is continuously performed to obtain the itemized dataset with the highest feature retention rate. This involves repeated trials, adjustments, and evaluations to find the optimal dimensionality reduction effect. Finally, similar dimensionality reduction optimization is performed on multiple itemized datasets to obtain multiple itemized datasets. This step is repeated for other itemized datasets to ensure that all datasets undergo appropriate dimensionality reduction. Through these steps, effective dimensionality reduction optimization can be performed on multiple itemized datasets to obtain multiple itemized datasets that meet the requirements. This process helps reduce data dimensionality, simplify data processing, improve processing efficiency, and maintain data representativeness, providing a foundation for subsequent decision analysis and optimization.

[0050] Furthermore, the method of this application, based on the dimensionality reduction dataset of the multiple items, analyzes the processing complexity and processing importance of the multiple processing items to obtain the complexity and importance of the multiple items, including:

[0051] A set of processing complexities for multiple items is obtained by calculating the computation time of multiple data points in the multiple item dimensionality reduction dataset according to the preset contract;

[0052] Based on the set of processing complexity for each item, the complexity of each item is calculated by weighting according to the probability distribution of the dimensionality reduction data of the dimensionality reduction dataset for each item.

[0053] Based on the multiple processing items, multiple sample processing data sets are obtained, and multiple sample processing importance sets are obtained. A processing importance analyzer is constructed, and the processing importance analyzer includes multiple processing importance analysis branches corresponding to the multiple processing items.

[0054] Based on the processing importance analyzer, the data within the multiple item dimensionality reduction dataset is analyzed to obtain multiple item processing importance sets;

[0055] The importance of multiple processing items is calculated based on the multiple sets of item processing importance.

[0056] Specifically, based on the computation time of calculating multiple data points within a multi-item dimensionality reduction dataset according to a preset contract, a set of processing complexities for multiple items is obtained. This ensures the computing environment is properly configured, including the necessary hardware resources, software tools, and libraries, to guarantee smooth computation. For each item in the dimensionality reduction dataset, calculations are performed according to the preset contract, and the computation time for each data point is recorded. This can be done using a timer or similar tool. Based on the recorded computation time, the processing complexity of each data point is analyzed, including an evaluation of the algorithms, operations, and resource usage involved in the computation. The processing complexity data for each item in the dimensionality reduction dataset is then organized to form a corresponding set of item processing complexities. The completeness and accuracy of the data are ensured. Based on the sets of processing complexities for multiple items, a weighted calculation is performed according to the probability distribution of the dimensionality reduction items in each item's dimensionality reduction dataset to obtain the multiple item complexities for multiple processing items. Based on these multiple processing items, multiple sets of sample processing data and a set of sample processing importance are obtained. A processing importance analyzer is constructed, which includes multiple processing importance analysis branches corresponding to multiple processing items. This allows for a more comprehensive analysis of the importance of processing items and provides them with corresponding weights or priorities. Based on the processing importance analyzer, the data within the multi-item dimensionality reduction dataset is analyzed item by item to obtain a set of processing importance for each item. The importance of each processing item is then calculated based on these sets. This can be accomplished using weighted averages, principal component analysis, or other appropriate methods to ensure that the importance of each processing item is accurately measured. Through these steps, the importance and complexity of each processing item in the multi-item dimensionality reduction dataset can be comprehensively evaluated, providing valuable reference for subsequent decision optimization.

[0057] Furthermore, the method of this application obtains multiple data complexities and multiple data importances of the multiple real-time data contents by analyzing the similarity between the multiple real-time data contents and the data within the multiple itemized dimensionality reduction datasets, including:

[0058] Based on the multiple real-time data contents, analyze the similarity with the data in the multiple itemized dimensionality reduction datasets, and select the multiple dimensionality reduction data with the highest similarity to obtain multiple matching dimensionality reduction data;

[0059] The processing complexity and importance of the multiple matched dimensionality-reduced data within the multiple item processing complexity set and the multiple item processing importance set are used as the multiple data complexity and multiple data importance.

[0060] Specifically, based on multiple real-time data contents, the similarity with data in multiple dimensionality-reduced datasets is analyzed. The dimensionality-reduced data with the highest similarity are selected to find the most similar data to the real-time data contents, providing a reference and comparison basis for real-time data processing and analysis. Euclidean distance, cosine similarity, etc., can be used to measure the distance or similarity between two data points. Feature matching: Compare the features of the real-time data contents with those in the dimensionality-reduced dataset to see if they match or are similar. Classifier evaluation: Use classification algorithms (such as K-nearest neighbors, support vector machines, etc.) to evaluate the similarity between the real-time data contents and the dimensionality-reduced dataset. Key features are extracted from the real-time data contents, which may correspond to features in the dimensionality-reduced dataset. For each real-time data content, its similarity to each dimensionality-reduced data point is calculated. This can be achieved by comparing features or using specialized similarity metrics. Based on the calculated similarity values, the dimensionality-reduced data point with the highest similarity is selected as the matching data. The selected matching dimensionality-reduced data is used as the output, which can be further used for tasks such as real-time data processing, analysis, and visualization. Based on the processing complexity and importance of multiple matched dimensionality-reduced data points within multiple sets of processing complexity and processing importance, a comprehensive importance value is assigned to the matched dimensionality-reduced data points to better understand and evaluate them. Weights are assigned to processing complexity and processing importance to reflect their importance in the comprehensive evaluation. The processing complexity of each matched dimensionality-reduced data point is multiplied by its weight, and the processing importance is multiplied by its weight, then the two values ​​are summed. The matched dimensionality-reduced data points are sorted according to the comprehensive score, and the data with the highest score is selected as the most important data. The processing complexity of each matched dimensionality-reduced data point is obtained from the multiple sets of processing complexity. The processing importance of each matched dimensionality-reduced data point is obtained from the multiple sets of processing importance. Appropriate weights are assigned to processing complexity and processing importance based on actual needs or experience. The comprehensive score of each matched dimensionality-reduced data point is calculated using the weighted summation method described above. The matched dimensionality-reduced data points are sorted according to the comprehensive score, and the most important data is selected.

[0061] Furthermore, the method of this application, based on the complexity and importance of multiple real-time processing items, and combined with the complexity and importance of multiple data items, calculates the total complexity and total importance of the multiple real-time data contents, and performs on-chain and off-chain collaborative computing decisions, including:

[0062] Based on the complexity and importance of the multiple real-time processing items, and combined with the complexity and importance of the multiple data items, a weighted calculation is performed to obtain multiple total complexities and multiple total importances.

[0063] With the aim of reducing the processing complexity and increasing the processing importance on the target blockchain, a collaborative function is constructed as follows:

[0064]

[0065] Where bch is the collaborative fitness, w1 and w2 are the complexity weight and importance weight, m ​​is the number of real-time data contents processed on the target blockchain within the collaborative decision-making scheme, and m is an integer greater than 1. i Z represents the total complexity of the i-th real-time data content processed on the target blockchain. i The total importance of the i-th real-time data content processed on the target blockchain;

[0066] Construct collaborative constraints, wherein the collaborative constraints include the fact that the processing power of real-time data content processed on the target blockchain is less than or equal to a preset blockchain computing power threshold.

[0067] Based on the cooperative function and cooperative constraints, the cooperative processing schemes for processing multiple real-time data contents on-chain or off-chain are optimized to obtain the cooperative decision scheme with the highest cooperative fitness.

[0068] According to the collaborative decision-making scheme, the multiple real-time data contents are processed collaboratively on or off the target blockchain according to the preset contract, wherein the off-chain calculation results are sent to the target blockchain.

[0069] Specifically, based on the real-time complexity and importance of each real-time processing item, combined with data complexity and importance, a weighted calculation can be performed to obtain the total complexity and total importance. Weights are assigned to real-time processing items and data complexity / importance based on business requirements. Weights are determined based on historical data, data distribution, or other statistical information. A combination of subjective and objective methods is used to determine weights to improve the accuracy and reliability of the evaluation. The process involves: obtaining the real-time complexity and importance of each real-time processing item: extracting relevant data from the real-time processing item to obtain its complexity and importance; obtaining the complexity and importance of each data point: obtaining the complexity and importance of each data point based on the previously calculated results; and determining the weights: setting an initial value or range for the subjective and objective weights based on business requirements. Weighted calculation: Total complexity = (Real-time item complexity weight × Real-time item complexity) + (Data complexity weight × Data complexity), Total importance = (Real-time item importance weight × Real-time item importance) + (Data importance weight × Data importance). The calculated total complexity and total importance are used as output results, which can be further used for data analysis, decision support, etc. Next, based on the goal of reducing processing complexity and increasing processing importance on the target blockchain, a collaborative function can be constructed. This function can reflect the relationship between the processing complexity and importance of different real-time data content, providing guidance for optimization decisions. When constructing collaborative constraints, it is necessary to ensure that the processing power of the real-time data content processed on the target blockchain does not exceed the preset blockchain computing power threshold. Understand the technical specifications and limitations of the target blockchain, including its maximum computing power value. This can be done by consulting the blockchain's technical documentation or using specific analysis tools. Based on the requirements and the capabilities of the target blockchain, set a reasonable computing power threshold. This threshold should both meet the data processing needs and prevent blockchain overload. Optimizing the Cooperative Processing Scheme Based on Cooperative Functions and Constraints: After determining the cooperative functions and constraints, the next goal is to find an optimal cooperative processing scheme that maximizes cooperative fitness while satisfying the constraints. The cooperative function describes the correlation and dependency between various real-time data components. Specific optimization objectives are defined, such as minimizing processing time, maximizing resource utilization, or optimizing specific performance metrics. The processing scheme parameters are adjusted iteratively based on the cooperative functions and constraints until a satisfactory solution is found or a preset number of iterations is reached. The schemes generated in each iteration are evaluated, and the scheme with the highest cooperative fitness is selected as the final cooperative decision scheme. Finally, the real-time data content is processed according to the determined cooperative decision scheme. All necessary software and hardware environments must be prepared to meet the requirements of cooperative processing. This may include installing necessary software and configuring network connections. Based on the cooperative decision scheme, the real-time data content is distributed to appropriate locations on or off the target blockchain for processing. This may include data sharding and distributing computational tasks across multiple nodes.Begin the computation process at the selected location. If processing is off-chain, ensure the results are accurately recorded and transmitted back to the blockchain. Verify the off-chain results to ensure consistency with on-chain records. Perform necessary auditing steps to ensure data integrity and accuracy.

[0070] Example 2, based on the same inventive concept as the aforementioned example of an on-chain and off-chain collaborative computing method for blockchain, such as... Figure 4 As shown, this application provides an on-chain and off-chain collaborative computing system for blockchain, the system comprising:

[0071] The processing item acquisition module 10 is used to interact with the target blockchain and acquire multiple processing items that are processed according to a preset contract on the target blockchain.

[0072] The target data acquisition module 20 is used to acquire the target data to be processed in the target blockchain, wherein the target data includes multiple real-time data contents corresponding to multiple real-time processing items.

[0073] The dimension reduction dataset acquisition module 30 is used to perform dimension reduction processing on the historical processing data of the multiple processing items based on the data blocks in the target blockchain to obtain multiple item dimension reduction datasets.

[0074] The processing item analysis module 40 is used to analyze the processing complexity and processing importance of the multiple processing items based on the multiple item dimensionality reduction dataset, and obtain the multiple item complexity and multiple item importance;

[0075] The real-time content data acquisition module 50 is used to obtain multiple data complexities and multiple data importances of the multiple real-time data contents by analyzing the similarity between the multiple real-time data contents and the data within the multiple item dimensionality reduction datasets.

[0076] The collaborative decision-making scheme acquisition module 60 is used to calculate the total complexity and total importance of the multiple real-time data contents based on the complexity and importance of the multiple real-time processing items, combined with the complexity and importance of the multiple data, to perform on-chain and off-chain collaborative computing decisions, obtain a collaborative decision-making scheme, and perform collaborative computing.

[0077] Furthermore, the system also includes:

[0078] The data partitioning module is used to acquire the target data to be processed in the target blockchain; according to the preset contract, the target data is partitioned to obtain multiple real-time processing items and multiple real-time data contents, wherein the multiple real-time processing items are included in the multiple processing items.

[0079] Furthermore, the system also includes:

[0080] The dimensionality reduction module is used to extract historical data block sets from data blocks stored in the target blockchain according to the preset contract, divide them according to the multiple processing items, and obtain multiple itemized datasets; within each itemized dataset, according to the proportion of each data occurrence, calculate and obtain multiple itemized data probability distributions, wherein the proportion of each data occurrence is proportional to the data probability; and perform dimensionality reduction processing on the multiple itemized datasets according to the multiple itemized data probability distributions to obtain the multiple itemized dimensionality-reduced datasets.

[0081] Furthermore, the system also includes:

[0082] The dimensionality reduction optimization processing module is used to: randomly select data from the first itemized dataset among multiple itemized datasets to generate a first itemized dimensionality reduction dataset according to the number of data items to be reduced; allocate and calculate the probability distribution of the first itemized data items within the first itemized dimensionality reduction dataset based on the proportion of each data item appearing; calculate the first dimensionality reduction feature retention rate based on the probability distribution of the first itemized data items and the probability distribution of the itemized data items in the first itemized dataset; continue to randomly generate itemized dimensionality reduction datasets from the first itemized dataset, and optimize to obtain the itemized dimensionality reduction dataset with the highest dimensionality reduction feature retention rate; and perform dimensionality reduction optimization processing on the multiple itemized datasets to obtain the multiple itemized dimensionality reduction datasets.

[0083] Furthermore, the system also includes:

[0084] A multiple importance set acquisition module is used to obtain multiple item processing complexity sets based on the computation time of multiple data points in the multiple item dimensionality reduction dataset calculated according to the preset contract; based on the multiple item processing complexity sets, the module calculates the multiple item complexity of the multiple processing items by weighting according to the probability distribution of the dimensionality reduction item data in the multiple item dimensionality reduction dataset; based on the multiple processing items, the module obtains multiple sample processing data sets and multiple sample processing importance sets, and constructs a processing importance analyzer, which includes multiple processing importance analysis branches corresponding to the multiple processing items; based on the processing importance analyzer, the module analyzes the data in the multiple item dimensionality reduction dataset to obtain multiple item processing importance sets; and based on the multiple item processing importance sets, the module calculates the multiple item importance of the multiple processing items.

[0085] Furthermore, the system also includes:

[0086] The matching dimensionality reduction data acquisition module is used to analyze the similarity between the multiple real-time data contents and the data in the multiple item dimensionality reduction datasets, and select the multiple dimensionality reduction data with the highest similarity to obtain multiple matching dimensionality reduction data; and to use the processing complexity and processing importance of the multiple matching dimensionality reduction data in the multiple item processing complexity set and the multiple item processing importance set as the multiple data complexity and multiple data importance.

[0087] Furthermore, the system also includes:

[0088] The collaborative computing processing module is used to calculate multiple total complexities and multiple total importances based on the multiple real-time processing items' multiple real-time item complexities and multiple real-time item importances, combined with the multiple data complexities and multiple data importances; and to construct a collaborative function with the aim of reducing the processing complexity and increasing the processing importance on the target blockchain, as shown in the following equation: Where bch is the collaborative fitness, w1 and w2 are the complexity weight and importance weight, m ​​is the number of real-time data contents processed on the target blockchain within the collaborative decision-making scheme, and m is an integer greater than 1. i Z represents the total complexity of the i-th real-time data content processed on the target blockchain. i To determine the total importance of the i-th real-time data content processed on the target blockchain; construct collaborative constraints, wherein the collaborative constraints include that the processing power of the real-time data content processed on the target blockchain is less than or equal to a preset blockchain computing power threshold; optimize the collaborative processing scheme for processing the multiple real-time data contents on or off-chain according to the collaborative function and collaborative constraints, and obtain a collaborative decision scheme with the highest collaborative fitness; according to the collaborative decision scheme, perform collaborative computation processing of the multiple real-time data contents on or off the target blockchain according to the preset contract, wherein the off-chain computation results are sent to the target blockchain.

[0089] Through the detailed description of the on-chain and off-chain collaborative computing method for blockchain described above, those skilled in the art can clearly understand the on-chain and off-chain collaborative computing system for blockchain in this embodiment. As the system disclosed in the embodiment corresponds to the method disclosed in the embodiment, the description is relatively simple, and relevant parts can be referred to the method section description.

[0090] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A collaborative computing method for on-chain and off-chain operations in blockchain, characterized in that, The method includes: Interact with the target blockchain to obtain multiple processing items on the target blockchain that perform data processing according to a preset contract; Obtain the target data to be processed in the target blockchain, wherein the target data includes multiple real-time data contents corresponding to multiple real-time processing items; Based on the data blocks within the target blockchain, the historical processing data of the multiple processing items are subjected to dimensionality reduction processing to obtain multiple item dimensionality reduction datasets; Based on the dimensionality reduction dataset of the multiple items, analyze the processing complexity and processing importance of the multiple processing items to obtain the complexity and importance of the multiple items; By analyzing the similarity between the multiple real-time data contents and the data within the multiple item dimensionality reduction datasets, the multiple data complexities and multiple data importance of the multiple real-time data contents are obtained; Based on the complexity and importance of the multiple real-time processing items, and combined with the complexity and importance of the multiple data, the total complexity and total importance of the multiple real-time data contents are calculated. On-chain and off-chain collaborative computing decisions are then made to obtain a collaborative decision-making scheme and perform collaborative computing. Based on the complexity and importance of the multiple real-time processing items, and combined with the complexity and importance of the multiple data items, the total complexity and total importance of the multiple real-time data contents are calculated, and on-chain and off-chain collaborative computing decisions are made, including: Based on the complexity and importance of the multiple real-time processing items, and combined with the complexity and importance of the multiple data items, a weighted calculation is performed to obtain multiple total complexities and multiple total importances. With the aim of reducing the processing complexity and increasing the processing importance on the target blockchain, a collaborative function is constructed as follows: ; Where bch represents the co-fitness. and Here, m represents the complexity weight and importance weight, respectively, and m is the number of real-time data contents processed on the target blockchain within the collaborative decision-making scheme, where m is an integer greater than 1. Let be the total complexity of the i-th real-time data content processed on the target blockchain. The total importance of the i-th real-time data content processed on the target blockchain; Construct collaborative constraints, wherein the collaborative constraints include the fact that the processing power of real-time data content processed on the target blockchain is less than or equal to a preset blockchain computing power threshold. Based on the cooperative function and cooperative constraints, the cooperative processing schemes for processing multiple real-time data contents on-chain or off-chain are optimized to obtain the cooperative decision scheme with the highest cooperative fitness. According to the collaborative decision-making scheme, the multiple real-time data contents are processed collaboratively on or off the target blockchain according to the preset contract, wherein the off-chain calculation results are sent to the target blockchain.

2. The method according to claim 1, characterized in that, Obtain the target data to be processed from the target blockchain, including: Obtain the target data to be processed in the current target blockchain; According to the preset contract, the target data is divided to obtain multiple real-time processing items and multiple real-time data contents, wherein the multiple real-time processing items are included within the multiple processing items.

3. The method according to claim 1, characterized in that, Based on the data blocks within the target blockchain, the historical processing data of the multiple processing items are subjected to dimensionality reduction processing to obtain multiple dimensionality-reduced datasets, including: Based on the data blocks within the target blockchain that are processed and stored according to the preset contract, a historical data block set is extracted and divided according to the multiple processing items to obtain multiple item datasets; Within each item dataset, multiple item data probability distributions are calculated based on the proportion of each data occurrence, where the proportion of each data occurrence is proportional to the data probability. Based on the probability distribution of the multiple item data, the multiple item datasets are subjected to dimensionality reduction processing to obtain the multiple item dimensionality-reduced datasets.

4. The method according to claim 3, characterized in that, Based on the probability distribution of the multiple item data, the dimensionality reduction process is performed on the multiple item data dataset, including: Within the first dimensionality reduction dataset, the probability distribution of the first dimensionality reduction data is calculated based on the proportion of each data point. The first dimensionality reduction feature retention rate is calculated based on the probability distribution of the first dimensionality reduction term data and the probability distribution of the term data in the first term dataset. Continue to randomly generate item-reduced dimensionality datasets from the first item dataset, and optimize to obtain the item-reduced dimensionality dataset with the highest dimensionality reduction feature retention. The multiple item datasets are subjected to dimensionality reduction optimization to obtain the multiple item dimensionality-reduced datasets.

5. The method according to claim 4, characterized in that, Based on the dimensionality reduction dataset of the multiple items, the processing complexity and importance of the multiple processing items are analyzed to obtain the complexity and importance of multiple items, including: A set of processing complexities for multiple items is obtained by calculating the computation time of multiple data points in the multiple item dimensionality reduction dataset according to the preset contract; Based on the set of processing complexity for each item, the complexity of each item is calculated by weighting according to the probability distribution of the dimensionality reduction data of the dimensionality reduction dataset for each item. Based on the multiple processing items, multiple sample processing data sets are obtained, and multiple sample processing importance sets are obtained. A processing importance analyzer is constructed, which includes multiple processing importance analysis branches corresponding to the multiple processing items. Based on the processing importance analyzer, the data within the multiple item dimensionality reduction dataset is analyzed to obtain multiple item processing importance sets; The importance of multiple processing items is calculated based on the multiple sets of item processing importance.

6. The method according to claim 5, characterized in that, By analyzing the similarity between the multiple real-time data contents and the data within the multiple itemized dimensionality-reduced datasets, the data complexity and importance of the multiple real-time data contents are obtained, including: Based on the multiple real-time data contents, analyze the similarity with the data in the multiple itemized dimensionality reduction datasets, and select the multiple dimensionality reduction data with the highest similarity to obtain multiple matching dimensionality reduction data; The processing complexity and importance of the multiple matched dimensionality-reduced data within the multiple item processing complexity set and the multiple item processing importance set are used as the multiple data complexity and multiple data importance.

7. An on-chain and off-chain collaborative computing system for blockchain, characterized in that, The system includes: A processing item acquisition module is used to interact with the target blockchain and acquire multiple processing items that are processed according to a preset contract on the target blockchain. The target data acquisition module is used to acquire the target data to be processed in the target blockchain, wherein the target data includes multiple real-time data contents corresponding to multiple real-time processing items. A dimensionality reduction dataset acquisition module is used to perform dimensionality reduction processing on the historical processing data of the multiple processing items based on the data blocks within the target blockchain, thereby obtaining multiple item dimensionality reduction datasets. The processing item analysis module is used to analyze the processing complexity and processing importance of the multiple processing items based on the dimensionality reduction dataset of the multiple items, and obtain the complexity and importance of the multiple items. A real-time content data acquisition module is used to obtain multiple data complexities and multiple data importances of the multiple real-time data contents by analyzing the similarity between the multiple real-time data contents and the data within the multiple item dimensionality reduction datasets; The collaborative decision-making scheme acquisition module is used to calculate the total complexity and total importance of the multiple real-time data contents based on the complexity and importance of the multiple real-time processing items, combined with the complexity and importance of the multiple data, to perform on-chain and off-chain collaborative computing decisions, obtain a collaborative decision-making scheme, and perform collaborative computing. The system also includes: The collaborative computing processing module is used to calculate multiple total complexities and multiple total importances based on the multiple real-time processing items' multiple real-time item complexities and multiple real-time item importances, combined with the multiple data complexities and multiple data importances; and to construct a collaborative function with the aim of reducing the processing complexity and increasing the processing importance on the target blockchain, as shown in the following equation: Where bch represents co-fitness. and Here, m represents the complexity weight and importance weight, respectively, and m is the number of real-time data contents processed on the target blockchain within the collaborative decision-making scheme, where m is an integer greater than 1. Let be the total complexity of the i-th real-time data content processed on the target blockchain. To determine the total importance of the i-th real-time data content processed on the target blockchain; construct collaborative constraints, wherein the collaborative constraints include that the processing power of the real-time data content processed on the target blockchain is less than or equal to a preset blockchain computing power threshold; optimize the collaborative processing scheme for processing the multiple real-time data contents on or off-chain according to the collaborative function and collaborative constraints, and obtain a collaborative decision scheme with the highest collaborative fitness; according to the collaborative decision scheme, perform collaborative computation processing of the multiple real-time data contents on or off the target blockchain according to the preset contract, wherein the off-chain computation results are sent to the target blockchain.

Citation Information

Patent Citations

  • Bank data analysis method based on deep learning

    CN116955926A

  • Data processing method, system, device and equipment and storage medium

    CN117376371A