The invention discloses a
data security sharing method and
system based on a block chain, relates to the technical field of
data security sharing, and is used for solving the problem of reduced security of shared data, calling shared data through a
shared database, reading block chain information, obtaining a key length and an
encryption duration, and generating a shared
encryption coefficient. Screening target data, compressing the target data and extracting content mode features; calling storage node information, detecting
disaster recovery switching time through an operation and maintenance log, counting access permission change times in unit time, and calculating node
toughness characteristics; constructing a
feature vector based on a content mode and node
toughness, evaluating an
encryption risk level by using K-means clustering, generating an encryption priority coefficient according to sorting, calculating an encryption evaluation value in combination with normalized
disaster recovery switching time, executing secondary encryption when a preset threshold value is reached, and obtaining a second encryption result; and the security, the restorability and the protection priority
dynamic balance of the shared data in the storage process are realized.