CN110222086A - Data managing method, device, equipment and storage medium based on block chain - Google Patents

Data managing method, device, equipment and storage medium based on block chain Download PDF

Info

Publication number
CN110222086A
CN110222086A CN201910377822.4A CN201910377822A CN110222086A CN 110222086 A CN110222086 A CN 110222086A CN 201910377822 A CN201910377822 A CN 201910377822A CN 110222086 A CN110222086 A CN 110222086A
Authority
CN
China
Prior art keywords
data
target data
block chain
terminal
keyword
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
CN201910377822.4A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910377822.4A priority Critical patent/CN110222086A/en
Publication of CN110222086A publication Critical patent/CN110222086A/en
Priority to PCT/CN2019/121718 priority patent/WO2020224246A1/en
Pending legal-status Critical Current

Links

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/22Indexing; Data structures therefor; Storage structures
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The present invention relates to block chain fields, provide a kind of data managing method based on block chain, the following steps are included: receive terminal transmission to the operation requests of storing data in block chain when, obtain the corresponding keyword of the operation requests, wherein, the keyword includes: data type, affiliated person mark, type of service and/or service identification;The data stored in the block chain are inquired, obtain the target data with the keyword match, and judge that the terminal corresponds to the operating right whether user has the target data;When the terminal, which corresponds to user, has the operating right of the target data, the target data is handled by the operation requests.The invention also discloses a kind of data administrator based on block chain, equipment and storage mediums.The present invention improves the efficiency of the data query in block chain by multidimensional data query.

Description

Data managing method, device, equipment and storage medium based on block chain
Technical field
The present invention relates to block chain fields, more particularly to the data managing method based on block chain, device, equipment and storage Medium.
Background technique
Block chain is the novel of the computer technologies such as Distributed Storage, point-to-point transmission, common recognition mechanism, Encryption Algorithm Application model, that is, block chain is interpreted as a distributed account book, its essence is also a distributed database.
The bottom of block chain uses the Key-Value database an of persistence.Due to the number stored in block chain According to more and more, according to current Key-Value database purchase mode, can make efficiency data query in block chain compared with It is low, the search efficiency of data in block chain how is improved, current technical problem urgently to be resolved is become.
Summary of the invention
The main purpose of the present invention is to provide a kind of data managing method based on block chain, device, equipment and storages Medium, it is intended to solve the technical problem that efficiency data query is lower in block chain.
To achieve the above object, the present invention provides the data managing method based on block chain, the number based on block chain According to management method the following steps are included:
Receive terminal transmission to the operation requests of storing data in block chain when, it is corresponding to obtain the operation requests Keyword, wherein the keyword includes: data type, affiliated person mark, type of service and/or service identification;
The data stored in the block chain are inquired, obtain the target data with the keyword match, and described in judgement Terminal corresponds to the operating right whether user has the target data;
When the terminal, which corresponds to user, has the operating right of the target data, by described in operation requests processing Target data.
Optionally, it is described receive terminal transmission to the operation requests of storing data in block chain when, described in acquisition Before the step of operation requests corresponding keyword, comprising:
When receiving data input request, the corresponding primary data of the data input request and user identifier are obtained;
When the user identifier corresponds to user with data input permission, using the primary data as mesh to be stored Data are marked, are identified the user identifier as the affiliated person of the target data, and obtain the data class of the target data Type, type of service and service identification;
Person's mark, the data type, the type of service and the service identification are as the target belonging to will be described The keyword of data, and the keyword and the target data association are stored in the block chain.
Optionally, described when the terminal, which corresponds to user, has the operating right of the target data, by the operation Request was handled after the step of target data, comprising:
When detecting that the target data processing is completed, the corresponding processing information of the target data is obtained, wherein institute Stating processing information includes: operating time point, operation user identifier and action type;
Using the processing information as Value value, the Value value and the target data association are stored to the area In block chain.
Optionally, the data stored in the inquiry block chain, obtain the target data with the keyword match The step of, comprising:
The corresponding preset keyword of each data stored in the keyword and the block chain is compared, will be preset Keyword data identical with the keyword are as the first data;
When the quantity of first data is no less than two, prompt information is sent to the terminal, to prompt the end Corresponding user is held to input new keyword;
The new keyword that the terminal is sent is received, the new keyword is corresponding with first data default Keyword is compared, until getting the corresponding target data of the operation requests.
It is optionally, described to judge that the terminal corresponds to whether user has the step of operating right of the target data, Include:
The target data is fed back into the terminal, so that the terminal adds the target data using private key Close operation;
When receiving the encrypted target data that the terminal is sent, solution Migong is determined by default intelligent contract Key, and operation is decrypted to the target data by the public key;
In the target data successful decryption, determine that the terminal corresponds to the operating rights that user has the target data Limit.
It is optionally, described to judge that the terminal corresponds to whether user has the step of operating right of the target data, Include:
The target data is fed back into the terminal, so that the terminal is by the timestamp and target data of current time Cryptographic operation is carried out together;
When receiving the encrypted target data that the terminal is sent, operation is decrypted to the target data The timestamp is obtained, the time of target data described in the terminal encryption and the time of current time are calculated by the timestamp Interval;
When the time interval is less than preset time threshold, determine that the terminal corresponds to user with the target data Operating right.
Optionally, the data stored in the inquiry block chain, obtain the target data with the keyword match, And judge that the terminal corresponds to after whether user have the step of operating right of the target data, comprising:
When the terminal corresponds to user and do not have the operating right of the target data, prompt information is sent to the end End, to prompt the terminal to correspond to user, there is currently no operating rights.
In addition, to achieve the above object, it is described to be based on the present invention also provides a kind of data administrator based on block chain The data administrator of block chain includes:
Request receiving module, for receive terminal transmission to the operation requests of storing data in block chain when, obtain Take the corresponding keyword of the operation requests, wherein the keyword includes: data type, affiliated person mark, type of service And/or service identification;
Inquiry judging module obtains the mesh with the keyword match for inquiring the data stored in the block chain Data are marked, and judge that the terminal corresponds to the operating right whether user has the target data;
Data processing module, for the terminal correspond to user have the target data operating right when, by institute It states operation requests and handles the target data.
In addition, to achieve the above object, the present invention also provides a kind of data management apparatus based on block chain;
The data management apparatus based on block chain includes: memory, processor and is stored on the memory simultaneously The computer program that can be run on the processor, in which:
The data management side as described above based on block chain is realized when the computer program is executed by the processor The step of method.
In addition, to achieve the above object, the present invention also provides computer storage mediums;
Computer program, the realization when computer program is executed by processor are stored in the computer storage medium Such as the step of the above-mentioned data managing method based on block chain.
The embodiment of the present invention proposes a kind of data managing method based on block chain, device, equipment and storage medium, in area Block chain distributed data platform receive terminal transmission to when the operation requests of storing data, obtaining the operation in block chain Request corresponding keyword, wherein the keyword includes: data type, affiliated person mark, type of service and/or business mark Know;The data stored in the block chain are inquired, obtain the target data with the keyword match, and judge the terminal pair Whether there is the operating right of the target data using family;The operation that user has the target data is corresponded in the terminal When permission, the target data is handled by the operation requests.Behaviour is received in block chain distributed data platform in the present invention When requesting, the corresponding data type of operation requests, affiliated person mark, type of service and/or service identification are obtained, is obtained with basis Data type, affiliated person mark, type of service and/or the service identification got inquire the data stored in block chain, It realizes multidimensional data query operation, improves the efficiency of the data query in block chain.
Detailed description of the invention
Fig. 1 is the apparatus structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is that the present invention is based on the flow diagrams of the data managing method first embodiment of block chain;
Fig. 3 is that the present invention is based on the functional block diagrams of one embodiment of data administrator of block chain.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The essence of block chain is also a distributed database.Bottom uses the Key-Value of a persistence Database.Unique key Key is relied in Key-Value database when the storage of data, and this keyword Key is usual It is a character string, the data being stored on block chain is inquired according to keyword Key.But business is very in block chain Complicated, Key-Value database has many limitations, such as can not inquire data according to various dimensions.
The present invention provides a solution, when data are written in block chain, obtains the affiliated of target data to be written Person's mark, data type, type of service and service identification;And by affiliated person's mark, data type, type of service and service identification As the keyword of target data, keyword and target data association are stored in the block chain.In the mistake of data manipulation Cheng Zhong can carry out multidimensional data query according to affiliated person's mark, data type, type of service and the service identification of data Operation, optimizes inquiry operation.
As shown in Figure 1, Fig. 1 be the distributed server for the hardware running environment that the embodiment of the present invention is related to (again It is block data platform, block catenary system, the node of block chain or the data management apparatus based on block chain, wherein be based on The data management apparatus of block chain can be to be made of the data administrator individually based on block chain, is also possible to by other Device is combined with the data administrator based on block chain and to be formed) structural schematic diagram.
Server of the embodiment of the present invention refers to a management resource and provides the computer of service for user, is generally divided into file Server, database server and apps server.The computer or computer system for running the above software are also referred to as Server.For common PC (personal computer) personal computer, server is in stability, safety, property Energy etc. requires higher;As shown in Figure 1, the server may include: processor 1001, such as central processing unit (Central Processing Unit, CPU), network interface 1004, user interface 1003, memory 1005, communication bus 1002, hardware such as chipset, disk system, network etc..Wherein, communication bus 1002 is for realizing the connection between these components Communication.User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user Interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include having for standard Line interface, wireless interface (such as Wireless Fidelity WIreless-FIdelity, WIFI interface).Memory 1005 can be high speed with Machine accesses memory (random access memory, RAM), is also possible to stable memory (non-volatile ), such as magnetic disk storage memory.Memory 1005 optionally can also be the storage dress independently of aforementioned processor 1001 It sets.
Optionally, server can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, sound Frequency circuit, WiFi module;Input unit, than display screen, touch screen;Network interface can be blue in blanking wireless interface in addition to WiFi Tooth, probe etc..It will be understood by those skilled in the art that server architecture shown in Fig. 1 does not constitute the restriction to server, It may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, the computer software product, which is stored in a storage medium, (storage medium: is called computer storage Medium, computer media, readable medium, readable storage medium storing program for executing, computer readable storage medium are directly medium etc., storage Medium can be non-volatile readable storage medium, such as RAM, magnetic disk, CD) in, including some instructions use is so that an end End equipment (can be mobile phone, computer, server, air conditioner or the network equipment etc.) executes each embodiment institute of the present invention The method stated, as may include operating system, network communication module, use in a kind of memory 1005 of computer storage medium Family interface module and computer program.
In server shown in Fig. 1, network interface 1004 be mainly used for connect background data base, with background data base into Row data communication;User interface 1003 is mainly used for connection client, and (client, is called user terminal or terminal, and the present invention is implemented Example terminal can be also possible to mobile terminal with fixed terminal, e.g., intelligent air condition, intelligent electric lamp, intelligent power with network savvy, Intelligent sound box, autonomous driving vehicle, PC, smart phone, tablet computer, E-book reader, portable computer etc., are wrapped in terminal Containing sensor such as optical sensor, motion sensor and other sensors, details are not described herein), data are carried out with client Communication;And processor 1001 can be used for calling the computer program stored in memory 1005, and it is real to execute the present invention or less Step in the data managing method based on block chain of example offer is provided.
The present embodiment provides a kind of data managing method based on block chain, the present embodiment is applied to point as shown in Figure 1 The server of cloth is called block data platform, block catenary system, the node of block chain or the data management based on block chain Equipment, the data managing method based on block chain in the present embodiment, comprising:
Receive terminal transmission to the operation requests of storing data in block chain when, it is corresponding to obtain the operation requests Keyword, wherein the keyword includes: data type, affiliated person mark, type of service and/or service identification;
The data stored in the block chain are inquired, obtain the target data with the keyword match, and described in judgement Terminal corresponds to the operating right whether user has the target data;
When the terminal, which corresponds to user, has the operating right of the target data, by described in operation requests processing Target data.
Before the step of executing the present embodiment, the writing format of data in block chain is pre-defined, specifically, comprising:
Step S01 obtains the corresponding primary data of the data input request and use when receiving data input request Family mark.
When block data platform receives data input request, obtains data input request and correspond to initial number to be written According to and data input request in the user identifier that carries, user identifier refers to the identification information for uniquely determining user identity, example Such as, miner's account of block chain.
The triggering mode of data input request is not especially limited in the present embodiment, that is, the manual trigger data input of user Request, for example, user inputs at the terminal, " 125 type of service xxx, the input request of service identification xxx " trigger data, terminal will Data input request is sent to block data platform, and block data platform receives the data input request that terminal is sent, and obtains In data input request " 125 type of service xxx, service identification xxx " are used as the corresponding primary data of data input request, so Afterwards, block data platform obtains the user identifier carried in data input request;Alternatively, automatic trigger data input request, example Such as, user is in the automatic trigger condition for presetting data input request on block data platform: when getting new data, so Afterwards, when block data platform gets new data, the judgement of block data platform meets default automatic trigger condition, block counts According to platform automatic trigger data input request, it is corresponding as data input request that block data platform will acquire new data Primary data, block data platform obtain the corresponding mark of user of setting automatic trigger condition, and block data platform is by the use The corresponding mark in family is used as the corresponding user identifier of the data input request.
After block data platform gets primary data and user identifier, block data platform needs to judge the user Whether the corresponding user of mark there are data to input permission, for example, the user identifier that block data platform will acquire is marked with pre- The default mark known in set is compared, when there is target identification matched with user identifier in default logo collection, area Block data platform determines that the user identifier corresponds to user and inputs permission with data, on the contrary;For another example, block data platform data The primary data carried in input request is by terminal encryption, that is, terminal inputs encrypted primary data and data Request is sent to block data platform together, and operation is decrypted to primary data in block data platform, in block data platform When to primary data successful decryption, block data platform determines that the user identifier corresponds to user and inputs permission with data, on the contrary. Determine that the user identifier corresponds to user and inputs permission without data in block data platform, block data platform will send and prompt Information corresponds to user to terminal with prompt terminal.
Step S02, the user identifier correspond to user with data input permission when, using the primary data as to The target data of storage identifies the user identifier as the affiliated person of the target data, and obtains the target data Data type, type of service and service identification.
When block data platform determines that user identifier corresponds to user with data input permission, block data platform will be obtained The primary data taken is identified as target data to be stored, and using user identifier as the affiliated person of target data, then, area Block data platform obtains the information such as data type, type of service and the service identification of target data, wherein data type is index According to type be business datum or organization information data etc.;Affiliated person's mark is the affiliated person for mark data, alliance Possess numerous users in chain, affiliated person's mark can be with the affiliated side of rapidly locating;Type of service refers in practical business field Under scape, the actual type of data or type;Service identification refers to the business unique identification under specific business scenario.
Step S03, will it is described belonging to person mark, the data type, the type of service and the service identification as The keyword of the target data, and the keyword and the target data association are stored in the block chain.
Block data platform identifies affiliated person, data type, type of service and service identification are as the pass of target data Key word, and keyword and target data association are stored in block chain.In the present embodiment in block chain keyword Key format It is no longer single meaningless character string, but affiliated person's mark, data type, type of service and the industry of data predetermined Business mark, can be according to affiliated person's mark, data type, type of service and business when block data platform carries out data manipulation Mark realizes multiple dimension inquiries, realizes the quick search of block chain data, specifically:
It is described to be based on block chain the present invention is based in the first embodiment of the data managing method of block chain referring to Fig. 2 Data managing method include:
Step S10, receive terminal transmission to the operation requests of storing data in block chain when, obtain the operation Request corresponding keyword.
Block data platform receive terminal transmission to the operation requests of storing data in block chain when, wherein behaviour Making request can be data update request, data modification request and data removal request etc.;Block data platform obtains operation and asks Seek corresponding keyword Key.
It should be added that the triggering mode of operation requests is not especially limited in the application, that is, operation requests can Being triggered manually by user, for example, then user inputs " change of xxx business datum " at the terminal clicks presetting in terminal Key, trigger action request, block data platform receive operation requests, and obtain the user's input carried in operation requests " xxx business " is used as the corresponding keyword of the operation requests by " xxx business ", block data platform;Alternatively, operation requests may be used also To be automatic trigger, for example, operation requests trigger condition is being arranged in user in block data platform in advance: in storing data Automatic trigger data update request when update;When block data detection of platform to storing data updates, block data platform is certainly Dynamic trigger data updates request, and data are updated type of service that request carries etc. as data and update request by block data platform Corresponding keyword.
Operation requests in the present embodiment correspond to keyword include: data type, affiliated person mark, type of service and/or Service identification, for example, data type includes business datum, organization information data and message data etc., different types of data are taken It is identified with different data types, if business datum is with " 001 " beginning, organization information data are with " 002 " beginning.
Each data are stored in block chain and all there is corresponding affiliated person's mark, according to the corresponding affiliated person of each data Mark, it may be determined that the affiliated person of data;Type of service is arranged according to specific needs, such as may be configured as invoice type, order Type and buying and selling of commodities type etc.;Under specific business scenario, the service identification of each data all existence anduniquess, but it is multiple There may be identical service identifications for business scenario.Therefore, to find a unique data in block chain, operation is asked The data type for including in keyword, affiliated person mark, one in type of service and service identification or more can be carried by asking It is a.That is, the keyword Key of each data can be connected by fixed separator in block chain, which can be "-", ", " etc., for example, target data: 1523 (data type a, affiliated person mark b, type of service c, service identification d).
Step S20 inquires the data stored in the block chain, obtains the target data with the keyword match, and Judge that the terminal corresponds to the operating right whether user has the target data.
After block data platform gets keyword, according to the number stored in the keyword query block chain of acquisition According to specifically, comprising:
The corresponding preset keyword of each data stored in the keyword and the block chain is compared step a, Using preset keyword data identical with the keyword as the first data;
Step b sends prompt information to the terminal, with prompt when the quantity of first data is no less than two The terminal corresponds to user and inputs new keyword;
Step c receives the new keyword that the terminal is sent, and the new keyword is corresponding with first data Preset keyword be compared, until get the corresponding target data of the operation requests.
That is, block data platform carries out the keyword preset keyword corresponding with each data of storage in operation requests It compares, block data platform is using the identical data of preset keyword keyword corresponding with operation requests as the first data;Then, Block data platform obtains the data amount check of the first data;When the quantity of the first data is no less than two, block data platform Prompt information is sent to terminal, user is corresponded to prompt terminal and inputs new keyword;Block data platform receives terminal and sends New keyword, new keyword preset keyword corresponding with the first data is compared, until getting operation and asking Seek corresponding unique objects data.
For example, block data platform obtains the data according to keyword in block chain when keyword is data type The corresponding total data of type;When the data volume of the acquisition is multiple, terminal when block data platform sends prompt information, eventually End subscriber inputs new keyword: service identification, and service identification is sent to block data platform by terminal, and block data platform is pressed New keyword: service identification filters out the corresponding target data of operation requests from multiple data.
After block data platform gets target data, block data platform needs to judge that the terminal corresponds to user and is The no operating right having to target data, to determine whether to execute the operation requests, wherein block data platform carries out permission The step of judgement includes:
The target data is back to terminal by block data platform, and terminal encrypts target data using its private key, And terminal signs encrypted target data, the target data after being signed, terminal is by the target data after signature Return to block data platform.Public key corresponding with the private key is stored in block chain.When block data platform receives After encrypted target data, using the public key decryptions target data.It can be with successful decryption target data, then according to the public key Block data platform determines that terminal corresponds to the operating right that user has target data;Number of targets cannot be decrypted according to the public key According to then block data platform determines that terminal corresponds to user without the operating right to target data.
It should be added that Encryption Algorithm includes but is not limited to MD5 and hash algorithm.In the present embodiment, each There is corresponding public private key pair in user, public key is stored in the intelligent contract of block chain, and private key is by terminal storage.In addition, block Chain can also correspond to different private keys according to the difference of operation requests, in the public private key pair of user, there are a public key and with The corresponding multiple sub- private keys of the public key.Such as, after terminal data update the corresponding sub- private key encryption target data of update of request, if Block chain uses public key can be with the successful decryption target data, then block data platform judges that terminal corresponds to user and has update mesh Mark the renewal authority of data.
Step S30, when the terminal, which corresponds to user, has the operating right of the target data, by the operation requests Handle the target data.
Block data platform determine terminal correspond to user have target data operating right when, block data platform is pressed Operation requests processing target data, for example, operation requests are to update operation requests, block data platform is according to update operation requests Update target data.
When block chain distributed data platform receives operation requests in the present embodiment, the corresponding number of operation requests is obtained According to type, affiliated person mark, type of service and/or service identification, according to data type, the affiliated person mark, industry got Service type and/or service identification inquire the data stored in block chain, realize multidimensional data query operation, improve The efficiency of data query in block chain.
Further, on the basis of first embodiment of the invention, propose that the present invention is based on the data managements of block chain The second embodiment of method.
The present embodiment be in first embodiment after step S30 the step of, block data platform will operate in the present embodiment Information is recorded, to facilitate backtracking and analysis to storing data in block chain, specifically, comprising:
Step S40 obtains the corresponding processing letter of the target data when detecting that the target data processing is completed Breath.
At the end of target data operation, target data is added an operation label, block data by block data platform When detection of platform is to the operation label, block data platform determines that target data processing is completed, at this point, block data platform obtains The operation information of target data, wherein processing information includes: operating time point, operation user identifier and action type, so that area Operation information is added to corresponding target data by block data platform, specifically:
Step S50 stores the Value value and the target data association using the processing information as Value value Into the block chain.
The processing information that block data platform will acquire is stored as Value value, and by Value value and target data association Into block chain, that is, Value value only has recorded and keyword corresponding data, root in current block chain Key-Value database It can not judge whether the target data is newly-increased data according to Value value, the data being still modified can not also judge to modify Whom the modification user for the data crossed is, block data platform is using operation information as Value value in the present embodiment, so that block Data traceability in chain is more accurate, meanwhile, block data platform can also carry out target data analysis according to Value value.
Further, on the basis of the above embodiments, propose that the present invention is based on the data managing methods of block chain 3rd embodiment.
The present embodiment is the refinement of step S20 in first embodiment, and two kinds are shown in particular in the present embodiment and judges terminal Whether corresponding user has the mode of target data operating right, implementation one: block chain carries out user according to user's signature Permission judgement, that is,
The target data is fed back to the terminal by step S21, so that the terminal uses private key to the number of targets According to progress cryptographic operation.
Target data is fed back to terminal by block data platform, so that terminal carries out encryption behaviour to target data using private key Make, terminal simultaneously signs to encrypted target data, the target data after being signed, and terminal is by the number of targets after signature According to returning to block data platform.The digital signature of terminal in the present embodiment, that is, rivest, shamir, adelman needs together when in use Shi Yongyou public key and private key, public key is corresponding with private key, if having used public key in the ciphering process to data, only has It could be decrypted using corresponding private key., whereas if having used private key when encrypting to data, also only use Corresponding public key could be decrypted.
Step S22 is determined when receiving the encrypted target data that the terminal is sent by default intelligent contract Public key is decrypted, and operation is decrypted to the target data by the public key.
When block data platform receives the encrypted target data that terminal is sent, block data platform is by default intelligence (default intelligence contract is the pre-set computer program operated on reproducible, shared account book to contract, can handle letter Breath receives, storage and transmission are worth) determine decryption public key, and operation is decrypted to target data by public key.
Step S23 determines that the terminal corresponds to user with the target data in the target data successful decryption Operating right.
When block data platform is to target data successful decryption, block data platform determines that terminal corresponds to user with institute State the operating right of target data.
Implementation two: terminal encrypt target data and timestamp together when cryptographic operation, that is,
The target data is fed back to the terminal by step S24, for the terminal by the timestamp of current time and Target data carries out cryptographic operation together.
Target data is fed back to terminal by block data platform, so that terminal is by the timestamp and target data of current time Cryptographic operation is carried out together.That is, the present embodiment, when encrypting to target data, terminal is added together with timestamp using target data It is close, it is to be understood that the time point of terminal encryption target data can be determined by timestamp.
Step S25 carries out the target data when receiving the encrypted target data that the terminal is sent Decryption oprerations obtain the timestamp, by the timestamp calculate target data described in the terminal encryption time and it is current when Between time interval.
When block data platform receives the encrypted target data that terminal is sent, block data platform is to target Data be decrypted operation included timestamp, block data platform temporally stab computing terminal encryption target data when Between, block data platform calculates the time interval of timestamp and current time.
By the time interval being calculated, (preset time threshold refers to be set block data platform in advance with preset time threshold The decryption time interval set, is arranged according to specific needs, for example, being set as 10s) it is compared, according to comparison result Carry out permission judgement, that is,
Step S26 determines that the terminal corresponds to user with described when the time interval is less than preset time threshold The operating right of target data.
When time interval is less than preset time threshold, block data platform determines that terminal corresponds to user with the target The operating right of data, when time interval is greater than or equal to preset time threshold, block data platform determines terminal to application Family does not have the operating right of the target data, can guarantee the accuracy that permission determines in the present embodiment.
In addition, the embodiment of the present invention also proposes a kind of data administrator based on block chain, described to be based on referring to Fig. 3 The data administrator of block chain includes:
Request receiving module, for receive terminal transmission to the operation requests of storing data in block chain when, obtain Take the corresponding keyword of the operation requests, wherein the keyword includes: data type, affiliated person mark, type of service And/or service identification;
Inquiry judging module obtains the mesh with the keyword match for inquiring the data stored in the block chain Data are marked, and judge that the terminal corresponds to the operating right whether user has the target data;
Data processing module, for the terminal correspond to user have the target data operating right when, by institute It states operation requests and handles the target data.
Optionally, the data administrator based on block chain, comprising:
Request module is inputted, it is corresponding for when receiving data input request, obtaining the data input request Primary data and user identifier;
Data obtaining module is used for when the user identifier corresponds to user with data input permission, will be described initial Data are identified as target data to be stored using the user identifier as the affiliated person of the target data, and obtain institute State the data type, type of service and service identification of target data;
It is associated with preserving module, for will affiliated person's mark, the data type, the type of service and the business The keyword as the target data is identified, and the keyword and the target data association are stored in the block chain In.
Optionally, the data administrator based on block chain, comprising:
Operation information acquisition module, for obtaining the target data when detecting that the target data processing is completed Corresponding processing information, wherein the processing information includes: operating time point, operation user identifier and action type;
Preserving module is updated, is used for using the processing information as Value value, by the Value value and the number of targets According to associated storage into the block chain.
Optionally, the inquiry judging module 20, comprising:
First comparing unit, the corresponding default key of each data for will be stored in the keyword and the block chain Word is compared, using preset keyword data identical with the keyword as the first data;
Prompt unit is sent, for when the quantity of first data is no less than two, sends prompt information to described Terminal inputs new keyword to prompt the terminal to correspond to user;
Second comparing unit, the new keyword sent for receiving the terminal, by the new keyword with it is described The corresponding preset keyword of first data is compared, until getting the corresponding target data of the operation requests.
Optionally, the inquiry judging module 20, comprising:
First encryption unit, for the target data to be fed back to the terminal, so that the terminal uses private key pair The target data carries out cryptographic operation;
First decryption unit, for when receiving the encrypted target data that the terminal is sent, pressing default intelligence Energy contract determines decryption public key, and operation is decrypted to the target data by the public key;
First judging unit, in the target data successful decryption, determining that the terminal corresponds to user with institute State the operating right of target data.
Optionally, the inquiry judging module 20, comprising:
Second encryption unit, for the target data to be fed back to the terminal, so that the terminal is by current time Timestamp and target data carry out cryptographic operation together;
Second decryption unit, for when receiving the encrypted target data that the terminal is sent, to the mesh Mark data are decrypted operation and obtain the timestamp, by the timestamp calculate target data described in the terminal encryption when Between time interval with current time;
Second judging unit, for determining the terminal to application when the time interval is less than preset time threshold Family has the operating right of the target data.
Optionally, the data administrator based on block chain, further includes:
Cue module is sent, for sending out when the terminal corresponds to user and do not have the operating right of the target data Send prompt information to the terminal, there is currently no operating rights to prompt the terminal to correspond to user.
Wherein, the step of each Implement of Function Module of the data administrator based on block chain can refer to the present invention is based on Each embodiment of the data managing method of block chain, details are not described herein again.
In addition, the embodiment of the present invention also proposes a kind of computer storage medium.
Computer program, the realization when computer program is executed by processor are stored in the computer storage medium Operation in data managing method provided by the above embodiment based on block chain.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body/operation/object is distinguished with another entity/operation/object, without necessarily requiring or implying these entity/operations/ There are any actual relationship or orders between object;The terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or the system that include a series of elements not only include that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of system.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in process, method, article or the system for including the element.
For device embodiment, since it is substantially similar to the method embodiment, related so describing fairly simple Place illustrates referring to the part of embodiment of the method.The apparatus embodiments described above are merely exemplary, wherein making It may or may not be physically separated for the unit of separate part description.In can selecting according to the actual needs Some or all of the modules realize the purpose of the present invention program.Those of ordinary skill in the art are not making the creative labor In the case where, it can it understands and implements.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of data managing method based on block chain, which is characterized in that the data managing method packet based on block chain Include following steps:
Receive terminal transmission to the operation requests of storing data in block chain when, obtain the corresponding pass of the operation requests Key word, wherein the keyword includes: data type, affiliated person mark, type of service and/or service identification;
The data stored in the block chain are inquired, obtain the target data with the keyword match, and judge the terminal Whether corresponding user has the operating right of the target data;
When the terminal, which corresponds to user, has the operating right of the target data, the target is handled by the operation requests Data.
2. the data managing method as described in claim 1 based on block chain, which is characterized in that described to receive terminal hair Send to before the step of when the operation requests of storing data, obtaining the corresponding keyword of the operation requests in block chain, packet It includes:
When receiving data input request, the corresponding primary data of the data input request and user identifier are obtained;
When the user identifier corresponds to user with data input permission, using the primary data as number of targets to be stored According to being identified the user identifier as the affiliated person of the target data, and obtain the data type of the target data, industry Service type and service identification;
Person's mark, the data type, the type of service and the service identification are as the target data belonging to will be described Keyword, and the keyword and the target data association are stored in the block chain.
3. the data managing method as described in claim 1 based on block chain, which is characterized in that described corresponding in the terminal When user has the operating right of the target data, after the step of the operation requests processing target data, packet It includes:
When detecting that the target data processing is completed, the corresponding processing information of the target data is obtained, wherein the place Reason information includes: operating time point, operation user identifier and action type;
Using the processing information as Value value, the Value value and the target data association are stored to the block chain In.
4. the data managing method as described in claim 1 based on block chain, which is characterized in that the inquiry block chain The step of data of middle storage, acquisition and target data of the keyword match, comprising:
The corresponding preset keyword of each data stored in the keyword and the block chain is compared, by default key Word data identical with the keyword are as the first data;
When the quantity of first data is no less than two, prompt information is sent to the terminal, to prompt the terminal pair New keyword is inputted using family;
The new keyword that the terminal is sent is received, by the new keyword default key corresponding with first data Word is compared, until getting the corresponding target data of the operation requests.
5. the data managing method as described in claim 1 based on block chain, which is characterized in that the judgement terminal pair Whether there is the step of operating right of the target data using family, comprising:
The target data is fed back into the terminal, so that the terminal carries out encryption behaviour to the target data using private key Make;
When receiving the encrypted target data that the terminal is sent, decryption public key is determined by default intelligent contract, and Operation is decrypted to the target data by the public key;
In the target data successful decryption, determine that the terminal corresponds to the operating right that user has the target data.
6. the data managing method as described in claim 1 based on block chain, which is characterized in that the judgement terminal pair Whether there is the step of operating right of the target data using family, comprising:
The target data is fed back into the terminal, for the terminal by the timestamp of current time and target data together Carry out cryptographic operation;
When receiving the encrypted target data that the terminal is sent, operation is decrypted to the target data and is obtained The timestamp was calculated by the timestamp between the time of target data described in the terminal encryption and the time of current time Every;
When the time interval is less than preset time threshold, determine that the terminal corresponds to the behaviour that user has the target data Make permission.
7. the data managing method as described in claim 1 based on block chain, which is characterized in that the inquiry block chain The data of middle storage obtain the target data with the keyword match, and judge that the terminal corresponds to whether user has institute After the step of stating the operating right of target data, comprising:
When the terminal corresponds to user and does not have the operating right of the target data, transmission prompt information to the terminal, To prompt the terminal to correspond to user, there is currently no operating rights.
8. a kind of data administrator based on block chain, which is characterized in that the data administrator packet based on block chain It includes:
Request receiving module, for receive terminal transmission to the operation requests of storing data in block chain when, obtain institute State the corresponding keyword of operation requests, wherein the keyword include: data type, affiliated person mark, type of service and/or Service identification;
Inquiry judging module obtains the number of targets with the keyword match for inquiring the data stored in the block chain According to, and judge that the terminal corresponds to the operating right whether user has the target data;
Data processing module, for the terminal correspond to user have the target data operating right when, by the behaviour Make request and handles the target data.
9. a kind of data management apparatus based on block chain, which is characterized in that the data management apparatus packet based on block chain It includes: memory, processor and being stored in the computer program that can be run on the memory and on the processor, in which:
When the computer program is executed by the processor realize as described in any one of claims 1 to 7 based on block The step of data managing method of chain.
10. a kind of computer storage medium, which is characterized in that be stored with computer program, institute in the computer storage medium State the data pipe based on block chain realized as described in any one of claims 1 to 7 when computer program is executed by processor The step of reason method.
CN201910377822.4A 2019-05-07 2019-05-07 Data managing method, device, equipment and storage medium based on block chain Pending CN110222086A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910377822.4A CN110222086A (en) 2019-05-07 2019-05-07 Data managing method, device, equipment and storage medium based on block chain
PCT/CN2019/121718 WO2020224246A1 (en) 2019-05-07 2019-11-28 Block chain-based data management method and apparatus, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910377822.4A CN110222086A (en) 2019-05-07 2019-05-07 Data managing method, device, equipment and storage medium based on block chain

Publications (1)

Publication Number Publication Date
CN110222086A true CN110222086A (en) 2019-09-10

Family

ID=67820857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910377822.4A Pending CN110222086A (en) 2019-05-07 2019-05-07 Data managing method, device, equipment and storage medium based on block chain

Country Status (2)

Country Link
CN (1) CN110222086A (en)
WO (1) WO2020224246A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110609839A (en) * 2019-09-17 2019-12-24 北京海益同展信息科技有限公司 Method, device and equipment for processing block chain data and readable storage medium
CN110674180A (en) * 2019-09-26 2020-01-10 腾讯科技(深圳)有限公司 Business data processing method and device and readable storage medium
CN110888953A (en) * 2019-11-14 2020-03-17 中国民航信息网络股份有限公司 Region information input method and device
CN110909074A (en) * 2019-10-21 2020-03-24 北京海益同展信息科技有限公司 Method and device for processing social data, computer equipment and storage medium
CN111177252A (en) * 2019-11-26 2020-05-19 腾讯云计算(北京)有限责任公司 Service data processing method and device
CN111368230A (en) * 2020-02-19 2020-07-03 北京邮电大学 Block chain-based industrial internet identification processing method and device
CN111400397A (en) * 2020-02-29 2020-07-10 平安科技(深圳)有限公司 Data synchronization method, device, equipment and computer storage medium
CN111506628A (en) * 2020-04-22 2020-08-07 中国民航信息网络股份有限公司 Data processing method and device
CN111885133A (en) * 2020-07-10 2020-11-03 深圳力维智联技术有限公司 Data processing method and device based on block chain and computer storage medium
WO2020224246A1 (en) * 2019-05-07 2020-11-12 深圳壹账通智能科技有限公司 Block chain-based data management method and apparatus, device and storage medium
CN113098876A (en) * 2021-04-02 2021-07-09 中南大学 Product data chaining method and medium based on block chain and intelligent contract
CN113268514A (en) * 2021-05-26 2021-08-17 深圳壹账通智能科技有限公司 Multidimensional data statistical method and device, electronic equipment and storage medium
CN115174234A (en) * 2022-07-08 2022-10-11 慧之安信息技术股份有限公司 Internet of things identification management method based on block chain

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107769913A (en) * 2016-08-16 2018-03-06 广东国盾量子科技有限公司 A kind of communication means and system based on quantum UKey
CN107968736A (en) * 2017-12-04 2018-04-27 深圳绿米联创科技有限公司 Intelligent domestic system and information ciphering method and device, terminal
CN109587146A (en) * 2018-12-11 2019-04-05 北京奇虎科技有限公司 Method for managing object and system based on block chain

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990407B (en) * 2018-04-27 2020-11-10 腾讯科技(深圳)有限公司 Block chain based data storage method and device, server and storage medium
CN109413136A (en) * 2018-08-31 2019-03-01 北京京东金融科技控股有限公司 Management method, device, equipment and the readable storage medium storing program for executing of hotel's data
CN110222086A (en) * 2019-05-07 2019-09-10 深圳壹账通智能科技有限公司 Data managing method, device, equipment and storage medium based on block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107769913A (en) * 2016-08-16 2018-03-06 广东国盾量子科技有限公司 A kind of communication means and system based on quantum UKey
CN107968736A (en) * 2017-12-04 2018-04-27 深圳绿米联创科技有限公司 Intelligent domestic system and information ciphering method and device, terminal
CN109587146A (en) * 2018-12-11 2019-04-05 北京奇虎科技有限公司 Method for managing object and system based on block chain

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020224246A1 (en) * 2019-05-07 2020-11-12 深圳壹账通智能科技有限公司 Block chain-based data management method and apparatus, device and storage medium
CN110609839A (en) * 2019-09-17 2019-12-24 北京海益同展信息科技有限公司 Method, device and equipment for processing block chain data and readable storage medium
CN110609839B (en) * 2019-09-17 2021-05-25 北京海益同展信息科技有限公司 Method, device and equipment for processing block chain data and readable storage medium
US11966412B2 (en) 2019-09-17 2024-04-23 Jingdong Technology Information Technology Co., Ltd. Blockchain data processing method and apparatus, device, and readable storage medium
CN110674180A (en) * 2019-09-26 2020-01-10 腾讯科技(深圳)有限公司 Business data processing method and device and readable storage medium
CN110909074A (en) * 2019-10-21 2020-03-24 北京海益同展信息科技有限公司 Method and device for processing social data, computer equipment and storage medium
CN110888953A (en) * 2019-11-14 2020-03-17 中国民航信息网络股份有限公司 Region information input method and device
CN111177252A (en) * 2019-11-26 2020-05-19 腾讯云计算(北京)有限责任公司 Service data processing method and device
CN111368230A (en) * 2020-02-19 2020-07-03 北京邮电大学 Block chain-based industrial internet identification processing method and device
CN111400397B (en) * 2020-02-29 2023-04-11 平安科技(深圳)有限公司 Data synchronization method, device, equipment and computer storage medium
CN111400397A (en) * 2020-02-29 2020-07-10 平安科技(深圳)有限公司 Data synchronization method, device, equipment and computer storage medium
CN111506628A (en) * 2020-04-22 2020-08-07 中国民航信息网络股份有限公司 Data processing method and device
CN111885133A (en) * 2020-07-10 2020-11-03 深圳力维智联技术有限公司 Data processing method and device based on block chain and computer storage medium
CN111885133B (en) * 2020-07-10 2023-06-09 深圳力维智联技术有限公司 Block chain-based data processing method and device and computer storage medium
CN113098876A (en) * 2021-04-02 2021-07-09 中南大学 Product data chaining method and medium based on block chain and intelligent contract
CN113268514A (en) * 2021-05-26 2021-08-17 深圳壹账通智能科技有限公司 Multidimensional data statistical method and device, electronic equipment and storage medium
CN115174234A (en) * 2022-07-08 2022-10-11 慧之安信息技术股份有限公司 Internet of things identification management method based on block chain
CN115174234B (en) * 2022-07-08 2023-08-29 慧之安信息技术股份有限公司 Block chain-based Internet of things identifier management method

Also Published As

Publication number Publication date
WO2020224246A1 (en) 2020-11-12

Similar Documents

Publication Publication Date Title
CN110222086A (en) Data managing method, device, equipment and storage medium based on block chain
US20210232974A1 (en) Federated-learning based method of acquiring model parameters, system and readable storage medium
CN109891424B (en) Establishing links between identifiers without revealing specific identifying information
CN109255444B (en) Federal modeling method and device based on transfer learning and readable storage medium
CN106533669B (en) The methods, devices and systems of equipment identification
US9538372B2 (en) Establishing communication between devices
CN110086817B (en) Reliable user service system and method
CN109995876B (en) File transmission method, device, system and computer storage medium
CN109347839B (en) Centralized password management method and device, electronic equipment and computer storage medium
CN111553745A (en) Federal-based model updating method, device, equipment and computer storage medium
CN113114753A (en) Equipment control method, device and system, storage medium and electronic device
CN110011987A (en) A kind of system and method that handset program is bound with Intelligent hardware
CN111027981B (en) Method and device for multi-party joint training of risk assessment model for IoT (Internet of things) machine
CN110377856A (en) Netpage registration method, system, equipment and computer storage medium
CN115130075A (en) Digital signature method and device, electronic equipment and storage medium
JP2015090993A (en) Encryption control device, encryption control method and program
CN112231309A (en) Method, device, terminal equipment and medium for removing duplicate of longitudinal federal data statistics
CN110572268B (en) Anonymous authentication method and device
CN112150030A (en) Account management method based on multiple units and multiple identities, terminal equipment and storage medium
CN108667647B (en) Method and device for setting device parameters and server
CN110266698A (en) Pass through the Knowledge Sharing data cochain method and its equipment of block chain
CN115510490A (en) Method, device, system and equipment for inquiring encrypted data shared by non-secret keys
CN111259452A (en) Data management method based on block chain and related device
CN112019642B (en) Audio uploading method, device, equipment and storage medium
CN114157425A (en) Method and device for responding service request

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