WO2020224247A1 - 基于区块链的数据溯源方法、装置、设备及可读存储介质 - Google Patents

基于区块链的数据溯源方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2020224247A1
WO2020224247A1 PCT/CN2019/121719 CN2019121719W WO2020224247A1 WO 2020224247 A1 WO2020224247 A1 WO 2020224247A1 CN 2019121719 W CN2019121719 W CN 2019121719W WO 2020224247 A1 WO2020224247 A1 WO 2020224247A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
target
terminal
keyword
historical
Prior art date
Application number
PCT/CN2019/121719
Other languages
English (en)
French (fr)
Inventor
张文明
谢丹力
贾牧
宦鹏飞
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020224247A1 publication Critical patent/WO2020224247A1/zh

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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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

Definitions

  • This application relates to the field of blockchain technology, and in particular to a method, device, equipment and readable storage medium for data traceability based on blockchain.
  • Blockchain can be understood as a distributed ledger, its essence is also a distributed database, its bottom layer can use a persistent key value Key-Value Database for storage.
  • the data traceability function of the blockchain itself has drawbacks: the data traceability function of the blockchain can only record the time when a certain data is modified or deleted, and the record information is single. If a piece of blockchain data is modified Or deleted, the blockchain historical ledger only records the data modification or deletion and the time when the data is modified or deleted. There is no other operation information, which cannot meet the actual business needs.
  • the main purpose of this application is to provide a blockchain-based data traceability method, device, equipment and readable storage medium, aiming to solve the problem of single recorded information when blockchain data is deleted or modified.
  • this application provides a blockchain-based data traceability method, including:
  • the step of generating historical keywords and historical values uniquely corresponding to the target keywords includes: performing operations on the target keywords based on a preset algorithm to obtain historical keywords uniquely corresponding to the target keywords; Create an initial structure based on preset recording rules, and add corresponding record characters to the initial structure according to the modification operation/delete operation to obtain the corresponding historical structure; determine the historical structure as the history The historical value corresponding to the keyword.
  • this application also provides a block chain-based data traceability device, and the block chain-based data traceability device includes:
  • the modification and deletion module is configured to, when receiving a data modification/delete instruction sent by the first terminal, query the target keyword corresponding to the target data according to the data modification/delete instruction, and execute the target value corresponding to the target keyword Modify operation/delete operation on the target keyword;
  • the record update module is used to generate historical keywords and historical values uniquely corresponding to the target keywords, the historical values including the operation instruction information of the target data, and based on the historical keywords and the modification operation/ The delete operation updates the history of the blockchain;
  • the first query module is configured to, when receiving a traceability query instruction based on the target keyword sent by the second terminal, query the historical record according to the traceability query instruction, and obtain the target key according to the historical record Keyword record corresponding to the word;
  • the second query module is configured to obtain the historical keyword according to the keyword record and the target keyword, and obtain the historical value according to the historical keyword query;
  • An information return module configured to return corresponding data source information to the second terminal according to the keyword record and the historical value
  • the record update module includes:
  • a keyword calculation unit configured to perform calculations on the target keyword based on a preset algorithm to obtain a historical keyword uniquely corresponding to the target keyword;
  • the structure creation unit is configured to create an initial structure based on preset record rules, and add corresponding record characters to the initial structure according to the modification operation/delete operation to obtain the corresponding historical structure;
  • the historical value determining unit is configured to determine the historical structure as the historical value corresponding to the historical keyword.
  • this application also provides a blockchain-based data traceability device, including a processor, a memory, and computer-readable instructions stored on the memory and executable by the processor.
  • a blockchain-based data traceability device including a processor, a memory, and computer-readable instructions stored on the memory and executable by the processor.
  • the present application also provides a readable storage medium having computer readable instructions stored on the readable storage medium, and when the computer readable instructions are executed by a processor, the above-mentioned region-based Steps of blockchain data traceability method.
  • Figure 1 is a schematic diagram of the hardware structure of a blockchain-based data traceability device involved in the embodiment of the application;
  • FIG. 2 is a schematic flowchart of the first embodiment of the data traceability method based on blockchain according to this application.
  • the blockchain-based data traceability method involved in the embodiments of this application is mainly applied to a blockchain-based data traceability device, which can be a personal computer, server, mobile phone, tablet computer, handheld computer, or other devices with data processing functions.
  • Fig. 1 is a schematic diagram of the hardware structure of the blockchain-based data traceability device involved in the embodiment of the application.
  • the device may include a processor 1001 (for example, a central processing unit Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.
  • processor 1001 for example, a central processing unit Central Processing Unit, CPU
  • communication bus 1002 for example, a central processing unit Central Processing Unit, CPU
  • user interface 1003 for example, a central processing unit Central Processing Unit, CPU
  • network interface 1004 for example, a network interface 1005
  • the communication bus 1002 is used to realize the connection and communication between these components;
  • the user interface 1003 may include a display (Display), an input unit such as a keyboard (Keyboard);
  • the network interface 1004 may optionally include a standard wired interface, a wireless interface (Such as wireless fidelity WIreless-FIdelity, WI-FI interface);
  • the memory 1005 can be a high-speed random access memory (random access memory, RAM), or stable memory (non-volatile memory), such as a disk memory.
  • the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
  • the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, and computer-readable instructions; the network communication module is mainly used to connect to a database and communicate data with the database; and the processor 1001 may call the storage in the memory 1005
  • the computer-readable instructions of this application and execute the blockchain-based data traceability method provided in the embodiments of this application.
  • the embodiment of the application provides a data traceability method based on blockchain.
  • FIG. 2 is a schematic flowchart of a first embodiment of a data traceability method based on blockchain in this application.
  • the blockchain-based data traceability method includes the following steps:
  • Step S10 upon receiving the data modification/deletion instruction sent by the first terminal, query the target keyword corresponding to the target data according to the data modification/deletion instruction, and perform a modification operation/ on the target value corresponding to the target keyword. Perform a delete operation on the target keyword;
  • the block chain-based data traceability method of this embodiment is mainly applied in a block chain system.
  • the block chain system includes a number of block chain nodes. These block chain nodes can be regarded as a distributed database.
  • the database is a key-value database; the business terminal can send a business transaction request to a node to perform operations such as data addition, data modification or data deletion on the blockchain; for each blockchain node ,
  • the function can be realized by a data traceability device based on the blockchain.
  • the device can be a personal computer, server, mobile phone, tablet computer, handheld computer, etc.; for the convenience of description, the device is described with a server as an example.
  • a smart contract is preset in the server (blockchain node), and the smart contract can be understood as a collection of code and data; the smart contract can automatically perform some functions driven by time or events, such as Transfer information between each other, modify the state of the blockchain (account information, etc.), and Turing complete calculation (all things that can be done with a Turing machine, in general, are all things that a general programming language can do).
  • Each business participant of the blockchain can access the corresponding blockchain node through their business terminal, and send related business operation instructions to the smart contract of the blockchain system.
  • a business participant When a business participant needs to modify or delete a certain data in the blockchain business system, it can send the data modification/delete to the server through a certain business terminal (such as PC, laptop, mobile phone, tablet, etc.) Instructions (or send data modification/delete instructions to the smart contract of the server).
  • a certain business terminal such as PC, laptop, mobile phone, tablet, etc.
  • Instructions or send data modification/delete instructions to the smart contract of the server.
  • the service terminal that sends the data modification/deletion instruction may be referred to as the first terminal.
  • the data modification/delete instruction includes an operation object that needs to be modified/deleted, and the operation object may be referred to as target data. Since the bottom layer of the blockchain uses a persistent Key-Value database, the target data in the data modification/deletion instruction can be represented by the target key Key1.
  • the data deletion instruction may include the target keyword Key1 of the target data; if the data is to be modified, the data modification instruction may include the target keyword Key1 of the target data and the specific modification content.
  • the server receives the data modification/deletion instruction, it can extract the target keyword Key1 in the data modification/deletion instruction, query the target keyword Key1 in the blockchain, and then perform the corresponding operation : If it is a data modification instruction, the target value Value1 corresponding to the target keyword Key1 can be obtained by further query according to the target keyword Key1, and the target value Value1 can be modified; if it is a data deletion instruction, the target keyword can be obtained Key1 performs the delete operation.
  • the data modification/deletion instruction can also include other content, such as the reason for the data modification or deletion, the first identity of the first terminal, the data operation authorization identifier, and the operation associated terminal identifier (that is, the data operation involves Other business parties) and other content.
  • Step S20 generating historical keywords and historical values uniquely corresponding to the target keywords, the historical values including the operation description information of the target data, and according to the historical keywords and the modification operation/deleting operation pair Update the history of the blockchain;
  • the server after the server performs a related modification/delete operation on the target value Value1 or the target keyword Key1 corresponding to the target data, it will generate a historical key uniquely corresponding to the target keyword Key1 according to the modification/delete operation HistoryKey1, and generate the corresponding historical value HistoryValue1 for the historical keyword HistoryKey1 according to the delete/modify operation.
  • the history value of this operation HistoryValue1 includes the operation description information of this delete/modify operation, which is used to record this delete/modify operation Details, such as operation type, operation reason remarks, operator identification, operation authorization identification, etc.
  • the target keyword Key1 may be calculated based on a certain algorithm (for example, a hash algorithm or other mapping rules).
  • the server can create an initial structure based on a preset record rule, and then add corresponding record characters to the initial structure according to the modification operation/delete operation, thereby obtaining the corresponding historical structure;
  • the history structure is determined as the history value HistoryValue1 corresponding to the history keyword HistoryKey1.
  • the initial structure can be
  • the Updater records the modification operation of the target data
  • the Action records the deletion operation of the target data
  • the Info records the remarks on the modification/deletion of the target data
  • the server smart contract
  • Info can be set according to the actual situation or sent according to the first terminal
  • the Info includes the operation terminal identifier, which is also a required item; for the filling process of the operation terminal identifier, it may be that when the first terminal sends a data modification/delete instruction, the data modification /Delete instruction to add its own first identity; when the server receives the data modification/deletion instruction, it will extract the first identity; and when creating the initial structure and recording characters, it will use the first identity
  • the identification records the corresponding operation terminal identification in the Info section of the initial organization body.
  • the Info also includes an operation reason, which is an optional item; the process of filling in the operation reason may be that the first terminal sends a data modification/delete instruction according to the user’s operation.
  • the server will extract the operation reason when receiving the data modification/delete instruction
  • the corresponding string content will be recorded in the Info section of the initial organization based on the operation reason information; of course, if the modification/delete instruction does not include the operation reason information, then The server will not record the characters related to the operation reason in the Info section.
  • the historical value HistoryValue1 other content can be included in addition to the historical structure; and the form of the structure can also be set according to actual conditions; the above examples do not constitute a limitation to this solution.
  • the server after the server generates the historical keyword and historical value, it will also update the record in the historical record of the blockchain itself.
  • the update content includes the corresponding modification/delete operation of the newly added target keyword Key1 Record, of course, the record may include the operation time; it may also include the historical keyword HistoryKey1 (or the generation algorithm of HistoryKey1) corresponding to the target keyword Key1, so as to query the historical keyword HistoryKey1 corresponding to Key1.
  • Step S30 upon receiving the traceability query instruction based on the target keyword sent by the second terminal, query the historical record according to the traceability query instruction, and obtain the key corresponding to the target keyword according to the historical record.
  • a certain business terminal when a certain business participant needs to inquire about (trace the source) related information of the target data, a certain business terminal can send a traceability query command based on the target keyword Key1 to the server (blockchain node); of course;
  • the modification/delete operation and the execution of the data traceability operation may not be performed by the same server (blockchain node), but for the convenience of description, the two operations are performed by the same server as an example for description in this embodiment .
  • the service terminal that sends the traceability query instruction based on the target keyword may be referred to as the second terminal.
  • the server When the server receives the traceability query command based on the target keyword, it will first query the historical record of the blockchain itself according to the traceability query command, and obtain the keyword record of the target keyword Key1 from the historical record, and then according to the The keyword record learns the modification/deletion of the target keyword Key1.
  • a certain blockchain query API interface such as QueryHistory API
  • the server will query according to the input and output the keyword records obtained from the query; by providing the API interface to each business terminal, it is convenient for each business party to query. It provides convenience for all business parties; for the server (blockchain), the format of traceability query instructions is also standardized to facilitate subsequent processing.
  • the traceability query instruction can also include other content, such as the user ID of the query, the data query authorization ID, and so on.
  • Step S40 obtaining the historical keyword according to the keyword record and the target keyword, and obtaining the historical value according to the historical keyword query;
  • the server when the server obtains the keyword record for the target keyword Key1, it can judge whether the target keyword Key1 is modified/deleted according to the keyword record; if there is modification/delete, it will be based on The keyword record and the target keyword Key1 obtain the corresponding historical keyword HistoryKey1, and query according to the historical keyword HistoryKey1 to obtain the corresponding historical value HistoryValue1; and because the historical value HistoryValue1 includes the operation instruction information when the target data is modified/deleted , That is, the server has obtained the detailed operation information of the modification/deletion of the target data. Of course, if there is no modification/delete, the server can directly obtain the target value Value1 according to the target keyword Key1, and return the target value Value1 to the second terminal.
  • Step S50 Return corresponding data source information to the second terminal according to the keyword record and the historical value.
  • the server when the server obtains the operation history value HistoryValue1, the server can return corresponding data source information to the second terminal according to the key record and the operation history value HistoryValue1, so that the relevant business party can obtain specific information of the target data.
  • the data traceability information can be set according to a certain format, such as a data traceability file set to an excel format, in which each row of the excel table is a related record that the target data is modified/deleted each time.
  • step S50 includes:
  • the server can generate several data change records according to the keyword record and the operation history value HistoryValue1.
  • Each data change record includes the corresponding change time.
  • the data change record can also include other content. , Such as changing the operator (that is, the terminal or user that caused the change), change description, etc.
  • the server will sort these data change records in a flashback manner according to the change time in the data change records.
  • the data change records of a certain target data include a, b, and c, which are respectively "Updater 20180506 adm1 --, “Updater 20180308 adm2", “Action 20180906 adm1";
  • “Updater” refers to the modification operation of the target data
  • “Action” refers to the deletion operation of the target data
  • “20180506”, “20180308” and “20180906” are the change time (year , Month, day)
  • “adm1" and “adm2" are the identifiers of the change operator
  • the server can sort the three data change records in a time flashback according to the change time, and the sorted result is:
  • the server may return the sorted data change record to the second terminal, so that the business side can view it conveniently.
  • this embodiment adds a piece of associated data when performing data modification or deletion operations on blockchain data, which is used as the traceability history information for the modification or deletion of data; when data traceability is required, it can be based on This linked data obtains the specific operation record of the modified or deleted data, so as to solve the single information problem encountered when the data needs to be traced after the data is modified or deleted, and realize the detailed record of the blockchain data change, which meets the requirements of the blockchain Data recording requirements under business applications.
  • step S10 includes:
  • Step S11 when receiving the data modification/deletion instruction sent by the first terminal, obtain the first identity of the first terminal, and determine the target data corresponding to the data modification/deletion instruction;
  • the blockchain in this embodiment can also impose certain permission restrictions on data modification/deletion operations.
  • different permission restrictions can be set for different blockchain data;
  • the operation authority of the first terminal is also judged first, and the modification/delete operation is only performed if the first terminal has the relevant operation authority.
  • the first terminal will add its own first identity (or the business party’s identity, operation authority, etc.) to the data modification/deletion instruction, And the target keyword Key1 of the target data that needs to be modified/deleted, and then the data modification/delete instruction is sent to the server.
  • the server When the server receives the data modification/deletion instruction sent by the first terminal, it will extract the first identity, so as to determine the identity of the first terminal according to the first identity; at the same time, the server will also extract the data modification/deletion The target keyword Key1 in the instruction, and the target data (operating object) corresponding to the data modification/deletion instruction is determined according to the target keyword Key1.
  • Step S12 judging whether the first terminal has data operation authority for the target data according to the first identity
  • the server When the server obtains the first identity of the first terminal and determines the target data, it can determine whether the first terminal has the data operation authority for the target data according to the first identity.
  • a corresponding operation authority table may be set in advance for various types of data in the blockchain, and the operation authority table includes an identity identifier with relevant operation authority for various types of data; the server may use the first identity identifier
  • the operation authority table is queried to determine whether the first terminal has data operation authority for the target data.
  • Step S13 If the first terminal has the data operation authority, query the target keyword of the target data according to the data modification/deletion instruction, and perform a modification operation/ on the target value corresponding to the target keyword. Perform a delete operation on the target keyword.
  • the server can extract the target keyword Key1 in the data modification/delete instruction, query the target keyword Key1 in the blockchain, and then execute the corresponding Operation: If it is a data modification instruction, the target value Value1 corresponding to the target keyword Key1 can be obtained by further query according to the target keyword Key1, and the target value Value1 can be modified; if it is a data deletion instruction, the target key can be obtained The word Key1 performs a delete operation. If the server determines that the first terminal does not have the data operation authority for the target data, the server will return a corresponding no-operation authority prompt to the first terminal, and refuse to perform the data modification/delete operation.
  • the blockchain in this embodiment can also limit the frequency of data modification/deletion operations of the terminal (user), thereby reducing the possibility of frequent modification/deletion of blockchain data.
  • the first terminal has the data operation authority, query the target keyword of the target data according to the data modification/deletion instruction, and modify the target value corresponding to the target keyword
  • the steps of operating/deleting the target keyword include:
  • the terminal operation record of the first terminal is obtained according to the first identity, and it is determined according to the terminal operation record that the first terminal is within a preset period The number of data operations;
  • a related data operation record is set in the blockchain of this embodiment, and the data operation record includes the number of data operations of each service terminal and the time for each data operation.
  • the server determines that the first terminal has the data operation authority for the target data according to the first identity of the first terminal, it will also query the data operation record according to the first identity to obtain the terminal operation record of the first terminal. And according to the terminal operation record, the number of data operations of the first terminal in a preset period is determined, for example, the number of data operations of the first terminal in the current day.
  • the server determines the number of data operations of the first terminal within a preset period, it will determine whether the number of data operations is less than a preset safety threshold to determine whether the first terminal is operating too frequently; and for the preset
  • the security threshold can be set according to the actual situation; of course, for different service terminals (terminal identity), different security thresholds can also be set.
  • the target keyword of the target data is queried according to the data modification/deletion instruction, and the target value corresponding to the target keyword is modified/repaired.
  • the target keyword is deleted.
  • the server can extract the target keyword Key1 in the data modification/delete instruction, query the target keyword Key1 in the blockchain, and then perform the corresponding operation: if it is a data modification instruction, it can be based on the target key
  • the word Key1 is further inquired to obtain the target value Value1 corresponding to the target keyword Key1, and the target value Value1 is modified; if it is a data deletion instruction, the target keyword Key1 can be deleted.
  • the data operation is greater than or equal to the preset security threshold, it means that the first terminal is operating too frequently. At this time, it can be considered that this data modification/deleting operation of the first terminal has certain related risks. A prompt that the corresponding operation is too frequent will be returned to the first terminal, and the data modification/delete operation will be refused.
  • the risk caused by frequent data operations can be reduced, which is beneficial to improve the security of blockchain data storage.
  • the step S30 includes:
  • Step S31 When receiving a traceability query instruction based on the target keyword sent by the second terminal, acquire a second identity of the second terminal, and determine whether the second terminal has Traceability query authority for the target data;
  • the blockchain in this embodiment can also impose certain authority restrictions on data traceability query operations.
  • different authority restrictions can be set for different blockchain data;
  • the query authority of the second terminal is also judged first, and the query operation is performed only if the second terminal has the relevant query authority.
  • the second terminal will add the second terminal's own second identity (or the business party’s identity, operation authority, etc.) to the traceability query instruction, and then the data The modify/delete instruction is sent to the server.
  • the server When the server receives the traceability query instruction sent by the second terminal, it will extract the second identity from it, so as to determine the identity of the second terminal based on the second identity; then the server can determine the second identity based on the second identity.
  • a corresponding query authority table may be set for various types of data in the blockchain in advance, and the query authority table includes an identity identifier with relevant query authority for various types of data; the server may use the second identity identifier
  • the query permission table is queried to determine whether the second terminal has the traceability query permission for the target data.
  • Step S32 If the second terminal has the traceability query authority, query the historical record according to the traceability query instruction, and obtain the keyword record corresponding to the target keyword according to the historical record.
  • the server can query the historical record of the blockchain itself, and obtain the keyword record about the target keyword Key1 from the historical record. If the server determines that the second terminal does not have the traceability query authority for the target data, the server will return a corresponding no query authority prompt to the second terminal and refuse to perform the record query.
  • an embodiment of the present application also provides a block chain-based data traceability device, and the block chain-based data traceability device includes:
  • the modification and deletion module is configured to, when receiving a data modification/delete instruction sent by the first terminal, query the target keyword corresponding to the target data according to the data modification/delete instruction, and execute the target value corresponding to the target keyword Modify operation/delete operation on the target keyword;
  • the record update module is used to generate historical keywords and historical values uniquely corresponding to the target keywords, the historical values including the operation instruction information of the target data, and based on the historical keywords and the modification operation/ The delete operation updates the history of the blockchain;
  • the first query module is configured to, when receiving a traceability query instruction based on the target keyword sent by the second terminal, query the historical record according to the traceability query instruction, and obtain the target key according to the historical record Keyword record corresponding to the word;
  • the second query module is configured to obtain the historical keyword according to the keyword record and the target keyword, and obtain the historical value according to the historical keyword query;
  • the information return module is configured to return corresponding data source information to the second terminal according to the keyword record and the historical value.
  • each virtual function module of the above-mentioned blockchain-based data traceability device is stored in the memory 1005 of the device shown in FIG. 1, and is used to implement all the functions of computer-readable instructions; each module can be implemented when executed by the processor 1001 Data traceability function based on blockchain.
  • the record update module includes:
  • a keyword calculation unit configured to perform calculations on the target keyword based on a preset algorithm to obtain a historical keyword uniquely corresponding to the target keyword;
  • the structure creation unit is configured to create an initial structure based on preset record rules, and add corresponding record characters to the initial structure according to the modification operation/delete operation to obtain the corresponding historical structure;
  • the historical value determining unit is configured to determine the historical structure as the historical value corresponding to the historical keyword.
  • modification and deletion module includes:
  • An identification acquiring unit configured to acquire the first identity of the first terminal when receiving a data modification/deletion instruction sent by the first terminal, and determine the target data corresponding to the data modification/deletion instruction;
  • a first judging unit configured to judge whether the first terminal has data operation authority for the target data according to the first identity
  • the modification and deletion unit is configured to, if the first terminal has the data operation authority, query the target keyword of the target data according to the data modification/deletion instruction, and execute the target value corresponding to the target keyword Modify operation/delete operation on the target keyword.
  • modification and deletion module further includes:
  • the first returning unit is configured to, if the first terminal does not have the data operation authority, return a corresponding no operation authority prompt to the first terminal.
  • modification and deletion unit further includes:
  • the number determination subunit is configured to, if the first terminal has the data operation authority, obtain the terminal operation record of the first terminal according to the first identity identifier, and determine the first terminal operation record according to the terminal operation record The number of data operations of a terminal in a preset period;
  • the frequency judgment subunit is used to judge whether the number of data operations is less than a preset safety threshold
  • the modification and deletion subunit is configured to, if the number of data operations is less than the preset safety threshold, query the target keyword of the target data according to the data modification/deletion instruction, and check the target corresponding to the target keyword Value modification operation/delete operation on the target keyword.
  • the first query module includes:
  • the second judging unit is configured to, when receiving a traceability query instruction based on the target keyword sent by the second terminal, obtain the second identity of the second terminal, and judge the first identity according to the second identity 2. Whether the terminal has the traceability query authority for the target data;
  • the record query unit is configured to, if the second terminal has the traceability query authority, query the historical record according to the traceability query instruction, and obtain the keyword record corresponding to the target keyword according to the historical record.
  • the data traceability information includes data change records
  • the information return module 50 includes:
  • a record generating unit configured to generate a corresponding data change record according to the keyword record and the historical value, the data change record including the change time;
  • the record returning unit is configured to sort the data change records in a time flashback manner according to the change time of the change data, and return the sorted data change records to the second terminal.
  • each module in the above-mentioned block chain-based data traceability device corresponds to each step in the above-mentioned block chain-based data traceability method embodiment, and its functions and realization processes will not be repeated here.
  • embodiments of the present application also provide a readable storage medium, and the computer-readable storage medium may be a non-volatile readable storage medium.
  • the readable storage medium of the present application stores computer readable instructions. When the computer readable instructions are executed by a processor, the steps of the above-mentioned blockchain-based data traceability method are realized.
  • the method implemented when the computer-readable instruction is executed can refer to the various embodiments of the blockchain-based data traceability method of this application, which will not be repeated here.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , Magnetic disk, optical disk), including several instructions to make a terminal device (can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present application.
  • a terminal device can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种基于区块链的数据溯源方法、装置、设备及可读存储介质。在对区块链数据执行数据修改或删除操作时,对应的增加一条具有关联关系的数据,用以作为修改或删除数据的溯源历史信息;当需要进行数据溯源时,可根据这条关联数据获取已修改或已删除数据的具体操作记录,从而解决数据被修改或删除后需要进行溯源时遇到的信息单一问题,实现对区块链数据变化的详细记录,满足了区块链业务应用下的数据记录需求。

Description

基于区块链的数据溯源方法、装置、设备及可读存储介质
本申请要求于2019年5月7日提交中国专利局、申请号为201910377821.X、发明名称为“基于区块链的数据溯源方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,尤其涉及一种基于区块链的数据溯源方法、装置、设备及可读存储介质。
背景技术
区块链可理解为一个分布式账本,它的本质也是一个分布式的数据库,其底层可使用一个持久化的键值Key-Value 数据库进行存储。目前,采用区块链技术进行数据和管理已经开始逐渐应用到了不同的实际业务场景中。但在实际应用中,区块链本身的数据溯源功能存在弊端:区块链的数据溯源功能只能记录某一数据被修改或被删除的时间,记录信息单一,若区块链一条数据被修改或删除了,区块链历史账本只记录这条数据被修改或删除、以及数据修改或删除的时间,没有其它操作信息,不能满足实际的业务需求。
发明内容
本申请的主要目的在于提供一种基于区块链的数据溯源方法、装置、设备及可读存储介质,旨在解决区块链数据被删除或修改时记录信息单一的问题。
为实现上述目的,本申请提供一种基于区块链的数据溯源方法,包括:
在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息;
其中,所述生成与所述目标关键字唯一对应的历史关键字和历史值的步骤包括:基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应的历史结构体;将所述历史结构体确定为所述历史关键字对应的历史值。
此外,为实现上述目的,本申请还提供一种基于区块链的数据溯源装置,所述基于区块链的数据溯源装置包括:
修改删除模块,用于在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
记录更新模块,用于生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
第一查询模块,用于在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
第二查询模块,用于根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
信息返回模块,用于根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息;
其中,所述记录更新模块包括:
关键字运算单元,用于基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;
结构体创建单元,用于基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应历史结构体;
历史值确定单元,用于将所述历史结构体确定为所述历史关键字对应历史值。
此外,为实现上述目的,本申请还提供一种基于区块链的数据溯源设备,包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,所述计算机可读指令被所述处理器执行时,实现如上述的基于区块链的数据溯源方法的步骤。
此外,为实现上述目的,本申请还提供一种可读存储介质,所述可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时,实现如上述的基于区块链的数据溯源方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其他特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
图1为本申请实施例方案中涉及的基于区块链的数据溯源设备的硬件结构示意图;
图2为本申请基于区块链的数据溯源方法第一实施例的流程示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例涉及的基于区块链的数据溯源方法主要应用于基于区块链的数据溯源设备,该设备可以是个人计算机、服务器、手机、平板电脑、掌上电脑等具有数据处理功能的设备。
参照图1,图1为本申请实施例方案中涉及的基于区块链的数据溯源设备的硬件结构示意图。本申请实施例中,该设备可以包括处理器1001(例如中央处理器Central Processing Unit,CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如无线保真WIreless-FIdelity,WI-FI接口);存储器1005可以是高速随机存取存储器(random access memory,RAM),也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。本领域技术人员可以理解,图1中示出的硬件结构并不构成对本申请的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。作为一种计算机可读存储介质的存储器1005可以包括操作系统、网络通信模块以及计算机可读指令;网络通信模块主要用于连接数据库,与数据库进行数据通信;而处理器1001可以调用存储器1005中存储的计算机可读指令,并执行本申请实施例提供的基于区块链的数据溯源方法。
本申请实施例提供了一种基于区块链的数据溯源方法。
参照图2,图2为本申请基于区块链的数据溯源方法第一实施例的流程示意图。
本实施例中,所述基于区块链的数据溯源方法包括以下步骤:
步骤S10,在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
本实施例的基于区块链的数据溯源方法主要应用在区块链系统中,该区块链系统包括了若干个区块链节点,这些区块链节点可视为一个分布式数据库,且该数据库属于键值(Key-Value)数据库;而业务终端可向某一个节点发送的业务交易请求,从而对区块链进行数据新增、数据修改或数据删除等操作;对于每一个区块链节点,则可以是由基于区块链的数据溯源设备实现其功能,该设备可以是个人计算机、服务器、手机、平板电脑、掌上电脑等;为描述方便,该设备以服务器为例进行说明。
本实施例中,服务器(区块链节点)中预先设置有智能合约,智能合约可理解为是代码和数据的集合;该智能合约在时间或事件的驱动下能自动执行一些功能,如可以在相互之间传递信息,修改区块链的状态(账户信息等),以及图灵完备计算(可以用图灵机做到的所有事情,通俗来说就是一般编程语言可以做的所有事情)。区块链的各业务参与方可通过各自的业务终端访问对应的区块链节点,并向区块链系统的智能合约发送相关的业务操作指令。当某一业务参与方需要对区块链业务系统中的某一数据进行修改或删除操作时,可通过某一业务终端(如PC、笔记本电脑、手机、平板等)向服务器发送数据修改/删除指令(或向服务器的智能合约发送数据修改/删除指令)。为描述方便,发送该数据修改/删除指令的业务终端可称为第一终端。对于该数据修改/删除指令,包括有需要进行修改/删除的操作对象,该操作对象可称为目标数据。由于区块链底层使用的是一个持久化的键值(Key-Value)数据库,因此该数据修改/删除指令中的目标数据可以是以目标关键字Key1的方式进行表示。例如若是进行数据删除,则该数据删除指令中可以包括目标数据的目标关键字Key1;若是进行数据修改,则该数据修改指令中可以包括目标数据的目标关键字Key1以及具体修改内容。服务器(智能合约)在接收到该数据修改/删除指令时,即可提取该数据修改/删除指令中的目标关键字Key1,并在区块链中查询该目标关键字Key1,然后执行对应的操作:若是数据修改指令,则可根据该目标关键字Key1进一步的查询得到该目标关键字Key1对应的目标值Value1,并对该目标值Value1进行修改;若是数据删除指令,则可对该目标关键字Key1执行删除操作。
当然,对于该数据修改/删除指令,还可以包括其它的内容,例如进行数据修改或删除的原因,第一终端的第一身份标识,数据操作授权标识、操作关联终端标识(即该数据操作涉及的其它业务方)等内容。
步骤S20,生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
本实施例中,服务器在对目标数据对应的目标值Value1或目标关键字Key1执行了相关修改/删除操作后,将会根据该修改/删除操作生成一个与目标关键字Key1唯一对应的历史关键字HistoryKey1,并根据删除/修改操作为该历史关键字HistoryKey1生成对应的历史值HistoryValue1,该操作历史值HistoryValue1中包括有本次删除/修改操作的操作说明信息,用以记录本次删除/修改操作的详细情况,如操作类型、操作原因备注、操作者标识、操作授权标识等内容。其中,对于该历史关键字HistoryKey1的生成过程,可以是基于一定的算法(例如哈希算法或是其它的映射规则)对该目标关键字Key1进行运算得到。而对于该历史值HistoryValue1,为了确保区块链中信息的统一性,可以是通过结构体的方式进行设置。具体的,服务器可基于一预设记录规则创建一个初始结构体,然后根据所述修改操作/删除操作在该初始结构体中添加对应的记录字符,从而得到对应的历史结构体;然后即可将该历史结构体确定为历史关键字HistoryKey1对应的历史值HistoryValue1。例如,该初始结构体可以为
type History stuct {
Updater string
Action string
Info string
...
}
其中,Updater记录对目标数据的修改操作;Action记录目标数据的删除操作;Info记录对目标数据修改/删除的备注说明;对于Updater和 Action,属于二选一的必填项,是由服务器(智能合约)自动根据数据删除/修改指令进行补全的内容,而Info则是可以是根据实际情况进行设置、或是根据第一终端发送的数据修改/删除指令中包括的操作原因、操作终端标识(用户标识)、数据操作授权标识等内容进行设置的字符串。例如,该Info中包括有操作终端标识,该操作终端标识,也属于必填项;对于该操作终端标识的填写过程,可以是第一终端在发送数据修改/删除指令时,会在该数据修改/删除指令中添加自身的第一身份标识;服务器在接收到数据修改/删除指令时,将提取其中的第一身份标识;而在创建初始结构体并进行字符记录时,会根据该第一身份标识在初始机构体的Info部分记录对应的操作终端标识。又例如,该Info中还包括有操作原因,该操作原因属于选填项;对于该操作原因的填写过程,可以是第一终端在发送数据修改/删除指令时,可根据用户的操作在该数据修改/删除指令中添加相关的操作原因信息(该操作原因信息可以是以一段字符串的方式表示,从而减少数据传输量);服务器在接收到数据修改/删除指令时,将提取其中的操作原因信息;而在创建初始结构体并进行字符记录时,会根据该操作原因信息在初始机构体的Info部分记录对应的字符串内容;当然若该修改/删除指令中不包括该操作原因信息,则服务器不会在Info部分记录操作原因的相关字符。值得说明的是,对于该历史值HistoryValue1,除了历史结构体外还可以包括其它内容;而对于结构体的形式也可根据实际情况进行设置;上述举例并不构成对本方案的限制。
本实施例中,服务器在生成历史关键字和历史值之后,还将会对区块链本身的历史记录中进行记录更新,更新内容包括新添该目标关键字Key1的相关修改/删除操作的对应记录,当然该记录可以包括操作时间;还可以包括该目标关键字Key1对应的历史关键字HistoryKey1(又或者是HistoryKey1的生成算法等内容),以便查询Key1对应的历史关键字HistoryKey1。
步骤S30,在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
本实施例中,当某一业务参与方需要查询(溯源)目标数据的相关情况时,可以通过某一业务终端向服务器(区块链节点)发送基于该目标关键字Key1的溯源查询指令;当然在实际中,修改/删除操作和执行数据溯源操作可能不是由同一个服务器(区块链节点)执行,但为说明方便,本实施例中将这两项操作由同一个服务器执行为例进行说明。其中,发送该基于目标关键字的溯源查询指令的业务终端可称为第二终端。服务器在接收到基于目标关键字的溯源查询指令时,首先会根据该溯源查询指令查询区块链本身的历史记录,并从该历史记录中获取关于目标关键字Key1的关键字记录,从而根据该关键字记录获知目标关键字Key1的修改/删除情况。值得说明的是,为了方便查询历史记录,还可以设置一定的区块链查询API接口,如QueryHistory API,当该API接口的输入为关键字内容,服务器将根据该输入进行查询,并将查询得到的关键字记录输出;通过将该API接口提供给各业务终端,可方便各业务方进行查询,为各业务方提供了便利;而对服务器(区块链)而言,还规范了溯源查询指令的格式,方便进行后续处理。当然对于该溯源查询指令,还可以包括其它的内容,如查询的用户标识、数据查询授权标识等。
步骤S40,根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
本实施例中,服务器在得到针对目标关键字Key1的关键字记录时,即可根据该关键字记录判断目标关键字Key1是否存在修改/删除的情况;若存在修改/删除的情况,则将根据该关键字记录和目标关键字Key1获取对应的历史关键字HistoryKey1,并根据该历史关键字HistoryKey1查询得到对应的历史值HistoryValue1;又由于该历史值HistoryValue1包括有目标数据修改/删除时的操作说明信息,也即服务器获取到了目标数据的修改/删除的详细操作信息。当然,若不存在修改/删除的情况,则服务器可直接根据该目标关键字Key1获取目标值Value1,并将该目标值Value1返回至第二终端。
步骤S50,根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息。
本实施例中,服务器在得到该操作历史值HistoryValue1时,服务器即可根据关键字记录和该操作历史值HistoryValue1向第二终端返回对应的数据溯源信息,以相关业务方获取目标数据的具体信息。对于该数据溯源信息,可以依据一定的格式进行设置,例如设置为excel格式的数据溯源文件,其中excel表格的每行为目标数据每次被修改/删除的相关记录。
进一步的,为了更好的表示目标数据的去向,对于该数据溯源信息,可以是以若干条数据变动记录的方式进行表示,且这些数据表动记录将以时间倒叙的方式进行排列,从而方便业务方查看。具体的,步骤S50包括:
根据所述关键字记录和所述历史值生成对应的数据变动记录,所述数据变动记录包括变动时间;
服务器在得到该操作历史值HistoryValue1时,服务器可根据关键字记录和该操作历史值HistoryValue1生成若干条数据变动记录,其中每条数据变动记录包括对应的变动时间,当然数据变动记录还可以包括其它内容,如变动操作者(也即导致其变动的终端、用户),变动说明等。
根据所述变动数据的变动时间将所述数据变动记录以时间倒叙的方式排序,并将排序后的数据变动记录返回所述第二终端。
当得到这些数据变动记录时,服务器将根据数据变动记录中的变动时间将这些数据变动记录以时间倒叙的方式排序。例如某目标数据的数据变动记录共包括a、b、c三条,依次分别为“Updater 20180506 adm1...”、“Updater 20180308 adm2...”、“Action 20180906 adm1...”;这些数据变动记录中,“Updater”指对目标数据的修改操作,“Action”指对目标数据的删除操作,“20180506”、“20180308”和“20180906”为变动时间(年、月、日),“adm1”和“adm2”为变动操作者的标识;服务器可根据变动时间将这三条数据变动记录以时间倒叙方式排序,排序后为:
Action 20180906 adm1...
Updater 20180506 adm1...
Updater 20180308 adm2...
在完成排序后,服务器可将排序后的数据变动记录返回至第二终端,从而方便业务方进行查看。
通过以上方式,本实施例在对区块链数据执行数据修改或删除操作时对应增加一条具有关联关系的数据,用以作为修改或删除数据的溯源历史信息;当需要进行数据溯源时,可根据这条关联数据获取已修改或已删除数据的具体操作记录,从而解决数据被修改或删除后需要进行溯源时遇到的信息单一问题,实现对区块链数据变化的详细记录,满足区块链业务应用下的数据记录需求。
基于图2所示实施例,提出本申请基于区块链的数据溯源第二实施例。
本实施例中,所述步骤S10包括:
步骤S11,在接收到第一终端发送的数据修改/删除指令时,获取所述第一终端的第一身份标识,并确定所述数据修改/删除指令对应的目标数据;
考虑到区块链数据安全性问题,本实施例中的区块链还可对数据修改/删除操作进行一定的权限限制,当然对于不同的区块链数据可以设置不同的权限限制;而在接收到第一终端的数据修改/删除指令时,还先对第一终端的操作权限进行判断,若该第一终端具有相关操作权限,才会进行修改/删除操作。具体的,第一终端在发送数据修改/删除指令前,会在该数据修改/删除指令中添加第一终端自身的第一身份标识(又或者是业务方的身份标识、操作权限标识等)、以及需要进行修改/删除操作的目标数据的目标关键字Key1,再将该数据修改/删除指令发送至服务器。服务器在接收到第一终端发送的数据修改/删除指令时,将会提取其中的第一身份标识,从而根据该第一身份标识确定第一终端的身份;同时,服务器还将提取数据修改/删除指令中的目标关键字Key1,并根据该目标关键字Key1确定数据修改/删除指令对应的目标数据(操作对象)。
步骤S12,根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限;
服务器在得到第一终端的第一身份标识、并确定目标数据时,即可根据该第一身份标识判断第一终端是否具有针对该目标数据的数据操作权限。对于该判断的过程,可以是区块链中预先对各类数据设置有对应的操作权限表,该操作权限表中包括对各类数据具有相关操作权限的身份标识;服务器可根据第一身份标识查询该操作权限表,从而判断第一终端是否具有针对该目标数据的数据操作权限。
步骤S13,若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
当服务器判定第一终端具有针对该目标数据的数据操作权限时,服务器可提取该数据修改/删除指令中的目标关键字Key1,并在区块链中查询该目标关键字Key1,然后执行对应的操作:若是数据修改指令,则可根据该目标关键字Key1进一步的查询得到该目标关键字Key1对应的目标值Value1,并对该目标值Value1进行修改;若是数据删除指令,则可对该目标关键字Key1执行删除操作。而若服务器判定第一终端不具有针对该目标数据的数据操作权限,则服务器将向第一终端返回对应的无操作权限提示,并拒绝进行数据修改/删除操作。通过上述设置数据操作权限和操作权限判断的方式,可降低区块链数据被恶意修改/删除的可能性,可提高区块链数据存储的安全性。
再进一步的,本实施例中的区块链还可对终端(用户)的数据修改/删除操作频率进行限制,从而降低区块链数据被频繁修改/删除的可能性。具体的,所述若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
若所述第一终端具有所述数据操作权限,则根据所述第一身份标识获取所述第一终端的终端操作记录,并根据所述终端操作记录确定所述第一终端在预设周期内的数据操作次数;
本实施例的区块链中设置有相关的数据操作记录,该数据操作记录中包括有各业务终端的数据操作次数、以及每次进行数据操作的时间。服务器在根据第一终端的第一身份标识判定第一终端具有针对该目标数据的数据操作权限时,还将根据该第一身份标识查询该数据操作记录,从而获取第一终端的终端操作记录,并根据该终端操作记录确定第一终端在预设周期内的数据操作次数,例如第一终端在本日内的数据操作次数等。
判断所述数据操作次数是否小于预设安全阈值;
服务器在确定第一终端在预设周期内的数据操作次数时,将会判断该数据操作次数是否小于预设安全阈值,以判断该第一终端是否存在操作过于频繁的情况;而对于该预设安全阈值,则可根据实际情况进行设置;当然对于不同的业务终端(终端身份标识),还可以设置不同的安全阈值。
若所述数据操作次数小于所述预设安全阈值,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
若该数据操作次数小于该预设安全阈值,则说明该第一终端不存在操作过于频繁的情况,此时可认为第一终端的本次数据修改/删除操作不存在相关风险(或风险较低),对此服务器可提取该数据修改/删除指令中的目标关键字Key1,并在区块链中查询该目标关键字Key1,然后执行对应的操作:若是数据修改指令,则可根据该目标关键字Key1进一步的查询得到该目标关键字Key1对应的目标值Value1,并对该目标值Value1进行修改;若是数据删除指令,则可对该目标关键字Key1执行删除操作。而若该数据操作大于或等于该预设安全阈值,则说明该第一终端存在操作过于频繁的情况,此时可认为第一终端的本次数据修改/删除操作存在一定相关风险,对此服务器将向第一终端返回对应的操作过于频繁的提示,并拒绝进行数据修改/删除操作。通过以上对终端的数据操作频率进行限制,可降低数据频繁操作带来的风险,有利于提高区块链数据存储安全性。
基于图2所示实施例,提出本申请基于区块链的数据溯源第三实施例,本实施例中,所述步骤S30包括:
步骤S31,在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,获取所述第二终端的第二身份标识,根据所述第二身份标识判断所述第二终端是否具有针对所述目标数据的溯源查询权限;
考虑到区块链数据安全性问题,本实施例中的区块链还可对数据溯源查询操作进行一定的权限限制,当然对于不同的区块链数据可以设置不同的权限限制;而在接收到第二终端的溯源查询指令时,还先对第二终端的查询权限进行判断,若该第二终端具有相关查询权限,才会进行查询操作。具体的,第二终端在发送溯源查询指令前,会在该溯源查询指令中添加第二终端自身的第二身份标识(又或者是业务方的身份标识、操作权限标识等),再将该数据修改/删除指令发送至服务器。服务器在接收到第二终端发送的溯源查询指令时,将会提取其中的第二身份标识,从而根据该第二身份标识确定第二终端的身份;然后服务器可根据该第二身份标识判断第二终端是否具有针对该目标数据的溯源查询权限。对于该判断的过程,可以是区块链中预先对各类数据设置有对应的查询权限表,该查询权限表中包括对各类数据具有相关查询权限的身份标识;服务器可根据第二身份标识查询该查询权限表,从而判断第二终端是否具有针对该目标数据的溯源查询权限。
步骤S32,若所述第二终端具有所述溯源查询权限,则根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录。
当服务器判定第二终端具有针对该目标数据的溯源查询权限时,服务器可查询区块链本身的历史记录,并从该历史记录中获取关于目标关键字Key1的关键字记录。而若服务器判定第二终端不具有针对该目标数据的溯源查询权限,则服务器将向第二终端返回对应的无查询权限提示,并拒绝进行记录查询。通过上述设置查询权限和查询权限判断的方式,可降低重要业务数据(隐私数据)泄露的可能性,有利于提高区块链数据存储的安全性。当然,在实际中,对于不同的数据,其可以对应设置不同的溯源查询权限。
此外,本申请实施例还提供一种基于区块链的数据溯源装置,所述基于区块链的数据溯源装置包括:
修改删除模块,用于在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
记录更新模块,用于生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
第一查询模块,用于在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
第二查询模块,用于根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
信息返回模块,用于根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息。
其中,上述基于区块链的数据溯源装置的各虚拟功能模块存储于图1所示设备的存储器1005中,用于实现计算机可读指令的所有功能;各模块被处理器1001执行时,可实现基于区块链的数据溯源功能。
进一步的,所述记录更新模块包括:
关键字运算单元,用于基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;
结构体创建单元,用于基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应历史结构体;
历史值确定单元,用于将所述历史结构体确定为所述历史关键字对应历史值。
进一步的,所述修改删除模块包括:
标识获取单元,用于在接收到第一终端发送的数据修改/删除指令时,获取所述第一终端的第一身份标识,并确定所述数据修改/删除指令对应的目标数据;
第一判断单元,用于根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限;
修改删除单元,用于若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
进一步的,所述修改删除模块还包括:
第一返回单元,用于若所述第一终端不具有所述数据操作权限,则向所述第一终端返回对应的无操作权限提示。
进一步的,所述修改删除单元还包括:
次数确定子单元,用于若所述第一终端具有所述数据操作权限,则根据所述第一身份标识获取所述第一终端的终端操作记录,并根据所述终端操作记录确定所述第一终端在预设周期内的数据操作次数;
次数判断子单元,用于判断所述数据操作次数是否小于预设安全阈值;
修改删除子单元,用于若所述数据操作次数小于所述预设安全阈值,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
进一步的,所述第一查询模块包括:
第二判断单元,用于在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,获取所述第二终端的第二身份标识,根据所述第二身份标识判断所述第二终端是否具有针对所述目标数据的溯源查询权限;
记录查询单元,用于若所述第二终端具有所述溯源查询权限,则根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录。
进一步的,所述数据溯源信息包括数据变动记录,所述信息返回模块50包括:
记录生成单元,用于根据所述关键字记录和所述历史值生成对应的数据变动记录,所述数据变动记录包括变动时间;
记录返回单元,用于根据所述变动数据的变动时间将所述数据变动记录以时间倒叙的方式排序,并将排序后的数据变动记录返回所述第二终端。
其中,上述基于区块链的数据溯源装置中各个模块的功能实现与上述基于区块链的数据溯源方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。
此外,本申请实施例还提供一种可读存储介质,所述计算机可读存储介质可以为非易失性可读存储介质。本申请可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现如上述的基于区块链的数据溯源方法的步骤。
其中,计算机可读指令被执行时所实现的方法可参照本申请基于区块链的数据溯源方法的各个实施例,此处不再赘述。
需要说明的是,在本文“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于区块链的数据溯源方法,其中,所述基于区块链的数据溯源方法包括:
    在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
    生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
    在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
    根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
    根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息;
    其中,所述生成与所述目标关键字唯一对应的历史关键字和历史值的步骤包括:
    基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;
    基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应的历史结构体;
    将所述历史结构体确定为所述历史关键字对应的历史值。
  2. 如权利要求1所述的基于区块链的数据溯源方法,其中,所述在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
    在接收到第一终端发送的数据修改/删除指令时,获取所述第一终端的第一身份标识,并确定所述数据修改/删除指令对应的目标数据;
    根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限;
    若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  3. 如权利要求2所述的基于区块链的数据溯源方法,其中,所述根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限的步骤之后,还包括:
    若所述第一终端不具有所述数据操作权限,则向所述第一终端返回对应的无操作权限提示。
  4. 如权利要求2所述的基于区块链的数据溯源方法,其中,所述若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
    若所述第一终端具有所述数据操作权限,则根据所述第一身份标识获取所述第一终端的终端操作记录,并根据所述终端操作记录确定所述第一终端在预设周期内的数据操作次数;
    判断所述数据操作次数是否小于预设安全阈值;
    若所述数据操作次数小于所述预设安全阈值,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  5. 如权利要求1所述的基于区块链的数据溯源方法,其中,所述在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录的步骤包括:
    在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,获取所述第二终端的第二身份标识,根据所述第二身份标识判断所述第二终端是否具有针对所述目标数据的溯源查询权限;
    若所述第二终端具有所述溯源查询权限,则根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录。
  6. 如权利要求1所述的基于区块链的数据溯源方法,其中,所述数据溯源信息包括数据变动记录,
    所述根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息的步骤包括:
    根据所述关键字记录和所述历史值生成对应的数据变动记录,所述数据变动记录包括变动时间;
    根据所述变动数据的变动时间将所述数据变动记录以时间倒叙的方式排序,并将排序后的数据变动记录返回所述第二终端。
  7. 一种基于区块链的数据溯源装置,其中,所述基于区块链的数据溯源装置包括:
    修改删除模块,用于在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
    记录更新模块,用于生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
    第一查询模块,用于在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
    第二查询模块,用于根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
    信息返回模块,用于根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息;
    其中,所述记录更新模块包括:
    关键字运算单元,用于基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;
    结构体创建单元,用于基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应的历史结构体;
    历史值确定单元,用于将所述历史结构体确定为所述历史关键字对应的历史值。
  8. 如权利要求7所述的基于区块链的数据溯源装置,其中,所述修改删除模块包括:
    标识获取单元,用于在接收到第一终端发送的数据修改/删除指令时,获取所述第一终端的第一身份标识,并确定所述数据修改/删除指令对应的目标数据;
    第一判断单元,用于根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限;
    修改删除单元,用于若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  9. 如权利要求8所述的基于区块链的数据溯源装置,其中,所述修改删除模块还包括:
    第一返回单元,用于若所述第一终端不具有所述数据操作权限,则向所述第一终端返回对应的无操作权限提示。
  10. 如权利要求8所述的基于区块链的数据溯源装置,其中,所述修改删除单元还包括:
    次数确定子单元,用于若所述第一终端具有所述数据操作权限,则根据所述第一身份标识获取所述第一终端的终端操作记录,并根据所述终端操作记录确定所述第一终端在预设周期内的数据操作次数;
    次数判断子单元,用于判断所述数据操作次数是否小于预设安全阈值;
    修改删除子单元,用于若所述数据操作次数小于所述预设安全阈值,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  11. 如权利要求7所述的基于区块链的数据溯源装置,其中,所述第一查询模块包括:
    第二判断单元,用于在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,获取所述第二终端的第二身份标识,根据所述第二身份标识判断所述第二终端是否具有针对所述目标数据的溯源查询权限;
    记录查询单元,用于若所述第二终端具有所述溯源查询权限,则根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录。
  12. 一种基于区块链的数据溯源设备,其中,所述基于区块链的数据溯源设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的计算机可读指令,其中所述计算机可读指令被所述处理器执行时,实现以下步骤:
    在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
    生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
    在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
    根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
    根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息;
    其中,所述生成与所述目标关键字唯一对应的历史关键字和历史值的步骤包括:
    基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;
    基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应的历史结构体;
    将所述历史结构体确定为所述历史关键字对应的历史值。
  13. 如权利要求12所述的基于区块链的数据溯源设备,其中,所述在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
    在接收到第一终端发送的数据修改/删除指令时,获取所述第一终端的第一身份标识,并确定所述数据修改/删除指令对应的目标数据;
    根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限;
    若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  14. 如权利要求13所述的基于区块链的数据溯源设备,其中,所述根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限的步骤之后,还包括:
    若所述第一终端不具有所述数据操作权限,则向所述第一终端返回对应的无操作权限提示。
  15. 如权利要求13所述的基于区块链的数据溯源设备,其中,所述若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
    若所述第一终端具有所述数据操作权限,则根据所述第一身份标识获取所述第一终端的终端操作记录,并根据所述终端操作记录确定所述第一终端在预设周期内的数据操作次数;
    判断所述数据操作次数是否小于预设安全阈值;
    若所述数据操作次数小于所述预设安全阈值,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  16. 如权利要求12所述的基于区块链的数据溯源设备,其中,所述在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录的步骤包括:
    在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,获取所述第二终端的第二身份标识,根据所述第二身份标识判断所述第二终端是否具有针对所述目标数据的溯源查询权限;
    若所述第二终端具有所述溯源查询权限,则根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录。
  17. 一种可读存储介质,其中,所述可读存储介质上存储有计算机可读指令,其中所述计算机可读指令被处理器执行时,实现以下步骤:
    在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作;
    生成与所述目标关键字唯一对应的历史关键字和历史值,所述历史值包括所述目标数据的操作说明信息,并根据所述历史关键字和所述修改操作/删除操作对区块链的历史记录进行记录更新;
    在接收到第二终端发送的基于所述目标关键字的溯源查询指令时,根据所述溯源查询指令查询所述历史记录,并根据所述历史记录获取所述目标关键字对应的关键字记录;
    根据所述关键字记录和所述目标关键字获取所述历史关键字,并根据所述历史关键字查询得到所述历史值;
    根据所述关键字记录和所述历史值向所述第二终端返回对应的数据溯源信息;
    其中,所述生成与所述目标关键字唯一对应的历史关键字和历史值的步骤包括:
    基于预设算法对所述目标关键字进行运算,获得所述目标关键字唯一对应的历史关键字;
    基于预设记录规则创建初始结构体,并根据所述修改操作/删除操作在所述初始结构体中添加对应的记录字符,得到对应的历史结构体;
    将所述历史结构体确定为所述历史关键字对应的历史值。
  18. 如权利要求17所述的可读存储介质,其中,所述在接收到第一终端发送的数据修改/删除指令时,根据所述数据修改/删除指令查询对应目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
    在接收到第一终端发送的数据修改/删除指令时,获取所述第一终端的第一身份标识,并确定所述数据修改/删除指令对应的目标数据;
    根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限;
    若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
  19. 如权利要求18所述的可读存储介质,其中,所述根据所述第一身份标识判断所述第一终端是否具有针对所述目标数据的数据操作权限的步骤之后,还包括:
    若所述第一终端不具有所述数据操作权限,则向所述第一终端返回对应的无操作权限提示。
  20. 如权利要求18所述的可读存储介质,其中,所述若所述第一终端具有所述数据操作权限,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作的步骤包括:
    若所述第一终端具有所述数据操作权限,则根据所述第一身份标识获取所述第一终端的终端操作记录,并根据所述终端操作记录确定所述第一终端在预设周期内的数据操作次数;
    判断所述数据操作次数是否小于预设安全阈值;
    若所述数据操作次数小于所述预设安全阈值,则根据所述数据修改/删除指令查询所述目标数据的目标关键字,并对所述目标关键字对应的目标值执行修改操作/对所述目标关键字执行删除操作。
PCT/CN2019/121719 2019-05-07 2019-11-28 基于区块链的数据溯源方法、装置、设备及可读存储介质 WO2020224247A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910377821.XA CN110263015A (zh) 2019-05-07 2019-05-07 基于区块链的数据溯源方法、装置、设备及可读存储介质
CN201910377821.X 2019-05-07

Publications (1)

Publication Number Publication Date
WO2020224247A1 true WO2020224247A1 (zh) 2020-11-12

Family

ID=67914365

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/121719 WO2020224247A1 (zh) 2019-05-07 2019-11-28 基于区块链的数据溯源方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN110263015A (zh)
WO (1) WO2020224247A1 (zh)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110263015A (zh) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 基于区块链的数据溯源方法、装置、设备及可读存储介质
CN110597840B (zh) * 2019-09-26 2023-09-22 腾讯科技(深圳)有限公司 基于区块链的伴侣关系建立方法、装置、设备及存储介质
CN110765205A (zh) * 2019-10-12 2020-02-07 中思博安科技(北京)有限公司 基于区块链的元数据管理方法、系统和计算机存储介质
CN111368325A (zh) * 2020-02-24 2020-07-03 北京阿尔山金融科技有限公司 业务信息处理方法、装置和电子设备
CN114185952A (zh) * 2020-09-15 2022-03-15 腾讯科技(深圳)有限公司 一种数据找回方法、装置、电子设备及存储介质
CN112286881B (zh) * 2020-10-28 2024-04-05 金蝶云科技有限公司 一种文档的认证溯源方法及装置
CN112417178B (zh) * 2020-11-24 2022-09-30 从法信息科技有限公司 基于文档模板定义的链上合约处理方法、装置和电子设备
CN113010906B (zh) * 2021-04-12 2023-10-27 福建省海峡信息技术有限公司 一种基于区块链的可信的数据溯源方法及系统
CN113836503A (zh) * 2021-08-10 2021-12-24 中标慧安信息技术股份有限公司 基于区块链的物联网数据修改状态记录方法及系统
CN113918622B (zh) * 2021-10-22 2022-04-19 南京理工大学 基于区块链的信息溯源方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160267474A1 (en) * 2015-03-13 2016-09-15 First Data Corporation Systems and methods for securing digital gift cards with a public ledger
CN107391735A (zh) * 2017-08-04 2017-11-24 北京明朝万达科技股份有限公司 基于区块链的业务数据溯源方法、装置、系统和存储设备
CN107622096A (zh) * 2017-08-31 2018-01-23 上海保险交易所股份有限公司 基于区块链系统的异步多方数据交互方法和存储介质
US20180284093A1 (en) * 2017-03-29 2018-10-04 Innit International S.C.A. Trusted Food Traceability System and Method and Sensor Network
CN110263015A (zh) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 基于区块链的数据溯源方法、装置、设备及可读存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108304724A (zh) * 2018-01-25 2018-07-20 中国地质大学(武汉) 文档溯源装置、系统及方法
CN108449336A (zh) * 2018-03-16 2018-08-24 浙江创邻科技有限公司 基于区块链的数据追溯与强加密方法、装置、介质及系统
CN108628942B (zh) * 2018-03-27 2020-07-31 深圳市网心科技有限公司 区块链节点设备、分布式数据库的数据读取及写入方法
CN109165224B (zh) * 2018-08-24 2021-02-19 东北大学 一种在区块链数据库上针对关键字key的索引方法
CN109684305A (zh) * 2018-12-22 2019-04-26 复旦大学 一种基于区块链的百科词条管理系统和实施方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160267474A1 (en) * 2015-03-13 2016-09-15 First Data Corporation Systems and methods for securing digital gift cards with a public ledger
US20180284093A1 (en) * 2017-03-29 2018-10-04 Innit International S.C.A. Trusted Food Traceability System and Method and Sensor Network
CN107391735A (zh) * 2017-08-04 2017-11-24 北京明朝万达科技股份有限公司 基于区块链的业务数据溯源方法、装置、系统和存储设备
CN107622096A (zh) * 2017-08-31 2018-01-23 上海保险交易所股份有限公司 基于区块链系统的异步多方数据交互方法和存储介质
CN110263015A (zh) * 2019-05-07 2019-09-20 深圳壹账通智能科技有限公司 基于区块链的数据溯源方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN110263015A (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2020224247A1 (zh) 基于区块链的数据溯源方法、装置、设备及可读存储介质
WO2019192085A1 (zh) 银企直联通信方法、装置、设备及计算机可读存储介质
WO2018107610A1 (zh) 业务数据处理方法、系统、设备及计算机可读存储介质
WO2019037396A1 (zh) 账户清结算方法、装置、设备及存储介质
WO2019165691A1 (zh) 自动生成测试案例的方法、装置、设备及可读存储介质
WO2018228050A1 (zh) 防止敏感信息泄露的方法、装置及存储介质
WO2019100604A1 (zh) 账户查询方法、装置、设备及计算机可读存储介质
WO2015144089A1 (en) Application recommending method and apparatus
WO2019109520A1 (zh) 视频面签派工方法、装置、设备及可读存储介质
WO2018205545A1 (zh) 数据生成方法、装置、终端及计算机可读存储介质
WO2019041832A1 (zh) 修改源数据库表结构的方法、服务器、系统及存储介质
WO2019161615A1 (zh) 账单录入方法、系统、光学字符识别服务器和存储介质
WO2018227880A1 (zh) 数据比对方法、装置、设备及可读存储介质
WO2019218441A1 (zh) 请求处理方法、装置、设备及存储介质
WO2019085301A1 (zh) 座机未接来电的反馈方法、装置、设备及可读存储介质
WO2019051902A1 (zh) 终端控制方法、空调器及计算机可读存储介质
WO2018040421A1 (zh) 资源共享方法、装置及系统
WO2019161597A1 (zh) 基于即时通讯的信息发送方法、装置、设备和存储介质
WO2018098881A1 (zh) 应用程序的访问处理方法及装置
WO2016058258A1 (zh) 终端远程控制方法和系统
WO2019169814A1 (zh) 自动生成中文注释的方法、装置、设备及存储介质
WO2018120430A1 (zh) 一种页面构建方法、终端、计算机可读存储介质及页面构建设备
WO2018076811A1 (zh) 数据分享方法、装置、存储介质及电子设备
WO2015027679A1 (zh) 互联网寻址方法和装置
WO2018188342A1 (zh) 脚本文件生成方法、装置、设备和计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19927860

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19927860

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 18/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19927860

Country of ref document: EP

Kind code of ref document: A1