CN112905554A - Data sharing method and device based on block chain - Google Patents

Data sharing method and device based on block chain Download PDF

Info

Publication number
CN112905554A
CN112905554A CN202110174638.7A CN202110174638A CN112905554A CN 112905554 A CN112905554 A CN 112905554A CN 202110174638 A CN202110174638 A CN 202110174638A CN 112905554 A CN112905554 A CN 112905554A
Authority
CN
China
Prior art keywords
data
event
target
user
shared
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
CN202110174638.7A
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.)
Iallchain Co Ltd
Original Assignee
Iallchain Co Ltd
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 Iallchain Co Ltd filed Critical Iallchain Co Ltd
Priority to CN202110174638.7A priority Critical patent/CN112905554A/en
Publication of CN112905554A publication Critical patent/CN112905554A/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/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • 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

Abstract

The invention provides a data sharing method and a device based on a block chain, comprising the following steps: listening for at least one data storage event broadcast by the blockchain; recording a characteristic value, an ID, a transaction hash and a block hash in each data storage event; determining whether at least one target event exists in at least one data storage event according to the recorded characteristic value, the ID and the subscription condition set by the user; if yes, determining whether the user currently has the authority of accessing the subscribed data corresponding to each target event; if so, acquiring subscribed data through a blockchain according to the characteristic value in the recorded target event, wherein the subscribed data comprise at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockchain, and the target shared data are data described by the characteristic value in the corresponding target event; and sending the subscribed data to the user. The scheme can reduce the difficulty of the user in acquiring data.

Description

Data sharing method and device based on block chain
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data sharing method and apparatus based on a block chain.
Background
With the development of information technology, the block chain technology has become a technology of great interest due to its advantages such as openness, non-tamper property, and decentralization.
In the prior art, a large amount of data needs to be stored every day in a blockchain, and the traffic types of the stored data are different. When a user needs to acquire data of a certain service type, the user needs to search from a large amount of data, so that the difficulty of acquiring the data by the user is increased.
Disclosure of Invention
The embodiment of the invention provides a data sharing method and device based on a block chain, which can reduce the difficulty of a user in acquiring data.
In a first aspect, the present invention provides a data sharing method based on a block chain, including:
monitoring at least one data storage event broadcasted by a block chain, wherein the data storage event is used for describing a data storage operation executed by at least one block of the block chain;
recording a characteristic value used for characterizing the shared data, an ID of the shared data, a transaction hash and a block hash in each data storage event, wherein the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing a process of storing the uplink data into the block chain, and the block hash is used for characterizing data in the latest block and data in a block connected with the latest block;
determining whether at least one target event exists in the at least one data storage event according to the recorded characteristic value, the ID and a subscription condition set by a user;
when at least one target event exists, determining whether the user currently has the authority of accessing the subscribed data corresponding to each target event;
when the user currently has the right to access the subscribed data, acquiring the subscribed data through the blockchain according to the recorded characteristic value in the target event, wherein the subscribed data comprises at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockchain, and the target shared data is data described by the characteristic value in the corresponding target event;
and sending the subscribed data to the user.
Preferably, the first and second electrodes are formed of a metal,
before the determining whether the user currently has the right to access the subscribed data corresponding to each target event, further comprising:
determining whether a user has a storage behavior to store data in the blockchain;
when the user has the storage behavior, determining a first time of the storage behavior, a first ID of data corresponding to the storage behavior each time, a first storage time and a first data size;
calculating initial data sharing integral of the user according to the first times, the service type indicated by the first ID, the first storage time and the weight value corresponding to the first data size;
determining the initial validity period corresponding to the initial data sharing credit;
generating an authentication Token Auth Token and a theme Topic corresponding to the subscription condition set by the user;
assigning the value of the initial validity period to a target validity period of the Auth Token;
the determining whether the user currently has the right to access the subscribed data corresponding to each target event includes:
d1: determining whether the target validity period of the Auth Token of the user is expired, if so, executing D3, otherwise, executing D2;
d2: executing the subscribed data acquired through the block chain according to the recorded characteristic value in the target event;
d3: sending prompt information for representing that the Auth Token is invalid to the user;
the sending the subscribed data to the user comprises:
and sending the subscribed data to the user through the Topic.
Preferably, the first and second electrodes are formed of a metal,
after the assigning the value of the validity period to the validity period of the Auth Token, further comprising:
when a spontaneous event exists in the monitored at least one data storage event, determining data information of self-storage data corresponding to the spontaneous event, wherein the spontaneous event is an event generated after the user uploads data to the blockchain, and the data information comprises a second data size, a second ID, a second storage time and a second number of times of the storage behavior of the user of the self-storage data;
calculating the current data sharing integral of the user according to the second times, the service type indicated by the second ID, the second storage time and the weight value corresponding to the second data size;
determining the current validity period according to the target validity period of the Auth Token and the current data sharing integral;
and assigning the value of the current validity period to the target validity period of the Auth Token.
Preferably, the first and second electrodes are formed of a metal,
before the determining whether there is at least one target event in the at least one data storage event according to the recorded feature value, the ID and a subscription condition set by a user, further comprising:
determining the event number of target events subscribed by a user;
creating a queue for placing the target events of the number of events;
the determining whether at least one target event exists in the at least one data storage event according to the recorded characteristic value, the ID and a subscription condition set by a user comprises:
s0: establishing a pending set comprising at least one of the data storage events;
s1: determining a current data storage event from the set to be processed;
s2: determining whether the feature value and the ID in the recorded current data storage event match a subscription condition set by a user, if so, performing S3, otherwise, performing S6;
s3: determining whether the current number of the target events in the queue is equal to the number of events, if so, performing S5, otherwise, performing S4;
s4: adding the current data storage event as a target event into the queue;
s5: executing the determination whether the user currently has the authority to access the subscribed data corresponding to each target event;
s6: the target event is deleted from the pending join and the process returns to S1.
Preferably, the first and second electrodes are formed of a metal,
prior to at least one data storage event broadcast by the chain of listening blocks, further comprising:
when shared data are acquired, establishing an ID corresponding to the shared data;
extracting a characteristic value from the shared data, wherein the characteristic value is used for characterizing the characteristics of the shared data;
generating uplink data according to the ID, the characteristic value and the shared data;
uploading the uplink data to a block chain, so that the block chain generates a data storage event according to the executed data storage operation, and broadcasting the data storage event.
Preferably, the first and second electrodes are formed of a metal,
the extracting feature values from the shared data includes:
extracting at least one value from a character string for characterizing the shared data, wherein each value is used for characterizing data content corresponding to an attribute of the shared data;
and extracting at least one key from the at least one value, and taking the extracted key as a characteristic value, wherein different keys are different.
Preferably, the first and second electrodes are formed of a metal,
the establishing of the ID corresponding to the shared data includes:
determining a target service type corresponding to the shared data from at least one preset service type;
determining a target number segment corresponding to the target service type;
determining an ID corresponding to latest data, wherein the latest data is the data with the shortest time stored on the block chain in the data corresponding to the target service type;
and generating an ID corresponding to the shared data according to the ID corresponding to the latest data.
Preferably, the first and second electrodes are formed of a metal,
after the acquiring the shared data, further comprising:
e1: determining whether the transaction type corresponding to the shared data is updated data, if so, executing E2, otherwise, executing E5;
e2: determining target uplink data corresponding to the shared data stored in a block chain;
e3: determining difference data for a difference between the shared data and the target uplink data;
e4: merging the difference data and the target uplink data to obtain merged data, taking the merged data as uplink data, and executing the uplink data uploading to a block chain;
e5: and executing the ID corresponding to the shared data.
Preferably, the first and second electrodes are formed of a metal,
before the determining whether there is at least one target event in the at least one data storage event according to the recorded feature value, the ID and a subscription condition set by a user, further comprising:
acquiring a code to be checked corresponding to the type of the service to be checked input by a user;
determining the position of the code to be checked in a target ID corresponding to the subscribed data to be acquired;
determining a specified feature value for a feature characterizing the subscribed data;
generating a subscription condition including the code to be looked up, the position and the specified feature value.
In a second aspect, the present invention provides a device for sharing data based on a block chain, including:
the event monitoring module is used for monitoring at least one data storage event broadcasted by a block chain, wherein the data storage event is used for describing data storage operation executed by at least one block of the block chain;
an information recording module, configured to record, in each data storage event monitored by the event monitoring module, a feature value used for characterizing features of shared data, an ID of the shared data, a transaction hash and a block hash, where the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing a process of storing the uplink data into the block chain, and the block hash is used for characterizing data in a latest block and data in a block to which the latest block is connected;
the event processing module is used for determining whether at least one target event exists in the at least one data storage event according to the characteristic value, the ID and a subscription condition set by a user, which are recorded by the information recording module;
the authority management module is used for determining whether the user currently has the authority to access the subscribed data corresponding to each target event when the event processing module determines that the at least one target event exists;
the data management module is used for acquiring the subscribed data through the blockchain according to the recorded characteristic value in the target event when the authority management module determines that the user currently has the authority of accessing the subscribed data, wherein the subscribed data comprise at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockchain, and the target shared data are data described by the characteristic value in the corresponding target event; and sending the subscribed data to the user.
In a third aspect, the present invention also provides an intelligent electronic device, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine readable program to execute the method for sharing data based on a blockchain according to any one of the first aspect.
In a fourth aspect, the present invention further provides a computer readable medium having stored thereon computer instructions, which, when executed by a processor, cause the processor to execute the method for sharing data based on a blockchain according to any one of the first aspect.
The embodiment of the invention provides a data sharing method and device based on a block chain, when data are stored in the block chain, the block chain broadcasts a data storage event related to the stored data, the characteristic value and the ID in the data storage event are recorded and can be compared with subscription conditions set by a user to judge whether the data corresponding to the data storage event are data required by the user, if yes, whether the user has the authority of accessing the data at the moment is also required to be judged, the data on the block chain are prevented from being leaked, and if the user has the authority of accessing the data, transaction hash, block hash or uplink data in the data storage event can be sent to the user. In summary, the data required by the user can be provided to the user according to the subscription condition set by the user without the user viewing the data from the blockchain, so that the difficulty of the user in acquiring the data can be reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a block chain-based data sharing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a data sharing method based on a block chain according to another embodiment of the present invention;
fig. 3 is a schematic diagram of a data sharing apparatus based on a block chain according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
In the prior art, the main function of the blockchain is to store information, and any information to be stored can be written into or read from the blockchain, so that the blockchain is a database. Second, anyone can assume that a server joins the blockchain network to become a node. Since there is no central node in the blockchain, each node is equal and the entire database is maintained. Therefore, a user can write/read data to/from any one node, since all nodes are synchronized last, ensuring that the blockchain is consistent. And the blockchain has no administrator, it is completely centerless. While others have administrators, but not blockchains. This is not achieved if someone wants to add audits to the blockchain, since its design goal is to prevent the presence of centrally located regulatory authorities.
The block chain is composed of blocks, the blocks are very similar to records of a database, and one block is created every time data is written. The block head of each block can be written with the current time, the Hash of the last block, the Hash of the block body and other information. The entire tile is then broadcast into the network. However, the information on the blockchain is stored in a Hash form, and the source data cannot be reversely pushed through the Hash value, so that the user cannot determine the content of the data based on the Hash value in the blockchain, and the user cannot find the required data.
Based on the foregoing problem, an embodiment of the present invention provides a data sharing method based on a block chain, as shown in fig. 1, specifically including:
step 101: monitoring at least one data storage event broadcasted by a block chain, wherein the data storage event is used for describing a data storage operation executed by at least one block of the block chain;
step 102: recording a characteristic value used for characterizing the shared data, an ID of the shared data, a transaction hash and a block hash in each data storage event, wherein the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing a process of storing the uplink data into the block chain, and the block hash is used for characterizing data in the latest block and data in a block connected with the latest block;
step 103: determining whether at least one target event exists in the at least one data storage event according to the recorded characteristic value, the ID and a subscription condition set by a user;
step 104: when at least one target event exists, determining whether the user currently has the authority of accessing the subscribed data corresponding to each target event;
step 105: when the user currently has the right to access the subscribed data, acquiring the subscribed data through the blockchain according to the recorded characteristic value in the target event, wherein the subscribed data comprises at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockchain, and the target shared data is data described by the characteristic value in the corresponding target event;
step 106: and sending the subscribed data to the user.
In the embodiment of the invention, when data are stored in the blockchain, the blockchain broadcasts a data storage event related to the stored data, and the characteristic value and the ID in the data storage event are recorded and compared with the subscription condition set by the user to judge whether the data corresponding to the data storage event are the data required by the user, if so, whether the user has the authority of accessing the data at the moment is also required to be judged, so that the data on the blockchain is prevented from being leaked, and if the user has the authority of accessing the data, the transaction hash, the blockhash or the uplink data in the data storage event can be sent to the user. In summary, the data required by the user can be provided to the user according to the subscription condition set by the user without the user viewing the data from the blockchain, so that the difficulty of the user in acquiring the data can be reduced.
In an embodiment of the present invention, before the determining whether the user currently has the right to access the subscribed data corresponding to each of the target events, the method further includes:
determining whether a user has a storage behavior to store data in the blockchain;
when the user has the storage behavior, determining a first time of the storage behavior, a first ID of data corresponding to the storage behavior each time, a first storage time and a first data size;
calculating initial data sharing integral of the user according to the first times, the service type indicated by the first ID, the first storage time and the weight value corresponding to the first data size;
determining the initial validity period corresponding to the initial data sharing credit;
generating an authentication Token Auth Token and a theme Topic corresponding to the subscription condition set by the user;
assigning the value of the initial validity period to a target validity period of the Auth Token;
the determining whether the user currently has the right to access the subscribed data corresponding to each target event includes:
d1: determining whether the target validity period of the Auth Token of the user is expired, if so, executing D3, otherwise, executing D2;
d2: executing the subscribed data acquired through the block chain according to the recorded characteristic value in the target event;
d3: sending prompt information for representing that the Auth Token is invalid to the user;
the sending the subscribed data to the user comprises:
and sending the subscribed data to the user through the Topic.
In the embodiment of the present invention, before a user acquires data from a blockchain, an initial data sharing score of the user needs to be determined based on the number of times that the user uploads the data to the blockchain, the service type corresponding to the ID of the uploaded data, the storage time, and the size of the stored data. And then setting an initial validity period capable of accessing data in the block chain for the user based on the initial data sharing integral, and assigning the initial validity period to the Auth Token so that the user can acquire required data through the Topic when the Auth Token is valid.
In an embodiment of the present invention, after the assigning the value of the validity period to the validity period of the Auth Token, the method further includes:
when a spontaneous event exists in the monitored at least one data storage event, determining data information of self-storage data corresponding to the spontaneous event, wherein the spontaneous event is an event generated after the user uploads data to the blockchain, and the data information comprises a second data size, a second ID, a second storage time and a second number of times of the storage behavior of the user of the self-storage data;
calculating the current data sharing integral of the user according to the second times, the service type indicated by the second ID, the second storage time and the weight value corresponding to the second data size;
determining the current validity period according to the target validity period of the Auth Token and the current data sharing integral;
and assigning the value of the current validity period to the target validity period of the Auth Token.
In the embodiment of the present invention, after obtaining the Auth Token, if the user uploads the data to the block chain, the current data sharing score corresponding to the behavior of the user storing the data at this time may be determined based on the total number of times, time, data size, and service type corresponding to the data that the user uploads the data, and the validity period of the Auth Token of the user is updated for the user based on the current data sharing score. The validity period of the authority of the user for accessing the block chain is determined through the data uploading behavior of the user, so that the user can be encouraged to share data in the multi-way block chain for other users to consult.
In an embodiment of the present invention, before the determining whether there is at least one target event in the at least one data storage event according to the recorded feature value, the ID, and a subscription condition set by a user, further includes:
determining the event number of target events subscribed by a user;
creating a queue for placing the target events of the number of events;
the determining whether at least one target event exists in the at least one data storage event according to the recorded characteristic value, the ID and a subscription condition set by a user comprises:
s0: establishing a pending set comprising at least one of the data storage events;
s1: determining a current data storage event from the set to be processed;
s2: determining whether the feature value and the ID in the recorded current data storage event match a subscription condition set by a user, if so, performing S5, otherwise, performing S3;
s3: determining whether the current number of the target events in the queue is equal to the number of events, if so, performing S5, otherwise, performing S4;
s4: adding the current data storage event as a target event into the queue, deleting the target event from the combination to be processed, and returning to the step S1;
s5: and executing the determination whether the user currently has the authority of accessing the subscribed data corresponding to each target event.
In the embodiment of the invention, a user can set the number of events to be subscribed and the size of data to be acquired according to requirements, so as to set a queue capable of placing the number of events set by the user, and when the monitored data storage events are consistent with the subscription conditions of the user, the data storage events are added into the queue until the number in the queue reaches the upper limit.
When the data corresponding to the data storage events in the queue is obtained, the data can be obtained based on the quantity set by the user, for example, the data with the size of 3GB is only obtained by the data storage events which are set by the user and meet the requirements, all the data is obtained if the data corresponding to the data storage events in the queue is smaller than 3GB, and the 3GB data is obtained from the data if the size of the data is larger than 3GB, so that the influence on the user's reference due to too much obtained data is avoided. Alternatively, the total data size to be obtained may be set based on the user, for example, 20GB of data is obtained in total, and if the data size corresponding to the first data storage event in the queue is 13GB, then data needs to be obtained from the data corresponding to the second data storage event in the queue until 20GB of data is obtained. And if the data corresponding to all the data storage events in the queue are added to form a group of 20GB, deleting the data storage events of the acquired data in the queue, and then continuing to monitor the data storage events matched with the subscription conditions set by the user to be added into the queue until the 20GB data is acquired.
In an embodiment of the present invention, before at least one data storage event broadcasted by the listening block chain, the method further includes:
when shared data are acquired, establishing an ID corresponding to the shared data;
extracting a characteristic value from the shared data, wherein the characteristic value is used for characterizing the characteristics of the shared data;
generating uplink data according to the ID, the characteristic value and the shared data;
uploading the uplink data to a block chain, so that the block chain generates a data storage event according to the executed data storage operation, and broadcasting the data storage event.
In the embodiment of the present invention, when an external entity wants to share data through a block chain, an ID for identifying a data identity may be established based on the obtained shared data, then a feature value for characterizing data features may be extracted, and uplink data that can be uploaded to the block chain may be generated based on the created ID, the extracted feature value, and shared data that needs to be shared. Therefore, after the uplink data is uploaded to the block chain, the target uplink notification information matched with the code to be checked input by the user can be acquired, so that the user can judge whether the data corresponding to the target uplink notification information is the data to be acquired or not based on the characteristic value in the target uplink notification information, and the user can be helped to quickly search the required data.
In an embodiment of the present invention, the extracting feature values from the shared data includes:
extracting at least one value from a character string for characterizing the shared data, wherein each value is used for characterizing data content corresponding to an attribute of the shared data;
and extracting at least one key from the at least one value, and taking the extracted key as a characteristic value, wherein different keys are different.
In the embodiment of the present invention, if the obtained shared data is in the form of a character string, data content used for representing attributes of the shared data may be extracted from the character string, for example, if the shared data is structural data, the value includes attributes such as the size of the shared data being 1GB, 6 paragraphs in total, the data size of each paragraph, an abstract of the shared data, a name of the shared data, and a source; if the shared data is non-structural data, such as video, audio, etc., the value may include the size of the shared data, critical frames of data, source, etc. And then extracting keys capable of representing the characteristics of the shared data from the extracted values, so that the user can conveniently identify the content of the shared data based on the keys.
It is understood that keys are keywords specified by data, and each piece of data can be uniquely distinguished. In order to prevent the key uplink operation from being returned to the information that the data already exists, therefore, different keys extracted from the same shared data are different.
If the obtained shared data is not in the form of a character string, for example, the obtained shared data is in the form of Chinese and English. The shared data may be converted into a character string of a preset format. For example, a binary string, an octal string, or a hexadecimal string.
It should be noted that before the key is extracted, different models can be established based on different data types, and each model corresponds to data of at least one service type, such as judicial data, intellectual property data, movie and television data, and educational guidance data. Each model comprises information such as data structure, keywords, field names and the like of corresponding service types so as to extract keys from shared data based on the model.
In an embodiment of the present invention, the establishing an ID corresponding to the shared data includes:
determining a target service type corresponding to the shared data from at least one preset service type;
determining a target number segment corresponding to the target service type;
determining an ID corresponding to latest data, wherein the latest data is the data with the shortest time stored on the block chain in the data corresponding to the target service type;
and generating an ID corresponding to the shared data according to the ID corresponding to the latest data.
In the embodiment of the invention, the service types corresponding to the shared data needing to be uplinked are different, and in order to search the data of the same service type, the number sections corresponding to different service types are different. For example, the number of the judicial data is 202001, the number of the educational data is 202002, and the number of the intellectual property data is 202003. In order to determine the ID corresponding to the shared data, a target service type of the shared data may be determined first, a service to which the shared data belongs may be determined, then it is determined whether the latest data that belongs to the target service type and has the shortest storage time exists in the blockchain, and if so, the ID of the shared data is generated based on the ID of the latest data.
For example, the service type of the shared data is "education class", the number segment is 202002, the ID of the latest data of the "education class" in the blockchain is "20200205", and if the encoding rule is that the number of the ID bits of the same service type is the same and the difference between the ID of the shared data to be linked and the ID of the data of the same service type on the blockchain is 1, the ID of the shared data is "20200206".
It is understood that the ID may include at least one of a number, a letter, and a character.
In an embodiment of the present invention, after the acquiring the shared data, the method further includes:
e1: determining whether the transaction type corresponding to the shared data is updated data, if so, executing E2, otherwise, executing E5;
e2: determining target uplink data corresponding to the shared data stored in a block chain;
e3: determining difference data for a difference between the shared data and the target uplink data;
e4: merging the difference data and the target uplink data to obtain merged data, taking the merged data as uplink data, and executing the uplink data uploading to a block chain;
e5: and executing the ID corresponding to the shared data.
In the embodiment of the present invention, the data uploaded to the block chain may be uploaded for the first time, or the data uploaded before may be updated. If the data requiring uplink is the data updated from the previous data, the difference between the shared data and the data previously stored on the blockchain needs to be determined, and then the target uplink data already on the blockchain is merged based on the difference data to generate merged data, and the generated data is uplinked to complete the data update.
In an embodiment of the present invention, before the determining whether there is at least one target event in the at least one data storage event according to the recorded feature value, the ID, and a subscription condition set by a user, further includes:
acquiring a code to be checked corresponding to the type of the service to be checked input by a user;
determining the position of the code to be checked in a target ID corresponding to the subscribed data to be acquired;
determining a specified feature value for a feature characterizing the subscribed data;
generating a subscription condition including the code to be looked up, the position and the specified feature value.
In the embodiment of the invention, a user can determine the service type corresponding to the data to be acquired based on requirements, and because each service type corresponds to the appointed code number segment, the user can determine the code to be checked corresponding to the data to be acquired. For example, the number segment corresponding to education class "is 20a1, the number segment corresponding to" justice class "is 20B1, the number segment corresponding to" traffic class "is 20C1, and the number segment corresponding to" news class "is 20D 1. If the user wants to obtain data of "traffic class", the code to be looked at is 20C 1. Since the data of the unified service type is also divided into a plurality of service data, the positions of the codes of the service data in the ID may be different in order to distinguish different service data. For example, the code of the ticket in the traffic data of the traffic class is located at the head of the ID, and the code of the parking fee in the traffic data of the traffic class is located at the tail of the ID. The characteristic value of the data to be viewed by the user may be data characterizing the data, such as a ticket amount, a parking time period.
As shown in fig. 2, in order to more clearly illustrate the technical solution and advantages of the present invention, the following describes in detail a data sharing method based on a block chain according to an embodiment of the present invention, which specifically includes:
step 201: and acquiring the code to be checked corresponding to the type of the service to be checked input by the user.
Step 202: and determining the position of the code to be checked in the target ID corresponding to the subscribed data to be acquired.
Step 203: specified feature values for features characterizing the subscribed data are determined.
Step 204: and generating a subscription condition comprising the code to be checked, the position and the specified characteristic value.
Specifically, a user may determine a service type of data to be acquired based on a requirement of the user, in order to distinguish data of different service types, code number segments corresponding to different service types are different, and positions of the code number segments in an ID may also be different, so that the user is required to set a code to be checked of a service type corresponding to the data to be acquired, a position of the code to be checked in the ID, and a specified feature value representing a feature of the acquired data, and generate a subscription condition based on the setting, so as to acquire the data required by the user based on the subscription condition.
Step 205: when the shared data is acquired, determining whether the transaction type corresponding to the shared data is the update data, if so, executing step 206, otherwise, executing step 209.
Specifically, when a user needs to upload data to the blockchain, the data to be uploaded may be the first time, or the previously uploaded data may be updated, so that the transaction type of the shared data to be uploaded needs to be determined, so as to clarify the purpose of uploading data by the user.
Step 206: and determining target uplink data corresponding to the shared data stored in the block chain.
Step 207: determining difference data that is different between the shared data and the target uplink data.
Step 208: merge the difference data and the target uplink data to obtain merged data, and use the merged data as uplink data, go to step 213.
Specifically, if the shared data is data existing on the blockchain, the ID of the shared data is not changed, and therefore, target uplink data corresponding to the shared data can be determined from the blockchain, and then the difference between the target uplink data and the shared data is determined to obtain difference data.
Step 209: and determining a target service type corresponding to the shared data from at least one preset service type, determining a target number segment corresponding to the target service type, and executing step 210.
Step 210: and determining the ID corresponding to the latest data, wherein the latest data is the data with the shortest time stored on the block chain in the data corresponding to the target service type.
Step 211: and generating an ID corresponding to the shared data according to the ID corresponding to the latest data.
Specifically, if the shared data is uploaded for the first time, the service type of the shared data needs to be determined, and then the target number segment of the target service type is determined.
Step 212: the method comprises the steps of extracting at least one value from a character string for representing shared data, extracting at least one key from the at least one value, using the extracted key as a characteristic value, and generating uplink data according to an ID, the characteristic value and the shared data, wherein each value is used for representing data content corresponding to one attribute of the shared data, different keys are different, and the characteristic value is used for representing the characteristics of the shared data.
Step 213: uploading the uplink data to the block chain so that the block chain generates a data storage event according to the executed data storage operation and broadcasts the data storage event.
Specifically, in order to make the user clearly identify the content of the uplink data, it is necessary to extract a feature value representing the attribute of the user from the shared data, then extract a key representing the feature of the user from the shared data, generate uplink data based on the ID, the feature value, and the shared data, uplink the uplink data, and complete data sharing.
Step 214: monitoring at least one data storage event broadcasted by the block chain, wherein the data storage event is used for describing a data storage operation executed by at least one block of the block chain.
Specifically, after storing data, the blockchain generates a data storage event based on the stored data, and then broadcasts the data storage event so that other nodes can determine that data is newly added or updated based on broadcast content.
Step 215: and recording a characteristic value used for representing the characteristics of the shared data, an ID of the shared data, a transaction hash and a block hash in each data storage event, wherein the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing the process of storing the uplink data into a block chain, and the block hash is used for representing data in the latest block and data in a block connected with the latest block.
Step 216: a pending set is established that includes at least one data storage event.
Step 217: a current data storage event is determined from the set to be processed.
Step 218: it is determined whether the characteristic values and IDs in the recorded current data storage event match the subscription conditions, if so, step 219 is performed, otherwise, step 221 is performed.
Step 219: it is determined whether the current number of target events in the queue is equal to the user set number of events, if so, step 222 is performed, otherwise, step 220 is performed.
Step 220: adding the current data storage event as a target event into a queue capable of placing a number of target events, and executing step 222;
step 221: the target event is removed from the pending join and the process returns to step 217.
Specifically, after monitoring the data storage events broadcast by the blockchain, it is necessary to judge whether the data storage events are events matched with the subscription conditions set by the user one by one, and if the current data storage events are matched with the subscription conditions, it is determined whether a queue in which the user can place a specified number of events has empty space, and the data storage events in the representation queue reach the number required by the user, so that the matching is not required. If the queue still has free space, the data storage event matched with the subscription condition can be placed in the queue, and whether other data storage events are matched with the subscription condition is continuously judged.
Step 222: it is determined whether the target validity period of the user's Auth Token has expired, and if so, step 224 is performed, otherwise, step 223 is performed.
Specifically, after the data storage events matching the subscription conditions are screened out, it is also necessary to determine whether the user has the right to access the data on the blockchain at this time.
Step 223: and acquiring subscribed data through a blockchain according to the characteristic value in the recorded target event, and sending the subscribed data to a user through Topic, wherein the subscribed data comprises at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockhash, and the target shared data is data described by the characteristic value in the corresponding target event.
Step 224: and sending prompt information for representing that the Auth Token is invalid to the user.
Specifically, if the user does not have the authority to access the data on the block chain at the moment, prompt information is sent to the user, so that the user can conveniently acquire points by uploading the data to the block chain and the like, and further acquire the authority to access the block chain.
It should be noted that the authority of the user to access the block chain may be determined by the following steps:
it is determined whether the user has a storage activity to store data into the blockchain.
When a user has a storage behavior, determining a first time of the storage behavior, a first ID of data corresponding to each storage behavior, a first storage time and a first data size.
And calculating the initial data sharing integral of the user according to the first times, the service type indicated by the first ID, the first storage time and the weight value corresponding to the first data size.
An initial validity period corresponding to the initial data sharing credit is determined.
And generating authentication tokens Auth Token and Topic corresponding to the subscription conditions set by the user.
And assigning the value of the initial validity period to the target validity period of Auth Token.
Specifically, by recording a first number of times that a user stores data on a block chain, a service type indicated by a first ID corresponding to the stored data, a first storage time for storing the data, and a first data size of the stored data, an initial data sharing integral of a storage behavior of the user storing the data in the block chain is calculated, then an initial validity period for the user to access the block chain is determined based on the integral, an Auth Token is generated based on the initial validity period, and a Topic is used for acquiring the data, so that the user can acquire required data through the Auth Token and the Topic.
In particular, the amount of the solvent to be used,
after the user has obtained the right to access the block chain, if data is uploaded to the block chain again, the current data sharing integral of the user's storage behavior at this time may be determined based on the second number of times of the user's storage behavior of storing data, the second data size of the uploaded data, the second ID, and the second storage event, then the current validity period corresponding to the storage behavior at this time is determined based on the current data sharing integral, the current validity period is assigned to the Auth Token that the user has obtained, and the update of the Auth Token validity period is completed.
For example, the current data sharing integral of the storage behavior at this time is 36 points, and the current validity period corresponding to 30-40 points is 5 days, then the target validity period of the Auth Token of the user at this time is reached to 2020.4.5, the current validity period obtained by the storage behavior at this time is assigned to the Auth Token for 5 days, and then the validity period after the Auth Token is updated is reached to 2020.4.10.
As shown in fig. 3, an embodiment of the present invention further provides a data sharing apparatus based on a block chain, including:
an event monitoring module 301, configured to monitor at least one data storage event broadcasted by a block chain, where the data storage event is used to describe a data storage operation performed by at least one block of the block chain;
an information recording module 302, configured to record, in each data storage event monitored by the event monitoring module 301, a feature value used for characterizing features of shared data, an ID of the shared data, a transaction hash and a block hash, where the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing a process of storing uplink data into the block chain, and the block hash is used for characterizing data in the latest block and data in a block to which the latest block is connected;
an event processing module 303, configured to determine whether there is at least one target event in the at least one data storage event according to the feature value, the ID, and a subscription condition set by a user, which are recorded by the information recording module 302;
a permission management module 304, configured to determine whether the user currently has permission to access subscribed data corresponding to each target event when the event processing module 303 determines that the at least one target event exists;
a data management module 305, configured to, when the rights management module 304 determines that the user currently has a right to access the subscribed data, obtain the subscribed data through the blockchain according to the recorded feature value in the target event, where the subscribed data includes at least one of target shared data, data corresponding to the transaction hash, and data corresponding to the blockhash, and the target shared data is data described by the feature value in the corresponding target event; and sending the subscribed data to the user.
In an embodiment of the present invention, the rights management module is further configured to perform the following operations:
determining whether a user has a storage behavior to store data in the blockchain;
when the user has the storage behavior, determining a first time of the storage behavior, a first ID of data corresponding to the storage behavior each time, a first storage time and a first data size;
calculating initial data sharing integral of the user according to the first times, the service type indicated by the first ID, the first storage time and the weight value corresponding to the first data size;
determining the initial validity period corresponding to the initial data sharing credit;
generating an authentication Token Auth Token and a theme Topic corresponding to the subscription condition set by the user;
assigning the value of the initial validity period to a target validity period of the Auth Token;
d1: determining whether the target validity period of the Auth Token of the user is expired, if so, executing D3, otherwise, executing D2;
d2: executing the subscribed data acquired through the block chain according to the recorded characteristic value in the target event;
d3: sending prompt information for representing that the Auth Token is invalid to the user;
and the data management module is used for sending the subscribed data to the user through the Topic.
In an embodiment of the present invention, the information recording module 302 is configured to determine data information of self-stored data corresponding to a spontaneous event when the spontaneous event exists in the at least one data storage event monitored by the event monitoring module 201, where the spontaneous event is an event generated after the user uploads data to the blockchain, and the data information includes a second data size, a second ID, a second storage time of the self-stored data, and a second number of times of the storage behavior of the user;
the right management module 304 is configured to calculate a current data sharing score of the user according to the second number of times, the service type indicated by the second ID, the second storage time, and a weight value corresponding to the second data size; determining the current validity period according to the target validity period of the Auth Token and the current data sharing integral; and assigning the value of the current validity period to the target validity period of the Auth Token.
In an embodiment of the present invention, the event processing module is configured to determine an event number of a target event subscribed by a user; creating a queue for placing the target events of the number of events; and performs the following operations:
s0: establishing a pending set comprising at least one of the data storage events;
s1: determining a current data storage event from the set to be processed;
s2: determining whether the feature value and the ID in the recorded current data storage event match a subscription condition set by a user, if so, performing S5, otherwise, performing S3;
s3: determining whether the current number of the target events in the queue is equal to the number of events, if so, performing S5, otherwise, performing S4;
s4: adding the current data storage event as a target event into the queue, deleting the target event from the combination to be processed, and returning to the step S1;
s5: and executing the determination whether the user currently has the authority of accessing the subscribed data corresponding to each target event.
In an embodiment of the present invention, the device for sharing data based on a blockchain further includes: the data processing module and the data storage module;
the data processing module is used for establishing an ID corresponding to shared data when the shared data is acquired; extracting a characteristic value from the shared data, wherein the characteristic value is used for characterizing the characteristics of the shared data; generating uplink data according to the ID, the characteristic value and the shared data;
the data storage module is configured to upload the uplink data to a block chain, so that the block chain generates a data storage event according to an executed data storage operation, and broadcasts the data storage event.
In an embodiment of the present invention, the data processing module is configured to extract at least one value from a string used for characterizing the shared data, where each value is used for characterizing data content corresponding to an attribute of the shared data; and extracting at least one key from the at least one value, and taking the extracted key as a characteristic value, wherein different keys are different.
In an embodiment of the present invention, the data processing module is configured to determine a target service type corresponding to the shared data from at least one preset service type; determining a target number segment corresponding to the target service type; determining an ID corresponding to latest data, wherein the latest data is the data with the shortest time stored on the block chain in the data corresponding to the target service type; and generating an ID corresponding to the shared data according to the ID corresponding to the latest data.
In an embodiment of the present invention, the data processing module is configured to perform the following operations:
s1: determining whether the transaction type corresponding to the shared data is updated data, if so, executing S2, otherwise, executing S5;
s2: determining target uplink data corresponding to the shared data stored in a block chain;
s3: determining difference data for a difference between the shared data and the target uplink data;
s4: merging the difference data and the target uplink data to obtain merged data, taking the merged data as uplink data, and executing the uplink data uploading to a block chain;
s5: and executing the ID corresponding to the shared data.
In an embodiment of the present invention, the rights management module is further configured to perform the following operations:
acquiring a code to be checked corresponding to the type of the service to be checked input by a user;
determining the position of the code to be checked in a target ID corresponding to the subscribed data to be acquired;
determining a specified feature value for a feature characterizing the subscribed data;
generating a subscription condition including the code to be looked up, the position and the specified feature value.
It is to be understood that the illustrated structure of the embodiment of the present invention does not form a specific limitation on the data sharing apparatus based on the blockchain. In other embodiments of the invention, the blockchain-based data sharing apparatus may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
An embodiment of the present invention further provides an intelligent electronic device, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine readable program to perform the method for sharing data based on a blockchain according to any embodiment of the present invention.
An embodiment of the present invention further provides a computer-readable medium, where the computer-readable medium stores computer instructions, and when the computer instructions are executed by a processor, the processor is caused to execute the method for sharing data based on a blockchain in any embodiment of the present invention.
Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. The data sharing method based on the block chain is characterized by comprising the following steps:
monitoring at least one data storage event broadcasted by a block chain, wherein the data storage event is used for describing a data storage operation executed by at least one block of the block chain;
recording a characteristic value used for characterizing the shared data, an ID of the shared data, a transaction hash and a block hash in each data storage event, wherein the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing a process of storing the uplink data into the block chain, and the block hash is used for characterizing data in the latest block and data in a block connected with the latest block;
determining whether at least one target event exists in the at least one data storage event according to the recorded characteristic value, the ID and a subscription condition set by a user;
when at least one target event exists, determining whether the user currently has the authority of accessing the subscribed data corresponding to each target event;
when the user currently has the right to access the subscribed data, acquiring the subscribed data through the blockchain according to the recorded characteristic value in the target event, wherein the subscribed data comprises at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockchain, and the target shared data is data described by the characteristic value in the corresponding target event;
and sending the subscribed data to the user.
2. The blockchain-based data sharing method according to claim 1,
before the determining whether the user currently has the right to access the subscribed data corresponding to each target event, further comprising:
determining whether a user has a storage behavior to store data in the blockchain;
when the user has the storage behavior, determining a first time of the storage behavior, a first ID of data corresponding to the storage behavior each time, a first storage time and a first data size;
calculating initial data sharing integral of the user according to the first times, the service type indicated by the first ID, the first storage time and the weight value corresponding to the first data size;
determining the initial validity period corresponding to the initial data sharing credit;
generating an authentication Token Auth Token and a theme Topic corresponding to the subscription condition set by the user;
assigning the value of the initial validity period to a target validity period of the Auth Token;
the determining whether the user currently has the right to access the subscribed data corresponding to each target event includes:
d1: determining whether the target validity period of the Auth Token of the user is expired, if so, executing D3, otherwise, executing D2;
d2: executing the subscribed data acquired through the block chain according to the recorded characteristic value in the target event;
d3: sending prompt information for representing that the Auth Token is invalid to the user;
the sending the subscribed data to the user comprises:
and sending the subscribed data to the user through the Topic.
3. The blockchain-based data sharing method according to claim 2,
after the assigning the value of the validity period to the validity period of the Auth Token, further comprising:
when a spontaneous event exists in the monitored at least one data storage event, determining data information of self-storage data corresponding to the spontaneous event, wherein the spontaneous event is an event generated after the user uploads data to the blockchain, and the data information comprises a second data size, a second ID, a second storage time and a second number of times of the storage behavior of the user of the self-storage data;
calculating the current data sharing integral of the user according to the second times, the service type indicated by the second ID, the second storage time and the weight value corresponding to the second data size;
determining the current validity period according to the target validity period of the Auth Token and the current data sharing integral;
and assigning the value of the current validity period to the target validity period of the Auth Token.
4. The blockchain-based data sharing method according to claim 1,
before the determining whether there is at least one target event in the at least one data storage event according to the recorded feature value, the ID and a subscription condition set by a user, further comprising:
determining the event number of target events subscribed by a user;
creating a queue for placing the target events of the number of events;
the determining whether at least one target event exists in the at least one data storage event according to the recorded characteristic value, the ID and a subscription condition set by a user comprises:
s0: establishing a pending set comprising at least one of the data storage events;
s1: determining a current data storage event from the set to be processed;
s2: determining whether the feature value and the ID in the recorded current data storage event match a subscription condition set by a user, if so, performing S3, otherwise, performing S6;
s3: determining whether the current number of the target events in the queue is equal to the number of events, if so, performing S5, otherwise, performing S4;
s4: adding the current data storage event as a target event into the queue;
s5: executing the determination whether the user currently has the authority to access the subscribed data corresponding to each target event;
s6: the target event is deleted from the pending join and the process returns to S1.
5. The blockchain-based data sharing method according to claim 1,
prior to at least one data storage event broadcast by the chain of listening blocks, further comprising:
when shared data are acquired, establishing an ID corresponding to the shared data;
extracting a characteristic value from the shared data, wherein the characteristic value is used for characterizing the characteristics of the shared data;
generating uplink data according to the ID, the characteristic value and the shared data;
uploading the uplink data to a block chain, so that the block chain generates a data storage event according to the executed data storage operation, and broadcasting the data storage event.
6. The blockchain-based data sharing method according to claim 5,
the extracting feature values from the shared data includes:
extracting at least one value from a character string for characterizing the shared data, wherein each value is used for characterizing data content corresponding to an attribute of the shared data;
extracting at least one key from the at least one value, and taking the extracted key as a characteristic value, wherein different keys are different;
and/or the presence of a gas in the gas,
the establishing of the ID corresponding to the shared data includes:
determining a target service type corresponding to the shared data from at least one preset service type;
determining a target number segment corresponding to the target service type;
determining an ID corresponding to latest data, wherein the latest data is the data with the shortest time stored on the block chain in the data corresponding to the target service type;
generating an ID corresponding to the shared data according to the ID corresponding to the latest data;
and/or the presence of a gas in the gas,
after the acquiring the shared data, further comprising:
e1: determining whether the transaction type corresponding to the shared data is updated data, if so, executing E2, otherwise, executing E5;
e2: determining target uplink data corresponding to the shared data stored in a block chain;
e3: determining difference data for a difference between the shared data and the target uplink data;
e4: merging the difference data and the target uplink data to obtain merged data, taking the merged data as uplink data, and executing the uplink data uploading to a block chain;
e5: and executing the ID corresponding to the shared data.
7. The blockchain-based data sharing method according to any one of claims 1 to 6,
before the determining whether there is at least one target event in the at least one data storage event according to the recorded feature value, the ID and a subscription condition set by a user, further comprising:
acquiring a code to be checked corresponding to the type of the service to be checked input by a user;
determining the position of the code to be checked in a target ID corresponding to the subscribed data to be acquired;
determining a specified feature value for a feature characterizing the subscribed data;
generating a subscription condition including the code to be looked up, the position and the specified feature value.
8. A block chain-based data sharing apparatus, comprising:
the event monitoring module is used for monitoring at least one data storage event broadcasted by a block chain, wherein the data storage event is used for describing data storage operation executed by at least one block of the block chain;
an information recording module, configured to record, in each data storage event monitored by the event monitoring module, a feature value used for characterizing features of shared data, an ID of the shared data, a transaction hash and a block hash, where the shared data is data corresponding to uplink data stored in one block before uplink, the transaction hash is used for describing a process of storing the uplink data into the block chain, and the block hash is used for characterizing data in a latest block and data in a block to which the latest block is connected;
the event processing module is used for determining whether at least one target event exists in the at least one data storage event according to the characteristic value, the ID and a subscription condition set by a user, which are recorded by the information recording module;
the authority management module is used for determining whether the user currently has the authority to access the subscribed data corresponding to each target event when the event processing module determines that the at least one target event exists;
the data management module is used for acquiring the subscribed data through the blockchain according to the recorded characteristic value in the target event when the authority management module determines that the user currently has the authority of accessing the subscribed data, wherein the subscribed data comprise at least one of target shared data, data corresponding to the transaction hash and data corresponding to the blockchain, and the target shared data are data described by the characteristic value in the corresponding target event; and sending the subscribed data to the user.
9. Intelligent electronic device, its characterized in that includes: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program to perform the blockchain based data sharing method of any one of claims 1 to 7.
10. Computer readable medium, having stored thereon computer instructions, which, when executed by a processor, cause the processor to perform the method of blockchain based data sharing according to any one of claims 1 to 7.
CN202110174638.7A 2021-02-07 2021-02-07 Data sharing method and device based on block chain Pending CN112905554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110174638.7A CN112905554A (en) 2021-02-07 2021-02-07 Data sharing method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110174638.7A CN112905554A (en) 2021-02-07 2021-02-07 Data sharing method and device based on block chain

Publications (1)

Publication Number Publication Date
CN112905554A true CN112905554A (en) 2021-06-04

Family

ID=76122853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110174638.7A Pending CN112905554A (en) 2021-02-07 2021-02-07 Data sharing method and device based on block chain

Country Status (1)

Country Link
CN (1) CN112905554A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886101A (en) * 2021-09-27 2022-01-04 华南理工大学 Big data sharing coexistence evidence method based on block chain technology

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108366105A (en) * 2018-01-30 2018-08-03 百度在线网络技术(北京)有限公司 Data access method, device, system and the computer-readable medium of transregional piece of chain
CN109450910A (en) * 2018-11-26 2019-03-08 远光软件股份有限公司 Data sharing method, data sharing network and electronic equipment based on block chain
US20190286532A1 (en) * 2017-01-24 2019-09-19 Tencent Technology (Shenzhen) Company Limited Shared data recovery method and apparatus, computer device, and storage medium
CN110264190A (en) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 Triggering method, device, equipment and the storage medium of intelligent contract
CN110535928A (en) * 2019-08-22 2019-12-03 杭州趣链科技有限公司 A kind of event method for pushing of the JAVA intelligence contract of block chain
CN110930254A (en) * 2019-11-19 2020-03-27 腾讯科技(深圳)有限公司 Data processing method, device, terminal and medium based on block chain
WO2020108441A1 (en) * 2018-11-27 2020-06-04 华为技术有限公司 Data storage method, device, computer apparatus, and readable storage medium
CN111859470A (en) * 2020-09-23 2020-10-30 支付宝(杭州)信息技术有限公司 Business data chaining method and device
CN111858677A (en) * 2020-07-27 2020-10-30 中国平安财产保险股份有限公司 Local cache data access method, device, equipment and storage medium
CN111914021A (en) * 2020-07-02 2020-11-10 连连智能科技有限公司 Cross-block-chain interaction method and system, computer equipment and storage medium
CN112100279A (en) * 2020-10-30 2020-12-18 中航信移动科技有限公司 Data sharing system based on block chain
CN112214802A (en) * 2020-09-30 2021-01-12 电子科技大学 Block chain intelligent contract message publishing and subscribing method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190286532A1 (en) * 2017-01-24 2019-09-19 Tencent Technology (Shenzhen) Company Limited Shared data recovery method and apparatus, computer device, and storage medium
CN108366105A (en) * 2018-01-30 2018-08-03 百度在线网络技术(北京)有限公司 Data access method, device, system and the computer-readable medium of transregional piece of chain
CN109450910A (en) * 2018-11-26 2019-03-08 远光软件股份有限公司 Data sharing method, data sharing network and electronic equipment based on block chain
WO2020108441A1 (en) * 2018-11-27 2020-06-04 华为技术有限公司 Data storage method, device, computer apparatus, and readable storage medium
CN110264190A (en) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 Triggering method, device, equipment and the storage medium of intelligent contract
CN110535928A (en) * 2019-08-22 2019-12-03 杭州趣链科技有限公司 A kind of event method for pushing of the JAVA intelligence contract of block chain
CN110930254A (en) * 2019-11-19 2020-03-27 腾讯科技(深圳)有限公司 Data processing method, device, terminal and medium based on block chain
CN111914021A (en) * 2020-07-02 2020-11-10 连连智能科技有限公司 Cross-block-chain interaction method and system, computer equipment and storage medium
CN111858677A (en) * 2020-07-27 2020-10-30 中国平安财产保险股份有限公司 Local cache data access method, device, equipment and storage medium
CN111859470A (en) * 2020-09-23 2020-10-30 支付宝(杭州)信息技术有限公司 Business data chaining method and device
CN112214802A (en) * 2020-09-30 2021-01-12 电子科技大学 Block chain intelligent contract message publishing and subscribing method
CN112100279A (en) * 2020-10-30 2020-12-18 中航信移动科技有限公司 Data sharing system based on block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886101A (en) * 2021-09-27 2022-01-04 华南理工大学 Big data sharing coexistence evidence method based on block chain technology
CN113886101B (en) * 2021-09-27 2023-04-21 华南理工大学 Big data sharing and concurrent evidence method based on blockchain technology

Similar Documents

Publication Publication Date Title
US11316659B2 (en) Primary and secondary blockchain device
CN112905536B (en) Data verification synchronization method and device based on block chain
CN110851879B (en) Method, device and equipment for infringement and evidence preservation based on evidence preservation block chain
JP2020511059A (en) Information authentication method and system
CN110597943A (en) Interest point processing method and device based on artificial intelligence and electronic equipment
CN111602166B (en) Method and apparatus for providing traversable key-value data storage on a blockchain
CN112988667B (en) Data storage method and device based on block chain network
US9736155B2 (en) System, method, and apparatus for authentication
CN110532529A (en) A kind of recognition methods of file type and device
US9292703B2 (en) Electronic document management method
CN112579596A (en) Data playback method and device, storage medium and electronic equipment
CN112905554A (en) Data sharing method and device based on block chain
EP4120096A1 (en) Method and device for data retrieval, electronic device, and storage medium
CN112905553A (en) Data sharing method, device and system based on block chain
CN115269910A (en) Audio and video auditing method and system
KR102121245B1 (en) System and method for sharing data among a plurality of block chain networks
CN113886803A (en) Object storage system of instant messaging, object storage request method and device
CN109886045B (en) Intellectual property data protection, transaction and right-maintaining method and device based on block chain
CN113766031A (en) Method and device for storing note resources and related equipment
CN111291336A (en) Game registration method and device in game platform
CN112491839A (en) Cross-system-based login processing method and device, computer equipment and medium
JP2006074425A (en) Public key certificate verification device, public key certificate verification method, and program
JP4113511B2 (en) Time stamp station selection system and time stamp station selection program
KR101407334B1 (en) The method, device and server for providing music service
JP6865338B1 (en) Information processing system

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