A Method and System for Sharing and Trading Time-Series Data Based on Blockchain

By using smart contracts, timing databases, IPFS and token access mechanisms on the blockchain, the problem of inefficient storage and transaction efficiency of timing data on the blockchain is solved, and efficient sharing and secure transactions of timing data are achieved.

CN115841387BActive Publication Date: 2025-06-13SHANGHAI HONGCHUANG IND TRADE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211609627.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2025-06-13
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

It is difficult for the prior art to effectively share and process industrial timing data, especially in blockchain systems, where the storage efficiency and transaction efficiency of timing data are low.

Method used

Smart contracts, timing databases, IPFS and token access mechanisms are adopted to realize trusted sharing and transactions of timing data on the blockchain. Through efficient data compression of timing databases and fragmented IPFS storage, the storage efficiency of timing data is improved. At the same time, through the data token access mechanism, the rapid acquisition of high-value timing data and the large-scale acquisition of other types of timing data are achieved.

Benefits of technology

It improves the storage efficiency and transaction efficiency of time series data, ensures the secure transaction and trustworthy sharing of time series data, and solves the problem of data silos and waste of storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841387B_ABST
    Figure CN115841387B_ABST
Patent Text Reader

Abstract

The present invention discloses a time-series data sharing and trading system and method based on blockchain. The present invention includes a data storage module, a data token access module, a data sharing and trading module, and an application layer module; the data storage module consists of a general time-series database and IPFS, and uses a hybrid storage strategy of the time-series database and IPFS. The data token access module is responsible for maintaining various types of data access in the system; for the data sharing and trading module, the data requester orders high-value time-series data for a period of time or orders a large range of other types of time-series data in batches from the data holder through a smart contract; the application layer module presents a visual interface externally, facilitating the sharing of time-series data among participants within the alliance or enabling users outside the alliance to retrieve and purchase the data they need. The present invention realizes the trusted sharing and external trading of time-series data among different participating parties by using smart contracts, time-series databases, IPFS, and token access mechanisms. At the same time, it greatly improves the problem of the storage efficiency of time-series data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular, to a method and system for sharing and trading time-series data based on blockchain. Background Art

[0002] In recent years, blockchain has been a very active topic in industries that require distributed, trusted, and transparent data, such as the Internet of Things (IoT) and the Internet of Medical Things (IOMT). The "blockchain +" model integrating other new technologies has gradually become the consensus in the industry. The "Blockchain White Paper" compiled by the China Academy of Information and Communications Technology mentions that the combination of blockchain and IoT can make up for their own deficiencies and achieve a trusted link between the physical and digital worlds. First, IoT devices can effectively improve the authenticity of the data uploaded to the blockchain. Second, blockchain provides a trusted guarantee for the transfer and value mining of data elements. Third, blockchain promotes the expansion of IoT applications.

[0003] Compared with blockchain systems, traditional systems have the following problems. First, there is a lack of unified data sharing services, and data cannot be obtained effectively and immediately. Second, existing industrial systems are a loosely distributed organization, and it is difficult for traditional industrial data management systems to interact with other participants. Third, different participants use different management systems with different data formats and database configurations, which is not conducive to data circulation.

[0004] The traditional solution is to forward data according to the data standards given by each party, and there are many problems with such forwarding. First, the forwarding efficiency is low, and each party needs to balance various data requirements, which is not conducive to the maintenance of the system. Moreover, for such forwarding, due to the large volume and real-time generation of industrial time-series data, the consumption of system resources for forwarding is large, and it is difficult to balance the benefit distribution for most operations.

[0005] The blockchain solution to this is that since blockchain supports distributed trusted data sharing, data sharing can be achieved on the basis of existing consortium blockchains, and a unified data standard can be constructed. However, such solutions also have some problems. Such sharing solutions have a wide range of uses, but there are large deficiencies in the sharing, storage, and trading of specific types of data. Since time-series data needs to be analyzed and processed, and the blockchain system cannot complete the visualization operation of such data, it is difficult for data holders to effectively operate the data using such a system. Secondly, the blockchain system is not suitable as a solution for large-scale data storage. Since the blockchain system needs to retain data backups in each member, storing large amounts of industrial time-series data in the blockchain will result in a large waste of storage space. And such data is more suitable for storage in a time-series database.

[0006] Time series databases are mainly used to process time series data with time tags (changing in chronological order, i.e., time serialization). Taking InfluxDB as an example, InfluxDB is an open-source time series database developed by InfluxData. Written in Go, it focuses on high-performance querying and storing time series data. As a custom high-performance data storage specifically written for time series data, its TSM engine has high-performance writing and data compression. In addition, it provides simple and high-performance queries and built-in HTTP support. It also supports plugins such as graphite and OpenTSDB for visual analysis of data. Therefore, it is widely used in scenarios such as monitoring data of storage systems and real-time data in the IoT industry.

[0007] In the blockchain system, the InterPlanetary File System (IPFS) has been widely used. The InterPlanetary File System is a file storage and content distribution network protocol that combines distributed hash tables, BitTorrent, Git, self-certifying file systems, and blockchain. IPFS uses decentralized sharding encryption storage technology to split files into multiple fragments and store them on various nodes in the network. When a file needs to be retrieved, IPFS will automatically restore the file. Compared with the traditional HTTP protocol, IPFS greatly saves network bandwidth, reduces storage costs, and can resist attacks such as Sybil attacks, outsourcing attacks, and DDOS attacks.

[0008] Today, a large number of IoT devices are distributed all over the world, generating a vast amount of data, which also includes very important time series data. For example, the electroencephalogram (EEG) time series data collected using brain-computer devices plays a crucial role in predicting and analyzing the condition of patients. However, due to its scarcity, the EEG time series data collected by a large number of research institutions and hospitals is rarely publicly shared, resulting in the problem of data silos. The lack of data interoperability also leads to insufficient data samples, making it difficult to improve the accuracy of disease prediction. At the same time, due to the high timeliness of time series data, data silos cause a large amount of time series data to be wasted, and the effective information and potential value in the time series data cannot be discovered in a timely manner.

[0009] Based on the above background, the present invention designs a data sharing and trading method and system based on blockchain, encryption algorithms, and time series databases, effectively improving the storage efficiency and trading efficiency of time series data. Summary of the Invention

[0010] The purpose of the present invention is to provide a time series data sharing and trading method and system based on blockchain to solve the problems of a large number of time series data silos generated by various current devices and the difficulty of efficiently processing time series data in various blockchain systems.

[0011] To solve the above technical problems, the present invention realizes the trustworthy sharing and external trading of time-series data among different participating parties by using smart contracts, time-series databases, IPFS, and token access mechanisms. At the same time, the efficient data compression scheme provided by the time-series database greatly improves the storage efficiency of time-series data. The separation of high-value time-series data and other types of time-series data is achieved through the interaction between IPFS (InterPlanetary File System) and the time-series database. According to the importance of the data, the rapid acquisition of high-value time-series data and the large-scale acquisition of other types of time-series data are realized. In addition, the present invention also designs a time-series data segmented access token mechanism, which effectively improves the convenience of time-series data transactions.

[0012] The technical solution adopted by the present invention to achieve its technical purpose is as follows:

[0013] A blockchain-based time-series data sharing and trading system, applicable to an environment with multiple data holders and multiple demanders, includes the following four modules:

[0014] The data storage module is composed of a general time-series database and IPFS, and uses a hybrid storage strategy of the time-series database and IPFS; after collecting time-series data, the data holder stores it in the time-series database and uploads the hash value to the deposit chain, where the time-series database performs effective lossless compression on the stored time-series data; for high-value time-series data, it is screened, compressed, and synchronously stored in IPFS in real time, and the desensitized information in the high-value time-series data is submitted to the sharing and trading chain; IPFS is logically divided into a high-value time-series data storage area and a buffer area for other types of time-series data; for high-value time-series data, it is retained for a long time within the scope of the high-value time-series data standard specified by the alliance members, and is automatically deleted when it exceeds this standard; for other types of time-series data, it will be automatically destroyed from IPFS after confirming the end of the data sharing and trading;

[0015] The data token access module is responsible for maintaining various data accesses in the system, including the generation of time-series data segmented sub-tokens for casting data tokens for the target of continuously incoming high-value time-series data; it also includes generating data tokens required for other types of time-series data or large batches of time-series data in a single transaction;

[0016] In the data sharing and trading module, the data requester orders high-value time-series data from the data holder for a certain period of time or orders a large range of other types of time-series data in batches through a smart contract. For high-value time-series data, the data holder will mint a total data token according to the ordered time period by the requester for long-term access to continuously uploaded high-value time-series data. After the data requester accesses a segment of data through this token, the sub-token corresponding to this segment of data is automatically destroyed. For other types of time-series data, after the data holder filters and compresses the data, it stores the data in IPFS and mints a single-access token. After the requester accesses and obtains the data through the token, the token is automatically deleted, and the data is also destroyed from IPFS.

[0017] In the application layer module, it is presented as a visual interface externally, facilitating the sharing of time-series data among participants within the alliance or enabling users outside the alliance to retrieve and purchase the data they need.

[0018] Furthermore, after receiving the transaction request sent by the requester, the smart contract matches the corresponding data provider through the blockchain system and generates a corresponding transaction contract, including the required data time period, data price, identity information of both parties, etc.

[0019] Furthermore, the blockchain system utilizes the characteristics of blockchain such as decentralization and anti-tampering to provide a trusted time-series data trading service for all parties. At the same time, the data holder and the requester achieve secure data trading through the time-series data token access mechanism. Using the time-series data token access mechanism designed by the present invention to mint tokens for time-series data segment by segment not only takes into account the security of time-series data trading but also takes into account the granularity differentiation of time-series data, improving the convenience of data trading.

[0020] Furthermore, the present invention designs a separation strategy for high-value time-series data and other types of time-series data. By combining a time-series database with IPFS, all data is first stored in the time-series database, and the time-series data is compressed and stored using the existing compression algorithm of the time-series database, greatly improving the data storage efficiency. The high-value time-series data is synchronously replicated to IPFS in real time to improve the system's operating performance using limited data redundancy. For other types of time-series data such as large quantities of low-value data, they are compressed and stored in IPFS using a time-series compression algorithm after the transaction is concluded, and the data requester accesses the data using a one-time transaction token.

[0021] Furthermore, the high-value time-series data is defined in the time-series data as time-series data that exceeds a specific threshold or is lower than a specific threshold. Taking device vibration detection as an example, the time-series data that exceeds the vibration frequency and the time-series data that is lower than the vibration frequency can be regarded as high-value time-series data. Such abnormal time-series data indicates that the device status is abnormal, so such time-series data is screened and synchronously replicated to IPFS.

[0022] Such asFigure 3 As shown in the figure, a time-series data sharing and trading method based on blockchain is provided for high-value time-series data, and the specific implementation steps are as follows:

[0023] Step 1: The data holder and the data requester generate their respective public and private keys through the system;

[0024] Step 2: The data holder collects time-series data through subordinate devices and stores it in the time-series database. At the same time, the data screening and compression contract is called to extract the high-value time-series data and store it in IPFS, and the corresponding data storage address is obtained;

[0025] Step 3: The data holder uses the token contract to mint the total data access token according to the public key of the requester, the data hash, the data storage address, and the data demand time range;

[0026] Step 4: The data holder uses the data storage address where the segmented data is stored, the total data access token, and the public key of the requester to mint the sub-token for the segmented data;

[0027] Step 5: The data requester uses the total data access token to access the corresponding segmented data. After the extraction and confirmation of the corresponding segmented data are completed, the sub-token for the segmented data corresponding to the total data access token is automatically destroyed, and this segmented data cannot be accessed again through the total data access token;

[0028] Step 6: The data holder continuously uploads high-value time-series data until all high-value time-series data of the data requester is uploaded;

[0029] Step 7: The data requester continuously uses the total data access token to obtain high-value time-series data until all high-value time-series data is successfully accessed;

[0030] Step 8: The token contract reached by both parties automatically destroys the total data access token;

[0031] Step 9: The data requester verifies the integrity of the high-value time-series data through the hash value stored by the data holder when writing the high-value time-series data.

[0032] As Figure 4 shown, the steps for storing and trading other types of time-series data and a large number of time-series data are implemented as follows:

[0033] Step (1): The data holder and the data requester generate their respective public and private keys through the system;

[0034] Step (2): The data holder stores other types of time-series data in the time-series database and hashes the data, and uploads the hash value to the evidence chain;

[0035] Step (3): The data holder stores other types of time-series data into IPFS and obtains the corresponding data address;

[0036] Step (4): The data holder uses the token contract to mint a data access token according to the data address and the public key of the requester;

[0037] Step (5): The data requester extracts data from IPFS using the data access token;

[0038] Step (6): After the data extraction is completed, the token smart contract automatically destroys the data access token;

[0039] Step (7): After the token is destroyed, IPFS deletes the cached data in IPFS.

[0040] Compared with other blockchain sharing systems, the present invention has the following advantages:

[0041] The present invention proposes a blockchain-based sharing and trading method for time-series data, which ensures the efficient trading of time-series data.

[0042] The present invention proposes a token access mechanism based on blockchain. The minting, trading, and destruction records of various tokens will be recorded in the blockchain, improving the data access traceability and accountability mechanism.

[0043] The present invention proposes a sub-token access mechanism for time-series data. Sub-tokens are minted for pre-subscribed data. The sub-tokens belong to the total token held by the data requester, and the sub-tokens can be used to achieve effective access to segmented time-series data in a fine-grained manner.

[0044] The present invention screens, compresses, and synchronizes high-value time-series data to IPFS in real time, effectively improving the efficiency of the system to obtain high-value time-series data.

[0045] The present invention stores other types of time-series data in a time-series database, and uses the efficient data compression algorithm, convenient visualization analysis interface, and rich third-party interfaces provided by the time-series database to achieve real-time interconnection with IPFS, while also ensuring the convenience of data storage and analysis for the data holder itself. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a schematic diagram of the system architecture provided by the embodiment of the present invention;

[0047] Figure 2 It is a schematic diagram of obtaining continuous high-value time-series data provided by the embodiment of the present invention;

[0048] Figure 3 It is a schematic diagram of obtaining data when some high-value time-series data already exists provided by the embodiment of the present invention;

[0049] Figure 4 Schematic diagram for obtaining one-time token data provided by an embodiment of the present invention;

[0050] Figure 5 Timing diagram for obtaining high-value timing data provided by an embodiment of the present invention;

[0051] Figure 6 Timing diagram for obtaining other types of timing data provided by an embodiment of the present invention; Detailed implementation manners

[0052] Next, the technical solutions in the embodiments of the present invention will be further explained and described in combination with the accompanying drawings in the embodiments of the present invention and specific embodiments of the invention.

[0053] An embodiment of the present invention provides a blockchain-based timing data sharing and trading method that can be applied to the scenario of blockchain-based timing data sharing and trading, especially for data value division and segmented acquisition based on timing data.

[0054] As Figure 1 shown, a preview of the system architecture diagram provided in this embodiment. It can be seen from the figure that this system includes a data storage module, a data token access module, a data sharing and trading module, and an application layer module. It is divided into a data holder and a requester for different objects.

[0055] The data holder is generally the producer of data, which can be an individual or a consortium composed of relevant units. Corresponding timing data is collected through various types of devices. If it is a consortium composed of relevant units, relevant data format standards can be formulated to facilitate the unification of data for each unit within the consortium, which is beneficial to the sharing and external trading of data within the consortium.

[0056] Generally speaking, the requester is each enterprise, government or relevant scientific research institution that needs to obtain corresponding timing data for relevant research. Such requesters can reasonably design the format required for data analysis research according to the data standards formulated by the data holders, which can greatly improve the data analysis efficiency.

[0057] The data storage module is divided into two parts, including a time series database and IPFS. The time series data collected by the data holder is stored in the time series database in real time, such as InfluxDB, Timescale, QuestDB, etc. Such databases generally provide efficient compression algorithms and visualization interfaces for easy analysis of time series data, greatly improving the storage and operation efficiency of time series data. IPFS, i.e., the InterPlanetary File System combined with blockchain, has been applied to many blockchain systems. In the present invention, high-value time series data and other types of time series data are divided according to the time dimension and data importance. Logically, IPFS is also divided into a high-value time series data storage area and a cache area for other types of time series data. For high-value time series data, some high-value time series data is usually generated during the process of obtaining time series data. For example, in device vibration detection, if the vibration data of certain devices is abnormal, it may indicate that the device has a fault, and at this time, the device needs to be repaired immediately. Such abnormal data often has higher value compared to normal type data. In addition, in application scenarios such as forest fire detection, these high-value time series data are often the most recent. To avoid the occurrence of forest fires, it is necessary to capture the data at the first time of abnormality to avoid disasters. These types of data often occupy the important value of time series data, so they need to be synchronously uploaded to IPFS in real time to improve the system operation efficiency. For other types of time series data, such as a large amount of time series data, it is needed in the scenario of large-scale time series analysis. At this time, such a large amount of time series often has the characteristics of a large amount of data, many data features, and high requirements for data visualization analysis. For such data, efficient compression and convenient visualization operations need to be provided. Due to its own characteristics, IPFS is difficult to implement such functions, while many time series databases on the market can generally achieve efficient compression and visualization processing of data, and such time series databases provide rich third-party data access interfaces, which are very convenient to operate. Taking InfluxDB as an example, InfluxDB 2.0 provides rich third-party data interfaces, which are convenient for data migration and processing, and also integrates data processing analysis and data visualization interfaces. Therefore, in the present invention, a strategy of hybrid storage of time series database and IPFS is used, and a data screening and compression script is used to realize the circulation of data from the time series database to IPFS.

[0058] The data token access module is mainly responsible for token management during the interaction of the entire system, including three cases. The first case is as Figure 2As shown in the figure, after the data requester subscribes to the time-series data to be collected, the data holder will mint a total data access token, which belongs to the data requester. The minting of the token is determined by the content of the transaction contract, which includes necessary parameters such as the range of time-series data that the token can access and the number of accessible times. After the data holder collects the corresponding data, the data C1 and C2 are uploaded to IPFS through a data screening and compression script and the corresponding data addresses are generated. The data holder mints data access sub-tokens based on these data addresses, the total data token, time, and other parameters. The sub-token is a part of the total token. The data requester can use the total data access token to access data C1 and C2. After the access to C1 and C2 is confirmed successful, the token contract will automatically destroy the sub-tokens corresponding to C1 and C2. At this time, the data requester can still use the total data access token to access the data after C3. The second case is as Figure 3 shown. When a part of the data subscribed by the data requester is already stored in IPFS, such as Figure 3 C1, C2, and C3 in the figure, the data holder also first mints a total data access token according to the parameters specified in the transaction contract, and then uses the data addresses stored in IPFS and the total data access token to mint data access sub-tokens. These sub-tokens can access C1, C2, and C3 in IPFS. After the requester uses the total token to access C1, C2, C3, and C4, the corresponding token contract will automatically destroy the corresponding sub-tokens. At this time, the requester can still use the total data access token to access the time-series data after C5. The third case is as Figure 4 shown. When the data requester subscribes to a large amount of time-series data for data analysis, the data holder compresses this large amount of data and stores it in IPFS, and mints a one-time access token using the parameters agreed in the transaction contract and the corresponding data addresses. After the requester uses the token to access the data, the token contract will also destroy the token and delete the data from IPFS after the transaction confirmation is completed. One advantage of using sub-tokens for access is that it effectively controls the data access granularity and also avoids data leakage. Token access based on blockchain can trace the whole process from the minting of the token to its destruction. Token traceability can avoid data disputes and retain data access records.

[0059] The data sharing and trading module consists of a blockchain, which is mainly responsible for transaction evidence storage, data anti-tampering, data sharing, etc. It includes several modules such as a data evidence storage chain, a sharing and trading chain, and smart contracts. The data evidence storage chain is used for all parties to store evidence after obtaining data. The data holder formulates data evidence storage standards and determines the data evidence storage granularity before obtaining the data and storing it in the time series database. After the data collection is completed, the hash value is obtained according to the corresponding standard and uploaded to the evidence storage chain, which includes the necessary information of the data and the data holder. After the requester obtains the complete data, the data integrity can be verified through the same standard. The sharing and trading chain records the records of data transactions, token minting, token trading, token destruction, etc. After the data holder and the data requester reach a data trading contract, a data access token will be minted. This token belongs to the data requester. The data requester needs to use this token to access the data. When the data is accessed, the operations on the data accessed by the token will be stored as evidence in the sharing and trading chain. The sub-token access mechanism is the same. The smart contracts included in the module are data trading contracts, token contracts, collection contracts, and aging contracts. Among them, the data trading contract is used for the data holder and the requester to negotiate a contract to determine the required data scope and standards. The token contract is used for token minting, trading, and destruction, and is responsible for maintaining the entire token life cycle. The data collection contract is used for data holders to formulate data collection standards and standard data circulation formats. The aging contract is responsible for maintaining the data life cycle. Taking high-value time series data as an example, after a certain period of aging, if the high-value time series data does not meet the high-value time series data standard, it will be automatically destroyed from IPFS. Other types of time series data will also be automatically destroyed after the transaction is completed to improve the utilization rate of storage space and the system data access efficiency.

[0060] The application layer module presents itself as a visual interface externally, facilitating users to retrieve and purchase the data they need.

[0061] Blockchain has characteristics such as decentralization, audibility, traceability, and anti-tampering, providing a trustworthy, secure, and reliable environment for the information sharing and trading of time series data. At the same time, a large number of mainstream blockchains support smart contracts and programmable operations. Encryption and decryption algorithms can be compiled into smart contracts and deployed to the blockchain to achieve secure data transmission.

[0062] The present invention is particularly applicable to the scenario of time-series data circulation and trading generated by the Industrial Internet of Things. In the case of time-series data generated by large-scale Industrial Internet of Things, there are generally problems such as inconsistent data standards, poor liquidity, low returns, and insufficient security. Due to concerns about data leakage caused by data sharing, data holders often choose to prohibit data circulation or adopt an inefficient encrypted forwarding form. Encrypted forwarding of data consumes a lot of system resources, especially for time-series data. Since the collection of time-series data is often continuous and the data arrives at time nodes in seconds or minutes, the forwarding efficiency of such data is low, and it needs to be forwarded multiple times according to the data standards formulated by each party, and the security also needs to be improved. Using the time-series data sharing method proposed by the present invention, sub-tokens based on the blockchain system are segmented and forged for high-value time-series data, effectively ensuring data security and data granularity, and using the natural advantages of blockchain technology can ensure the safe trading and effective traceability of data. For a large amount of data, effective compression and sharing can be carried out, greatly improving data liquidity.

[0063] The above data sharing method includes the registration of consortium members, high-value time-series data trading, other types of time-series data trading, and token life cycle. The specific content is as follows:

[0064] I. Registration of Consortium Members

[0065] Step 1: The data holder and the demander initiate a registration request;

[0066] Step 2: The certificate authority in the blockchain registers and issues an identity member certificate for the corresponding consortium;

[0067] Step 3: The key management module generates a public-private key pair and returns it to the user;

[0068] Step 4: Confirm that the public-private key pair is correct and complete the registration.

[0069] This data sharing method uses a consortium chain. Each data holder jointly forms a consortium, formulates member access standards and data collection standards. Each consortium member reaches a consensus and establishes a certificate authority to issue identity certificates for the corresponding consortium members.

[0070] II. High-value time-series data trading, and its detailed step timing diagram is as Figure 5 shown

[0071] Step 1: The data holder and the data demander generate their respective public and private keys through the system;

[0072] Step 2: The data holder collects data through subordinate devices and stores it in the time-series database, and at the same time calls the data screening and compression contract to extract the high-value time-series data and store it in IPFS and obtain the corresponding data storage address;

[0073] Step 3: The data holder uses the token contract to mint a total data access token based on the requester's public key, data hash, data storage address, and data demand time range;

[0074] Step 4: The data holder uses the deposited segmented data and the total data token to mint sub-tokens for the segmented data;

[0075] Step 5: The data requester uses the total data access token to access the corresponding segmented data. After the extraction and confirmation of the corresponding segmented data are completed, the sub-token is automatically destroyed, and this segment of data cannot be accessed again through the total token;

[0076] Step 6: The data holder continuously uploads data until all the data required by the data requester is uploaded;

[0077] Step 7: The data requester continuously uses the total token to obtain data until all the data is successfully accessed;

[0078] Step 8: The token contract reached by both parties automatically destroys the total data access token;

[0079] Step 9: The data requester verifies the integrity of the data through the hash value deposited by the data holder when writing the data.

[0080] High-value time-series data is collected by the data holder, processed by a data screening and compression script, and then stored in IPFS. IPFS returns the corresponding storage address CID. The data holder obtains the CID and mints a data access token in combination with the necessary information of both trading parties, and formulates different strategies for different data forms, such as when there is already some data existing in IPFS or when the data collection has not started. For the case where there is already some data stored in IPFS, the data holder first extracts the data address of the data existing in IPFS and mints a sub-token for data access. For the data that has not started to be collected, after this segmented data is collected, a sub-token is minted and bound to the total token of the requester. Data is accessed in token format rather than data address format, which can effectively avoid the difficulty of accountability caused by data address leakage. And using blockchain-based token access can effectively trace data access records and ensure data security.

[0081] III. For other types of time-series data transactions, the detailed step sequence diagram is as Figure 6 shown

[0082] Step 1: The data holder and the consumer register through a key contract to generate a public-private key pair;

[0083] Step 2: The data holder deposits low-value data into the time-series database, hashes the data, and uploads the hash value to the deposit and proof chain;

[0084] Step 3: The data holder stores the data in IPFS and obtains the corresponding data address;

[0085] Step 4: The data holder uses the token contract to mint a data access token according to the requester's public key, data hash, data storage address, and data demand time range;

[0086] Step 5: The data requester extracts the data from IPFS using the data access token;

[0087] Step 6: After the data is retrieved, the token smart contract automatically destroys the data access token;

[0088] Step 7: IPFS deletes the cached data in IPFS after the token is destroyed.

[0089] Other types of time-series data often have a large amount of data and high data complexity. Storing all such data in IPFS cannot effectively utilize the storage efficiency. Therefore, by using the one-time access token mechanism, the loss caused by address leakage can be successfully avoided after access, and the data is destroyed from IPFS after the data access is completed, which also avoids data leakage.

[0090] IV. The time-series data token access mechanism based on blockchain has the following life cycle

[0091] S1: The data holder filters the time-series data according to the requirements of the requester and mints the corresponding data access token;

[0092] S2: Mint data sub-tokens, data access total tokens, or one-time data access tokens respectively according to whether the data arrives continuously;

[0093] S3: The data token minting record is saved on the blockchain;

[0094] S4: The data requester accesses the data using the data token and records it on the blockchain;

[0095] S5: For the segmented data that has been accessed by the data access total token, the corresponding data sub-tokens are destroyed. For the one-time data access token, it is directly destroyed after the access;

[0096] S6: After the data transaction is completed, the token is destroyed and recorded on the blockchain.

[0097] The present invention uses the above technical solutions and applies the idea similar to the cache in the operating system, which can effectively improve the data storage efficiency and data query efficiency, and ensure the security and reliability of the time-series data transaction. By using the blockchain-based token access mechanism, different tokens are minted for different categories and importance of data, fully considering various situations in the actual business scenario, and ensuring the rationality of the data transaction.

Claims

1. A blockchain-based time series data sharing and trading system. Features Including data storage module, data token access module, data sharing transaction module and application layer module: The data storage module is composed of a general time series database and IPFS, and uses a hybrid storage strategy of the time series database and IPFS. After collecting the time series data, the data holder stores it in the time series database and takes the hash value and uploads it to the evidence chain, where the time series database performs effective lossless compression on the stored time series data. High-value time series data is synchronized to IPFS in real time through screening and compression, and the desensitized information in the high-value time series data is submitted to the shared transaction chain. IPFS is logically divided into a high-value time series data storage area and other types of data buffers. High-value time series data is retained for a long time within the range of the high-value time series data standard specified by the alliance members, and is automatically deleted when it exceeds this standard. For other types of data, it will be automatically destroyed from IPFS after confirming that the data sharing transaction is completed; The data token access module is responsible for maintaining various data accesses in the system, including the generation of time series data segment sub-tokens, which is used to cast data tokens for continuously incoming high-value time series data targets; it also includes the generation of data tokens required for other types of time series data or large batches of time series data in a single transaction; In the data sharing transaction module, the data demander orders a period of high-value time series data from the data holder through a smart contract, or orders a large range of other types of time series data in batches; for high-value time series data, the data holder will cast a total data token according to the time period ordered by the demander for long-term access to continuously uploaded high-value time series data; after the data demander accesses a section of data through this token, the sub-token corresponding to the section of data is automatically destroyed; for other types of time series data, the data holder stores the data in IPFS after data screening and compression and casts a single access token. After the demander accesses the data through the token, the token is automatically deleted and the data is also destroyed from IPFS; The application layer module presents a visual interface to the outside world, making it easy for participants within the alliance to share time series data or for users outside the alliance to search and purchase the data they need.

2. According to the blockchain-based time series data sharing and trading system described in claim 1, Features For other types of time series data or large-scale time series data sharing and transaction needs, after the data demander makes a request, the data holder compresses the required data through the existing time series compression algorithm and stores it in IPFS and mints access tokens for the demander to call the data; When the high-value time series data is continuously generated according to the time series rules, the data holder casts a data master token for this type of data, and after each piece of data is uploaded, generates a data sub-token through the master token and the uploaded small piece of data; After the data demander uses the total token to obtain part of the segmented data, the sub-tokens of the corresponding segment are automatically destroyed through the smart contract; In the case of single - transaction of the other types of time - series data, the data holder generates a single - access token for the data, compresses the data and stores it in IPFS, and the token is automatically destroyed after the acquisition is completed; The time - series data is obtained from IPFS through a data token, and the hash value is also compared with the hash value in the deposit chain to check the data integrity and security.

3. An execution method of a time - series data sharing and trading system based on blockchain according to claim 1, characterized in that, the specific implementation steps are as follows: Step 1: The data holder and the data requester generate their respective public and private keys through the system; Step 2: The data holder collects time - series data through subordinate devices and stores it in the time - series database. At the same time, it calls the data screening and compression contract to extract the high - value time - series data and stores it in IPFS, and obtains the corresponding data storage address; Step 3: The data holder uses the token contract to mint a total data access token according to the public key of the requester, the data hash, the data storage address, and the data requester time range; Step 4: The data holder uses the data storage address where the segmented data is stored, the total data access token, and the public key of the requester to mint sub - tokens for the segmented data; Step 5: The data requester uses the total data access token to access the corresponding segmented data. After the extraction and confirmation of the corresponding segmented data are completed, the sub - tokens for the segmented data corresponding to the total data access token are automatically destroyed, and this segmented data cannot be accessed again through the total data access token; Step 6: The data holder continuously uploads high - value time - series data until all high - value time - series data of the data requester is uploaded; Step 7: The data requester continuously uses the total data access token to obtain high - value time - series data until all high - value time - series data is successfully accessed; Step 8: The token contract reached by both parties automatically destroys the total data access token; Step 9: The data requester verifies the integrity of the high - value time - series data through the hash value stored by the data holder when writing the high - value time - series data.

4. An execution method of a time - series data sharing and trading system based on blockchain according to claim 3, characterized in that the steps for storing and trading other types of time - series data and a large amount of time - series data are implemented as follows: Step (1): The data holder and the data requester generate their respective public and private keys through the system; Step (2): The data holder stores other types of time - series data in the time - series database and hashes the data, and uploads the hash value to the deposit chain; Step (3): The data holder stores other types of time - series data in IPFS and obtains the corresponding data address; Step (4): The data holder uses the token contract to mint a data access token according to the data address and the public key of the requester; Step (5): The data requester extracts data from IPFS using the data access token; Step (6): After the data extraction is completed, the token smart contract automatically destroys the data access token; Step (7): IPFS deletes the cached data in IPFS after the token is destroyed.

5. An execution method of a time - series data sharing and trading system based on blockchain according to claim 3 or 4, characterized in that The described time-series data token access mechanism includes the following steps: S1: The data holder filters the time-series data according to the requirements of the requester and mints corresponding data access tokens; S2: Mint data sub-tokens, total data access tokens or one-time data access tokens respectively according to whether the data arrives continuously; S3: The data token minting record is saved on the chain; S4: The data requester accesses the data using the data tokens and records it on the chain; S5: For the segmented data that has been accessed by the total data access token, the corresponding data sub-tokens are destroyed. For the one-time data access token, it is directly destroyed after the access ends; S6: After the data transaction ends, the tokens are destroyed and recorded on the chain.

Citation Information

Patent Citations

  • Internet of Things data sharing model based on block chain and management and control method

    CN113821808A

  • Data sharing method based on on-chain and off-chain collaboration

    CN115208692A