CN114238520A - Data sharing method and device - Google Patents

Data sharing method and device Download PDF

Info

Publication number
CN114238520A
CN114238520A CN202111675854.6A CN202111675854A CN114238520A CN 114238520 A CN114238520 A CN 114238520A CN 202111675854 A CN202111675854 A CN 202111675854A CN 114238520 A CN114238520 A CN 114238520A
Authority
CN
China
Prior art keywords
data
node
shared data
downloading
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111675854.6A
Other languages
Chinese (zh)
Inventor
陈武辉
梁峻源
郑子彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202111675854.6A priority Critical patent/CN114238520A/en
Publication of CN114238520A publication Critical patent/CN114238520A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Automation & Control Theory (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data sharing method and a device, wherein the method comprises the following steps: the method comprises the steps of storing shared data to be shared and basic information of the shared data locally, synchronizing the basic information of the shared data to other nodes of a block chain for the other nodes to search and initiate downloading, receiving an instruction which is sent by other nodes and requests for downloading the shared data, wherein the instruction comprises identity authentication information of the node sending a downloading request, performing identity authentication on the node sending the downloading request through the identity authentication information, and sending the shared data to the node sending the downloading request if the identity authentication is passed. Therefore, compared with a data sharing mode of cloud storage, shared data do not need to be uploaded to a centralized server or downloaded from the centralized server, the shared data can be inquired, the shared data can be downloaded only through data transmission among nodes, and data sharing efficiency and sharing flexibility are improved.

Description

Data sharing method and device
Technical Field
The present application relates to the field of block chaining technologies, and in particular, to a method and an apparatus for data sharing.
Background
With the development of internet technology, a large amount of data is flooded into the whole internet, and the world enters a 'big data age'. However, the big data also brings inevitable problems, such as data security problem, data privacy problem, data copyright problem, etc., which finally results in the problem of "information islanding" and the problem that data sharers are not willing to share high quality data.
Data sharing based on cloud storage is an effective scheme for solving the problem of information island, a data owner can store data in the cloud, the data are shared through the cloud, and a user can access the data through a cloud center, so that the purpose of data sharing is achieved.
However, since the shared data stored in the cloud is all stored in the centralized cloud, the performance of data sharing completely depends on the cloud center, so that the data sharing efficiency is low, and the sharing flexibility is poor.
Disclosure of Invention
In view of the foregoing problems, the present application is provided to provide a data sharing method and apparatus, so as to improve data sharing efficiency and sharing flexibility.
In order to achieve the above object, the following specific solutions are proposed:
a method of data sharing, comprising:
storing shared data to be shared and basic information of the shared data locally, and synchronizing the basic information of the shared data to other nodes of a block chain for the other nodes to search and initiate downloading;
receiving an instruction which is sent by other nodes and requests to download the shared data, wherein the instruction which requests to download the shared data comprises: sending identity authentication information of the node of the downloading request;
performing identity authentication on the node sending the downloading request through the identity authentication information;
and if the shared data passes the identity authentication, sending the shared data to the node sending the downloading request.
Optionally, the method further includes:
receiving an instruction which is sent by a node outside a block chain and requests to join the block chain, wherein the instruction comprises a public key of the node and an identity signature of the node;
verifying the identity signature by the public key;
if the verification is passed, a vote is cast to the node and local voting information is sent to other nodes of the block chain;
receiving voting information sent by other nodes of the block chain;
if the counted number of the tickets of the node is not less than the preset proportional value of the number of the nodes of the block chain, sending information for agreeing the node to join the block chain to the node;
and receiving the identity information sent by the node and storing the identity information in the local.
Optionally, after synchronizing the basic information of the shared data to other nodes of the block chain, the method further includes:
generating a copyright number of the shared data through a private key generated when the shared data is added to a block chain, basic information of the shared data and local identity information so as to be used for verifying the copyright number through a public key when a node of the block chain downloads the copyright number, wherein the public key is generated when the node is added to the block chain and is sent to other nodes of the block chain.
Optionally, after synchronizing the basic information of the shared data to other nodes of the block chain, the method further includes:
adding the local account point and the reward point obtained by uploading the basic information of the shared data to obtain the added local account point, and storing the change details of the local account point locally;
after sending the shared data to the node sending the download request, the method further includes:
and adding the local account point and the point required to be paid for downloading the shared data to obtain the increased local account point, and storing the change details of the local account point locally.
Optionally, the method further includes:
responding to the operation of inquiring the basic information of the shared data by the user, and determining target download data;
if the authority for downloading the target download data exists, generating an address for requesting to download the target data by using a locally stored network address of a node providing the target download data and basic information of the target download data;
sending an instruction for requesting to download the target download data to a node providing the target download data through the address, wherein the instruction for requesting to download the target download data comprises local identity authentication information;
and after the node receiving the target download data passes the authentication of the local identity authentication information, the node sends the target download data.
Optionally, the method further includes:
if the authority for downloading the target download data does not exist, and the local account integral is not less than the integral required to be paid by the target download data, acquiring the authority for downloading the target download data;
generating an address for requesting downloading of target data by using a locally stored network address of a node providing the target download data and basic information of the target download data;
sending an instruction for requesting to download the target download data to a node providing the target download data through the address, wherein the instruction for requesting to download the target download data comprises local identity authentication information;
after the node receiving the target download data passes the authentication of the local identity authentication information, the node sends the target download data;
and subtracting the credit required to be paid for downloading the target download data from the local account credit to obtain the subtracted local account credit, and storing the change details of the local account credit locally.
Optionally, after the node receiving the target download data passes the authentication of the local identity authentication information based on the local identity authentication information, the method further includes:
and storing the record for downloading the target download data in a local place.
Optionally, after the node receiving the target download data passes the authentication of the local identity authentication information based on the local identity authentication information, the method further includes:
and responding to the operation of a user for scoring the target download data, determining a scoring result of the target download data, and storing the scoring result in the basic information of the target download data.
Optionally, the method further includes:
and if the authority for downloading the target download data does not exist, and the local account point is smaller than the point required to be paid by the target download data, responding to the operation that the user requests point recharging to the administrator, adding the local account point to obtain the recharged point, and storing the change details of the local account point locally.
A data sharing apparatus, comprising:
the local data storage module is used for storing shared data to be shared;
the data sharing management module is used for storing basic information of shared data;
the data consensus and synchronization module is used for synchronizing the basic information of the shared data to other nodes of the block chain so as to search and initiate downloading by the other nodes;
a data message receiving and sending module, configured to receive an instruction requesting to download the shared data sent by another node, where the instruction requesting to download the shared data includes: and sending the identity authentication information of the node sending the downloading request, and if the identity authentication is passed, sending the shared data to the node sending the downloading request.
Optionally, the data message transceiver module is further configured to:
receiving an instruction which is sent by a node outside a block chain and requests to join the block chain, wherein the instruction comprises a public key of the node and an identity signature of the node;
if the identity signature passes the verification of the public key, casting a vote to the node and sending local voting information to other nodes of the block chain;
receiving voting information sent by other nodes of the block chain;
if the counted number of the tickets of the node is not less than the preset proportional value of the number of the nodes of the block chain, sending information for agreeing the node to join the block chain to the node;
and receiving the identity information sent by the node.
Optionally, the apparatus further comprises:
and the block chain member management module is used for verifying the identity signature through the public key.
Optionally, the apparatus further comprises:
and the identity authentication and management module is used for storing the identity information sent by the node after receiving the identity information sent by the node.
Optionally, the data sharing management module is further configured to:
after synchronizing the basic information of the shared data to other nodes of the blockchain, storing a copyright number of the shared data generated by a private key generated when joining the blockchain, the basic information of the shared data, and local identity information.
Optionally, the apparatus further comprises:
and the evaluation and excitation module is used for adding the local account point and the reward point obtained by uploading the basic information of the shared data after synchronizing the basic information of the shared data to other nodes of the block chain to obtain an added local account point, adding the local account point and the point required to be paid for downloading the shared data after sending the shared data to the node sending the downloading request to obtain an added local account point, and storing the change details of the local account point.
Optionally, the data sharing management module is further configured to:
responding to the operation of inquiring the basic information of the shared data by the user, and determining target download data;
and if the authority for downloading the target download data exists, providing the network address of the node of the target download data and the basic information of the target download data, and generating an address for requesting to download the target data.
Optionally, the identity authentication and management module is further configured to:
and if the authority for downloading the target download data does not exist and the local account integral is not less than the integral required to be paid by the target download data, acquiring the authority for downloading the target download data.
Optionally, the evaluation and excitation module is further configured to:
and subtracting the credit required to be paid for downloading the target download data from the local account credit to obtain the subtracted local account credit, and storing the change details of the local account credit.
Optionally, the data message transceiver module is further configured to:
sending an instruction for requesting to download the target download data to a node providing the target download data through the address, wherein the instruction for requesting to download the target download data comprises local identity authentication information;
and after the node receiving the target download data passes the authentication of the local identity authentication information, the node sends the target download data.
Optionally, the apparatus further comprises:
and the log management module is used for storing the record of downloading the target downloading data.
Optionally, the evaluation and excitation module is further configured to:
and responding to the operation of the user for grading the target download data, and determining the grading result of the target download data.
Optionally, the data sharing management module is further configured to:
and storing the scoring result in basic information of the target download data.
Optionally, the evaluation and excitation module is further configured to:
and if the authority for downloading the target download data does not exist, and the local account point is smaller than the point required to be paid by the target download data, responding to the operation that the user requests point recharging to the administrator, adding the local account point to obtain the recharged point, and storing the change details of the local account point.
By means of the technical scheme, the shared data needing to be shared are stored in the local data storage module, the basic information of the shared data is uploaded to the data sharing management module so as to be searched and downloaded by members of a block chain, the information of requesting to download the shared data sent by a data downloading node is received, and the information of requesting to download the shared data comprises: and the identity authentication information of the data downloading node authenticates the identity of the data downloading node through the identity authentication information, and if the identity authentication information passes the identity authentication, the shared data is sent to the data downloading node. Therefore, compared with a data sharing mode of cloud storage, members of the block chain do not need to upload shared data to a centralized server or download the shared data from the centralized server, the members of the block chain can inquire the shared data, and only data transmission among nodes is needed when the shared data is downloaded, so that the data sharing efficiency and the sharing flexibility are improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flowchart of a data sharing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a method for downloading shared data according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data sharing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data sharing device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The scheme can be realized based on a terminal with data processing capacity, and the terminal can be a mobile phone, a computer and the like.
Next, as described in conjunction with fig. 1, a method for sharing data provided in an embodiment of the present application may include the following steps:
step S110, storing the shared data to be shared and the basic information of the shared data locally, and synchronizing the basic information of the shared data to other nodes of the block chain for the other nodes to search and initiate downloading.
Specifically, the basic information of the shared data may include: the account name and account address of the owner of the shared data, the abstract of the shared data, copyright information of the shared data, the data type of the shared data, and the like. The locally stored shared data itself cannot be synchronized to other nodes of the blockchain, but users of other nodes of the blockchain can find basic information of the shared data by locally inputting query information.
The query information may include a data name, a data owner, a data keyword, and the like. And if the query result is that the data information exists, displaying all the queried data information, otherwise, displaying a prompt word that the query result is empty.
Step S120, receiving an instruction for requesting to download the shared data sent by other nodes, where the instruction for requesting to download the shared data includes: and sending the identity authentication information of the node of the downloading request.
Specifically, when other nodes of the blockchain need to download the shared data, a download request instruction may be sent according to the account address of the owner in the basic information of the shared data.
The identity authentication information may include an account name, an account address, and an identity signature. When each node joins the block chain, a public key and a private key can be generated, the public key is sent to other nodes of the block chain so as to be used for identity verification during data transaction between the nodes, and the private key can be stored locally so as to be used for generating an identity signature.
Step S130, performing identity authentication on the node sending the download request through the identity authentication information.
Specifically, the identity signature of the node sending the download request may be verified by the public key of the node sending the download request.
Besides, whether the state of the node sending the downloading request is normal or not and whether the account name and the account address are correct or not can be detected, and if one detection item is abnormal or fails, the identity verification is not passed.
Step S140, if the identity authentication is passed, sending the shared data to the node sending the download request.
Specifically, when the node sending the download request passes the authentication, the shared data may be transmitted to the node sending the download request.
In addition, when the node sending the download request fails to authenticate, the information of failing authentication can be synchronized to other nodes of the block chain to inform the node of potential danger. The other nodes of the block chain can perform identity authentication on all the nodes sending the download request, and if more than half of the block chain link points fail to authenticate the nodes sending the download request, the other nodes of the block chain locally remove the relevant information of the nodes sending the download request, namely move the nodes out of the block chain.
The data sharing method provided by the embodiment of the application can upload the basic information of the shared data to the data sharing management module by storing the shared data to be shared in the local data storage module, so that the members of the block chain can search and initiate downloading, and receive the information of requesting to download the shared data sent by the data downloading node, wherein the information of requesting to download the shared data comprises: and the identity authentication information of the data downloading node authenticates the identity of the data downloading node through the identity authentication information, and if the identity authentication information passes the identity authentication, the shared data is sent to the data downloading node. Therefore, compared with a data sharing mode of cloud storage, members of the block chain do not need to upload shared data to a centralized server or download the shared data from the centralized server, the members of the block chain can inquire the shared data, and only data transmission among nodes is needed when the shared data is downloaded, so that the data sharing efficiency and the sharing flexibility are improved.
In some embodiments of the present application, in view of encouraging more nodes in the blockchain to share data and providing rewards for data sharing parties, after the step S110 of synchronizing the basic information of the shared data to other nodes in the blockchain, a process of rewarding points for the account of the node sharing data is provided, and the process may include the following steps:
and adding the local account point and the reward point obtained by uploading the basic information of the shared data to obtain the added local account point, and storing the change details of the local account point locally.
The points can be used for downloading the shared data, and the points can be rewarded for the nodes for storing the shared data in order to improve the capability of the nodes for providing the shared data to download more shared data. The change details of each node account credit may be stored locally and may be synchronized to other nodes of the blockchain.
Specifically, the reward points obtained by uploading the basic information of the shared data can be determined according to the data amount of the stored shared data. For example, the stored sharing data is greater than 10000 words but not greater than 20000 words, the bonus point may be 1 point, the stored sharing data is greater than 20000 words but not greater than 30000 words, the bonus point may be 2 points, the stored sharing data is greater than 30000 words, and the bonus point may be 3 points.
Considering that the other nodes of the blockchain need to deduct the cost required for downloading the shared data from the account of the downloading party for downloading the shared data stored locally, and provide the cost for the sharing party, after the step S140 of the above embodiment, the process of sending the shared data to the node sending the download request, the following steps may be further included:
and adding the local account point and the point required to be paid for downloading the shared data to obtain the increased local account point, and storing the change details of the local account point locally.
It will be appreciated that the credits earned by the nodes sharing the data may be the credits paid by the downloader for downloading the shared data. The downloading of the shared data by the downloading party needs to pay the downloading cost in the basic information of the shared data, wherein the downloading cost can be defined according to the data volume of the shared data and can also be customized by a user. For example, if the credit of the account of the downloading party is 10 points, the credit required to be paid for the data to be downloaded is 9 points, the data to be downloaded may be downloaded, and the credit required to be paid is deducted, the credit of the account is 1 point, the downloaded data is the shared data stored locally in the local account, and the credit of the local account is 20 points, after the shared data is sent to the downloading party, the credit required to be paid for downloading the shared data is 9 points, and the credit of the account is 29 points.
In the embodiment provided by the application, reward points can be issued to the nodes sharing data, more nodes in the block chain are encouraged to share data, and a transaction can be generated between the nodes downloading the shared data and the nodes providing the shared data, so that the sharing and downloading operations of the block chain can be performed in order.
In some embodiments of the present application, considering that after uploading shared data, a node of a blockchain needs to download the shared data, the present application provides another data sharing method, which is described in conjunction with fig. 2, and introduces a process of downloading the shared data, where the process may include the following steps:
step S201, responding to the operation of querying the basic information of the shared data by the user, and determining the target download data.
It can be understood that the basic information of the shared information stored in each node of the blockchain can be synchronized to other nodes, so that the node user can query the basic information of the shared information of all the nodes by using query options such as data names, data owners, data keywords and the like to obtain the basic information of the shared information meeting query conditions, and determine target download data based on the queried basic information.
Step S202, judging whether the authority for downloading the target download data exists, if so, executing step S206, and if not, executing step S203.
It will be appreciated that the node user has already gained permission to download the data on the first download and therefore also has permission to download the target download data the second or more times.
Step S203, determining whether the local account score is not less than the score required by the target download data, if so, executing step S205, and if not, executing step S204.
Specifically, if the authority for downloading the target download data does not exist, whether the local account point is not smaller than the point required by the target download data is judged, that is, whether the local account point can deduct the point required by the target download data is detected.
And step S204, responding to the operation that the user requests the administrator for point recharging, adding the local account points to obtain the recharged points, and storing the change details of the local account points in the local area.
Specifically, if it is determined that the local account score is not sufficient to deduct the score required by the target download data, the operation of requesting the administrator for the score recharging by the node user may be responded, the local account score may be added to obtain the recharged score, and the change details of the local account score may be stored locally. When the local account points are charged enough to deduct the points needed by the target download data, the authority of downloading the target download data can be obtained.
And step S205, acquiring the permission of downloading the target download data.
Specifically, when the local account point is enough to deduct the point paid by the target download data, which indicates that the target download data can be downloaded locally, the authority for downloading the target download data is obtained.
Step S206, generating an address for requesting to download the target data according to the locally stored network address of the node providing the target download data and the basic information of the target download data.
The network address of a node of the blockchain may be synchronized to other nodes of the blockchain when the node joins the blockchain. The address used to request download of the target data may be a url (uniform resource locator) address.
It can be understood that the nodes can communicate only when knowing the network address of the node of the other party, and the basic information of the target download data does not include the address of the target download data, so that the nodes can communicate and initiate the download request by acquiring the network address of the node of the target download data.
Step S207, sending a command requesting to download the target download data to a node providing the target download data through the address, where the command requesting to download the target download data includes local identity authentication information.
In consideration of the security of data transmission, the node providing the shared data needs to perform authentication on the node requesting to download the shared data, and therefore, each time the shared data is requested to be downloaded, local authentication information needs to be sent to the other side.
And step S208, after the node receiving the target download data passes the authentication of the local identity authentication information, the target download data is sent.
Specifically, after the node providing the shared data passes the authentication of the local identity authentication information, the shared data is sent to the node requesting to download the shared data, so that the node capable of receiving the target download data sends the target download data after passing the authentication of the local identity authentication information.
And S209, subtracting the integral required for downloading the target download data from the local account integral to obtain the subtracted local account integral, and storing the change details of the local account integral in the local.
It can be understood that, after receiving the target download data requested to be downloaded, the node needs to pay the data provider for downloading the data, and the change of the local account credit is a process of subtracting the credit required for downloading the target download data from the original account credit and finally obtaining the subtracted local account credit. The change statement of the local account point includes basic information of the target download data in addition to the change of the local account point.
And step S210, storing the record for downloading the target download data in a local area.
Specifically, the recording of the target download data may include: data provider and node address, data downloader and node address, data copyright number, download time, basic information of data, and credit paid for downloading the data.
In addition, the recording of the target download data may be synchronized to other nodes of the blockchain.
In the embodiment provided by the application, shared data in the block chain can be inquired, after target download data is determined, a download request is initiated to a node of the block chain, the request is not made to a centralized server, when a data storage party fails or cannot send data, the block chain is only incapable of being operated by a single node, data sharing among other nodes is not influenced, and data sharing efficiency and sharing flexibility are improved.
In some embodiments of the present application, considering that, in order to improve the data quality of shared data, a node user may evaluate the quality of the data after using the downloaded data for reference by other node users of the blockchain, the present application provides another data sharing method, which introduces a process of determining a score of the shared data, and the process may include the following steps:
and responding to the operation of a user for scoring the target download data, determining a scoring result of the target download data, and storing the scoring result in the basic information of the target download data.
Specifically, before the node user scores the target download data, it may be verified whether the node user qualifies for scoring the data, and the verification passing condition may be: the node user has the right to download the target download data and has the change details of the integral corresponding to the download target download data.
For example, the node user may score the target download data by 10 points, 0 point may indicate the worst quality, 10 points may indicate the best quality, the score result of the target download data may be 10 points, the score result is fed back to the basic information of the target download data, other node users may sort based on the score result, and the data with high score may be specially displayed.
In the embodiment provided by the application, a function of scoring data can be provided for the node user, so that the node user can score the data, and the data with high score can attract more node users to download, so that the node providing the shared data can be stimulated to share the data with higher quality.
In some embodiments of the present application, considering that a node of a blockchain performs data sharing on the premise that a node that becomes a blockchain joins the blockchain to become a member node of the blockchain, the present application provides another data sharing method, which introduces a process of joining a new member of the blockchain, where the process may include the following steps:
s1, receiving an instruction which is sent by a node outside the block chain and requests to join the block chain, wherein the instruction comprises the public key of the node and the identity signature of the node.
Specifically, when a node outside the blockchain has a request for joining the blockchain, an instruction for requesting to join the blockchain may be sent to all member nodes of the blockchain, so that the member nodes of the blockchain perform identity verification on the node requesting to join.
And S2, verifying the identity signature through the public key.
The public key received by the member node of the block chain is temporarily stored locally, and the identity signature of the node requesting to join can be verified. If the node requesting to join finally becomes a member node of the block chain, the public key can be permanently stored locally, and if the node requesting to join finally cannot become a member node of the block chain, the member node of each block chain can delete the temporarily stored public key so as to reduce the pressure of public key storage.
And S3, if the verification is passed, casting a vote to the node and sending local voting information to other nodes of the block chain.
Specifically, when the result of verifying the identity signature by the public key is that the verification is passed, a ticket may be posted to the node, and a message that the local verification is passed may be notified to other nodes of the block chain.
Besides, when the result of verifying the identity signature by the public key is that the verification fails, no information needs to be sent to other nodes of the block chain.
And S4, receiving the voting information sent by other nodes of the block chain.
It can be understood that when the local authentication is passed, the local voting information may be sent to other nodes of the blockchain, and then if the other nodes of the blockchain are also passed, the local voting information that the other nodes of the blockchain pass the authentication may also be sent to other nodes of the blockchain, so that the voting information sent by other nodes of the blockchain may be received locally.
And S5, if the counted number of the tickets of the node is not less than the preset proportional value of the number of the nodes of the block chain, sending information agreeing to the node to join the block chain to the node.
Specifically, the preset proportion value may be two thirds, and when the obtained votes of the nodes are not less than the preset proportion value of the number of nodes of the block chain, it indicates that most of the nodes in the block chain agree to the node requesting to join in the block chain, and may send information agreeing to the node to join in the block chain to the node.
Wherein the information agreeing to the node to join the blockchain comprises a certificate to join the blockchain. The newly joined node may store the certificate locally.
For example, a block chain-based government affair information sharing system may have three departments, and a department a outside the system initiates a join request to the system, and at least two departments in the system need to be authenticated to obtain access to the system and become the department of the system.
In addition, if the obtained votes of the nodes are smaller than the preset proportional value of the node numbers of the block chain, the fact that more member nodes in the block chain do not agree with the node which requests to join the block chain is indicated, information which does not agree with the node to join the block chain can be sent to the node, and the temporarily stored public key is deleted.
And S6, receiving the identity information sent by the node and storing the identity information in the local.
Specifically, after a new node joins the block chain, the node may store its identity information and synchronously send its identity information to other nodes of the block chain. Therefore, the identity information sent by the newly-added node can be received and stored locally.
In the embodiment provided by the application, the verification of the node requesting to join the blockchain outside the blockchain can be performed through each node of the blockchain, and whether the node is allowed to join is jointly determined in a voting mode, so that decentralized member management is realized, and the fairness and the flexibility of member management are improved.
Furthermore, the member nodes of the blockchain have the function of allowing other nodes to join the blockchain, so that more and more node members of the blockchain are provided, and more shared data is provided for the member nodes of each blockchain.
In some embodiments of the present application, in view of security of downloaded data, when a node user downloads shared data, it needs to verify a source of the shared data, and after the process of synchronizing basic information of the shared data to other nodes of a blockchain in step S110 of the above embodiments, a process of generating a copyright number for the shared data is provided, where the process may include the following steps:
and generating the copyright number of the shared data through a private key generated when the block chain is added, the basic information of the shared data and the local identity information.
Where the copyright number is a unique identification for each shared data.
Specifically, when the node of the block chain needs to be downloaded, the copyright number may be verified through a public key, where the public key is generated when the node joins the block chain and is sent to other nodes of the block chain.
It can be understood that the shared data stored locally only trusts the local node, and if the shared data is tampered by the non-local node, the copyright number is regenerated, and the verification of the regenerated copyright number by the public key cannot be passed, so that the downloading operation is terminated.
In the embodiment provided by the application, the copyright number can be generated for the stored shared data, so that when a downloading party downloads the shared data, the downloaded data can be ensured to be safe and reliable.
The following describes a data sharing apparatus provided in an embodiment of the present application, and the data sharing apparatus described below and the data sharing method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a data sharing apparatus disclosed in the embodiment of the present application.
As shown in fig. 3, the apparatus may include:
the local data storage module 11 is used for storing shared data to be shared;
the data sharing management module 12 is used for storing basic information of shared data;
a data consensus and synchronization module 13, configured to synchronize the basic information of the shared data to other nodes of the block chain, so that the other nodes search and initiate downloading;
a data message transceiver module 14, configured to receive an instruction requesting to download the shared data sent by another node, where the instruction requesting to download the shared data includes: and sending the identity authentication information of the node sending the downloading request, and if the identity authentication is passed, sending the shared data to the node sending the downloading request.
Optionally, the data messaging module 14 is further configured to:
receiving an instruction which is sent by a node outside a block chain and requests to join the block chain, wherein the instruction comprises a public key of the node and an identity signature of the node;
if the identity signature passes the verification of the public key, casting a vote to the node and sending local voting information to other nodes of the block chain;
receiving voting information sent by other nodes of the block chain;
if the counted number of the tickets of the node is not less than the preset proportional value of the number of the nodes of the block chain, sending information for agreeing the node to join the block chain to the node;
and receiving the identity information sent by the node.
Optionally, the apparatus further comprises:
and the block chain member management module is used for verifying the identity signature through the public key.
Optionally, the apparatus further comprises:
and the identity authentication and management module is used for storing the identity information sent by the node after receiving the identity information sent by the node.
Optionally, the data sharing management module 12 is further configured to:
after synchronizing the basic information of the shared data to other nodes of the blockchain, storing a copyright number of the shared data generated by a private key generated when joining the blockchain, the basic information of the shared data, and local identity information.
Optionally, the apparatus further comprises:
and the evaluation and excitation module is used for adding the local account point and the reward point obtained by uploading the basic information of the shared data after synchronizing the basic information of the shared data to other nodes of the block chain to obtain an added local account point, adding the local account point and the point required to be paid for downloading the shared data after sending the shared data to the node sending the downloading request to obtain an added local account point, and storing the change details of the local account point.
Optionally, the data sharing management module 12 is further configured to:
responding to the operation of inquiring the basic information of the shared data by the user, and determining target download data;
and if the authority for downloading the target download data exists, providing the network address of the node of the target download data and the basic information of the target download data, and generating an address for requesting to download the target data.
Optionally, the identity authentication and management module is further configured to:
and if the authority for downloading the target download data does not exist and the local account integral is not less than the integral required to be paid by the target download data, acquiring the authority for downloading the target download data.
Optionally, the evaluation and excitation module is further configured to:
and subtracting the credit required to be paid for downloading the target download data from the local account credit to obtain the subtracted local account credit, and storing the change details of the local account credit.
Optionally, the data messaging module 14 is further configured to:
sending an instruction for requesting to download the target download data to a node providing the target download data through the address, wherein the instruction for requesting to download the target download data comprises local identity authentication information;
and after the node receiving the target download data passes the authentication of the local identity authentication information, the node sends the target download data.
Optionally, the apparatus further comprises:
and the log management module is used for storing the record of downloading the target downloading data.
Optionally, the evaluation and excitation module is further configured to:
and responding to the operation of the user for grading the target download data, and determining the grading result of the target download data.
Optionally, the data sharing management module 12 is further configured to:
and storing the scoring result in basic information of the target download data.
Optionally, the evaluation and excitation module is further configured to:
and if the authority for downloading the target download data does not exist, and the local account point is smaller than the point required to be paid by the target download data, responding to the operation that the user requests point recharging to the administrator, adding the local account point to obtain the recharged point, and storing the change details of the local account point.
The data sharing device provided by the embodiment of the application can be applied to data sharing equipment, such as a terminal: mobile phones, computers, etc. Alternatively, fig. 4 shows a block diagram of a hardware structure of the data sharing device, and referring to fig. 4, the hardware structure of the data sharing device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;
in the embodiment of the application, the number of the processor 1, the communication interface 2, the memory 3 and the communication bus 4 is at least one, and the processor 1, the communication interface 2 and the memory 3 complete mutual communication through the communication bus 4;
the processor 1 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present invention, etc.;
the memory 3 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory stores a program and the processor can call the program stored in the memory, the program for:
storing shared data to be shared and basic information of the shared data locally, and synchronizing the basic information of the shared data to other nodes of a block chain for the other nodes to search and initiate downloading;
receiving an instruction which is sent by other nodes and requests to download the shared data, wherein the instruction which requests to download the shared data comprises: sending identity authentication information of the node of the downloading request;
performing identity authentication on the node sending the downloading request through the identity authentication information;
and if the shared data passes the identity authentication, sending the shared data to the node sending the downloading request.
Alternatively, the detailed function and the extended function of the program may be as described above.
Embodiments of the present application further provide a storage medium, where a program suitable for execution by a processor may be stored, where the program is configured to:
storing shared data to be shared and basic information of the shared data locally, and synchronizing the basic information of the shared data to other nodes of a block chain for the other nodes to search and initiate downloading;
receiving an instruction which is sent by other nodes and requests to download the shared data, wherein the instruction which requests to download the shared data comprises: sending identity authentication information of the node of the downloading request;
performing identity authentication on the node sending the downloading request through the identity authentication information;
and if the shared data passes the identity authentication, sending the shared data to the node sending the downloading request.
Alternatively, the detailed function and the extended function of the program may be as described above.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, the embodiments may be combined as needed, and the same and similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method of data sharing, comprising:
storing shared data to be shared and basic information of the shared data locally, and synchronizing the basic information of the shared data to other nodes of a block chain for the other nodes to search and initiate downloading;
receiving an instruction which is sent by other nodes and requests to download the shared data, wherein the instruction which requests to download the shared data comprises: sending identity authentication information of the node of the downloading request;
performing identity authentication on the node sending the downloading request through the identity authentication information;
and if the shared data passes the identity authentication, sending the shared data to the node sending the downloading request.
2. The method of claim 1, further comprising:
receiving an instruction which is sent by a node outside a block chain and requests to join the block chain, wherein the instruction comprises a public key of the node and an identity signature of the node;
verifying the identity signature by the public key;
if the verification is passed, a vote is cast to the node and local voting information is sent to other nodes of the block chain;
receiving voting information sent by other nodes of the block chain;
if the counted number of the tickets of the node is not less than the preset proportional value of the number of the nodes of the block chain, sending information for agreeing the node to join the block chain to the node;
and receiving the identity information sent by the node and storing the identity information in the local.
3. The method of claim 1, further comprising, after synchronizing the basic information of the shared data to other nodes of a block chain:
generating a copyright number of the shared data through a private key generated when the shared data is added to a block chain, basic information of the shared data and local identity information so as to be used for verifying the copyright number through a public key when a node of the block chain downloads the copyright number, wherein the public key is generated when the node is added to the block chain and is sent to other nodes of the block chain.
4. The method of claim 1, further comprising, after synchronizing the basic information of the shared data to other nodes of a block chain:
adding the local account point and the reward point obtained by uploading the basic information of the shared data to obtain the added local account point, and storing the change details of the local account point locally;
after sending the shared data to the node sending the download request, the method further includes:
and adding the local account point and the point required to be paid for downloading the shared data to obtain the increased local account point, and storing the change details of the local account point locally.
5. The method of claim 1, further comprising:
responding to the operation of inquiring the basic information of the shared data by the user, and determining target download data;
if the authority for downloading the target download data exists, generating an address for requesting to download the target data by using a locally stored network address of a node providing the target download data and basic information of the target download data;
sending an instruction for requesting to download the target download data to a node providing the target download data through the address, wherein the instruction for requesting to download the target download data comprises local identity authentication information;
and after the node receiving the target download data passes the authentication of the local identity authentication information, the node sends the target download data.
6. The method of claim 5, further comprising:
if the authority for downloading the target download data does not exist, and the local account integral is not less than the integral required to be paid by the target download data, acquiring the authority for downloading the target download data;
generating an address for requesting downloading of target data by using a locally stored network address of a node providing the target download data and basic information of the target download data;
sending an instruction for requesting to download the target download data to a node providing the target download data through the address, wherein the instruction for requesting to download the target download data comprises local identity authentication information;
after the node receiving the target download data passes the authentication of the local identity authentication information, the node sends the target download data;
and subtracting the credit required to be paid for downloading the target download data from the local account credit to obtain the subtracted local account credit, and storing the change details of the local account credit locally.
7. The method according to any one of claims 5 or 6, wherein after the node receiving the target download data passes the authentication based on the local authentication information, the method further comprises:
and storing the record for downloading the target download data in a local place.
8. The method according to any one of claims 5 or 6, wherein after the node receiving the target download data passes the authentication based on the local authentication information, the method further comprises:
and responding to the operation of a user for scoring the target download data, determining a scoring result of the target download data, and storing the scoring result in the basic information of the target download data.
9. The method of claim 5, further comprising:
and if the authority for downloading the target download data does not exist, and the local account point is smaller than the point required to be paid by the target download data, responding to the operation that the user requests point recharging to the administrator, adding the local account point to obtain the recharged point, and storing the change details of the local account point locally.
10. A data sharing apparatus, comprising:
the local data storage module is used for storing shared data to be shared;
the data sharing management module is used for storing basic information of shared data;
the data consensus and synchronization module is used for synchronizing the basic information of the shared data to other nodes of the block chain so as to search and initiate downloading by the other nodes;
a data message receiving and sending module, configured to receive an instruction requesting to download the shared data sent by another node, where the instruction requesting to download the shared data includes: and sending the identity authentication information of the node sending the downloading request, and if the identity authentication is passed, sending the shared data to the node sending the downloading request.
CN202111675854.6A 2021-12-31 2021-12-31 Data sharing method and device Pending CN114238520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111675854.6A CN114238520A (en) 2021-12-31 2021-12-31 Data sharing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111675854.6A CN114238520A (en) 2021-12-31 2021-12-31 Data sharing method and device

Publications (1)

Publication Number Publication Date
CN114238520A true CN114238520A (en) 2022-03-25

Family

ID=80745465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111675854.6A Pending CN114238520A (en) 2021-12-31 2021-12-31 Data sharing method and device

Country Status (1)

Country Link
CN (1) CN114238520A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115622801A (en) * 2022-11-30 2023-01-17 中化现代农业有限公司 Data downloading method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115622801A (en) * 2022-11-30 2023-01-17 中化现代农业有限公司 Data downloading method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110443704B (en) Method and device for sending resources in cross-link mode
CN108681965B (en) Block chain network transaction processing method and device for offline node
JP2021524088A (en) Resource migration data management method and equipment, and computer programs
CN110046998B (en) Cross-chain right using system, method, device, electronic equipment and storage medium
CN112333198B (en) Secure cross-domain login method, system and server
CN109102269B (en) Transfer method and device based on block chain, block chain node and storage medium
US20190139047A1 (en) Block chain based resource management
US10990704B2 (en) Management of cryptographic transactions
CN110851879B (en) Method, device and equipment for infringement and evidence preservation based on evidence preservation block chain
CN109981646B (en) Resource transfer method and device based on block chain and electronic equipment
CN108710681B (en) File acquisition method, device, equipment and storage medium
WO2022206454A1 (en) Method and apparatus for providing cross-chain messages
CN109756337A (en) A kind of safety access method and device of service interface
CN111447069B (en) Low-frequency access data processing method based on block chain
CN111292174A (en) Tax payment information processing method and device and computer readable storage medium
CN111985007A (en) Contract signing and executing method and device based on block chain
CN110209691B (en) Data processing method and device
CN110599311A (en) Resource processing method and device, electronic equipment and storage medium
CN113474804A (en) Transaction and account verification method, device and storage medium of digital currency
CN111523142B (en) Data processing method, device, electronic equipment and medium
CN110660466A (en) Personal health data chaining method and system of Internet of things by combining block chains
CN112862589A (en) Identity verification method, device and system in financial scene
CN112287311A (en) Service implementation method and device based on block chain
CN113642239B (en) Federal learning modeling method and system
CN114238520A (en) Data sharing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination