A method and device for on-chain and off-chain collaborative data storage

By storing data in local dedicated storage devices in scenarios such as smart cars and using a certificate storage server to calculate hash values, the problems of data not being able to be uploaded to the blockchain in a timely manner and the protection of security and privacy are solved, achieving highly reliable and low-risk data certificate storage.

CN116150259BActive Publication Date: 2026-06-16POTEVIO INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
POTEVIO INFORMATION TECH CO LTD
Filing Date
2021-11-22
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In scenarios such as smart cars, data cannot be uploaded to the blockchain in a timely manner due to network failures, which reduces the credibility of the data. At the same time, transmitting data to uncontrolled servers poses challenges to data security and privacy protection.

Method used

By using a collaborative on-chain and off-chain data storage method, the evidence storage data is stored in a local dedicated storage device that is directly connected to the data source device. The evidence storage server periodically sends encrypted data to perform hash value calculations, and the relevant calculation results are stored both locally and on-chain to ensure data integrity.

🎯Benefits of technology

Even when the data source device or local evidence storage device fails, data integrity can still be verified, improving reliability and reducing the risks to data security and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150259B_ABST
    Figure CN116150259B_ABST
Patent Text Reader

Abstract

The application discloses a kind of on-chain and off-chain collaborative data storage method and device, including storage server, for sending storage random number, calculate and the hash value group related to the data to be stored, and its received information is superimposed current time and chain and return corresponding on-chain number to special storage device and data source;Special storage device, connect the storage server, for receiving the storage random number sent by the storage server, and it is used for hash value generation;Data source equipment, connect the special storage device, for sending the data to be stored and its related information to the special storage device, and receiving the related information returned by the storage server with current time superimposed.This application stores storage data in local special storage device directly connected with data source equipment, through on-chain and off-chain collaborative mechanism, so that even in the event of equipment failure, the integrity of related data can still be checked when the on-chain channel is interrupted.Improve system reliability while reducing the risk of data security and privacy protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology, and in particular to a method and apparatus for on-chain and off-chain collaborative data storage. Background Technology

[0002] Data or information on the blockchain is characterized by being unforgeable or difficult to counterfeit, providing a new avenue for data notarization. The industry has already begun research and application of blockchain technology for notarization.

[0003] For example, Chinese invention patent CN202110313213.X discloses a data storage method based on blockchain, comprising: acquiring target data and the data type of the target data; if it is determined that the data type of the target data belongs to a first type, then acquiring a corresponding data extraction rule according to the data type of the target data; wherein the data extraction rule is preset; extracting the target data according to the data extraction rule to obtain editable data and formatted data; using the sending information and the editable data as a primary key, and using the formatted data as the value corresponding to the primary key; broadcasting a first on-chain request in the blockchain network to store first stored data, the first on-chain request including the first stored data; wherein the first stored data includes the primary key and the value corresponding to the primary key. This patent improves the convenience of data storage.

[0004] Existing blockchain-based evidence storage technologies typically transmit evidence data or data fingerprints (usually hash values) to a server for on-chain evidence storage. The evidence data or fingerprints stored on the blockchain can be used to verify whether the corresponding evidence data has been tampered with.

[0005] In certain scenarios, such as smart cars and smart equipment, data awaiting notarization may not be uploaded to the blockchain in a timely manner due to network failures, making it impossible to notarize data in a faulty state based on the blockchain. This reduces the credibility of data in a faulty state due to the possibility of tampering. Furthermore, transmitting data to a server that is not controlled by the party requesting notarization also presents challenges in data security and privacy protection. To address these issues, this invention provides a method and apparatus for on-chain and off-chain collaborative data notarization. Summary of the Invention

[0006] To address the aforementioned problems, this invention provides a method for on-chain and off-chain collaborative data notarization, comprising the following steps:

[0007] The S1 evidence storage server sends a random number for evidence storage to the dedicated evidence storage device through an encrypted channel, stores it in the memory of the dedicated evidence storage device, and establishes a local connection between the dedicated evidence storage device and the data source device.

[0008] During an S2 operation, the data source device sends the data to be stored and its related information to a dedicated storage device. After receiving the data, the dedicated storage device combines the data to be stored with the currently available storage random number and calculates the hash value group associated with the combination.

[0009] S3 uses a dedicated evidence storage device to bind the hash value group related to the current time and the relevant information of the data to be stored, store it locally, and then send it to the evidence storage server.

[0010] The S4 evidence server verifies a specific hash value. If it matches the corresponding hash value in S3, it adds the current time to the information bound in S3 and uploads it to the blockchain. The corresponding on-chain number is then returned to the dedicated evidence storage device and the data source device.

[0011] Furthermore, in the method, the evidence storage server periodically sends updated evidence storage random numbers to the dedicated evidence storage device through an encrypted channel, and saves the evidence storage random number information in the evidence storage server's local database.

[0012] Furthermore, the dedicated evidence storage device retains the latest received encrypted random number in memory, decrypts the random number when a hash value needs to be calculated based on it, and clears the random number after a specified time.

[0013] Furthermore, in the method, the relevant information of the data to be stored includes the data description information and the data number, wherein the data description information includes the data generation time, data size and device ID attribute provided by the data source device.

[0014] Furthermore, the current time of the local dedicated evidence storage device is provided by the evidence storage server or by configuring a satellite positioning and navigation module for it.

[0015] Furthermore, in the method, the hash value group related to the data to be certified includes a first hash value, a second hash value, and a third hash value.

[0016] Furthermore, in the method, the first hash value is the hash value for calculating the data to be stored; the second hash value is the hash value for calculating the description information of the data to be stored, which is also a specific hash value that the storage server can verify; and the third hash value is the hash value for calculating the combination of the data to be stored and the currently available system storage random number.

[0017] Furthermore, in the method, the evidence storage server calculates the second hash value in the same way as the dedicated evidence storage device. If the calculation result is consistent with the result calculated by the evidence storage device, the hash value group related to the data to be stored after being bound to time, along with the relevant information of the data to be stored, plus the current time of the server, is uploaded to the blockchain, and the number of this information on the blockchain is returned to the dedicated evidence storage device and the data source.

[0018] Furthermore, the current time of the evidence storage server is synchronized with the current time of the blockchain network.

[0019] On another level, the present invention provides a data storage device for on-chain and off-chain collaboration, including...

[0020] The evidence storage server is used to send a random number for evidence storage, calculate a specific hash value related to the data to be stored, and upload the received information to the blockchain after adding the current time. Then, it returns the number of the information on the blockchain to the dedicated evidence storage device and the data source.

[0021] A dedicated evidence storage device is connected to the evidence storage server. It is used to receive the evidence storage random number sent by the evidence storage server, and retain the latest received encrypted random number in its memory. When it is necessary to calculate the hash value based on it, the random number is decrypted and the random number is cleared after a specified time.

[0022] The data source device is connected to the dedicated evidence storage device and is used to send the data to be stored and its related information to the dedicated evidence storage device, and to receive the evidence storage data number and the corresponding on-chain number returned by the evidence storage server.

[0023] Furthermore, the dedicated evidence storage device is connected to the data source device via any one of LAN, USB, WIFI, or Bluetooth.

[0024] Furthermore, the dedicated evidence storage device is connected to the evidence storage server via the Internet.

[0025] Furthermore, the data source device transmits encrypted data to be stored to the local dedicated evidence storage device in a periodic, non-periodic, or streaming manner.

[0026] The beneficial effects of this invention are as follows:

[0027] This invention stores the evidence storage data in a dedicated local storage device directly connected to the data source device. The evidence storage server periodically sends encrypted data to the dedicated local storage device for hash value calculation, and the calculation results are stored simultaneously on the dedicated local storage device and on the blockchain. This on-chain / off-chain collaborative mechanism ensures high reliability even if the data source device or the dedicated local storage device malfunctions and interrupts the on-chain channel. Furthermore, since there is no need to send the data to be stored to the server, it reduces risks to data security and privacy. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 A step diagram illustrating an on-chain and off-chain collaborative data notarization method provided in this application embodiment;

[0030] Figure 2 A timing diagram for a specific implementation of the embodiments of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” used in the embodiments of this invention and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.

[0033] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0034] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0035] Example 1

[0036] This embodiment provides, for example Figure 1 The illustrated on-chain and off-chain collaborative data notarization method includes the following steps:

[0037] The S1 evidence storage server sends a random number for evidence storage to the dedicated evidence storage device through an encrypted channel, stores it in the memory of the dedicated evidence storage device, and establishes a local connection between the dedicated evidence storage device and the data source device.

[0038] During an S2 operation, the data source device sends the data to be stored and its related information to a dedicated storage device. After receiving the data, the dedicated storage device combines the data to be stored with the currently available storage random number and calculates the hash value group associated with the combination.

[0039] S3 uses a dedicated evidence storage device to bind the hash value group related to the current time and the relevant information of the data to be stored, store it locally, and then send it to the evidence storage server.

[0040] The S4 evidence server verifies a specific hash value. If it matches the corresponding hash value in S3, it adds the current time to the information bound in S3 and uploads it to the blockchain. The corresponding on-chain number is then returned to the dedicated evidence storage device and the data source device.

[0041] In this embodiment, the connection between the local dedicated evidence storage device and the data source device is via LAN.

[0042] In this embodiment, the evidence storage server periodically sends a random number for evidence storage to the dedicated evidence storage device through an encrypted channel, and saves this information in the memory of the dedicated evidence storage device.

[0043] In this embodiment, the current time of the local dedicated evidence storage device is provided by the evidence storage server. The current time of the evidence storage server is synchronized with the current time of the blockchain network.

[0044] This embodiment stores the evidence storage data in a local dedicated storage device that is directly connected to the data source device. Through the on-chain and off-chain collaboration mechanism, the integrity of the relevant data can still be verified even if the data source device fails.

[0045] Example 2

[0046] In terms of specific applications, this embodiment takes the example of the evidence storage server sending random numbers for evidence storage to a dedicated evidence storage device through an encrypted channel on an aperiodic basis, and the details are described as follows:

[0047] The evidence storage server periodically sends random numbers for evidence storage to the dedicated evidence storage device via an encrypted channel and stores this information in its local database; the local dedicated evidence storage device and the data source device are connected via USB. The local dedicated evidence storage device and the evidence storage server are connected via the Internet.

[0048] The data source device sends the data to be stored to a dedicated storage device connected locally to the device in a predefined manner, along with the description information and data number of the data to be stored.

[0049] After receiving the data to be stored, the dedicated evidence storage device calculates its hash value and records it as the first hash value, calculates the hash value of the description information of the data to be stored and records it as the second hash value, and calculates the hash value of the combination of the data to be stored and the currently available system evidence storage random number and records it as the third hash value.

[0050] The dedicated evidence storage device binds the current time with the first hash value, the second hash value, the third hash value, the description information of the data to be stored, and the data number, and then sends it to the evidence storage server.

[0051] In this embodiment, the current time of the local dedicated evidence storage device is provided by the evidence storage server. The current time of the evidence storage server is synchronized with the current time of the blockchain network.

[0052] The evidence storage server calculates the second hash value in the same way as the dedicated evidence storage device. If the calculation result is consistent with the result calculated by the evidence storage device, the above-mentioned bound information is superimposed with the server's current time and uploaded to the blockchain. The number of this information on the blockchain is returned to the dedicated evidence storage device and the data source.

[0053] The dedicated evidence storage device in this embodiment only retains the most recently received encrypted random number in memory, and only decrypts the random number when it is needed to calculate a hash value, and clears the random number after a specified time.

[0054] Example 3

[0055] This embodiment provides an on-chain and off-chain collaborative data storage device, the timing diagram of which is as follows: Figure 2 As shown, specifically including

[0056] The evidence storage server is used to send a random number for evidence storage, calculate a specific hash value related to the data to be stored, add the received information to the current time and put it on the chain, and return the corresponding on-chain number to the dedicated evidence storage device and data source.

[0057] A dedicated evidence storage device is connected to the evidence storage server. It is used to receive the evidence storage random number sent by the evidence storage server, and retain the latest received encrypted random number in its memory. When it is necessary to calculate the hash value based on it, the random number is decrypted and the random number is cleared after a specified time.

[0058] The data source device is connected to the dedicated evidence storage device and is used to send the data to be stored and its related information to the dedicated evidence storage device, and to receive the relevant information returned by the evidence storage server with the current time superimposed on it.

[0059] In this embodiment, the dedicated evidence storage device is connected to the data source device via any one of LAN, USB, WIFI, or Bluetooth. The dedicated evidence storage device is connected to the evidence storage server via the Internet.

[0060] In summary, this invention stores the evidence storage data in a dedicated local storage device directly connected to the data source device. The evidence storage server periodically sends encrypted data to the dedicated local storage device for hash value calculation, and the calculation results are stored simultaneously on the dedicated local storage device and on the blockchain. This on-chain / off-chain collaborative mechanism ensures high reliability even if the data source device or the dedicated local storage device malfunctions and interrupts the on-chain channel. Furthermore, since there is no need to send the data to be stored to the server, it reduces risks to data security and privacy.

[0061] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0062] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of a necessary general-purpose hardware platform, or by a combination of hardware and software. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a computer product. The present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0063] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable resource update device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable resource update device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0064] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable resource update device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0065] These computer program instructions can also be loaded onto a computer or other programmable resource update device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0066] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0067] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0068] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for collaborative on-chain and off-chain data notarization, characterized in that, Includes the following steps: The S1 evidence storage server sends a random number for evidence storage to a dedicated evidence storage device through an encrypted channel, stores it in a local database, and connects the dedicated evidence storage device to the data source device locally. During an S2 operation, the data source device sends the data to be stored and its related information to a dedicated storage device. After receiving the data, the dedicated storage device calculates a group of hash values ​​associated with the data to be stored. S3 uses a dedicated evidence storage device to bind the hash value group related to the current time and the relevant information of the data to be stored, then stores it locally and sends it to the evidence storage server. The S4 evidence storage server calculates the hash value group related to the data to be stored. If it matches the hash value group in S3, it adds the current time to the time information bound in S3 and returns it to the dedicated evidence storage device and the data source device via the blockchain. Its characteristic is that... The evidence storage server periodically sends random numbers to the dedicated evidence storage device via an encrypted channel and stores this random number information in a local database. The dedicated evidence storage device retains the most recently received encrypted random number in memory, decrypts it when a hash value needs to be calculated based on it, and clears the random number after a specified period. The relevant information for the data to be stored includes a description of the data and a data number. The description includes the data generation time, data size, and device ID attribute provided by the data source device. The current time of the local dedicated storage device is provided by the storage server or through a satellite positioning and navigation module configured for it. The hash value group associated with the data to be certified includes the first hash value, the second hash value, and the third hash value.

2. The on-chain and off-chain collaborative data notarization method according to claim 1, characterized in that, In the method, the first hash value is the hash value for calculating the data to be stored; the second hash value is the hash value for calculating the description information of the data to be stored; and the third hash value is the hash value for calculating the combination of the data to be stored and the currently available system storage random number.

3. The on-chain and off-chain collaborative data storage method according to claim 2, characterized in that, In the method, the evidence storage server calculates the first hash value, the second hash value, and the third hash value in the same way as the dedicated evidence storage device. If the calculation result is consistent with the result calculated by the evidence storage device, the hash value group related to the data to be stored after being bound to time and the relevant information of the data to be stored, plus the current time of the server, are uploaded to the blockchain. The number of this information on the blockchain is returned to the dedicated evidence storage device and the data source. The current time of the evidence storage server is synchronized with the current time of the blockchain network.

4. A data storage device for on-chain and off-chain collaboration, characterized in that, include The evidence storage server is used to send random numbers for evidence storage, calculate a group of hash values ​​related to the data to be stored, and return the received information, along with the current time, to the dedicated evidence storage device and data source via the blockchain. A dedicated evidence storage device, connected to the evidence storage server, is used to receive the evidence storage random number sent by the evidence storage server, and retain the latest received encrypted random number in its memory. When it is necessary to calculate a hash value based on it, the random number is decrypted and cleared after a specified time. The current time is bound with the first hash value, the second hash value, the third hash value, the description information of the data to be stored, and the data number, and then stored locally and sent to the evidence storage server. A data source device, connected to the dedicated evidence storage device, is used to send data to be stored and related information to the dedicated evidence storage device, and to receive relevant information superimposed with the current time returned by the evidence storage server, characterized in that... The evidence storage server periodically sends random numbers to the dedicated evidence storage device via an encrypted channel and stores this random number information in a local database. The dedicated evidence storage device retains the most recently received encrypted random number in memory, decrypts it when a hash value needs to be calculated based on it, and clears the random number after a specified period. The relevant information for the data to be stored includes a description of the data and a data number. The description includes the data generation time, data size, and device ID attribute provided by the data source device. The current time of the local dedicated storage device is provided by the storage server or through a satellite positioning and navigation module configured for it. The hash value group associated with the data to be certified includes the first hash value, the second hash value, and the third hash value.

5. The on-chain and off-chain collaborative data storage device according to claim 4, characterized in that, The dedicated evidence storage device is connected to the data source device via any one of LAN, USB, WIFI, or Bluetooth.

6. The on-chain and off-chain collaborative data storage device according to claim 4, characterized in that, The dedicated evidence storage device is connected to the evidence storage server via the Internet.

7. The on-chain and off-chain collaborative data storage device according to claim 4, characterized in that, The data source device transmits encrypted data to be stored to the local dedicated evidence storage device in a periodic, non-periodic, or streaming manner.