Data sharing method and apparatus

CN118118174BActive Publication Date: 2026-10-27NEW H3C SECURITY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410383189.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2026-10-27
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

因此,相关技术在数据共享时,数据安全性较低

Benefits of technology

[0019]本说明书实施例中,终端设备通过自身的终端私钥对自身的终端数据进行加密,确保终端数据仅能通过自身的终端公钥进行解密,终端数据解密使用的终端公钥仅在终端设备中保存,数据运营平台以及区块链中存储的均是由临时密钥进行加密后的数据,外部无法利用读取实际信息。由此,提高了数据的安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118118174B_ABST
    Figure CN118118174B_ABST
Patent Text Reader

Abstract

The specification provides a data sharing method and device. The method comprises: receiving a transaction request for terminal data sent by a data service platform; according to the transaction request, executing a transaction contract, the transaction contract being used for: generating a temporary public key and a temporary private key corresponding to each other according to the transaction request; sending data transaction information to a data operation platform, the data transaction information comprising the temporary public key; receiving a terminal public key ciphertext sent by the data operation platform; decrypting the terminal public key ciphertext by using the temporary private key to obtain a terminal public key; encrypting the terminal public key and a data validity duration of the terminal data by using the temporary private key to obtain a ciphertext data packet; and sending a data storage address of the terminal data and the ciphertext data packet to the data service platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of communication technology, and in particular to data sharing methods and apparatus. Background Technology

[0002] With the development of technologies such as intelligent connected vehicles and autonomous driving, automotive data is growing exponentially, and this data has enormous industrial value.

[0003] To ensure data security during data sharing, relevant technologies employ secure multi-party computation. Secure multi-party computation is a technology that enables multiple parties to jointly compute and make decisions based on data while protecting privacy.

[0004] However, in secure multi-party computation (MPC) techniques, participating entities may attempt to obtain additional information about other entities by monitoring and analyzing information during the protocol process. Furthermore, participating entities may not only violate protocol rules but also employ any means possible to disrupt the protocol or falsify information, including sending false messages, forging data, and denial-of-service attacks. Therefore, these technologies offer relatively low data security during data sharing. Summary of the Invention

[0005] To overcome the problems existing in related technologies, this specification provides a data sharing method and apparatus.

[0006] According to a first aspect of the embodiments of this specification, a data sharing method is provided, applied to a blockchain, the method comprising: receiving a transaction request for terminal data sent by a data service platform; executing a transaction contract according to the transaction request, the transaction contract being used to: generate a corresponding temporary public key and a temporary private key according to the transaction request; sending data transaction information to a data operation platform, the data transaction information including the temporary public key; receiving encrypted terminal public key sent by the data operation platform; decrypting the encrypted terminal public key using the temporary private key to obtain the terminal public key; encrypting the terminal public key and the data validity period of the terminal data using a fixed private key to obtain an encrypted data packet; and sending the data storage address of the terminal data and the encrypted data packet to the data service platform.

[0007] According to a second aspect of the embodiments of this specification, a data sharing method is provided, applied to a data operation platform. The method includes: receiving data transaction information for terminal data sent by a blockchain; sending the data transaction information to the terminal device; receiving terminal public key ciphertext sent by the terminal device; and sending the terminal public key ciphertext to the blockchain.

[0008] According to a third aspect of the embodiments of this specification, a terminal device is provided, the method comprising: receiving data transaction information for terminal data sent by a data operation platform, the data transaction information including a temporary public key; if the data transaction information is confirmed, encrypting the terminal public key using the temporary public key to obtain terminal public key ciphertext; and sending the terminal public key ciphertext to the data operation platform.

[0009] According to a fourth aspect of the embodiments of this specification, a data sharing method is provided, applied to a data service platform. The method includes: sending a transaction request for terminal data to a blockchain; receiving a data storage address and a encrypted data packet sent by the blockchain; obtaining encrypted terminal data based on the data storage address; decrypting the encrypted data packet using a fixed public key to obtain a data validity period and a terminal public key; decrypting the encrypted terminal data using the terminal public key to obtain the terminal data; and providing application services using the terminal data within the data validity period.

[0010] According to a fifth aspect of the embodiments of this specification, a data sharing device is provided, applied to a blockchain. The device includes: a first receiving module, configured to receive a transaction request for terminal data sent by a data service platform; a first execution module, configured to execute a transaction contract according to the transaction request, the transaction contract being used for: a key generation module, configured to generate a corresponding temporary public key and a temporary private key according to the transaction request; a first sending module, configured to send data transaction information to a data operation platform, the data transaction information including the temporary public key; a second receiving module, configured to receive terminal public key ciphertext sent by the data operation platform; a first decryption module, configured to decrypt the terminal public key ciphertext using the temporary private key to obtain the terminal public key; a first encryption module, configured to encrypt the terminal public key and the data validity period of the terminal data using a fixed private key to obtain an encrypted data packet; and a second sending module, configured to send the data storage address of the terminal data and the encrypted data packet to the data service platform.

[0011] According to a sixth aspect of the embodiments of this specification, a data sharing device is provided, applied to a data operation platform. The device includes: a third receiving module for receiving data transaction information for terminal data sent by a blockchain; a third sending module for sending the data transaction information to the terminal device; a fourth receiving module for receiving terminal public key ciphertext sent by the terminal device; and a fourth sending module for sending the terminal public key ciphertext to the blockchain.

[0012] According to a seventh aspect of the embodiments of this specification, a data sharing apparatus is provided, applied to a terminal device, the apparatus comprising: a fifth receiving module, configured to receive data transaction information for terminal data sent by a data operation platform, the data transaction information including a temporary public key; a second encryption module, configured to encrypt the terminal public key using the temporary public key if the data transaction information is confirmed, to obtain terminal public key ciphertext; and a fifth sending module, configured to send the terminal public key ciphertext to the data operation platform.

[0013] According to an eighth aspect of the embodiments of this specification, a data sharing apparatus is provided, applied to a data service platform. The apparatus includes: a sixth sending module for sending a transaction request for terminal data to a blockchain; a sixth receiving module for receiving a data storage address and a encrypted data packet sent by the blockchain; an acquisition module for acquiring encrypted terminal data based on the data storage address; a second decryption module for decrypting the encrypted data packet using a fixed public key to obtain a data validity period and a terminal public key; a third decryption module for decrypting the encrypted terminal data using the terminal public key to obtain terminal data; and a data processing module for providing application services using the terminal data within the data validity period.

[0014] According to a ninth aspect of the embodiments of this specification, a data sharing apparatus is provided, comprising:

[0015] processor;

[0016] Memory used to store processor-executable instructions;

[0017] The processor is configured to execute the first, second, third, or fourth aspects of the embodiments of this specification.

[0018] The technical solutions provided in the embodiments of this specification may include the following beneficial effects:

[0019] In the embodiments described in this specification, the terminal device encrypts its own terminal data using its own private key, ensuring that the terminal data can only be decrypted using its own public key. The public key used for decryption is stored only within the terminal device. The data stored on the data operation platform and in the blockchain is encrypted with a temporary key, preventing external access to read the actual information. This improves data security.

[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0022] Figure 1 This is a schematic diagram of a system architecture illustrated in this specification according to an exemplary embodiment.

[0023] Figure 2 This is a flowchart illustrating a data sharing method according to an exemplary embodiment of this specification.

[0024] Figure 3 This is a flowchart illustrating another data sharing method according to an exemplary embodiment.

[0025] Figure 4 This is a flowchart illustrating another data sharing method according to an exemplary embodiment.

[0026] Figure 5A This is a flowchart illustrating another data sharing process according to an exemplary embodiment, showing the process of uploading data to the blockchain.

[0027] Figure 5B This is a schematic diagram illustrating the flow of keys in another data sharing process according to an exemplary embodiment.

[0028] Figure 6 This is a flowchart illustrating another data sharing process according to an exemplary embodiment, showing a data query.

[0029] Figure 7 This is a flowchart illustrating a data transaction process during data sharing, according to an exemplary embodiment.

[0030] Figure 8 This is a flowchart illustrating data use in another data sharing process according to an exemplary embodiment.

[0031] Figure 9 This is a hardware structure diagram of a computer device containing the document processing apparatus in the embodiments of this specification.

[0032] Figure 10 This is a block diagram illustrating a data sharing device according to an exemplary embodiment of this specification.

[0033] Figure 11 This is a block diagram illustrating another data sharing device according to an exemplary embodiment of this specification.

[0034] Figure 12 This is a block diagram illustrating another data sharing device according to an exemplary embodiment of this specification.

[0035] Figure 13This is a block diagram illustrating another data sharing device according to an exemplary embodiment of this specification. Detailed Implementation

[0036] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0037] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0038] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0039] The embodiments described in this specification will now be described in detail.

[0040] The following combination Figure 1 The system architecture of the data sharing methods and apparatus applicable to the embodiments of this specification will be described. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0041] Figure 1 This is a schematic diagram of a system architecture illustrated in this specification according to an exemplary embodiment.

[0042] like Figure 1 As shown, this system architecture may include, for example, terminal devices, a data operation platform, a data service platform, data demanders, a blockchain, and a distributed storage system. The distributed storage system may include multiple distributed storage nodes.

[0043] Terminal devices may include, for example, intelligent connected vehicles, smartphones, tablets, laptops, and desktop computers.

[0044] Data service platforms can be used to provide application services such as data analysis and model training based on terminal data.

[0045] A data operations platform can be used to collect data from various terminal devices and add it to the blockchain through trusted authentication methods. For example, a data operations platform could be a platform belonging to a terminal device supplier or operator, such as a car manufacturer's platform.

[0046] Data requesters can be enterprises, companies, or universities that need relevant data for research and analysis.

[0047] Blockchains can be configured with smart contracts, such as contracts LA, LB, and LC. A smart contract is a piece of code written on the blockchain; once an event triggers a clause in the contract, the code executes automatically. In other words, it executes as soon as the conditions are met, without requiring human intervention.

[0048] In this embodiment, contract LA can be a transaction contract used to handle data transaction-related transactions. Contract LA can contain a fixed asymmetric key, which can be labeled K0. The fixed private key can be labeled SK0, and the corresponding fixed public key can be labeled PK0, both embedded in the data service platform. Contract LB can be an on-chain contract used to handle data uploading-to-chain related transactions. Contract LC can be a query contract used to handle data query-related transactions.

[0049] Terminal devices can collect data, encrypt it, and then report it to the data operation platform. The data operation platform can invoke the LB contract to upload the data to the blockchain. The data operator can register this data with the data service platform. In addition, the data operator can generate a price strategy contract, associate the contract address of the price strategy contract with the data operator's corporate identity, and store it in the data service platform.

[0050] Data requesters can query data on demand. For example, a data requester can send a data query request to a data service platform. The data service platform can then invoke the LC contract to query data in the blockchain.

[0051] When trading data, the data requester can send a transaction request to the data service platform. The data service platform can then invoke the contract LA. The contract LA can obtain authorization from the end-device user through the data operator. With authorization, the data is shared with the data service platform.

[0052] The data service platform can decrypt the data to obtain the terminal device. It can then display, analyze, and import the data into models for training, but it cannot perform secondary storage. For example, the data service platform can export a trained model, but other data cannot be exported.

[0053] The data sharing method provided in the embodiments of this disclosure will be described in detail below. For example... Figure 2 As shown, Figure 2 This is a flowchart illustrating a data sharing method according to an exemplary embodiment of this specification. The data sharing method provided in this disclosure embodiment may include the following steps.

[0054] In step S201, the data service platform sends a transaction request for terminal data to the blockchain.

[0055] According to embodiments of this disclosure, terminal data can be data collected by a terminal device. Terminal data can be pre-stored in a storage system via blockchain.

[0056] According to embodiments of this disclosure, a transaction request can be used to request the purchase of access to terminal data. The transaction request may include information related to the terminal data, such as the terminal identifier of the terminal device to which the data belongs, the data time range, and the data type.

[0057] In step S202, the blockchain receives a transaction request for terminal data sent by the data service platform; according to the transaction request, the transaction contract is executed, and the transaction contract is used to execute steps S2021 to S2022 and steps S2071 to S2073.

[0058] In step 2021, the transaction contract generates corresponding temporary public keys and temporary private keys based on the transaction request.

[0059] In step S2022, the transaction contract sends data transaction information to the data operation platform, which includes a temporary public key.

[0060] According to embodiments of this disclosure, the data transaction information includes a temporary public key. Optionally, the data transaction information may also include a transaction serial number, terminal identifier, data time range, data type, terminal revenue for each terminal, operator revenue, and other information.

[0061] In step S203, the data operation platform receives data transaction information for terminal data sent by the blockchain; and sends the data transaction information to the terminal device.

[0062] According to embodiments of this disclosure, a data operation platform can receive data transaction information for one or more terminal data, and then send each data transaction information to the corresponding terminal data.

[0063] In step S204, the terminal device receives data transaction information for terminal data sent by the data operation platform. The data transaction information includes a temporary public key. If the data transaction information is confirmed, the terminal public key is encrypted using the temporary public key to obtain the terminal public key ciphertext.

[0064] According to embodiments of this disclosure, users can confirm or reject data transaction information through their terminal devices. If the data transaction information is confirmed, it indicates that the user agrees to the transaction involving the terminal data.

[0065] According to embodiments of this disclosure, the terminal device can be pre-configured with corresponding public and private keys. Terminal data can be encrypted using the private key and uploaded to the blockchain for storage in a storage system. Therefore, when terminal data needs to be used, it must first be decrypted using the public key. This improves data security. Furthermore, it ensures that terminal data belongs to the user and that unauthorized use of terminal data is prohibited, thus protecting the user's ownership rights to the terminal data.

[0066] In step S205, the terminal device sends the terminal public key ciphertext to the data operation platform.

[0067] In step S206, the data operation platform receives the terminal public key ciphertext sent by the terminal device and sends the terminal public key ciphertext to the blockchain.

[0068] In step S2071, the transaction contract receives the terminal public key ciphertext sent by the data operation platform; it then decrypts the terminal public key ciphertext using a temporary private key to obtain the terminal public key.

[0069] In step S2072, the transaction contract uses a fixed private key to encrypt the terminal public key and the data validity period of the terminal data to obtain a ciphertext data packet.

[0070] According to embodiments of this disclosure, the data validity period can be calculated by the transaction contract based on the data usage duration sent by the data service platform. The data validity period can be used to limit the usage time of terminal data. The data service platform can only use the terminal device within the data validity period. The data validity period generated by the smart contract effectively ensures the fairness of data use and protects the legitimate rights and interests of both users.

[0071] According to embodiments of this disclosure, the blockchain can pre-generate a fixed private key and a fixed public key. The fixed public key can be sent to a data service platform, which stores the fixed public key.

[0072] In step S2073, the blockchain sends the data storage address and encrypted data packet of the terminal data to the data service platform.

[0073] In step S208, the data service platform receives the data storage address and encrypted data packet sent by the blockchain; and obtains the terminal data encrypted packet based on the data storage address.

[0074] In step S209, the data service platform uses a fixed public key to decrypt the encrypted data packet to obtain the data validity period and the terminal public key.

[0075] According to embodiments of this disclosure, the data service platform may pre-store temporary public keys.

[0076] In step S210, the data service platform uses the terminal's public key to decrypt the terminal data ciphertext and obtain the terminal data.

[0077] According to embodiments of this disclosure, the data service platform can be configured with a separate API (Application Programming Interface) for decrypting encrypted terminal data. This separate API performs in-memory decryption; the terminal public key resides and is used only in memory and is not stored with related key information.

[0078] In step S211, the data service platform provides application services using terminal data within the valid data duration.

[0079] According to embodiments of this disclosure, application services may include, for example, model training, data analysis, data mining, etc.

[0080] According to embodiments of this disclosure, the terminal device encrypts its own terminal data using its private key, ensuring that the terminal data can only be decrypted using its own public key. The public key used for decryption is stored only within the terminal device. The data stored on the data operation platform and in the blockchain is encrypted with a temporary key, preventing external access to the actual information. This improves data security. Secondly, during data transactions, a temporary public key generated by the transaction contract is used to encrypt and transmit the terminal public key, ensuring that the data operation platform cannot obtain the terminal public key during transmission. Furthermore, the terminal data is decrypted using the temporary private key and re-encrypted using a fixed private key before being sent to the data service platform for processing. The data service platform only retains the fixed public key of the transaction contract; the terminal public key resides only in memory, maximizing the security of the terminal key and protecting the user's ownership rights to the terminal data throughout the entire transaction chain.

[0081] According to embodiments of this disclosure, encryption combines the terminal public key with the data validity period, giving the terminal public key an expiration period. When the data service platform decrypts data using a built-in fixed private key, it can verify the data validity period during a single decryption process. If the time exceeds the validity period, it returns a failure; otherwise, it uses the public key to decrypt and use the data. Therefore, the data service platform only focuses on data usage and access control, without needing to concern itself with transaction information.

[0082] like Figure 3 The diagram shown is a flowchart illustrating another data sharing method according to an exemplary embodiment. Based on the foregoing embodiments, this embodiment describes a process for uploading terminal data to the blockchain during data sharing, including the following steps:

[0083] In step S301, the terminal device uses its private key to encrypt the terminal data, thus obtaining the encrypted terminal data.

[0084] According to embodiments of this disclosure, the terminal device can pre-generate corresponding terminal private keys and terminal public keys. Terminal data can be data collected by the terminal device.

[0085] In step S302, the terminal device sends the terminal data encrypted text and the terminal identifier to the data operation platform.

[0086] According to embodiments of this disclosure, a terminal identifier can be used to identify a terminal device. The terminal identifier may include, for example, a terminal name, a terminal tag, a terminal ID (identification code), etc.

[0087] In step S303, the data operation platform receives the terminal data encrypted text and terminal identifier sent by the terminal device; and sends the terminal data encrypted text, terminal identifier and operator identifier to the blockchain.

[0088] According to embodiments of this disclosure, an operator identifier can be used to identify a data operation platform. On the data service platform, the operator identifier can be associated with data ownership and pricing strategies. The operator identifier may include, for example, the operator name, operator tag, operator ID, etc.

[0089] In step S304, the blockchain receives the encrypted terminal data, the terminal identifier corresponding to the encrypted terminal data, and the operator identifier sent by the data operation platform; for the encrypted terminal data, the blockchain executes the on-chain contract. The on-chain contract can be used to execute steps 3041 to 3042.

[0090] In step S3041, the on-chain contract stores the encrypted terminal data into the storage system, and obtains the data storage address of the encrypted terminal data in the storage system.

[0091] In step S3042, the on-chain contract stores relevant information of the terminal data ciphertext on the blockchain. The relevant information may include data storage address, terminal identifier, and operator identifier.

[0092] like Figure 4 The diagram shown is a flowchart illustrating another data sharing method according to an exemplary embodiment. Based on the foregoing embodiments, this embodiment describes a process for querying terminal data during data sharing, including the following steps:

[0093] In step S401, the data service platform sends a query request to the blockchain, which includes query conditions.

[0094] According to embodiments of this disclosure, query conditions may include, for example, operator identifier, data category, terminal device location, data production time range, data usage duration, price contract address, etc.

[0095] In step S402, the blockchain executes the query contract based on the query request.

[0096] The query contract can be used to execute steps S4021 to S4023.

[0097] In step S4021, the query contract retrieves data on the blockchain according to the query request to obtain the target-related information of the target data.

[0098] According to embodiments of this disclosure, the target data can be terminal data that matches the query criteria. Target-related information may include, for example, information such as the target operator identifier of the terminal data.

[0099] In step S4022, the query contract calls the price contract corresponding to the target operator's identifier. The price contract is used to calculate the data value of the target data.

[0100] According to embodiments of this disclosure, each data operation platform may use different rules to calculate data prices. Therefore, a corresponding price contract can be set up for each data operation platform to calculate the value of the data according to the platform's price calculation rules.

[0101] In step S4023, the query contract sends the target-related information and data value to the data service platform.

[0102] In step S403, the data service platform receives the target-related information and data value corresponding to the query conditions sent by the blockchain.

[0103] According to embodiments of this disclosure, a data service platform can display target-related information and data value to users who need data, who can then choose to purchase it.

[0104] According to embodiments of this disclosure, smart contracts clearly define the distribution of benefits among all parties in a transaction, allowing users to directly see their relevant earnings and confirm the transaction. Simultaneously, the data operation platform has pricing power, can revise the price contract content based on market conditions, and replace the contract address through the data service platform to ensure the interests of all parties.

[0105] The following is combined Figure 5A , Figure 5B , Figure 6 , Figure 7 The data sharing method illustrated in the embodiments of this specification will be described in detail below. It should be understood that the following are merely exemplary embodiments and do not imply that this solution cannot be applied to other scenarios.

[0106] For example, in this embodiment, the terminal device may include an intelligent connected vehicle, hereinafter referred to as a vehicle. Terminal data may include radar data, video, voice, vehicle status, vehicle operating status, in-vehicle system status, and location identifiers. The data operation platform may include the platform of the data operation company to which the intelligent connected vehicle belongs, hereinafter referred to as the operation company. The data operation company may, for example, be the automaker to which the intelligent connected vehicle belongs; correspondingly, the operator's identifier may be the automaker's identifier.

[0107] Figure 5A This is a flowchart illustrating another data sharing process according to an exemplary embodiment, showing the process of uploading data to the blockchain. Figure 5B This is a schematic diagram illustrating the flow of keys in another data sharing process according to an exemplary embodiment.

[0108] like Figure 5A and Figure 5B As shown, after the vehicle collects terminal data, the terminal data can be classified according to type, and different types of data can be encrypted separately using the terminal private key to obtain terminal data ciphertext. This ciphertext, along with tag data, is then uploaded to the vehicle manufacturer's platform. The tag data can include: vehicle identification (i.e., terminal identification), data occurrence time, and the type of information contained in the data (e.g., radar, video, voice, vehicle status, vehicle operating status, in-vehicle system status, regional identification, etc.).

[0109] After obtaining the encrypted terminal data and tag data, the vehicle manufacturer's platform can add the vehicle manufacturer's identifier (i.e., the operator's identifier) ​​to the tag data. Based on this, the tag data can include the vehicle identifier, the data occurrence time, and the type of information contained in the data. Optionally, the vehicle identifier sent by the vehicle can be the vehicle's VIN (Vehicle Identification Number). The vehicle manufacturer's platform can convert the VIN into a vehicle identifier conforming to its internal identification method. By converting the vehicle identifier, the VIN can be hidden.

[0110] Automotive platforms can use the on-chain contract LB to store encrypted terminal data and tag data on the blockchain. The LB contract can be used for:

[0111] a) After receiving the terminal data ciphertext and tag data, calculate the check value of the terminal data ciphertext.

[0112] b) Store the encrypted terminal data in an off-chain storage service and record the data storage location.

[0113] c) Add the verification value and data storage location to the tag data and store it on the blockchain. Based on this, the data stored on the blockchain can include vehicle identifier, data occurrence time, data information type, vehicle manufacturer identifier, verification value, data storage location, etc.

[0114] Figure 6 This is a flowchart illustrating another data sharing process according to an exemplary embodiment, showing a data query.

[0115] like Figure 6 As shown, data requesters can input query criteria through a data service platform and then retrieve the required data information via blockchain. For example, in this embodiment, query criteria may include: vehicle manufacturer name, data category, vehicle's geographical location, data production time range, and data usage duration.

[0116] The data service platform can determine the price contract address and vehicle manufacturer identifier of the associated vehicle manufacturer based on the vehicle manufacturer's name. It then inputs the price contract address, vehicle manufacturer identifier, and query conditions into the blockchain's query interface to invoke the query contract (LC) on the blockchain to perform the query task. For example, in this embodiment, the data input into the query interface may include: vehicle manufacturer identifier, data category, vehicle's geographical location, data production time range, data usage duration, price contract address, etc.

[0117] Contract LC can be used for:

[0118] a) Receive query requests and retrieve data information that matches the query conditions from the on-chain data.

[0119] b) Based on the price contract address, access the automaker's pricing strategy and calculate the data value. The price contract may include: the unit time price for each data type, the duration discount coefficient, and the allocation ratio between the automaker and the car owner, etc.

[0120] c) After the data value calculation is completed, all data information and data value are summarized and returned to the data service platform.

[0121] The data service platform can send returned data information to the data requester based on the data information and data value. For example, in this embodiment, the returned data information may include: the name of the car manufacturer, the total amount of data, and the estimated cost.

[0122] Data requesters can select the data they need from the returned data list and initiate transaction requests for that data.

[0123] like Figure 7 The diagram shown is a flowchart illustrating a data transaction process during data sharing, according to an exemplary embodiment. This data transaction process may include the following steps:

[0124] 1. The data requester sends a transaction request through the data service platform. The data service platform will invoke the blockchain's transaction contract LA. Contract LA can contain a fixed asymmetric key, labeled K0. The fixed private key can be labeled SK0, and the corresponding fixed public key can be labeled PK0, both embedded within the data service platform. Contract LA can be used for:

[0125] a) Generate a transaction serial number SEQ, generate a pair of temporary public and private keys PK1 (temporary public key) and SK1 (temporary private key) and a new temporary contract address.

[0126] b) Send data transaction information to the vehicle manufacturer platform corresponding to the data. The data transaction information may include the transaction serial number SEQ, the vehicle identifier corresponding to the data, the data time range, the data type, the user revenue and enterprise revenue for each vehicle, as well as the temporary public key PK1 and the new temporary contract address, etc.

[0127] c) Monitor the new temporary contract address and wait for the response.

[0128] 2. After receiving the request, the car manufacturer sends the transaction serial number (SEQ), data time range, data type, user benefits, and temporary public key to the corresponding vehicle terminal based on the vehicle identifier.

[0129] 3. After receiving the request, the user can choose to accept or reject it. If accepted, proceed to step 4; otherwise, proceed to step 6.

[0130] 4. The vehicle terminal uses the temporary public key PK1 to encrypt the terminal public key and transaction serial number SEQ generated by the vehicle terminal, marks the encrypted message as MSG1, and sends the confirmation identifier, vehicle identifier, transaction serial number SEQ and the encrypted message MSG1 to the vehicle manufacturer platform.

[0131] 5. After receiving the data sent by the vehicle terminal, the vehicle manufacturer's platform stores the data in a temporary contract address if the data contains a confirmation identifier. The stored data may include: confirmation identifier, vehicle identifier, SEQ, and MSG1. Then proceed to step 8.

[0132] 6. If the vehicle end user refuses, the rejection confirmation flag, vehicle identifier, and SEQ will be returned directly.

[0133] 7. After receiving data from the vehicle terminal, if the vehicle manufacturer's platform contains a rejection identifier, it will store this data in a temporary contract address. The stored data may include: rejection identifier, vehicle identifier, and SEQ.

[0134] 8. Contract LA can also be used for:

[0135] a) Periodically perform statistical analysis on the data stored in the new temporary contract address.

[0136] b) Once all vehicle responses have been received or the timeout period has elapsed, the monitoring will cease.

[0137] c) Decrypt the MSG1 returned by the vehicle that agreed to use the data using the temporary private key SK1 to obtain the vehicle public key and the transaction serial number SEQ.

[0138] d) Compare the obtained transaction serial number SEQ with the current business transaction serial number to determine if it is the same transaction.

[0139] e) If it is the same transaction, the relevant data on the chain is obtained based on information such as vehicle identification, time range, and data type, and the data storage address and verification code are obtained.

[0140] f) Using a fixed private key SK0, all vehicle identifiers, corresponding terminal public keys, and effective times (e.g., calculated based on data usage duration in transaction requests) are encrypted to form MSG2. This MSG2, combined with vehicle identifiers and corresponding data storage locations, is then returned to the data service platform. The data service platform settles fees based on the returned data. Contract LA can track the final fee settlement status.

[0141] like Figure 8 The diagram shown is a flowchart illustrating data usage in another data sharing process according to an exemplary embodiment. This data usage process may include the following steps:

[0142] 1. After receiving the information returned by the contract LA, the data service platform can retrieve the relevant terminal data encrypted text from the storage system according to the data storage address.

[0143] 2. When data companies use data, they can decrypt the encrypted data at the terminal. The decryption process may include, for example:

[0144] a) Use the built-in fixed public key PK0 to decrypt MSG2 and obtain data such as vehicle identifier, corresponding AK1, and data validity period.

[0145] b) Compare the data validity period with the current time. If it is within the validity period, store the vehicle identifier and the corresponding vehicle public key in memory and proceed to step c. Otherwise, stop decryption, construct an error message, and proceed to step d.

[0146] c) Decrypt the retrieved terminal data ciphertext using the vehicle identifier and corresponding vehicle public key to obtain the vehicle data. Return the vehicle data.

[0147] d) Return error message.

[0148] Optionally, a decryption API can be configured to perform the decryption process. Based on this, encrypted data on the terminal can be decrypted by calling the decryption API.

[0149] In this embodiment, the data service platform restricts the data to be displayed, analyzed, and imported into the model for training, but it cannot be stored again.

[0150] Optionally, data companies can upload training models to the data service platform and access data to perform specific training tasks.

[0151] Corresponding to the embodiments of the aforementioned methods, this specification also provides embodiments of a data sharing device and the terminal to which it is applied.

[0152] The embodiments of the data sharing device described in this specification can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by its processor reading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 9 The diagram shown is a hardware structure diagram of a computer device containing the data sharing device according to an embodiment of this specification. Except for... Figure 9 In addition to the processor 910, memory 930, network interface 920, and non-volatile memory 940 shown, the server or electronic device where the device 931 is located in the embodiment may also include other hardware depending on the actual function of the computer device, which will not be described in detail here.

[0153] like Figure 10 As shown, Figure 10This is a block diagram illustrating a data sharing device according to an exemplary embodiment, applicable to blockchain, the device comprising:

[0154] The first receiving module 1010 is used to receive transaction requests for terminal data sent by the data service platform;

[0155] The first execution module 1020 is used to execute the transaction contract according to the transaction request. The transaction contract is used for:

[0156] The key generation module 1030 is used to generate corresponding temporary public keys and temporary private keys according to the transaction request;

[0157] The first sending module 1040 sends data transaction information to the data operation platform. The data transaction information includes a temporary public key.

[0158] The second receiving module 1050 is used to receive the terminal public key ciphertext sent by the data operation platform;

[0159] The first decryption module 1060 is used to decrypt the terminal public key ciphertext using a temporary private key to obtain the terminal public key.

[0160] The first encryption module 1070 is used to encrypt the terminal public key and the data validity period of the terminal data using a temporary private key to obtain a ciphertext data packet.

[0161] The second sending module 1080 is used to send the data storage address and encrypted data packet of the terminal data to the data service platform.

[0162] Accordingly, this specification also provides a data sharing device, which includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: receive a transaction request for terminal data sent by a data service platform; execute a transaction contract according to the transaction request, the transaction contract being used to: generate corresponding temporary public keys and temporary private keys according to the transaction request; send data transaction information to the data operation platform, the data transaction information including the temporary public key; receive encrypted terminal public key sent by the data operation platform; decrypt the encrypted terminal public key using the temporary private key to obtain the terminal public key; encrypt the terminal public key and the data validity period of the terminal data using the temporary private key to obtain an encrypted data packet; and send the data storage address of the terminal data and the encrypted data packet to the data service platform.

[0163] like Figure 11 As shown, Figure 11 This is a block diagram illustrating another data sharing apparatus according to an exemplary embodiment of this specification, which can be applied to a data operation platform. The apparatus includes:

[0164] The third receiving module 1110 is used to receive data transaction information sent by the blockchain for terminal data;

[0165] The third sending module 1120 is used to send data transaction information to the terminal device;

[0166] The fourth receiving module 1130 is used to receive the terminal public key ciphertext sent by the terminal device;

[0167] The fourth sending module 1140 is used to send the terminal public key ciphertext to the blockchain.

[0168] Accordingly, this specification also provides a data sharing device, which includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: receive data transaction information for terminal data sent by the blockchain; send the data transaction information to the terminal device; receive terminal public key ciphertext sent by the terminal device; and send the terminal public key ciphertext to the blockchain.

[0169] like Figure 12 As shown, Figure 12 This is a block diagram illustrating another data sharing apparatus according to an exemplary embodiment of this specification, which can be applied to a terminal device. The apparatus includes:

[0170] The fifth receiving module 1210 is used to receive data transaction information for terminal data sent by the data operation platform. The data transaction information includes a temporary public key.

[0171] The second encryption module 1220 is used to encrypt the terminal public key using a temporary public key if the data transaction information is confirmed, so as to obtain the terminal public key ciphertext.

[0172] The fifth sending module 1230 is used to send the terminal public key ciphertext to the data operation platform.

[0173] Accordingly, this specification also provides a data sharing device, which includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: receive data transaction information for terminal data sent by a data operation platform, the data transaction information including a temporary public key; if the data transaction information is confirmed, encrypt the terminal public key using the temporary public key to obtain terminal public key ciphertext; and send the terminal public key ciphertext to the data operation platform.

[0174] like Figure 13 As shown, Figure 13 This is a block diagram illustrating another data sharing apparatus according to an exemplary embodiment of this specification, which can be applied to a data service platform. The apparatus includes:

[0175] The sixth sending module 1310 is used to send transaction requests for terminal data to the blockchain;

[0176] The sixth receiving module 1320 is used to receive the data storage address and encrypted data packet sent by the blockchain;

[0177] The acquisition module 1330 is used to acquire terminal data ciphertext based on the data storage address;

[0178] The second decryption module 1340 is used to decrypt the encrypted data packet using a fixed public key to obtain the data validity period and the terminal public key.

[0179] The third decryption module 1350 is used to decrypt the terminal data ciphertext using the terminal public key to obtain the terminal data.

[0180] The data processing module 1360 is used to provide application services using terminal data within the valid data duration.

[0181] Accordingly, this specification also provides a data sharing device, which includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: send a transaction request for terminal data to a blockchain; receive a data storage address and a encrypted data packet sent by the blockchain; obtain the encrypted terminal data according to the data storage address; decrypt the encrypted data packet using a temporary public key to obtain the data validity period and the terminal public key; decrypt the encrypted terminal data using the terminal public key to obtain the terminal data; and provide application services using the terminal data within the data validity period.

[0182] According to embodiments of this disclosure, the terminal device encrypts its own terminal data using its private key, ensuring that the terminal data can only be decrypted using its own public key. The public key used for decryption is stored only within the terminal device. The data stored on the data operation platform and in the blockchain is encrypted with a temporary key, preventing external access to the actual information. This improves data security. Secondly, during data transactions, a temporary public key generated by the transaction contract is used to encrypt and transmit the terminal public key, ensuring that the data operation platform cannot obtain the terminal public key during transmission. Furthermore, the terminal data is decrypted using the temporary private key and re-encrypted using a fixed private key before being sent to the data service platform for processing. The data service platform only retains the fixed public key of the transaction contract; the terminal public key resides only in memory, maximizing the security of the terminal key and protecting the user's ownership rights to the terminal data throughout the entire transaction chain.

[0183] According to embodiments of this disclosure, encryption combines the terminal public key with the data validity period, giving the terminal public key an expiration period. When the data service platform decrypts data using a built-in fixed private key, it can verify the data validity period during a single decryption process. If the time exceeds the validity period, it returns a failure; otherwise, it uses the public key to decrypt and use the data. Therefore, the data service platform only focuses on data usage and access control, without needing to concern itself with transaction information.

[0184] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0185] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this specification according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0186] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0187] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.

[0188] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.

[0189] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A data sharing method applied to blockchain, characterized in that, The method includes: The system receives transaction requests for terminal data sent by a data service platform. The terminal data is encrypted by the terminal device using the terminal's private key and then uploaded to the blockchain, and stored in the storage system via the blockchain. Based on the transaction request, the transaction contract is executed, and the transaction contract is used for: Based on the transaction request, generate corresponding temporary public and private keys; Send data transaction information to the data operation platform so that the data operation platform sends the data transaction information to the terminal device corresponding to the terminal data, wherein the data transaction information includes the temporary public key; The system receives the terminal public key ciphertext sent by the data operation platform. The terminal public key ciphertext is received by the data operation platform from the terminal device. The terminal public key ciphertext is obtained by the terminal device encrypting the terminal public key based on the temporary public key after confirming the data transaction information. The terminal public key is obtained by decrypting the ciphertext of the terminal public key using the temporary private key; The terminal public key and the data validity period of the terminal data are encrypted using a fixed private key to obtain a ciphertext data packet; The data storage address of the terminal data and the encrypted data packet are sent to the data service platform.

2. The method according to claim 1, characterized in that, The method further includes: Receive terminal data ciphertext, terminal identifier, and operator identifier sent by the data operation platform; For the encrypted terminal data, execute the on-chain contract, which is used for: The terminal data ciphertext is stored in the storage system to obtain the data storage address of the terminal data ciphertext in the storage system; The relevant information of the terminal data ciphertext is stored on the blockchain, including the data storage address, the terminal identifier, and the operator identifier.

3. The method according to claim 2, characterized in that, The method further includes: Receive a query request sent by the data service platform, the query request including query conditions; Based on the query request, the query contract is executed, and the query contract is used for: Based on the query request, data on the blockchain is retrieved to obtain target-related information of the target data, including the target operator identifier; Invoke the price contract corresponding to the target operator's identifier, the price contract being used to calculate the data value of the target data; The target-related information and the data value are sent to the data service platform.

4. A data sharing method applied to a data operation platform, characterized in that, The method includes: The blockchain receives data transaction information for terminal data sent by the blockchain. The data transaction information is sent by the blockchain to the data operation platform after receiving a transaction request for the terminal data sent by the data service platform. The data transaction information includes a temporary public key, which is generated by the blockchain executing a transaction contract based on the transaction request. The data transaction information is sent to the terminal device corresponding to the terminal data. The terminal device receives the terminal public key ciphertext sent by the terminal device, wherein the terminal public key ciphertext is obtained by the terminal device encrypting the terminal public key based on the temporary public key after confirming the data transaction information; Send the encrypted public key of the terminal to the blockchain.

5. The method according to claim 4, characterized in that, The method further includes: The terminal device receives terminal data ciphertext and terminal identifier sent by the terminal device, wherein the terminal data ciphertext is obtained by encrypting the terminal data; The encrypted terminal data, the terminal identifier, and the operator identifier of the data operation platform are sent to the blockchain.

6. A data sharing method applied to a terminal device, characterized in that, The method includes: The system receives data transaction information for terminal data sent by a data operation platform. The data transaction information includes a temporary public key, which is generated by the blockchain after receiving the transaction request and executing a transaction contract according to the transaction request. The transaction request is a transaction request for the terminal data sent by the data service platform. If the data transaction information is confirmed, the terminal public key is encrypted using the temporary public key to obtain the terminal public key ciphertext. The terminal public key ciphertext is sent to the data operation platform.

7. The method according to claim 6, characterized in that, The method further includes: The terminal data is encrypted using the terminal's private key to obtain the terminal data ciphertext; The encrypted terminal data and terminal identifier are sent to the data operation platform.

8. A data sharing method applied to a data service platform, characterized in that, The method includes: Send a transaction request for terminal data to the blockchain; The system receives a data storage address and encrypted data packet sent by the blockchain. The encrypted data packet is obtained by the blockchain encrypting the terminal public key and the data validity period of the terminal data based on a fixed private key. The terminal public key is obtained by the blockchain decrypting the encrypted terminal public key using a temporary private key. The encrypted terminal public key is obtained by the terminal device encrypting the terminal public key based on a temporary public key after confirming the data transaction information, and then sending it to the blockchain. The data transaction information includes a temporary public key, which is generated by the blockchain executing a transaction contract according to the transaction request after receiving the transaction request. Based on the data storage address, obtain the terminal data ciphertext; The encrypted data packet is decrypted using a fixed public key to obtain the data validity period and the terminal public key; Using the terminal public key, the terminal data ciphertext is decrypted to obtain the terminal data. During the validity period of the data, application services are provided using the terminal data.

9. The method according to claim 8, characterized in that, The method further includes: Send a query request to the blockchain, the query request including query conditions; Receive the target-related information and data value corresponding to the query conditions sent by the blockchain.

10. A data sharing device applied to blockchain, characterized in that, The device includes: The first receiving module is used to receive transaction requests for terminal data sent by the data service platform. The terminal data is encrypted by the terminal device using the terminal private key and uploaded to the blockchain, and then stored in the storage system through the blockchain. The first execution module is configured to execute a transaction contract based on the transaction request, wherein the transaction contract is used for: The key generation module is used to generate a corresponding temporary public key and a temporary private key based on the transaction request. The first sending module sends data transaction information to the data operation platform, so that the data operation platform sends the data transaction information to the terminal device corresponding to the terminal data, and the data transaction information includes the temporary public key; The second receiving module is used to receive the terminal public key ciphertext sent by the data operation platform. The terminal public key ciphertext is received by the data operation platform from the terminal device. The terminal public key ciphertext is obtained by the terminal device encrypting the terminal public key based on the temporary public key after confirming the data transaction information. The first decryption module is used to decrypt the terminal public key ciphertext using the temporary private key to obtain the terminal public key; The first encryption module is used to encrypt the terminal public key and the data validity period of the terminal data using a fixed private key to obtain a ciphertext data packet. The second sending module is used to send the data storage address of the terminal data and the encrypted data packet to the data service platform.

11. A data sharing device, applied to a data operation platform, characterized in that, The device includes: The third receiving module is used to receive data transaction information for terminal data sent by the blockchain. The data transaction information is sent by the blockchain to the data operation platform after receiving a transaction request for the terminal data sent by the data service platform. The data transaction information includes a temporary public key, which is generated by the blockchain executing a transaction contract based on the transaction request. The third sending module is used to send the data transaction information to the terminal device corresponding to the terminal data; The fourth receiving module is used to receive the terminal public key ciphertext sent by the terminal device, wherein the terminal public key ciphertext is obtained by the terminal device encrypting the terminal public key based on the temporary public key after confirming the data transaction information; The fourth sending module is used to send the encrypted public key of the terminal to the blockchain.

12. A data sharing device, applied to a terminal device, characterized in that, The device includes: The fifth receiving module is used to receive data transaction information for terminal data sent by the data operation platform. The data transaction information includes a temporary public key, which is generated by the blockchain after receiving the transaction request and executing the transaction contract according to the transaction request. The transaction request is a transaction request for the terminal data sent by the data service platform. The second encryption module is used to encrypt the terminal public key using the temporary public key if the data transaction information is confirmed, to obtain the terminal public key ciphertext. The fifth sending module is used to send the encrypted public key of the terminal to the data operation platform.

13. A data sharing device, applied to a data service platform, characterized in that, The device includes: The sixth sending module is used to send transaction requests for terminal data to the blockchain; The sixth receiving module is used to receive the data storage address and encrypted data packet sent by the blockchain. The encrypted data packet is obtained by the blockchain encrypting the terminal public key based on a fixed private key and the data validity period of the terminal data. The terminal public key is obtained by the blockchain decrypting the encrypted terminal public key using a temporary private key. The encrypted terminal public key is obtained by the terminal device encrypting the terminal public key based on a temporary public key after confirming the data transaction information, and then sending it to the blockchain. The data transaction information includes a temporary public key, which is generated by the blockchain executing a transaction contract according to the transaction request after receiving the transaction request. The acquisition module is used to acquire terminal data ciphertext based on the data storage address; The second decryption module is used to decrypt the encrypted data packet using a fixed public key to obtain the data validity period and the terminal public key. The third decryption module is used to decrypt the terminal data ciphertext using the terminal public key to obtain the terminal data. The data processing module is used to provide application services using the terminal data within the valid duration of the data.

Citation Information

Patent Citations

  • Address generation method, block chain information processing method and related equipment

    CN114531224A

  • Identity authentication method and device, equipment and storage medium

    CN115150071A