WO2020187069A1 - 数据同步方法、装置、计算机设备以及可读存储介质 - Google Patents

数据同步方法、装置、计算机设备以及可读存储介质 Download PDF

Info

Publication number
WO2020187069A1
WO2020187069A1 PCT/CN2020/078348 CN2020078348W WO2020187069A1 WO 2020187069 A1 WO2020187069 A1 WO 2020187069A1 CN 2020078348 W CN2020078348 W CN 2020078348W WO 2020187069 A1 WO2020187069 A1 WO 2020187069A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction data
sensitive
sensitive phrase
identifier
update operation
Prior art date
Application number
PCT/CN2020/078348
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 腾讯科技(深圳)有限公司
Priority to SG11202101569VA priority Critical patent/SG11202101569VA/en
Priority to KR1020217006086A priority patent/KR102545615B1/ko
Priority to JP2021505803A priority patent/JP7066240B2/ja
Publication of WO2020187069A1 publication Critical patent/WO2020187069A1/zh
Priority to US17/145,829 priority patent/US11985251B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1865Transactional file systems
    • 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/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • G06F16/24565Triggers; Constraints
    • 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/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0245Filtering by information in the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information

Definitions

  • This application relates to the field of blockchain technology, and in particular to a data synchronization method, device, computer equipment and readable storage medium.
  • a data synchronization method, device, computer equipment, and readable storage medium are provided.
  • a data synchronization method executed by a computer device, the method including:
  • the sensitive phrase database is updated.
  • a data synchronization device which includes:
  • the receiving module is configured to receive any transaction data, and the any transaction data carries an update operation identifier and a sensitive phrase corresponding to the update operation identifier;
  • the obtaining module is used to obtain the update operation identifier and the sensitive phrase in the target block when the target block containing any transaction data is stored in the block chain of the blockchain system;
  • the update module is used to update the sensitive phrase database according to the update operation identifier in the target block and the sensitive phrase.
  • a non-volatile storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the data synchronization method.
  • a computer device includes a memory and a processor.
  • the memory stores computer readable instructions.
  • the processor executes the steps of a data synchronization method.
  • Figure 1 is a schematic diagram of a blockchain system provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a data synchronization method provided by an embodiment of the present application
  • Fig. 3 is a flowchart of a data query method based on data synchronization provided by an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a data synchronization device provided by an embodiment of the present application.
  • Fig. 5 is a schematic structural diagram of a node device provided by an embodiment of the present application.
  • Fig. 1 is a schematic diagram of a blockchain system provided by an embodiment of the present application.
  • the blockchain system consists of at least two node devices. Wherein, the at least two node devices may belong to different users. Any node device can generate or receive transaction data, package at least one transaction data, generate a block, and store the block passed by the consensus. Among them, the transaction data can be any type of data, and the transaction data can contain any content. Any data received or generated by any node device in the blockchain system can be called transaction data.
  • each node device in the blockchain system in the blockchain system can be different, and can be divided into supervisory node devices and ordinary node devices.
  • the supervisory node device can act as a supervisor to publish transaction data carrying sensitive phrases in the blockchain system, so that other node devices can update the local sensitive phrase database according to the sensitive phrases released by the supervisory node device.
  • Any node device can provide users with query services, so that users can query transaction data in each block of the blockchain in the blockchain system on any node device.
  • any node device shows the user to query For transaction data in a block
  • the sensitive phrases in the transaction data in the block to be queried can be filtered out according to the sensitive phrases in the local sensitive phrase database, and finally, the filtered transaction data is displayed to the user.
  • the supervisory node device generates any transaction data that carries an update operation identifier and a sensitive phrase corresponding to the update operation identifier.
  • the supervisory node device can be any node device with supervisory authority in the blockchain system.
  • the update operation identifier may be used to indicate the update operation that the node device needs to perform, and the update operation identifier may be an addition identifier or a deletion identifier.
  • the addition mark is used to indicate to add a sensitive phrase in the sensitive phrase database
  • the deletion mark is used to indicate to delete the sensitive phrase in the sensitive phrase database.
  • the update operation identifier can be any character string, or can be expressed in other forms, and different character strings used to represent the update operation identifier can be used to represent different update operations.
  • Add means add operation
  • Delete means delete operation.
  • Any node device in the blockchain system is equipped with a sensitive phrase database.
  • the sensitive phrase database is used to store sensitive phrases.
  • the sensitive phrase can be any phrase. The content of the sensitive phrase is not described in the embodiment of this application. limited.
  • the supervisory node device executes this step 201, wherein the any transaction data generation request is used to request the generation of any transaction data carrying sensitive phrases.
  • the supervisory node device receives any transaction data generation request, and the any transaction data generation request includes an update operation identifier and a sensitive phrase corresponding to the update operation identifier; the supervisory node device is based on any transaction data generation request; The update operation identifier in the transaction data generation request and the sensitive phrase corresponding to the update operation identifier are generated to generate any transaction data that meets the format requirements of the transaction data in the blockchain system.
  • the supervising node device receiving any transaction data generation request can be triggered by the user's storage operation. For example, when the user selects the update option in the user interface of the supervisory node device, enters a sensitive phrase in the position of the phrase corresponding to the update option, and then clicks the storage option to trigger any transaction data generation request.
  • the any transaction data may also include a supervision identifier to indicate that the any transaction data is generated by the supervision node device.
  • the supervisory identification includes the signature of the supervisory node device or the address of the supervisory node device.
  • the signature of the supervisory node device can be the signature of any transaction data by the supervisory node device using the private key.
  • the address of the supervisory node device can be the IP (internet protocol) address of the supervisory node device, or it can represent the supervision For other addresses of the node device identity, this embodiment of the application does not specifically limit the supervision identity.
  • the supervisory node device adds its own address to the initiation address field of any transaction data; the supervisory node device adds the update operation identifier and the sensitive phrase corresponding to the update operation identifier in the In the remark information field of any transaction data.
  • the supervisory node device adds the update operation identifier and the sensitive phrase corresponding to the update operation identifier in the remark information field of any transaction data, and uses the private key of the supervisory node device to Any transaction data added with remarks is signed.
  • the update operation identifier and the sensitive phrase corresponding to the update operation identifier can be in the remark information So that the update operation identifier corresponds to the sensitive phrase.
  • Add as the addition identifier
  • Delete as the deletion identifier
  • Sensitive phrase 1 Sensitive phrase 2 ... Sensitive phrase n Add xxx yyy ... zzz Delete mmm nnn To ttt
  • the implementation of this application does not specifically limit the form of the remark information and the number of sensitive phrases in the remark information.
  • the supervisory node device may also add an update operation identifier and a sensitive phrase corresponding to the update operation identifier in other fields in any transaction data.
  • the embodiment of the present application is sensitive to the update operation identifier and the sensitive phrase corresponding to the update operation identifier.
  • the position of the phrase in any transaction data is not limited.
  • the supervisory node device can also encrypt the sensitive phrase corresponding to the update operation identifier.
  • the supervisory node device uses a preset encryption algorithm to detect sensitive phrases corresponding to the update operation identifier.
  • the phrase is encrypted to obtain the encrypted sensitive phrase.
  • the supervisory node device generates any transaction data based on the encrypted sensitive phrase and the update operation identifier. This embodiment of the application does not specifically limit the preset encryption algorithm.
  • the supervisory node device broadcasts any transaction data on the blockchain system.
  • This step 202 can enable other node devices except the supervisory node device to receive any transaction data.
  • the node device receives any transaction data.
  • the node device verifies any transaction data.
  • the node device is a node device other than the supervisory node device in the blockchain system.
  • the node device can verify any transaction data by verifying the update operation identifier carried by any transaction data. When the verification of the update operation identifier carried in the data passes, the verification of any transaction data is passed, otherwise the verification fails.
  • blockchain node devices may not verify any transaction data, and have not packaged any transaction data into the block.
  • the node device can verify any transaction data by verifying the regulatory identifier carried by any transaction data.
  • the regulatory identifier carried by any transaction data passes the verification At the time, the verification of any transaction data is passed, otherwise the verification fails.
  • the node device can verify the regulatory identification in the target transaction data by any of the following methods 1-2.
  • the node device verifies the regulatory identifier carried by any transaction data through the regulatory information of the regulatory node device stored in the genesis block in the blockchain configured on the node device.
  • the supervision information includes the public keys of all supervision node devices or the addresses of all supervision node devices in the blockchain system, and is used to indicate the identity of the node device with supervision authority.
  • the supervision information of the supervision node device can be stored in the genesis block, so that any node device in the blockchain system can know which node device has supervision authority.
  • the regulatory identifier carried by any transaction data is the signature of the regulatory node device, and the public key of the regulatory node device is stored in the genesis block of the blockchain configured by the node device At the time, the regulatory identification passed the verification, otherwise the verification failed.
  • the supervision identifier carried by any transaction data is the address of the supervision node
  • the creation block of the blockchain configured by the node device stores the address of the supervision node device
  • Manner 2 The node device verifies the supervision identifier in any transaction data by executing the first contract.
  • the first contract is a smart contract used to verify the regulatory identification in the blockchain system.
  • the node device receives any transaction data carrying the regulatory identification, it can trigger the node device to execute the first contract to perform the first contract.
  • a supervisory identification carried by transaction data is verified.
  • the supervisory identification passes the verification, otherwise The verification failed.
  • the supervisory identifier in any transaction data is the address of the supervisory node, and the address of the supervisory node device is stored in the first contract, the supervisory identifier passes the verification, otherwise the verification fails. by.
  • the node device in the blockchain system verifies any transaction data through the supervisory identifier, so that the transaction data carrying the update operation identifier and the sensitive phrase corresponding to the update operation identifier on the blockchain are all generated by the supervisory node device, thereby ensuring The reliability of the transaction data carrying the update operation identifier and the sensitive phrase corresponding to the update operation identifier in the blockchain system.
  • the node device stores the target block containing the any transaction data on the blockchain of the blockchain system.
  • step 205 there may be step 205. It can be understood that only the node device that has executed step 204 will execute step 205. When most node devices in the blockchain system verify any transaction data, it can be considered that any transaction data is passed by consensus in the blockchain system. In a possible implementation manner, this step 205 can be implemented through the process shown in the following steps 205A-205B.
  • Step 205A When multiple node devices in the blockchain system pass the verification of any transaction data, the node device packs the any transaction data into the target block.
  • the target when the node device in the blockchain system packages the transaction data carrying the update operation identifier and the sensitive phrase corresponding to the update operation identifier into the target block, the target can be added to the target block. Identification, so that the node device in the blockchain system can obtain the target block on the blockchain based on the target identification.
  • the embodiment of the application does not specifically limit the target identifier.
  • Step 205B After multiple node devices in the blockchain system agree on the target block, the node device stores the target block on the blockchain configured by the node device.
  • the multiple node devices When multiple node devices in the blockchain system have all verified the target block, the multiple node devices reach a consensus on the target block. Any node device in the blockchain system can verify the block through the attributes of the target block.
  • the attributes of the target block include the block number, the root hash value, and the number of transaction data in the block Wait.
  • the node device passes the verification of the target block, otherwise the verification fails. For example, the block number of the target block is greater than that of the node. If the block number of the last block on the block chain configured by the device is greater than 1, the node device passes the verification of the target block.
  • the node device obtains the update operation identifier in the target block and the sensitive phrase corresponding to the update operation identifier.
  • this step 206 can obtain the update operation identifier carrying the update operation identifier and the sensitive phrase corresponding to the update operation identifier in the target block.
  • this step 206 may be implemented in any of the following manners 3-4.
  • Method 3 The node device obtains at least one piece of transaction data in the target block; when any piece of transaction data in the target block carries an update operation identifier, the node device obtains the data content of any piece of transaction data. Update the operation identifier and the sensitive phrase.
  • the node device can detect the content of the remark information field of all transaction data in the target block, and when it is detected in the remark information field of any transaction data in the target block When the operation identifier is updated, the node device acquires the data content in the remark information field of any piece of transaction data as the update operation identifier and the sensitive phrase.
  • the node device obtains at least one piece of transaction data of the target block; when any piece of transaction data in the target block carries a supervision identifier, the node device obtains the update from the data content of any piece of transaction data Operation identification and the sensitive phrase.
  • the node device can query the initiator address of all transaction data in the target block. When any transaction data is queried in the address of the supervisory node device stored in the genesis block When the initiation address in, the node device obtains the update operation identifier and the sensitive phrase from the data content of any piece of transaction data.
  • the node device can query the signatures in all transaction data in the target block.
  • the public key of the supervisory node device stored in the genesis block is queried with any transaction
  • the node device obtains the update operation identifier and the sensitive phrase from the data content of any piece of transaction data.
  • the node device needs to obtain the target block on the blockchain configured by the node device before obtaining the update operation identifier and the sensitive phrase corresponding to the update operation identifier in the target block.
  • the node device can obtain the target block on the blockchain through the following methods 5 and 6.
  • Method 5 Whenever a block is stored on the blockchain configured by the node device, the transaction data in the block is detected, when any transaction data in the block carries the update operation identification or the supervision identification , The node device obtains the block as the target block.
  • the node device may also not perform real-time detection of the blocks on the blockchain.
  • the node device detects the blockchain configured by the node device within the preset time period every time the node device has passed a preset period of time. At least one piece of transaction data in at least one block is newly stored, and when any transaction data in any block carries an update operation identifier or a supervision identifier, the block is acquired as the target block. For example, every hour that a node device has passed, at least one piece of transaction data in at least one block newly stored on the blockchain configured by the node device within the hour is detected. When any transaction data in any block carries an update When operating the identification or supervision identification, the block is acquired as the target block.
  • Method 6 When the node device detects that any block on the blockchain carries a target identifier, the block is acquired as a target block.
  • the target identifier is used to indicate that the block carries an update operation identifier and is related to the update.
  • the sensitive phrase corresponding to the operation identifier is used to indicate that the block carries an update operation identifier and is related to the update.
  • the node device updates the sensitive phrase database according to the update operation identifier in the target block and the sensitive phrase.
  • the node device Since the update operation identifier in any transaction data may be an addition identifier or a deletion identifier, for different update operation identifiers, the node device updates the sensitive phrase to the sensitive phrase database in different ways.
  • the node device when the update operation identifier in any transaction data is an increase identifier, the node device adds a sensitive phrase corresponding to the increase identifier in the sensitive phrase database. Still taking Table 1 in step 201 as an example, the sensitive phrase 1-n in the first row of Table 1 all correspond to the addition identifier Add, and the node device adds the sensitive phrase 1-n in the first row of Table 1 to the Sensitive phrase database.
  • the node device Before the node device updates the sensitive phrase database, there may be a sensitive phrase corresponding to the added identifier in the sensitive phrase database, or there may be no sensitive phrase corresponding to the added identifier, when there is no sensitive phrase corresponding to the added identifier in the sensitive phrase database , The node device adds the sensitive phrase corresponding to the added identifier in the sensitive phrase database.
  • the node device queries the sensitive phrase database according to the sensitive phrase corresponding to the added identifier, and when the sensitive phrase database does not contain the When adding a sensitive phrase corresponding to an identifier, the node device adds a sensitive phrase corresponding to the increased identifier in the sensitive phrase database. When the sensitive phrase database contains the sensitive phrase corresponding to the increased identifier, the node device may not execute Increase operation.
  • the node device when the update operation identifier in any transaction data is a deletion identifier, the node device deletes the sensitive phrase corresponding to the deletion identifier from the sensitive phrase database. Still taking Table 1 in step 201 as an example, the sensitive phrases 1-n in the second row of Table 1 all correspond to the delete identifier Delete, and the node device deletes the sensitive phrases in the second row of Table 1 from the sensitive phrase database 1-n.
  • the node device can also set a weight for the sensitive phrase in the sensitive phrase database to indicate the sensitivity of the sensitive phrase.
  • the weight of the sensitive phrase is greater, the sensitivity of the sensitive phrase is higher. The smaller the weight, the lower the sensitivity of the sensitive phrase.
  • the node device adds the weight of the sensitive phrase corresponding to the increased identifier in the sensitive phrase database.
  • the weight of the sensitive phrase can be determined according to the number of times that the sensitive phrase is added. In a possible implementation, for any sensitive phrase, every time the node device obtains an increase identifier corresponding to the sensitive phrase, the node The device increases the weight of the sensitive phrase by a preset value.
  • the node device can decrypt the encrypted sensitive phrase according to a preset decryption algorithm to obtain the decrypted sensitive phrase After that, the node device updates the decrypted sensitive phrase into the sensitive phrase database.
  • the preset decryption algorithm corresponds to the preset encryption algorithm for encrypting the sensitive phrase.
  • the block Any node device in the chain system can obtain the sensitive phrase in the target block from the blockchain of the blockchain system, and update its own sensitive phrase database according to the update operation identifier corresponding to the sensitive phrase, so that The sensitive phrase database can be updated synchronously on any node device.
  • the node device in the blockchain system verifies any transaction data through the supervision identification, so that the transaction data carrying the update operation identification and the sensitive phrase corresponding to the update operation identification on the blockchain are all generated by the supervision node device.
  • weights are set for sensitive phrases in the sensitive phrase database.
  • the sensitivity of sensitive phrases is expressed by the weight of sensitive words, and the sensitivity of sensitive phrases can be visually expressed through quantified data, so that subsequent data query based on the sensitive phrase database can be performed.
  • the node device when the node device stores a target block each time, it can obtain the update operation identifier and the sensitive phrase corresponding to the update operation identifier from the target block, so that each node device can perform its own sensitive phrase database. Real-time update can avoid the situation that the node device cannot accurately filter the block content of the block to be queried because the sensitive phrase database is not updated in time.
  • the sensitive phrase in any transaction data is an encrypted sensitive phrase, for ordinary users who do not know the decryption algorithm, it is impossible to decrypt the encrypted sensitive phrase in any transaction data. Avoid mass dissemination of sensitive phrases in any transaction data.
  • the node device in Figure 2 stores a sensitive phrase database locally, so that the node device can filter the block content of the block to be queried according to the sensitive phrase database.
  • Fig. 3 is a flowchart of a data query method based on data synchronization provided by an embodiment of the present application, and the method specifically includes:
  • the node device receives a query request, and the block query request carries the block number of the block to be queried.
  • the node device is any node device in the blockchain system.
  • the block number can be the number of the block on the blockchain configured by the blockchain system, and the number can also be the height of the block, for example, the block Block 001, block 002, etc.
  • the node device determines the block corresponding to the block number on the block chain of the blockchain system.
  • the node device can determine the block corresponding to the block number carried in the query request by querying the block number of each block on the blockchain configured by the node device.
  • the block where the queried block number is located is obtained as the first target block. , That is, the block that the node device needs to determine.
  • the node device analyzes the determined block, and obtains at least one piece of transaction data in the block.
  • the node device compares at least one piece of transaction data in the block corresponding to the block number with the sensitive phrase in the sensitive phrase database.
  • the node device can be compared based on the weights of sensitive phrases.
  • the node device can compare the weights of multiple sensitive phrases in the sensitive phrase database from high to low. At least one piece of transaction data is compared with the plurality of sensitive phrases one by one, and the weight is determined according to the number of times that the sensitive phrase is added.
  • the node device Before the comparison, the node device obtains the weight of each sensitive phrase in the sensitive phrase database. After that, the weight of each sensitive phrase is sorted in the order from high to bottom. Finally, the node device will sort the sensitive words according to the sorting. The group is compared with at least one transaction data in the block.
  • the node device sorts the sensitive phrases in the sensitive lexicon. As: sensitive phrase C, sensitive phrase B, and sensitive phrase A, then, first, the node device compares at least one transaction data in the block with sensitive phrase C, and secondly, at least one transaction data in the block Compare with sensitive phrase B, and finally, compare at least one piece of transaction data in the block with sensitive phrase A.
  • the node device filters out the sensitive phrases in the sensitive phrase database from the first transaction data to obtain query feedback information, and the query feedback information includes filtered At least one piece of transaction data, and the first transaction data is transaction data including any sensitive phrase in the sensitive phrase database.
  • the node device can filter sensitive words in the transaction data by deleting sensitive phrases or replacing sensitive phrases. Then, this step 304 can be implemented in any of the following modes 7 and 8.
  • the node device deletes the sensitive phrase in the sensitive phrase database from the first transaction data to obtain query feedback information, and the query feedback information includes deleted At least one transaction data.
  • the first transaction data carries the sensitive phrase A in the sensitive phrase database
  • the node device deletes the sensitive phrase A from the first transaction data
  • the first transaction data in the obtained query feedback information is the deleted first transaction data 1.
  • the node device replaces the sensitive phrase in the first transaction data with the target warning phrase to obtain query feedback information, and the query feedback information includes deleted At least one transaction data.
  • the target warning phrase can be represented by any character string, such as "******" or "the information here is sensitive information", which is used to indicate a sensitive phrase.
  • the content of the target warning phrase is not affected by the embodiment of this application. Make specific restrictions.
  • the first transaction data carries the sensitive phrase A in the sensitive phrase database, and the node device replaces the sensitive phrase A in the first transaction data with the sensitive phrase "******", and finally, the obtained query
  • the first transaction data in the feedback information is the first transaction data after replacement.
  • the node device can also display the query feedback information on the display interface of the node device for the user to refer to.
  • the embodiment of the present application does not limit the specific form of displaying the query feedback information.
  • the above process is a process in which the node device filters the sensitive phrases in the query block based on the local sensitive phrase database.
  • the node device can also execute the blockchain system The smart contract in, to filter the sensitive phrases in the query block.
  • the embodiment of the present application does not specifically limit the smart contract for filtering the sensitive phrases in the query block, and the smart contract can be maintained by a user with supervisory authority, without the need for other node devices to maintain.
  • the method provided by the embodiment of the present application compares the transaction data in the block to be queried with the sensitive phrase in the sensitive phrase database, and filters the transaction data carrying the sensitive phrase in the query block, so that the node device is The user displays the filtered transaction data. Since each node device in the blockchain system stores a sensitive phrase database, any node device in the blockchain system can treat the query area based on its own sensitive phrase database Sensitive phrases in the block are filtered, so as to prevent the sensitive phrases in the blockchain from being widely spread.
  • the node devices in the blockchain system filter the sensitive phrases in the query block through the smart contract, only users with supervisory authority need to maintain the smart contract without the need for other node devices to maintain, which can reduce other The service burden of the node device, and when the node device filters the data to be queried, it only needs to filter according to the local sensitive phrase database, without spending a lot of time, thereby improving the filtering efficiency of the node device.
  • FIG. 4 is a schematic structural diagram of a data synchronization device provided by an embodiment of the present application. Referring to FIG. 4, it includes a receiving module 401, an acquiring module 402, and an updating module 403. Each module included in the data synchronization device can be implemented in whole or in part by software, hardware or a combination thereof.
  • the receiving module 401 is connected to the storage module 402 to receive any transaction data, and the any transaction data carries an update operation identifier and a sensitive phrase corresponding to the update operation identifier.
  • the obtaining module 402 is connected to the update module 403, and is used to obtain the update operation identifier and the sensitive phrase in the target block when the target block containing any transaction data is stored in the blockchain of the blockchain system .
  • the update module 403 is configured to update the sensitive phrase database according to the update operation identifier in the target block and the sensitive phrase.
  • the update module 403 includes:
  • the adding unit is used to add a sensitive phrase corresponding to the added identifier in the sensitive phrase database when the update operation identifier in any transaction data is an adding identifier; or,
  • the deletion unit is used for deleting the sensitive phrase corresponding to the deletion identification from the sensitive phrase database when the update operation identification in any transaction data is the deletion identification.
  • the adding unit is configured to query the sensitive phrase database according to the sensitive phrase corresponding to the added tag when the update operation identifier in any transaction data is an increase tag, and when the sensitive phrase database does not contain the increase tag When the corresponding sensitive phrase is identified, the sensitive phrase corresponding to the increased identification is added to the sensitive phrase database.
  • the acquisition module 402 is configured to acquire the data content of any transaction data as the update operation identifier and the sensitive phrase when any piece of transaction data in the target block carries a supervision identifier.
  • the supervision identification includes the signature of the supervision node device or the address of the supervision node device.
  • the device further includes:
  • the determining module is used to determine the block corresponding to the block number on the block chain of the block chain system according to the block number carried in the query request.
  • the comparison module is used to compare at least one piece of transaction data in the block corresponding to the block number with the sensitive phrase in the sensitive phrase database.
  • the filtering module is used to filter the sensitive phrases in the sensitive phrase database from the first transaction data when the at least one piece of transaction data includes the first transaction data to obtain query feedback information.
  • the query feedback information includes filtered At least one piece of transaction data, and the first transaction data is transaction data including any sensitive phrase in the sensitive phrase database.
  • the comparison module is configured to compare at least one piece of transaction data in the block with the multiple sensitive phrases in the order of the weights of the multiple sensitive phrases in the sensitive phrase database from high to low. , The weight is determined based on the number of times that the sensitive phrase has been added.
  • the filtering module is used for any of the following:
  • the at least one piece of transaction data includes the first transaction data
  • the at least one piece of transaction data includes the first transaction data
  • replace the sensitive phrase in the first transaction data with the target warning phrase to obtain query feedback information
  • the query feedback information includes the replaced at least one piece of transaction data
  • the Any node device in the blockchain system can obtain the sensitive phrase in the target block from the blockchain of the blockchain system, and update its own sensitive phrase database according to the update operation identifier corresponding to the sensitive phrase. So that any node device can synchronize the update of the sensitive phrase database.
  • the node device in the blockchain system verifies any transaction data through the supervision identification, so that the transaction data carrying the update operation identification and the sensitive phrase corresponding to the update operation identification on the blockchain are all generated by the supervision node device.
  • the node device when the node device stores a target block each time, it can obtain the update operation identifier and the sensitive phrase corresponding to the update operation identifier from the target block, so that each node device can perform its own sensitive phrase database. Real-time update can avoid the situation that the node device cannot accurately filter the block content of the block to be queried because the sensitive phrase database is not updated in time.
  • the transaction data carrying the sensitive phrases in the block to be queried is filtered, so that the node device displays the filtered transaction data to the user .
  • any node device in the blockchain system can filter the sensitive phrases in the query block based on its own sensitive phrase database , So as to avoid the mass spread of sensitive phrases in the blockchain.
  • the node devices in the blockchain system filter the sensitive phrases in the query block through the smart contract, only users with supervisory authority need to maintain the smart contract without the need for other node devices to maintain, which can reduce other The service burden of the node device.
  • the data synchronization device provided in the above embodiment performs data synchronization
  • only the division of the above functional modules is used as an example.
  • the above functions can be allocated by different functional modules according to needs. That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the data synchronization device provided in the foregoing embodiment and the data synchronization method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment.
  • FIG. 5 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device may specifically be the node device in FIG. 1.
  • the node device 500 may have relatively large differences due to different configurations or performances, and may include one or more CPUs (central processing units, processors) 501 and one or more memories 502, wherein the memory 502 stores There is at least one instruction, and the at least one instruction is loaded and executed by the processor 501 to implement the methods provided in the foregoing method embodiments.
  • the node device may also have components such as a wired or wireless network interface, a keyboard, an input and output interface for input and output, and the node device may also include other components for implementing device functions, which will not be repeated here.
  • a computer-readable storage medium such as a memory including instructions, which may be executed by a processor in a terminal to complete the data synchronization method or data query method in the foregoing embodiment.
  • a computer device including a memory and a processor, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the processor executes the steps of the image processing method.
  • the steps of the image processing method may be the steps in the image processing method of each of the foregoing embodiments.
  • a computer-readable storage medium which stores computer-readable instructions.
  • the processor executes the steps of the image processing method.
  • the steps of the image processing method may be the steps in the image processing method of each of the foregoing embodiments.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种数据同步方法该方法包括:接收任一交易数据,所述任一交易数据携带更新操作标识以及与所述更新操作标识对应的敏感词组;当包含所述任一交易数据的目标区块存储至区块链系统的区块链中时,获取所述目标区块中的所述更新操作标识以及所述敏感词组;及根据所述目标区块中的所述更新操作标识以及所述敏感词组,对敏感词组数据库进行更新。

Description

数据同步方法、装置、计算机设备以及可读存储介质
本申请要求于2019年03月15日提交中国专利局,申请号为201910196407.9,申请名称为“数据同步方法、装置、计算机设备以及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,特别涉及一种数据同步方法、装置、计算机设备以及可读存储介质。
背景技术
随着网络技术的发展,人们可以通过浏览器查询网络上的数据,来获取信息,但是有些数据中携带有敏感词组,那么,安装有浏览器的设备在向用户展现待查询数据时,会对待查询数据中的敏感词组进行过滤,向用户展现过滤后的待查询数据,以避免敏感词组被大量传播。
目前,安装有浏览器的设备可以通过敏感词组过滤系统,来过滤待查询数据中的敏感词组。但是,当每一次需要对待查询数据进行过滤时,安装有浏览器的设备都需要通过敏感词过滤系统来完成过滤,还需要等待敏感词过滤系统反馈的过滤结果,那么,该设备等待时间较长,从而使得该设备过滤敏感词组的效率较低,所以亟需一种同步敏感词组数据库的方法。
发明内容
根据本申请提供的各种实施例,提供了一种数据同步方法、装置、计算机设备以及可读存储介质。
一种数据同步方法,由计算机设备执行,该方法包括:
接收任一交易数据,该任一交易数据携带更新操作标识以及与该更新操 作标识对应的敏感词组;
当包含该任一交易数据的目标区块存储至区块链系统的区块链中时,获取该目标区块中的该更新操作标识以及该敏感词组;及
根据该目标区块中的该更新操作标识以及该敏感词组,对敏感词组数据库进行更新。
一种数据同步装置,该装置包括:
接收模块,用于接收任一交易数据,该任一交易数据携带更新操作标识以及与该更新操作标识对应的敏感词组;
获取模块,用于当包含该任一交易数据的目标区块存储至区块链系统的区块链中时,获取该目标区块中的该更新操作标识以及该敏感词组;及
更新模块,用于根据该目标区块中的该更新操作标识以及该敏感词组,对敏感词组数据库进行更新。
一种存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行数据同步方法的步骤。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行数据同步方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种区块链系统的示意图;
图2是本申请实施例提供的一种数据同步方法的流程图;
图3是本申请实施例提供的一种基于数据同步的数据查询方法的流程图;
图4是本申请实施例提供的一种数据同步装置的结构示意图;及
图5是本申请实施例提供的一种节点设备的结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
图1是本申请实施例提供的一种区块链系统的示意图。参见图1,该区块链系统由至少二个节点设备组成。其中,该至少二个节点设备可以属于不同的用户。任一节点设备均可以生成或者接收交易数据,将至少一个交易数据打包,并生成区块,存储共识通过的区块。其中,交易数据可以为任意类型的数据,交易数据中可以包含任意内容。区块链系统中的任一节点设备接收到或者生成的任意数据均可以称为交易数据。
区块链系统中的各个节点设备在区块链系统中的作用可以不同,可以分为监管节点设备和普通节点设备。其中,监管节点设备可以作为监管方,用于在该区块链系统中发布携带敏感词组的交易数据,以便其他节点设备根据监管节点设备发布的敏感词组,更新本地的敏感词组数据库。
任一节点设备均可以为用户提供查询服务,使得用户可以在任一节点设备上查询该区块链系统中的区块链上各个区块内的交易数据,当任一节点设备向用户展现待查询区块内的交易数据时,可以根据本地的敏感词组数据库中的敏感词组,过滤出待查询区块内的交易数据中的敏感词组,最后,向用户展现过滤后的交易数据。
以上是对区块链系统以及节点设备的描述,为了体现区块链系统中节点设备将监管节点发布的敏感词组存储至本地敏感词组数据库的过程,参见图 2,图2是本申请实施例提供的一种数据同步方法的流程图,该方法具体包括:
201、监管节点设备生成任一交易数据,该任一交易数据携带更新操作标识以及与该更新操作标识对应的敏感词组。
该监管节点设备可以为该区块链系统中具有监管权限的任一节点设备。该更新操作标识可以用于指示节点设备需要进行的更新操作,该更新操作标识可以是增加标识,也可以是删除标识。其中,增加标识用于指示在敏感词组数据库中增加敏感词组,该删除标识用于指示删除敏感词组数据库中的敏感词组。
在一种可能实现方式中,该更新操作标识可以为任一字符串,也可以用其他的形式来表示,用于表示更新操作标识的不同字符串可以用来表示不同的更新操作。例如,Add表示增加操作,Delete表示删除操作。
该区块链系统中的任一节点设备均配置有一个敏感词组数据库,该敏感词组数据库用于存储敏感词组,该敏感词组可以是任一词组,本申请实施例对该敏感词组的内容不做限定。
当该监管节点设备接收到任一交易数据生成请求时,该监管节点设备执行本步骤201,其中,该任一交易数据生成请求用于请求生成携带有敏感词组的任一交易数据。在一种可能的实现方式中,监管节点设备接收任一交易数据生成请求,该任一交易数据生成请求包括更新操作标识以及与该更新操作标识对应的敏感词组;该监管节点设备基于该任一交易数据生成请求中的更新操作标识以及与该更新操作标识对应的敏感词组,生成符合该区块链系统中交易数据的格式要求的任一交易数据。
监管节点设备接收到该任一交易数据生成请求,可以由用户的存储操作来触发。例如,当用户在监管节点设备的用户界面中选中更新选项,在与该更新选项对应词组位置上输入敏感词组,然后,用户点击存储选项,可以触发该任一交易数据生成请求。
该任一交易数据还可以包括监管标识,以表示该任一交易数据由监管节点设备生成。其中,监管标识包括监管节点设备的签名或监管节点设备的地 址。监管节点设备的签名可以是监管节点设备采用私钥对该任一交易数据的签名,监管节点设备的地址可以是监管节点设备的IP(internet protocol,互联网协议)地址,还可以是能够代表该监管节点设备身份的其他地址,本申请实施例对该监管标识不做具体限定。
在一种可能的实现方式中,该监管节点设备将自己的地址添加在该任一交易数据的发起地址字段中;该监管节点设备将更新操作标识以及与该更新操作标识对应的敏感词组添加在该任一交易数据的备注信息字段中。
在一种可能的实现方式中,该监管节点设备将更新操作标识以及与该更新操作标识对应的敏感词组添加在该任一交易数据的备注信息字段中,采用该监管节点设备的私钥,对添加了备注信息的任一交易数据进行签名。
该监管节点设备在将更新操作标识以及与该更新操作标识对应的敏感词组添加在目标交易数据的备注信息字段中时,可以使得更新操作标识以及与该更新操作标识对应的敏感词组处于该备注信息中的同一行,以便该更新操作标识与该敏感词组相对应。以Add作为增加标识,以Delete作为删除标识,以表格的形式表示备注信息为例,参见表1所示的备注信息,由表1可知,第一行中的敏感词组1-n均与增加标识Add对应,第二行中的敏感词组1-n均与删除标识Delete对应。
表1
更新操作标识 敏感词组1 敏感词组2 ... 敏感词组n
Add xxx yyy ... zzz
Delete mmm nnn   ttt
需要说明的是,本申请实施对备注信息的形式以及备注信息中的敏感词组的个数不做具体限定。且该监管节点设备也可以在该任一交易数据中的其他字段中添加更新操作标识以及与该更新操作标识对应的敏感词组,本申请实施例对更新操作标识以及与该更新操作标识对应的敏感词组在该任一交易数据中的位置不做限定。
需要说明的是,该监管节点设备还可以对与更新操作标识对应的敏感词 组进行加密,在一种可能的实现方式中,该监管节点设备通过预设加密算法,对与更新操作标识对应的敏感词组进行加密,得到加密后的敏感词组,该监管节点设备基于加密后的敏感词语以及更新操作标识,生成该任一交易数据。本申请实施例对该预设加密算法不做具体限定。
那么,当该任一交易数据被存储在区块链上以后,对于不知道解密算法的普通用户而言,就无法对该任一交易数据中加密后的敏感词组进行解密,从而可以避免该任一交易数据中的敏感词组被大量传播。
202、监管节点设备将该任一交易数据在区块链系统进行广播。
本步骤202可以使得除该监管节点设备以外的其他节点设备能够接收到该任一交易数据。
203、节点设备接收到该任一交易数据。
可以理解的是,区块链中的所有节点设备均会接收到该任一交易数据。
204、该节点设备对该任一交易数据进行验证。
该节点设备为区块链系统中除该监管节点设备以外的节点设备,该节点设备可以通过验证任一交易数据携带的更新操作标识,来对该任一交易数据进行验证,当该任一交易数据携带的更新操作标识验证通过时,该任一交易数据验证通过,否则验证不通过。
可以理解的是,一部分区块链节点设备也可能并未对该任一交易数据进行验证,并未将该任一交易数据打包至区块中。
在一种可能的实现方式中,当该任一交易数据携带的更新操作标识的形式验证通过时,该任一交易数据验证通过,否则验证不通过,例如,以Add作为增加标识,以Delete作为删除标识,当该任一交易数据携带的更新操作标识为Add或者Delete时,该任一交易数据验证通过,否则验证不通过。
当该任一交易数据中携带监管标识时,该节点设备可以通过验证该任一交易数据携带的监管标识,来对该任一交易数据进行验证,当该任一交易数据携带的监管标识验证通过时,该任一交易数据验证通过,否则验证不通过。
该节点设备可以通过下述方式1-2中的任一方式,对该目标交易数据中的 监管标识进行验证。
方式1、该节点设备通过该节点设备上配置的区块链中的创世区块中存储的监管节点设备的监管信息,来验证该任一交易数据携带的监管标识。
该监管信息包括该区块链系统中的所有监管节点设备的公钥或者所有监管节点设备的地址,用于指示具有监管权限的节点设备的身份。在该区块链系统初始化阶段,可以在创世区块中存储监管节点设备的监管信息,以便该区块链系统中的任一节点设备都可以知道哪个节点设备具有监管权限。
在一种可能的实现方式中,当该任一交易数据携带的监管标识为监管节点设备的签名,且该节点设备配置的区块链的创世区块中存储有该监管节点设备的公钥时,该监管标识验证通过,否则验证不通过。
在一种可能的实现方式中,当该任一交易数据携带的监管标识为监管节点的地址,且该节点设备配置的区块链的创世区块中存储有该监管节点设备的地址时,该监管标识验证通过,否则验证不通过。
方式2、该节点设备通过执行第一合约,来验证该任一交易数据中的监管标识。
该第一合约为区块链系统中用于验证监管标识的智能合约,当该节点设备在接收到携带监管标识的任一交易数据时,可以触发该节点设备执行第一合约,以对该任一交易数据携带的监管标识进行验证。
在一种可能的实现方式中,当该任一交易数据中的监管标识为监管节点设备的签名,且该第一合约中存储有该监管节点设备的公钥时,该监管标识验证通过,否则验证不通过。
在一种可能的实现方式中,当该任一交易数据中的监管标识为监管节点的地址,且该第一合约中存储有该监管节点设备的地址时,该监管标识验证通过,否则验证不通过。
区块链系统中的节点设备通过监管标识来验证该任一交易数据,从而使得区块链上携带更新操作标识以及与更新操作标识对应的敏感词组的交易数据均由监管节点设备生成,从而保证了该区块链系统中携带更新操作标识以 及与更新操作标识对应的敏感词组的交易数据的可信度。
205、当该任一交易数据在区块链系统中共识通过时,该节点设备将包含该任一交易数据的目标区块存储至该区块链系统的区块链上。
可选的,在步骤204后还可以有步骤205。可以理解的是只有执行了步骤204的节点设备才会执行步骤205。当区块链系统中的多数节点设备对该任一交易数据验证通过时,可以认为该任一交易数据在该区块链系统中共识通过。在一种可能的实现方式中,本步骤205可以通过下述步骤205A-205B所示的过程来实现。
步骤205A、当该区块链系统中的多个节点设备对该任一交易数据验证通过时,该节点设备将该任一交易数据打包至目标区块中。
在一些实施例中,当区块链系统中的节点设备在将携带更新操作标识以及与该更新操作标识对应的敏感词组的交易数据打包至目标区块时,可以在该目标区块上添加目标标识,以便区块链系统中的节点设备基于目标标识,在区块链上获取目标区块。本申请实施例对该目标标识不做具体限定。
步骤205B、当该区块链系统中的多个节点设备对该目标区块共识通过后,该节点设备将该目标区块存储至该节点设备配置的区块链上。
当区块链系统中的多个节点设备都对该目标区块验证通过后,该多个节点设备对该目标区块达成共识。该区块链系统中的任一节点设备可以通过目标区块的属性对该区块进行验证,该目标区块的属性包括区块编号、根哈希值以及区块内的交易数据的条数等。
在一种可能的实现方式中,当该目标区块的属性符合上链条件时,该节点设备对该目标区块验证通过,否则验证不通过,例如,目标区块的区块编号比该节点设备配置的区块链上的最后一个区块的区块编号大1,则该节点设备对该目标区块验证通过。
206、当包含该任一交易数据的目标区块存储至区块链系统的区块链中时,节点设备获取目标区块中的更新操作标识以及与该更新操作标识对应的敏感词组。
可以理解的是,区块链中的所有节点设备均可执行该步骤206。节点设备可以获取目标区块中的携带更新操作标识以及与该更新操作标识对应的敏感词组。在一种可能的实现方式中,本步骤206可以通过下述方式3-4中的任一种方式来实现。
方式3、节点设备获取该目标区块中的至少一条交易数据;当该目标区块中的任一条交易数据中携带更新操作标识时,该节点设备从该任一条交易数据的数据内容中获取该更新操作标识以及该敏感词组。
在一种可能的实现方式中,该节点设备可以通过对该目标区块中所有交易数据的备注信息字段的内容进行检测,当在该目标区块中任一条交易数据的备注信息字段中检测到更新操作标识时,该节点设备将该任一条交易数据的备注信息字段内的数据内容获取为该更新操作标识以及该敏感词组。
方式4、该节点设备获取该目标区块的至少一条交易数据;当该目标区块中的任一条交易数据中携带监管标识时,该节点设备从该任一条交易数据的数据内容中获取该更新操作标识以及该敏感词组。
在一种可能的实现方式中,该节点设备可以通过对该目标区块中所有交易数据的发起方地址进行查询,当在创世区块存储的监管节点设备的地址中查询到任一条交易数据中的发起地址时,该节点设备从该任一条交易数据的数据内容中获取该更新操作标识以及该敏感词组。
在一种可能的实现方式中,该节点设备可以通过对该目标区块中所有交易数据中的签名进行查询,当在创世区块存储的监管节点设备的公钥中查询到与任一条交易数据中签名对应时,节点设备从该任一条交易数据的数据内容中获取该更新操作标识以及该敏感词组。
节点设备需要先在该节点设备配置的区块链上获取目标区块,才能在目标区块中获取更新操作标识以及与该更新操作标识对应的敏感词组。该节点设备可以通过下述方式5和6来获取区块链上的目标区块。
方式5、每当在节点设备配置的区块链上存储一个区块时,对该区块中的交易数据进行检测,当在该区块中的任一交易数据携带更新操作标识或监管 标识时,该节点设备将该区块获取为目标区块。
该节点设备也可以不对区块链上的区块进行实时检测,在一种可能的实现方式中,该节点设备每经过预设时长,检测在该预设时长内该节点设备配置的区块链上新存储的至少一个区块内的至少一条交易数据,当任一区块中的任一交易数据携带更新操作标识或监管标识时,将该区块获取为目标区块。例如,节点设备每经过1小时,检测这1小时内该节点设备配置的区块链上新存储的至少一个区块内的至少一条交易数据,当任一区块中的任一交易数据携带更新操作标识或监管标识时,将该区块获取为目标区块。
方式6、当节点设备检测到区块链上的任一区块内携带目标标识时,将该区块获取为目标区块,该目标标识用于指示区块内携带更新操作标识以及与该更新操作标识对应的敏感词组。
207、节点设备根据该目标区块中的该更新操作标识以及该敏感词组,对敏感词组数据库进行更新。
由于该任一交易数据中的更新操作标识可能是增加标识,也可能是删除标识,对于不同的更新操作标识,该节点设备将敏感词组更新至敏感词组数据库中的方式不同。
在一种可能的实现方式中,当该任一交易数据中的更新操作标识为增加标识时,该节点设备在该敏感词组数据库中增加与该增加标识对应的敏感词组。仍以步骤201中的表1为例,表1第一行中的敏感词组1-n均与增加标识Add对应,则该节点设备将表1第一行中的敏感词组1-n增加至该敏感词组数据库中。
该节点设备更新敏感词组数据库之前,敏感词组数据库中可能存在与增加标识对应的敏感词组,也可能不存在与增加标识对应的敏感词组,当敏感词组数据库中不存在与增加标识对应的敏感词组时,则该节点设备在该敏感词组数据库增加与增加标识对应的敏感词组。
在一种可能的实现方式中,当该任一交易数据中的更新操作标识为增加标识时,该节点设备根据增加标识对应的敏感词组查询该敏感词组数据库, 当该敏感词组数据库中未包含该增加标识对应的敏感词组时,该节点设备在该敏感词组数据库中增加与该增加标识对应的敏感词组,当该敏感词组数据库中包含该增加标识对应的敏感词组时,该节点设备则可以不执行增加操作。
在一种可能的实现方式中,当该任一交易数据中的更新操作标识为删除标识时,该节点设备从该敏感词组数据库中删除与该删除标识对应的敏感词组。仍以步骤201中的表1为例,表1第二行中的敏感词组1-n均与删除标识Delete对应,则该节点设备从该敏感词组数据库中删除表1第二行中的敏感词组1-n。
该节点设备还可以对该敏感词组数据库中的敏感词组设置权重,以表示该敏感词组的敏感度,当该敏感词组的权重越大时,该敏感词组的敏感度越高,当该敏感词组的权重越小时,该敏感词组的敏感度越低。当敏感词组数据库中存在与增加标识对应的敏感词组时,则该节点设备在该敏感词组数据库增加与增加标识对应的敏感词组的权重。
敏感词组的权重可以根据敏感词组被执行增加操作的次数确定,在一种可能的实现方式中,对于任一敏感词组,该节点设备每获取到一次与该敏感词组对应的增加标识时,该节点设备将该敏感词组的权重增加预设数值。
需要说明的是,当该节点设备在目标区块中获取的敏感词组为加密后的敏感词组时,该节点设备可以根据预设解密算法,对该加密后的敏感词组进行解密,得到解密后的敏感词组,其后,该节点设备将解密后的敏感词组更新至敏感词组数据库中。其中,该预设解密算法与加密该敏感词组的预设加密算法对应。
本申请实施提供的方法,当区块链系统中的节点设备对携带敏感词组的任一交易数据验证通过,且包含有该交易数据的目标区块被存储至区块链上时,该区块链系统中的任一节点设备都可以从该区块链系统的区块链上获取目标区块内的敏感词组,根据与该敏感词组对应的更新操作标识,更新自己的敏感词组数据库,从而使得任一节点设备上可以对敏感词组数据库进行同步更新。并且,区块链系统中的节点设备通过监管标识来验证该任一交易数 据,从而使得区块链上携带更新操作标识以及与更新操作标识对应的敏感词组的交易数据均由监管节点设备生成,从而保证了该区块链上携带更新操作标识以及与更新操作标识对应的敏感词组的交易数据的可信度。另外还对敏感词组数据库中的敏感词组设置了权重,通过敏感词的权重来表示敏感词组的敏感度,以通过量化数据直观表示敏感词组的敏感度,以便后续基于敏感词组数据库进行数据查询等操作。并且,当该节点设备每存储一个目标区块时,都可以从该目标区块中获取更新操作标识以及与该更新操作标识对应的敏感词组,从而使得各个节点设备可以对自己的敏感词组数据库进行实时更新,进而可以避免由于敏感词组数据库更新不及时,出现该节点设备对待查询区块的区块内容无法精确过滤的情况。并且,当该任一交易数据中的敏感词组为加密后的敏感词组时,对于不知道解密算法的普通用户而言,就无法对该任一交易数据中加密后的敏感词组进行解密,从而可以避免该任一交易数据中的敏感词组被大量传播。
图2中的节点设备在本地存储有敏感词组数据库,从而使得节点设备可以根据敏感词组数据库对待查询区块的区块内容进行过滤,为了进一步体现节点设备基于敏感词组数据库进行数据查询的过程,参见图3,图3是本申请实施例提供的一种基于数据同步的数据查询方法的流程图,该方法具体包括:
301、节点设备接收查询请求,该区块查询请求携带待查询区块的区块编号。
该节点设备为该区块链系统中任一节点设备,该区块编号可以是区块在该区块链系统所配置的区块链上的编号,编号还可以是区块高度,例如,区块001、区块002等。
302、根据查询请求所携带的区块编号,该节点设备在区块链系统的区块链上确定该区块编号对应的区块。
该节点设备可以通过查询该节点设备配置的区块链上各个区块的区块编号,来确定与查询请求携带的区块编号对应的区块,在一种可能的实现方式中,当在该节点设备配置的区块链上查询到与查询请求携带的区块编号相同 的区块编号时,将查询到的区块编号所在的区块获取为第一目标区块,该第一目标区块,也即是,该节点设备需确定的区块。
303、该节点设备对确定的区块进行解析,获取该区块中的至少一条交易数据。
304、该节点设备将该区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对。
该节点设备可以基于敏感词组的权重来进行对比,在一种可能的实现方式中,该节点设备按照该敏感词组数据库中多个敏感词组的权重从高到低的顺序,将该区块内的至少一条交易数据与该多个敏感词组进行一一比对,该权重根据敏感词组被执行增加操作的次数确定。
该节点设备在对比之前,获取敏感词组数据库中的各个敏感词组的权重,其后,将各个敏感词组的权重按照从高到底的顺序进行排序,最后,该节点设备根据排序,将排序后的敏感组与该区块内的至少一条交易数据进行对比。
例如,敏感词库中有3个敏感词组,敏感词组A的权重为1,敏感词组B的权重为2,敏感词组C的权重为3,该节点设备对该敏感词库中的敏感词组的排序为:敏感词组C、敏感词组B和敏感词组A,那么,首先,该节点设备将该区块内的至少一条交易数据与敏感词组C进行对比,其次,将该区块内的至少一条交易数据与敏感词组B进行对比,最后,将该区块内的至少一条交易数据与敏感词组A进行对比。
305、当该至少一条交易数据中包括第一交易数据时,该节点设备从该第一交易数据中过滤掉该敏感词组数据库中的敏感词组,得到查询反馈信息,该查询反馈信息包括经过过滤的至少一条交易数据,该第一交易数据为包括该敏感词组数据库中的任一敏感词组的交易数据。
该节点设备可以通过删除敏感词组或替换敏感词组,来过滤交易数据中的敏感词,那么,本步骤304可以通过下述方式7和8中的任一种方式来实现。
方式7、当该至少一条交易数据中包括第一交易数据时,该节点设备从该第一交易数据中删除该敏感词组数据库中的敏感词组,得到查询反馈信息, 该查询反馈信息包括删除后的至少一条交易数据。
例如,第一交易数据中携带有敏感词组数据库中的敏感词组A,该节点设备将该第一交易数据中敏感词组A删除,最后,得到的查询反馈信息中第一交易数据为删除后的第一交易数据。
方式8、当该至少一条交易数据中包括第一交易数据时,该节点设备将所述第一交易数据中的敏感词组替换为目标警示词组,得到查询反馈信息,该查询反馈信息包括删除后的至少一条交易数据。
该目标警示词组可以是用任一字符串来表示,例如“******”或者“此处信息为敏感信息”,用于指示敏感词组,本申请实施例对目标警示词组的内容不做具体限定。
例如,第一交易数据中携带有敏感词组数据库中的敏感词组A,该节点设备将该第一交易数据中的敏感词组A用敏感词组“******”替换,最后,得到的查询反馈信息中第一交易数据为替换后的第一交易数据。
该节点设备还可以在该节点设备的显示界面上,显示该查询反馈信息,以便用户查阅。本申请实施例对显示该查询反馈信息的具体形式不做限定。
需要说明是,上述过程为该节点设备基于本地的敏感词组数据库,对待查询区块中的敏感词组进行过滤的过程,在一种可能的实现方式中,该节点设备也可以通过执行区块链系统中的智能合约,来对待查询区块中的敏感词组进行过滤。本申请实施例对待查询区块中的敏感词组进行过滤的智能合约不做具体限定,该智能合约可以由具有监管权限的用户来维护,而无需其他节点设备来维护。
本申请实施例所提供的方法,通过将待查询区块中的交易数据与敏感词组数据库中的敏感词组进行对比,对待查询区块中的携带敏感词组的交易数据进行过滤,使得该节点设备向用户展现过滤后的交易数据,由于区块链系统中的各个节点设备上均存储有敏感词组数据库,使得该区块链系统中的任一节点设备都可以基于自己的敏感词组数据库,对待查询区块中的敏感词组进行过滤,从而可以避免区块链中的敏感词组被大量传播。并且,当区块链 系统中的节点设备通过智能合约对待查询区块中的敏感词组进行过滤时,仅需要具有监管权限的用户维护智能合约即可,而无需其他节点设备维护,从而可以降低其他节点设备的业务负担,并且该节点设备对待查询数据进行过滤时,仅需要根据本地的敏感词组数据库进行过滤即可,无需耗费大量的时间,从而提高了节点设备的过滤效率。
可以有上述所有可选技术方案,可以采用任意结合形成本公开的可选实施例,在此不再一一赘述。
图4是本申请实施例提供的一种数据同步装置的结构示意图,参见图4,包括接收模块401、获取模块402和更新模块403。数据同步装置中包括的各个模块可全部或部分通过软件、硬件或其组合来实现。
其中,接收模块401与存储模块402连接,用于接收任一交易数据,该任一交易数据携带更新操作标识以及与该更新操作标识对应的敏感词组。
获取模块402与更新模块403连接,用于当包含该任一交易数据的目标区块存储至区块链系统的区块链中时,获取该目标区块中的该更新操作标识以及该敏感词组。
更新模块403,用于根据该目标区块中的该更新操作标识以及该敏感词组,对敏感词组数据库进行更新。
可选地,该更新模块403包括:
增加单元,用于当该任一交易数据中的更新操作标识为增加标识时,在该敏感词组数据库中增加与该增加标识对应的敏感词组;或,
删除单元,用于当该任一交易数据中的更新操作标识为删除标识时,从该敏感词组数据库中删除与该删除标识对应的敏感词组。
可选地,该增加单元,用于当该任一交易数据中的更新操作标识为增加标识时,根据该增加标识对应的敏感词组查询该敏感词组数据库,当该敏感词组数据库中未包含该增加标识对应的敏感词组时,在该敏感词组数据库中增加与该增加标识对应的敏感词组。
可选地,该获取模块402,用于当该目标区块中的任一条交易数据中携带 监管标识时,将该任一条交易数据的数据内容获取为该更新操作标识以及该敏感词组。
可选地,该监管标识包括监管节点设备的签名或监管节点设备的地址。
可选地,该装置还包括:
确定模块,用于根据查询请求所携带的区块编号,在该区块链系统的区块链上确定该区块编号对应的区块。
对比模块,用于将该区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对。
过滤模块,用于当该至少一条交易数据中包括第一交易数据时,从该第一交易数据中过滤掉该敏感词组数据库中的敏感词组,得到查询反馈信息,该查询反馈信息包括经过过滤的至少一条交易数据,该第一交易数据为包括该敏感词组数据库中的任一敏感词组的交易数据。
可选地,该对比模块,用于按照该敏感词组数据库中多个敏感词组的权重从高到低的顺序,将该区块内的至少一条交易数据与该多个敏感词组进行一一比对,该权重根据敏感词组被执行增加操作的次数确定。
可选地,该过滤模块,用于下述任一项:
当该至少一条交易数据中包括第一交易数据时,从该第一交易数据中删除该敏感词组数据库中的敏感词组,得到查询反馈信息,该查询反馈信息包括删除后至少一条交易数据;
当该至少一条交易数据中包括第一交易数据时,将该第一交易数据中的敏感词组替换为目标警示词组,得到查询反馈信息,该查询反馈信息包括替换后的至少一条交易数据。
本申请实施例所提供的装置,当区块链系统中的节点设备对携带敏感词组的任一交易数据验证通过,且包含有该交易数据的目标区块被存储至区块链上时,该区块链系统中的任一节点设备都可以从该区块链系统的区块链上获取目标区块内的敏感词组,根据与该敏感词组对应的更新操作标识,更新自己的敏感词组数据库,从而使得任一节点设备上可以对敏感词组数据库进 行同步更新。并且,区块链系统中的节点设备通过监管标识来验证该任一交易数据,从而使得区块链上携带更新操作标识以及与更新操作标识对应的敏感词组的交易数据均由监管节点设备生成,从而保证了该区块链上携带更新操作标识以及与更新操作标识对应的敏感词组的交易数据的可信度。并且,当该节点设备每存储一个目标区块时,都可以从该目标区块中获取更新操作标识以及与该更新操作标识对应的敏感词组,从而使得各个节点设备可以对自己的敏感词组数据库进行实时更新,进而可以避免由于敏感词组数据库更新不及时,出现该节点设备对待查询区块的区块内容无法精确过滤的情况。并且,通过将待查询区块中的交易数据与敏感词组数据库中的敏感词组进行对比,对待查询区块中的携带敏感词组的交易数据进行过滤,使得该节点设备向用户展现过滤后的交易数据,由于区块链系统中的各个节点设备上均存储有敏感词组数据库,使得该区块链系统中的任一节点设备都可以基于自己的敏感词组数据库,对待查询区块中的敏感词组进行过滤,从而可以避免区块链中的敏感词组被大量传播。并且,当区块链系统中的节点设备通过智能合约对待查询区块中的敏感词组进行过滤时,仅需要具有监管权限的用户维护智能合约即可,而无需其他节点设备维护,从而可以降低其他节点设备的业务负担。
需要说明的是:上述实施例提供的数据同步装置在进行数据同步时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据同步装置与数据同步方法实施例属于同一构思,其具体实现过程详见方法实施例。
图5是本申请实施例提供的一种计算机设备的的结构示意图,该计算机设备具体可以是图1中的节点设备。该节点设备500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上CPU(central processing units,处理器)501和一个或一个以上的存储器502,其中,所述存储器502中存储有至少 一条指令,所述至少一条指令由所述处理器501加载并执行以实现上述各个方法实施例提供的方法。当然,该节点设备还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该节点设备还可以包括其他用于实现设备功能的部件,在此不做赘述。
在示例性实施例中,还提供了一种计算机可读存储介质,例如包括指令的存储器,上述指令可由终端中的处理器执行以完成上述实施例中数据同步方法或数据查询方法。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,存储器存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述图像处理方法的步骤。此处图像处理方法的步骤可以是上述各个实施例的图像处理方法中的步骤。
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述图像处理方法的步骤。此处图像处理方法的步骤可以是上述各个实施例的图像处理方法中的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及 存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (21)

  1. 一种数据同步方法,其特征在于,由计算机设备执行,所述方法包括:
    接收任一交易数据,所述任一交易数据携带更新操作标识以及与所述更新操作标识对应的敏感词组;
    当包含所述任一交易数据的目标区块存储至区块链系统的区块链中时,获取所述目标区块中的所述更新操作标识以及所述敏感词组;及
    根据所述目标区块中的所述更新操作标识以及所述敏感词组,对敏感词组数据库进行更新。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述目标区块中的所述更新操作标识以及所述敏感词组,对敏感词组数据库进行更新,包括:
    当所述任一交易数据中的更新操作标识为增加标识时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组;或,
    当所述任一交易数据中的更新操作标识为删除标识时,从所述敏感词组数据库中删除与所述删除标识对应的敏感词组。
  3. 根据权利要求2所述的方法,其特征在于,所述当所述任一交易数据中的更新操作标识为增加标识时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组,包括:
    当所述任一交易数据中的更新操作标识为增加标识时,根据所述增加标识对应的敏感词组查询所述敏感词组数据库,当所述敏感词组数据库中未包含所述增加标识对应的敏感词组时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组。
  4. 根据权利要求1所述的方法,其特征在于,所述获取所述目标区块中的所述更新操作标识以及所述敏感词组,包括:
    当所述目标区块中的任一条交易数据中携带监管标识时,获取所述任一条交易数据中的所述更新操作标识以及所述敏感词组。
  5. 根据权利要求4所述的方法,其特征在于,所述监管标识包括监管节点设备的签名或监管节点设备的地址。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据查询请求所携带的区块编号,在所述区块链系统的区块链上确定所述区块编号对应的区块;
    将所述区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对;及
    当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中过滤掉所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括经过过滤的至少一条交易数据,所述第一交易数据为包括所述敏感词组数据库中的任一敏感词组的交易数据。
  7. 根据权利要求6所述的方法,其特征在于,所述将所述区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对,包括:
    按照所述敏感词组数据库中多个敏感词组的权重从高到低的顺序,将所述区块内的至少一条交易数据与所述多个敏感词组进行一一比对,所述权重根据敏感词组被执行增加操作的次数确定。
  8. 根据权利要求6所述的方法,其特征在于,所述当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中过滤掉所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括经过过滤的至少一条交易数据,包括下述任一项:
    当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中删除所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括删除后的至少一条交易数据;及
    当所述至少一条交易数据中包括第一交易数据时,将所述第一交易数据中的敏感词组替换为目标警示词组,得到查询反馈信息,所述查询反馈信息包括替换后的至少一条交易数据。
  9. 一种数据同步装置,其特征在于,所述装置包括:
    接收模块,用于接收任一交易数据,所述任一交易数据携带更新操作标 识以及与所述更新操作标识对应的敏感词组;
    获取模块,用于当包含所述任一交易数据的目标区块存储至区块链系统的区块链中时,获取所述目标区块中的所述更新操作标识以及所述敏感词组;及
    更新模块,用于根据所述目标区块中的所述更新操作标识以及所述敏感词组,对敏感词组数据库进行更新。
  10. 根据权利要求9所述的装置,其特征在于,所述更新模块包括:
    增加单元,用于当所述任一交易数据中的更新操作标识为增加标识时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组;或,
    删除单元,用于当所述任一交易数据中的更新操作标识为删除标识时,从所述敏感词组数据库中删除与所述删除标识对应的敏感词组。
  11. 根据权利要求10所述的装置,其特征在于,所述增加单元,用于当所述任一交易数据中的更新操作标识为增加标识时,根据所述增加标识对应的敏感词组查询所述敏感词组数据库,当所述敏感词组数据库中未包含所述增加标识对应的敏感词组时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组。
  12. 根据权利要求9所述的装置,其特征在于,所述获取模块,用于当所述目标区块中的任一条交易数据中携带监管标识时,获取所述任一条交易数据中的所述更新操作标识以及所述敏感词组。
  13. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    确定模块,用于根据查询请求所携带的区块编号,在所述区块链系统的区块链上确定所述区块编号对应的区块;
    对比模块,用于将所述区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对;及
    过滤模块,用于当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中过滤掉所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括经过过滤的至少一条交易数据,所述第一交易 数据为包括所述敏感词组数据库中的任一敏感词组的交易数据。
  14. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:
    接收任一交易数据,所述任一交易数据携带更新操作标识以及与所述更新操作标识对应的敏感词组;
    当包含所述任一交易数据的目标区块存储至区块链系统的区块链中时,获取所述目标区块中的所述更新操作标识以及所述敏感词组;及
    根据所述目标区块中的所述更新操作标识以及所述敏感词组,对敏感词组数据库进行更新。
  15. 根据权利要求14所述的计算机设备,其特征在于,所述根据所述目标区块中的所述更新操作标识以及所述敏感词组,对敏感词组数据库进行更新,包括:
    当所述任一交易数据中的更新操作标识为增加标识时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组;或,
    当所述任一交易数据中的更新操作标识为删除标识时,从所述敏感词组数据库中删除与所述删除标识对应的敏感词组。
  16. 根据权利要求15所述的计算机设备,其特征在于,所述当所述任一交易数据中的更新操作标识为增加标识时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组,包括:
    当所述任一交易数据中的更新操作标识为增加标识时,根据所述增加标识对应的敏感词组查询所述敏感词组数据库,当所述敏感词组数据库中未包含所述增加标识对应的敏感词组时,在所述敏感词组数据库中增加与所述增加标识对应的敏感词组。
  17. 根据权利要求14所述的计算机设备,其特征在于,所述获取所述目标区块中的所述更新操作标识以及所述敏感词组,包括:
    当所述目标区块中的任一条交易数据中携带监管标识时,获取所述任一 条交易数据中的所述更新操作标识以及所述敏感词组。
  18. 根据权利要求14所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,还使得所述处理器执行以下步骤:
    根据查询请求所携带的区块编号,在所述区块链系统的区块链上确定所述区块编号对应的区块;
    将所述区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对;及
    当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中过滤掉所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括经过过滤的至少一条交易数据,所述第一交易数据为包括所述敏感词组数据库中的任一敏感词组的交易数据。
  19. 根据权利要求18所述的计算机设备,其特征在于,所述将所述区块编号对应的区块内的至少一条交易数据与敏感词组数据库中的敏感词组进行比对,包括:
    按照所述敏感词组数据库中多个敏感词组的权重从高到低的顺序,将所述区块内的至少一条交易数据与所述多个敏感词组进行一一比对,所述权重根据敏感词组被执行增加操作的次数确定。
  20. 根据权利要求18所述的计算机设备,其特征在于,所述当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中过滤掉所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括经过过滤的至少一条交易数据,包括下述任一项:
    当所述至少一条交易数据中包括第一交易数据时,从所述第一交易数据中删除所述敏感词组数据库中的敏感词组,得到查询反馈信息,所述查询反馈信息包括删除后的至少一条交易数据;及
    当所述至少一条交易数据中包括第一交易数据时,将所述第一交易数据中的敏感词组替换为目标警示词组,得到查询反馈信息,所述查询反馈信息包括替换后的至少一条交易数据。
  21. 一种存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如权利要求1至8中任一项所述的方法的步骤。
PCT/CN2020/078348 2019-03-15 2020-03-09 数据同步方法、装置、计算机设备以及可读存储介质 WO2020187069A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
SG11202101569VA SG11202101569VA (en) 2019-03-15 2020-03-09 Data synchronization method and apparatus, computer device and readable storage medium
KR1020217006086A KR102545615B1 (ko) 2019-03-15 2020-03-09 데이터 동기화 방법 및 장치, 컴퓨터 디바이스 및 판독가능 저장 매체
JP2021505803A JP7066240B2 (ja) 2019-03-15 2020-03-09 データ同期方法、装置、コンピュータデバイス、およびコンピュータプログラム
US17/145,829 US11985251B2 (en) 2019-03-15 2021-01-11 Data synchronization method and apparatus, computer device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910196407.9A CN109933629B (zh) 2019-03-15 2019-03-15 数据同步方法、装置、计算机设备以及可读存储介质
CN201910196407.9 2019-03-15

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/145,829 Continuation US11985251B2 (en) 2019-03-15 2021-01-11 Data synchronization method and apparatus, computer device, and readable storage medium

Publications (1)

Publication Number Publication Date
WO2020187069A1 true WO2020187069A1 (zh) 2020-09-24

Family

ID=66987163

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078348 WO2020187069A1 (zh) 2019-03-15 2020-03-09 数据同步方法、装置、计算机设备以及可读存储介质

Country Status (6)

Country Link
US (1) US11985251B2 (zh)
JP (1) JP7066240B2 (zh)
KR (1) KR102545615B1 (zh)
CN (1) CN109933629B (zh)
SG (1) SG11202101569VA (zh)
WO (1) WO2020187069A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364874A (zh) * 2021-06-09 2021-09-07 网易(杭州)网络有限公司 基于区块链的节点同步方法、装置、存储介质及服务器

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697367B (zh) * 2019-01-09 2021-08-24 腾讯科技(深圳)有限公司 显示区块链数据的方法、区块链浏览器、用户节点和介质
CN109933629B (zh) 2019-03-15 2021-07-30 腾讯科技(深圳)有限公司 数据同步方法、装置、计算机设备以及可读存储介质
US11251966B2 (en) 2019-06-28 2022-02-15 Advanced New Technologies Co., Ltd. Sending cross-chain authenticatable messages
CN112003703B (zh) * 2019-06-28 2023-08-22 创新先进技术有限公司 一种跨链发送可认证消息的方法和装置
US11356282B2 (en) 2019-06-28 2022-06-07 Advanced New Technologies Co., Ltd. Sending cross-chain authenticatable messages
CN110580625A (zh) * 2019-07-30 2019-12-17 上海数据交易中心有限公司 流通数据监管方法及装置、存储介质、终端
CN110572450B (zh) * 2019-09-05 2022-09-30 腾讯科技(深圳)有限公司 数据同步方法、装置、计算机可读存储介质和计算机设备
CN110659441B (zh) * 2019-09-26 2024-01-12 腾讯科技(深圳)有限公司 一种基于区块链的信息发布管理方法及装置
CN111988396A (zh) * 2020-08-19 2020-11-24 中国银行股份有限公司 基于区块链的内容安全检测同步方法、装置及系统
CN115396443B (zh) * 2022-10-31 2022-12-27 安徽中科晶格技术有限公司 基于时间因子的联盟链共识方法、装置、设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490978A (zh) * 2013-09-02 2014-01-01 用友软件股份有限公司 终端、服务器和消息监视方法
US20170358168A1 (en) * 2016-06-08 2017-12-14 Sichuan Energy Internet Research Institute, Tsinghua University Systems and methods for wireless charging stations
CN107623714A (zh) * 2017-07-28 2018-01-23 平安科技(深圳)有限公司 数据共享方法、装置及计算机可读存储介质
CN108985772A (zh) * 2018-07-02 2018-12-11 上海达家迎信息科技有限公司 一种区块链的验证方法、装置、设备及存储介质
KR20180137250A (ko) * 2017-06-16 2018-12-27 서강대학교산학협력단 비공개적 분산형 데이터베이스 네트워크 환경에서의 브로드캐스팅을 이용한 계약 참조 방식의 스마트 가로등 시스템 및 제어 방법
CN109241768A (zh) * 2018-08-03 2019-01-18 百度在线网络技术(北京)有限公司 爱情信息处理方法、装置、设备及存储介质
CN109933629A (zh) * 2019-03-15 2019-06-25 腾讯科技(深圳)有限公司 数据同步方法、装置、计算机设备以及可读存储介质

Family Cites Families (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4031264B2 (ja) 2002-03-06 2008-01-09 株式会社富士通ソーシアルサイエンスラボラトリ フィルタリング管理方法、フィルタリング管理プログラム、フィルタリング装置のフィルタリング管理方法、およびフィルタリング装置用フィルタリング管理プログラム
US8589346B2 (en) * 2011-04-26 2013-11-19 Oracle International Corporation Techniques for combining statement level, procedural, and row level replication
JP2011204178A (ja) 2010-03-26 2011-10-13 Nomura Research Institute Ltd 発言制御装置およびコンピュータプログラム
US20190171650A1 (en) * 2017-12-01 2019-06-06 Chavdar Botev System and method to improve data synchronization and integration of heterogeneous databases distributed across enterprise and cloud using bi-directional transactional bus of asynchronous change data system
US10223369B2 (en) * 2013-08-16 2019-03-05 Sanebox, Inc. Processing electronic messages
US9600193B2 (en) * 2015-02-04 2017-03-21 Delphix Corporation Replicating snapshots from a source storage system to a target storage system
US20180144292A1 (en) * 2016-11-22 2018-05-24 Wal-Mart Stores, Inc. Apparatus and method for tracking consumer premises inventory
US11631077B2 (en) * 2017-01-17 2023-04-18 HashLynx Inc. System for facilitating secure electronic communications between entities and processing resource transfers
US10158479B2 (en) * 2017-02-06 2018-12-18 Northern Trust Corporation Systems and methods for generating, uploading and executing code blocks within distributed network nodes
US10621150B2 (en) * 2017-03-05 2020-04-14 Jonathan Sean Callan System and method for enforcing the structure and content of databases synchronized over a distributed ledger
JP6814094B2 (ja) 2017-05-22 2021-01-13 Kddi株式会社 合意形成システム、プログラム、及び生成方法
US10061937B1 (en) 2017-06-28 2018-08-28 International Business Machines Corporation Protecting confidential information
US20190050810A1 (en) * 2017-08-14 2019-02-14 Honeywell International Inc. Terminal automation solutions supporting blockchain technology
US20190052453A1 (en) * 2017-08-14 2019-02-14 Honeywell International Inc. Apparatus and method for using blockchains with secure custody transfer data, sealing data, and other data associated with material transfers
CN108052529A (zh) * 2017-11-09 2018-05-18 福建省天奕网络科技有限公司 一种敏感词过滤方法及终端
CN107862076A (zh) * 2017-11-29 2018-03-30 四川九鼎智远知识产权运营有限公司 一种敏感词汇监控平台
US10810314B1 (en) * 2017-12-22 2020-10-20 Architecture Technology Corporation Database connector using attribute-based encryption
CN109246179B (zh) * 2018-06-30 2021-06-01 华为技术有限公司 维护区块链的方法和装置、服务器和计算机可读存储介质
CN108921556B (zh) * 2018-07-02 2022-04-19 上海达家迎信息科技有限公司 一种区块链的验证方法、装置、设备及存储介质
CN110740113B (zh) * 2018-07-20 2021-10-29 富士通株式会社 通过多个主体协作进行信息处理的方法和装置
US20210174432A1 (en) * 2018-08-07 2021-06-10 Perpetual Altruism Limited Computer implemented method and system for updating a database system for a blockchain version control system; computer implemented methods of auctioning an item for a seller, and computer implemented method of updating a smart contract
CN109194633B (zh) * 2018-08-21 2021-08-10 山东智慧云链网络科技有限公司 通讯录备份方法及系统
CN109325764B (zh) 2018-09-12 2022-05-27 江苏南大数码科技有限公司 基于区块链的敏感数据交易系统及方法
CN109241192B (zh) * 2018-09-18 2021-06-15 百度在线网络技术(北京)有限公司 区块链的数据修改及区块验证方法、装置、设备和介质
CN109284119B (zh) * 2018-09-27 2021-12-28 维沃移动通信有限公司 一种应用功能控制参数处理方法、装置及设备
EP3912121A4 (en) * 2018-11-19 2022-11-30 Rare Bits, Inc. LAZY UPDATING AND STATE PREDICTION FOR BLOCKCHAIN-BASED APPLICATIONS
US10810183B1 (en) * 2019-02-19 2020-10-20 Mythical, Inc. Systems and methods for synchronizing database operations with a distributed blockchain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103490978A (zh) * 2013-09-02 2014-01-01 用友软件股份有限公司 终端、服务器和消息监视方法
US20170358168A1 (en) * 2016-06-08 2017-12-14 Sichuan Energy Internet Research Institute, Tsinghua University Systems and methods for wireless charging stations
KR20180137250A (ko) * 2017-06-16 2018-12-27 서강대학교산학협력단 비공개적 분산형 데이터베이스 네트워크 환경에서의 브로드캐스팅을 이용한 계약 참조 방식의 스마트 가로등 시스템 및 제어 방법
CN107623714A (zh) * 2017-07-28 2018-01-23 平安科技(深圳)有限公司 数据共享方法、装置及计算机可读存储介质
CN108985772A (zh) * 2018-07-02 2018-12-11 上海达家迎信息科技有限公司 一种区块链的验证方法、装置、设备及存储介质
CN109241768A (zh) * 2018-08-03 2019-01-18 百度在线网络技术(北京)有限公司 爱情信息处理方法、装置、设备及存储介质
CN109933629A (zh) * 2019-03-15 2019-06-25 腾讯科技(深圳)有限公司 数据同步方法、装置、计算机设备以及可读存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113364874A (zh) * 2021-06-09 2021-09-07 网易(杭州)网络有限公司 基于区块链的节点同步方法、装置、存储介质及服务器
CN113364874B (zh) * 2021-06-09 2022-06-10 网易(杭州)网络有限公司 基于区块链的节点同步方法、装置、存储介质及服务器

Also Published As

Publication number Publication date
US11985251B2 (en) 2024-05-14
CN109933629A (zh) 2019-06-25
SG11202101569VA (en) 2021-03-30
CN109933629B (zh) 2021-07-30
JP7066240B2 (ja) 2022-05-13
US20210167970A1 (en) 2021-06-03
KR20210035290A (ko) 2021-03-31
JP2021533475A (ja) 2021-12-02
KR102545615B1 (ko) 2023-06-21

Similar Documents

Publication Publication Date Title
WO2020187069A1 (zh) 数据同步方法、装置、计算机设备以及可读存储介质
US11615210B1 (en) Third-party platform for tokenization and detokenization of network packet data
US10860725B2 (en) Increasing search ability of private, encrypted data
CN109474578B (zh) 报文消息校验方法、装置、计算机设备和存储介质
CN111563365B (zh) 试验标准工单修改信息处理方法、装置和计算机设备
CN110224833B (zh) 票据数据处理方法和系统
CN106899563B (zh) 鉴权方法及装置、鉴权码生成方法及装置、鉴权系统
WO2019114137A1 (zh) 密码调用方法、服务器及存储介质
CN112506481A (zh) 业务数据交互方法、装置、计算机设备和存储介质
CN111507706B (zh) 数据浏览、存储的方法、装置、计算机设备以及存储介质
US11232190B2 (en) Device attestation techniques
JP7100563B2 (ja) 匿名化システムおよび匿名化方法
WO2021169469A1 (zh) 声纹数据处理方法、装置、计算机设备和存储介质
WO2021012903A1 (zh) 数据存储方法、装置、计算机设备和存储介质
WO2020233086A1 (zh) 区块处理方法、装置、计算机设备和存储介质
CN111143399A (zh) 数据处理方法、装置、存储介质和计算机设备
CN112069522B (zh) 电子处方的处理方法、装置、计算机设备和存储介质
US10586034B2 (en) Network communication method and network communication system
CN110599386A (zh) 身份认证方法、装置、存储介质和计算机设备
CN117251883B (zh) 数据可靠性验证方法、装置、计算机设备和存储介质
US11609975B1 (en) Identity verification
CN113407213B (zh) 资源包更新方法、装置、设备及存储介质
CN115168907B (zh) 保护数据隐私的数据匹配方法、系统、设备及存储介质
CN113076318A (zh) 一种用户id分配方法、装置、计算机设备及存储介质
CN117828565A (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: 20772567

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021505803

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20217006086

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20772567

Country of ref document: EP

Kind code of ref document: A1