WO2020151181A1 - 基于区块链的跨平台数据更新方法、装置和计算机设备 - Google Patents

基于区块链的跨平台数据更新方法、装置和计算机设备 Download PDF

Info

Publication number
WO2020151181A1
WO2020151181A1 PCT/CN2019/093183 CN2019093183W WO2020151181A1 WO 2020151181 A1 WO2020151181 A1 WO 2020151181A1 CN 2019093183 W CN2019093183 W CN 2019093183W WO 2020151181 A1 WO2020151181 A1 WO 2020151181A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
node
update request
target
data update
Prior art date
Application number
PCT/CN2019/093183
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 WO2020151181A1 publication Critical patent/WO2020151181A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • 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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Definitions

  • This application relates to a cross-platform data update method, device and computer equipment based on blockchain.
  • shared data For example, when a user registers and logs in on a data processing platform, the data processing platform stores the user’s registration information. In order to reduce the user’s registration operations, one or more other data processing platforms provided by the company allow the same registration information to be used directly. log in.
  • the traditional method realizes data sharing among multiple data processing platforms by storing common data in a common memory. This approach reduces the security of shared data. Once the common memory fails, it will affect the operation of multiple data processing platforms.
  • a blockchain-based cross-platform data update method, device, and computer equipment are provided.
  • a cross-platform data update method based on blockchain includes: receiving a data update request sent by a block node based on a corresponding data processing platform; the data update request carries a target block; and the target block Broadcast to other block nodes; enable the other block nodes to perform chain pre-operation on the target block; monitor whether a new data update request is received; if a new data update request is received, update the new data Request for suspension processing; and send an in-chain instruction to each block node according to the execution result of the in-chain pre-operation, so that each block node writes the target block into the corresponding in-chain ledger.
  • a block chain-based cross-platform data update device comprising: an update request processing module for receiving a data update request sent by a block node based on a corresponding data processing platform; the data update request carries a target block ; Broadcast the target block to other block nodes; enable the other block nodes to perform pre-operations on the target block to enter the chain; concurrent request processing module for monitoring whether a new data update request is received; When a new data update request is received, the new data update request is temporarily processed; and the update data sharing module is used to send an in-chain instruction to each block node according to the execution result of the in-chain pre-operation to make each block The block node writes the target block into the corresponding in-chain ledger respectively.
  • a computer device including a memory and one or more processors, in which computer-readable instructions are stored, and when the computer-readable instructions are executed by the processor, the blockchain-based cross-platform provided in any of the embodiments of the present application is realized The steps of the data update method.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors implement any one of the embodiments of the present application. Provide the steps of the blockchain-based cross-platform data update method.
  • Fig. 1 is an application scenario diagram of a blockchain-based cross-platform data update method according to one or more embodiments.
  • Fig. 2 is a schematic flowchart of a cross-platform data update method based on blockchain according to one or more embodiments.
  • Fig. 3 is a schematic flowchart of the steps of blockchain deployment according to one or more embodiments.
  • Fig. 4 is a schematic flow chart of the steps of suspending processing of a new data update request according to one or more embodiments.
  • Fig. 5 is a structural block diagram of a block chain-based cross-platform data update device according to one or more embodiments.
  • Figure 6 is a block diagram of a computer device according to one or more embodiments.
  • the cross-platform data update method based on blockchain provided in this application can be applied to the application environment as shown in FIG. 1.
  • a plurality of block nodes 102 communicate with the server 104 through the network.
  • the block node 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
  • Each block node 102 corresponds to a data processing platform.
  • the corresponding block node 102 sends a data update request to the server 104.
  • the data update request carries the target block.
  • the server 104 broadcasts the target block to other block nodes 102 in the entire network, so that the other block nodes 102 perform chain pre-operation on the target block.
  • the server 104 monitors in real time whether a new data update request is received. If a new data update request is received, the new data update request is suspended for processing according to preset rules.
  • the server 104 receives the execution result of the in-chain pre-operation returned by each block node 102. If the execution result of more than half of the block nodes 102 is that the in-chain is passed, the server 104 sends an in-chain instruction to each block node 102 to make Each block node 102 actually writes the target block into the corresponding in-chain ledger.
  • corresponding block nodes are deployed for multiple data processing platforms that need to share data.
  • the shutdown of a block node will not affect the block nodes of other data processing platforms, which can improve the security of shared data; in addition, , Receive a data update request from another data processing platform during the data update process, and postpone the new data update request according to the preset rules, which can solve many problems well while ensuring that each data update request is responded to.
  • a cross-platform data update method based on blockchain is provided. Taking the method applied to the server in FIG. 1 as an example, the method includes the following steps:
  • Step 202 Receive a data update request sent by the block node based on the corresponding data processing platform; the data update request carries the target block.
  • Each data processing platform is deployed with its own block node, and blockchain services are deployed on the block nodes, such as configuring consensus mechanisms, blockchain channels, smart contracts, etc.
  • Multiple block nodes are connected to form a blockchain.
  • the server controls the data synchronization between the block nodes, and then realizes the data sharing between multiple data processing platforms.
  • the corresponding block node Based on the data update request sent by the data processing platform, the corresponding block node obtains the hash code of the previous block, generates the current hash code based on the updated data, and uses the above two hash codes and the updated data Generate the target block.
  • the target block is a data packet containing a block header and a block body. Among them, the block header includes the timestamp, the hash code of the previous block, etc.; the block body includes the updated data.
  • Step 204 Broadcast the target block to other block nodes; enable other block nodes to perform pre-operations on the target block to enter the chain.
  • the server broadcasts the target block to other block nodes in the entire network. It is easy to understand that the block node that sends the data update request and other block nodes that receive the broadcast of the target block together form a blockchain, and data processing platforms corresponding to different block nodes in the blockchain need to be shared. Each block node that receives the target block broadcast executes pre-chain pre-operations on the target block based on the consensus mechanism, such as hash code consistency check and integrity check on the target block.
  • the updated data (denoted as the first target data) is sent to the block node 1, and the block node 1 generates the first block based on the first target data, and A block is broadcast to other block nodes in the blockchain, such as block node 2, block node 3, etc.
  • Block node 2 and block node 3 respectively perform consensus operations on the first block based on the consensus mechanism to determine the hash code of the previous block contained in the first block and the locally stored hash code of the previous block. Whether the Greek code is consistent. If yes, mark the execution result of the in-chain pre-operation as the in-chain passed. Otherwise, the execution result of the in-chain pre-operation is marked as in-chain failure.
  • the block node feeds back the execution result of the pre-operation on the chain to the server.
  • Step 206 Monitor whether a new data update request is received.
  • the server broadcasting the target block to other block nodes or during the pre-operation of chain entry by other block nodes, it is possible to receive a new data update request again.
  • the new data update request can still come from block node 1, or from other block nodes.
  • the server receives the data update request sent by the block node 2 again.
  • the data update request sent by the block node 2 carries the second block.
  • Step 208 If a new data update request is received, the new data update request is suspended.
  • the traditional method is based on the principle of distributed lock, and data update authority is assigned to one of the data processing platforms.
  • distributed lock it may cause data conflicts.
  • the user updates the data based on the data processing platform 1, and writes the updated target data to the block node 1.
  • the server broadcasts the target data to other block nodes, it is possible that the user has also updated data based on the data processing platform 2.
  • block node 1 has preempted the data update authority , The user's data changes at block node 2 will be covered by the target data.
  • the server of this embodiment has a response mechanism for multiple data update requests, such as postponing processing of new data update requests received later, to ensure that each data processing platform can share data at any time. Update.
  • Step 210 Send an in-chain instruction to each block node according to the execution result of the in-chain pre-operation, so that each block node writes the target block into the corresponding in-chain ledger.
  • the server counts the execution results of the pre-operation on the chain returned by multiple block nodes, and the execution result is the number of block nodes that have passed the chain. If the number of block nodes passing through the chain exceeds half of the total number of block nodes in the block chain, the server sends an incoming chain instruction to each block node in the block node, so that each block node will target the target block. It is actually written into the ledger in the chain to realize data sharing.
  • the block node can send a data update request based on the corresponding data processing platform; broadcast the target block carried in the data update request to other block nodes, so that other block nodes can perform pre-operations on the target block. ; During this period, monitor whether a new data update request is received, and when a new data update request is received, the new data update request can be suspended in time; according to the execution result of the pre-operation in the chain, you can report to each Each block node sends an in-chain instruction; according to the in-chain instruction, each block node can write the target block to the corresponding in-chain ledger.
  • the shutdown of a block node will not affect the block nodes of other data processing platforms, which can improve the security of shared data; in addition, in the data update In the process, a data update request from another data processing platform is received, and the new data update request is suspended in accordance with the preset rules, which can solve the concurrency of multiple data processing platforms while ensuring that each data update request is responded to Conflict of update data.
  • step of blockchain deployment before receiving the data update request sent by the block node based on the corresponding data processing platform, it also includes the step of blockchain deployment, which specifically includes:
  • Step 302 Obtain the basic image file, and obtain the network segment information of each block node.
  • Step 304 according to the network segment information, return corresponding access port information to the block node of each network segment.
  • the server pre-opens the network ports that can access the server for different network segments; the block node sends its own network segment information to the server, so that the server determines the access port for the block node to access the server.
  • Step 306 Receive block parameters sent by each block node through the access port of the corresponding network segment.
  • Step 308 Generate a target image file corresponding to each network segment according to the basic image file and block parameters.
  • Block parameters include information such as the service address of the server where the block node is located, the exposed port and its information, and the peer level of the block node. After determining the access port for accessing the server, the block node sends its own block parameters to the server. After obtaining the block parameters, the server executes the configuration file generation tool to generate configuration-related configuration files.
  • the block node executes the automated deployment script and pulls the basic image file and the configuration file generated by the server from the server. File and base image file to generate target image file.
  • Step 310 Send a plurality of target image files to the block node of the corresponding network segment, so that the block node starts the target image file based on the pre-stored automated deployment script, so as to implement the deployment of the target image service.
  • the access port with the server is determined according to the network segment of the block node, and the configuration file and the basic image file corresponding to the block node are pulled from the server through the access port, thereby generating the target according to the configuration file and the basic image file Mirror files to realize automatic deployment of target mirror services, which greatly reduces the error probability of manually pulling mirror files. Since only the basic mirror files are required, deployment and maintenance costs are effectively reduced, and the efficiency of mirror file deployment is improved. In the process, the institutional network corresponding to each block node is still shielded from the outside, effectively ensuring the security of the network.
  • receiving the data update request sent by the block node based on the corresponding data processing platform includes: receiving the data update request sent concurrently by multiple block nodes based on the corresponding data processing platform; the data update request carries the update data and Timestamp; according to the timestamp, mark the data update request in the first chronological order as the target update request, and postpone processing of other chronological data update requests; mark the update data carried in the target update request as target data; according to the target data Generate the corresponding target block.
  • the preset duration can be the length of time from the server receiving the data update request to broadcasting the target block to other block nodes, or from the server receiving the data update request to each block node writing the target block into the chain ledger The length of time.
  • the server determines the corresponding sequence of the data update request according to the timestamps respectively carried in the multiple data update requests. Specifically, the data update request in the first time sequence is screened as the only data update request that needs to be processed in a timely manner. For data update requests in other chronological order, the server will postpone processing in the above manner.
  • the response sequence of concurrent data update requests can solve the conflict problem of concurrent data update by multiple data processing platforms while ensuring that each data update request is responded to.
  • broadcasting the target block to other block nodes; enabling other block nodes to perform chain pre-operation on the target block including: broadcasting the target block to other blocks in the blockchain where the block node is located Each block node; make each other block node obtain the block hash code of the previous block in the target block, and compare the obtained block hash code with the pre-stored previous block Block hash code for consistency verification; collect the consistency verification results returned by each block node; send in-chain instructions to each block node according to the execution result of the in-chain pre-operation, including: if there are more than half of the blocks The consistency check result returned by the node is passed, and an in-chain instruction is sent to each block node.
  • the new data update request is deferred, that is, the steps of deferring the new data update request include:
  • Step 402 If a new data update request is received, the block node that issued the new data update request is marked as a suspended node, and an error identification code is returned to the suspended node.
  • the error identification code may be a specific character or character string used to characterize the suspended processing. After receiving the error identification code, the suspended node can re-broadcast the corresponding update block until the update block is written into the ledger in the chain.
  • Step 404 When receiving the data update request re-sent according to the error identification code by the deferred node, detect whether the target block is written into the in-chain ledger; the re-sent data update request carries the update block.
  • Step 406 If yes, broadcast the update block to other block nodes, so that each block node writes the update block into the ledger in the chain.
  • Step 408 otherwise, return to the step of returning an error identification code to a new data update request.
  • the server After sending the error identifier to the suspended node, the server detects in real time whether the target block has been written into the chain ledger. If the data update request sent by the deferred node or the new data update request sent by other block nodes is received before the target block has been written into the ledger in the chain, the data update request received again is still sent in the above manner And new data update requests will be suspended.
  • the server waits for the new data and request, and can respond to the new data update request in time, that is, write the update block carried in the received new data update request in the above manner In-chain ledger.
  • an error identification code is returned to the block node that issued the new data update request, so that after receiving the error identification code, it can Re-broadcast the corresponding update block, so that the conflict problem of concurrent update data of multiple data processing platforms can be well resolved while ensuring that each data update request is responded to.
  • the postponement of the new data update request includes: obtaining the update data carried in the new data update request; caching the update data; and detecting whether the target block is Write to the ledger in the chain; if so, generate the corresponding update block based on the cached update data, and broadcast the update block to other block nodes, so that each block node will write the update block to the ledger in the chain; otherwise, return to the detection target Whether the block is written into the ledger in the chain.
  • the server obtains the update block carried in the new data update request, extracts the update data from the update block, and caches the update data so that the target block is written to the blockchain based on the update data Regenerate the updated block with the correct hash code. Cache the updated data so that each block node does not need to broadcast the same data repeatedly, which can save block node computing resources.
  • block node 3 before block node 3 writes the first block into the ledger in the chain, block node 3 receives the second block broadcast by block node 2 and the third block broadcast by block node 1.
  • the first update data carried in the second block and the second update data carried in the third block are cached.
  • the server When the first block is written into the in-chain ledger, if the second block is first received according to the timestamp, the server will regenerate the second block based on the first update data, and broadcast the regenerated second block to other Block node; regenerate the third block according to the above method and broadcast the regenerated third block.
  • the update data is extracted from the update block carried in the new data update request, and the update data is cached, which not only ensures the success of the data update, but also saves block node computing resources.
  • a blockchain-based cross-platform data update device including: an update request processing module 502, a concurrent request processing module 504, and an update data sharing module 506, wherein:
  • the update request processing module 502 is used to receive the data update request sent by the block node based on the corresponding data processing platform; the data update request carries the target block; broadcasts the target block to other block nodes; makes other block nodes respond to the target The block performs pre-operation into the chain.
  • the concurrent request processing module 504 is used to monitor whether a new data update request is received; if a new data update request is received, the new data update request is suspended.
  • the update data sharing module 506 is configured to send an in-chain instruction to each block node according to the execution result of the in-chain pre-operation, so that each block node writes the target block into the corresponding in-chain ledger.
  • the device further includes a blockchain deployment module 508, which is used to obtain the basic image file and obtain the network segment information of each block node; according to the network segment information, return to the block node of each network segment Corresponding access port information; receive block parameters sent by each block node through the access port of the corresponding network segment; generate target mirror files corresponding to each network segment according to the basic mirror file and block parameters; combine multiple target mirror files They are sent to the block nodes of the corresponding network segment respectively, so that the block nodes start the target image file based on the pre-stored automated deployment script to realize the deployment of the target image service.
  • a blockchain deployment module 508 which is used to obtain the basic image file and obtain the network segment information of each block node; according to the network segment information, return to the block node of each network segment Corresponding access port information; receive block parameters sent by each block node through the access port of the corresponding network segment; generate target mirror files corresponding to each network segment according to the basic mirror file and block parameters; combine multiple target mirror files They are sent to the block
  • the update request processing module 502 is further configured to receive data update requests concurrently sent by multiple block nodes based on the corresponding data processing platform; the data update request carries the update data and a timestamp; according to the timestamp, the first A chronological data update request is marked as a target update request, and other chronological data update requests are temporarily processed; the update data carried in the target update request is marked as target data; and the corresponding target block is generated according to the target data.
  • the update request processing module 502 is also used to broadcast the target block to every other block node in the blockchain where the block node is located; so that every other block node obtains the target block carrying The block hash code of the previous block is checked for consistency between the obtained block hash code and the pre-stored block hash code of the previous block; the consistency check returned by each block node is collected Verification result: Send the in-chain instruction to each block node according to the execution result of the in-chain pre-operation, including: if there are more than half of the block nodes, the consistency verification result returned by the verification is passed and sent to each block node Into the chain instruction.
  • the concurrent request processing module 504 is further configured to, if a new data update request is received, mark the block node that issued the new data update request as a suspended node, and return an error identification code to the suspended node;
  • the postponement node resends the data update request according to the error identification code, it checks whether the target block is written into the in-chain ledger; the resent data update request carries the update block; if so, broadcasts the update block to other block nodes , To make each block node write the update block into the ledger in the chain; otherwise, return to the step of returning an error identification code to a new data update request.
  • the concurrent request processing module 504 is also used to obtain the update data carried in the new data update request; cache the update data; detect whether the target block is written into the chain ledger; if so, according to the cached update data Generate the corresponding update block, broadcast the update block to other block nodes, so that each block node will write the update block into the chain ledger; otherwise, return to the step of detecting whether the target block is written into the chain ledger.
  • Each module in the above-mentioned block chain-based cross-platform data update device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 6.
  • the computer equipment includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store update data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • FIG. 6 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or less parts than shown in the figure, or combining some parts, or having a different part arrangement.
  • One or more non-volatile storage media storing computer-readable instructions.
  • the one or more processors can implement the Steps of the cross-platform data update method of the blockchain.
  • 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)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种基于区块链的跨平台数据更新方法,包括:接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作;监听是否接收到新的数据更新请求;若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别写入对应的链内账本。

Description

基于区块链的跨平台数据更新方法、装置和计算机设备
本申请要求于2019年01月23日提交中国专利局,申请号为2019100639268,申请名称为“基于区块链的跨平台数据更新方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种基于区块链的跨平台数据更新方法、装置和计算机设备。
背景技术
随着企业规模增大,同一企业往往具有多种数据处理平台,而多个数据处理平台有时需要共用相同的业务数据(以下简称“共用数据”)。例如,当用户在某个数据处理平台注册登录时,该数据处理平台存储用户的注册信息,为了减少用户的注册操作,该企业提供的其他一个或多个数据处理平台允许采用相同的注册信息直接登录。然而传统方式通过将共用数据存储至公共存储器实现多数据处理平台之间的数据共享。这种方式使得共用数据的安全性降低,一旦公共存储器出现故障,则影响多个数据处理平台的运行。
发明内容
根据本申请公开的各种实施例,提供一种基于区块链的跨平台数据更新方法、装置和计算机设备。
一种基于区块链的跨平台数据更新方法,所述方法包括:接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作;监听是否接收到新的数据更新请求;若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;及根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别 写入对应的链内账本。
一种基于区块链的跨平台数据更新装置,所述装置包括:更新请求处理模块,用于接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作;并发请求处理模块,用于监听是否接收到新的数据更新请求;若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;及更新数据共享模块,用于根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别写入对应的链内账本。
一种计算机设备,包括存储器和一个或多个处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时实现本申请任意一个实施例中提供的基于区块链的跨平台数据更新方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的基于区块链的跨平台数据更新方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中基于区块链的跨平台数据更新方法的应用场景图。
图2为根据一个或多个实施例中基于区块链的跨平台数据更新方法的流程示意图。
图3为根据一个或多个实施例中区块链部署的步骤的流程示意图。
图4为根据一个或多个实施例中对新数据更新请求暂缓处理的步骤的流程示意图。
图5为根据一个或多个实施例中基于区块链的跨平台数据更新装置的结构框图。
图6为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的基于区块链的跨平台数据更新方法,可以应用于如图1所示的应用环境中。多个区块节点102与服务器104通过网络进行通信。区块节点102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。每个区块节点102对应一种数据处理平台。当用户基于某种数据处理平台发送了数据更新操作,相应区块节点102向服务器104发送数据更新请求。数据更新请求携带了目标区块。服务器104将目标区块广播至全网其他区块节点102,使其他区块节点102对目标区块进行入链预操作。在执行入链预操作期间,服务器104实时监听是否接收到新的数据更新请求。如果接收到新的数据更新请求,按照预设规则对这个新的数据更新请求进行暂缓处理。服务器104接收每个区块节点102返回的入链预操作的执行结果,若半数以上区块节点102的执行结果为入链通过,则服务器104向每个区块节点102发送入链指令,使每个区块节点102将目标区块分别真正写入对应的链内账本。上述数据更新过程,针对需要共享数据的多个数据处理平台分别部署对应的区块节点,某个区块节点停止运行不会影响其他数据处理平台的区块节点,可以提高共用数据安全性;此外,在数据更新 过程中接收到另一数据处理平台的数据更新请求,按照预设规则对新数据更新请求进行暂缓处理,在保证每个数据更新请求均得以响应的情况下可以很好的解决多数据处理平台并发更新数据的冲突问题。
在其中一个实施例中,如图2所示,提供了一种基于区块链的跨平台数据更新方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
步骤202,接收区块节点基于相应数据处理平台发送的数据更新请求;数据更新请求携带了目标区块。
每个数据处理平台部署有各自的区块节点,并在区块节点上部署了区块链服务,如配置共识机制、区块链通道、智能合约等。多个区块节点连接形成区块链。通过服务器控制区块节点间进行数据同步,进而实现多个数据处理平台之间的数据共享。
终端基于数据处理平台发送的数据更新请求,对应的区块节点获取前一区块的哈希码,基于更新后的数据生成当前的哈希码,利用上述两个哈希码以及更新后的数据生成目标区块。目标区块为包含区块头和区块主体的数据包。其中,区块头包括时间戳、前一区块的哈希码等;区块主体包括更新后的数据。
步骤204,将目标区块广播至其他区块节点;使其他区块节点对目标区块进行入链预操作。
服务器将目标区块广播至全网其他区块节点。容易理解,发出数据更新请求的区块节点与接收目标区块广播的其他区块节点共同构成区块链,区块链中不同区块节点对应的数据处理平台之间需要进行数据共享。接收到目标区块广播的每个区块节点基于共识机制分别对目标区块执行入链预操作,如对目标区块进行哈希码一致性校验、完整性校验等。例如,当数据处理平台1需要进行数据更新时,将更新后的数据(记作第一目标数据)发送至区块节点1,区块节点1基于第一目标数据生成第一区块,将第一区块广播至区块链内其他区块节点,如区块节点2、区块节点3等。区块节点2以及区块 节点3等基于共识机制分别对第一区块进行共识运算,以判断第一区块中包含的前一区块的哈希码与本地存储的前一区块的哈希码是否一致。若是,将入链预操作的执行结果标记为入链通过。否则,将入链预操作的执行结果标记为入链失败。区块节点将入链预操作的执行结果反馈至服务器。
步骤206,监听是否接收到新的数据更新请求。
在服务器将目标区块广播至其他区块节点期间或者在其他区块节点进行入链预操作期间,有可能再次接收到新的数据更新请求。该新的数据更新请求可以仍来自区块节点1,也可以来自其他区块节点。例如,在上述举例中,在区块节点3将第一区块写入链内账本之前,服务器又接收到区块节点2发送的数据更新请求。区块节点2发送的数据更新请求携带了第二区块。
步骤208,若接收到新的数据更新请求,对新的数据更新请求进行暂缓处理。
对于上述在将目标区块写入区块链之前接收到新的数据更新请求的情况,传统的基于分布式锁原理,向其中一个数据处理平台分配数据更新权限。然而,如果采用“分布式锁”的方式,可能会造成数据冲突问题。例如,在允许的时间精度内用户基于数据处理平台1发生数据更新,将更新后的目标数据写入区块节点1。由于存在网络延迟,在服务器将目标数据广播至其他区块节点的过程中,有可能用户基于数据处理平台2也发生了数据更新,根据分布式锁原理,由于区块节点1抢占了数据更新权限,则用户在区块节点2的发生的数据变更会被目标数据覆盖。
为了解决上述问题,本实施例服务器具有对多个数据更新请求的响应机制,如对后面接收到的新的数据更新请求进行暂缓处理,可以保证基于每个数据处理平台在任何时机能够对共用数据进行更新。
步骤210,根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将目标区块分别写入对应的链内账本。
服务器对多个区块节点返回的入链预操作的执行结果进行统计,得到执行结果为入链通过的区块节点的数量。若为入链通过的区块节点的数量超过 区块链包含区块节点的总数的一半,则服务器向区块节点中每个区块节点发送至入链指令,使各区块节点将目标区块真正写入链内账本,从而实现数据共享。
本实施例中,区块节点可以基于相应数据处理平台发送数据更新请求;将数据更新请求携带的目标区块广播至其他区块节点,可以使其他区块节点对目标区块进行入链预操作;在此期间对是否接收到新的数据更新请求进行监听,可以在接收到新的数据更新请求时,及时对新的数据更新请求进行暂缓处理;根据入链预操作的执行结果,可以向每个区块节点发送入链指令;根据入链指令,每个区块节点可以将目标区块分别写入对应的链内账本。由于针对需要共享数据的多个数据处理平台分别部署对应的区块节点,某个区块节点停止运行不会影响其他数据处理平台的区块节点,可以提高共用数据安全性;此外,在数据更新过程中接收到另一数据处理平台的数据更新请求,按照预设规则对新数据更新请求进行暂缓处理,在保证每个数据更新请求均得以响应的情况下可以很好的解决多数据处理平台并发更新数据的冲突问题。
在其中一个实施例中,如图3所示,接收区块节点基于相应数据处理平台发送的数据更新请求之前,还包括区块链部署的步骤,具体包括:
步骤302,获取基础镜像文件,获取各个区块节点的网段信息。
步骤304,根据网段信息,向每个网段的区块节点返回对应的访问端口信息。
服务器预先为不同的网段开通可以访问服务器的网络端口;区块节点将自身的网段信息发送到服务器中,使服务器确定该区块节点访问服务器的访问端口。
步骤306,接收每个区块节点通过对应网段的访问端口发送的区块参数。
步骤308,根据基础镜像文件及区块参数,生成各网段对应的目标镜像文件。
区块参数包括区块节点所在服务器的服务地址、暴露端口及其信息以及 区块节点的peer级别等信息。在确定到访问服务器的访问端口后,区块节点将自身的区块参数发送至服务器中,服务器获得该区块参数后,执行配置文件生成工具,生成配置相关配置文件。
预先上传自动化部署脚本至区块节点中,在区块节点发送区块参数至服务器后,区块节点执行该自动化部署脚本,从服务器上拉取基础镜像文件以及由服务器生成的配置文件,根据配置文件以及基础镜像文件生成目标镜像文件。
步骤310,将多个目标镜像文件分别发送至对应网段的区块节点,使区块节点基于预存储的自动化部署脚本启动目标镜像文件,实现目标镜像服务的部署。
在区块链部署过程中,由于区块链的组件模块比较多,组织和运行起来比较繁琐,特别在涉及到分布式跨网段部署的时候。每个参与区块链的机构成员为了安全性能上的考虑,参与区块链的机构成员在设置区块节点时,自建的网络往往对外屏蔽,此时每个网段、甚至每个区块节点都需要事先准备好一份镜像文件。当区块节点的数量较多,同时区块节点又处于不同网段的时候,逐一对区块节点部署镜像文件的工作量巨大,部署效率低,且极容易出现错误。
本实施例中,根据区块节点的网段确定与服务器的访问端口,通过访问端口从服务器中拉取与区块节点对应的配置文件以及基础镜像文件,从而根据配置文件以及基础镜像文件生成目标镜像文件,实现自动化部署目标镜像服务,极大地降低了人工拉取镜像文件的出错概率,由于只需准备基础镜像文件,有效减少部署以及维护成本,提高镜像文件部署效率,且在镜像文件的部署过程中,每个区块节点对应的机构网络仍是对外屏蔽的,有效保证网络的安全性。
在其中一个实施例中,接收区块节点基于相应数据处理平台发送的数据更新请求,包括:接收多个区块节点基于相应数据处理平台并发发送的数据更新请求;数据更新请求携带了更新数据和时间戳;根据时间戳,将第一时 间顺序的数据更新请求标记为目标更新请求,对其他时间顺序的数据更新请求进行暂缓处理;将目标更新请求携带的更新数据标记为目标数据;根据目标数据生成对应的目标区块。
若预设时长内有多个数据处理平台并发更新数据,服务器按照上述方式对后面接收到的新的数据更新请求进行暂缓处理。预设时长可以是服务器自接收到数据更新请求至将目标区块广播至其他区块节点的时间长度,也可以是自服务器接收到数据更新请求至各区块节点将目标区块写入链内账本的时间长度。
服务器根据多个数据更新请求分别携带的时间戳,确定数据更新请求的相应顺序。具体的,将第一时间顺序的数据更新请求筛选作为需要及时响应处理的唯一数据更新请求。对于其他时间顺序的数据更新请求,服务器按照上述方式进行暂缓处理。
本实施例中,对并发的数据更新请求进行响应排序,可在保证每个数据更新请求均得以响应的情况下很好的解决多数据处理平台并发更新数据的冲突问题。
在其中一个实施例中,将目标区块广播至其他区块节点;使其他区块节点对目标区块进行入链预操作,包括:将目标区块广播至区块节点所在区块链内其他每个区块节点;使其他每个区块节点获取目标区块中携带了前一区块的区块哈希码,并对获取到的区块哈希码与预存储的前一区块的区块哈希码进行一致性校验;采集各区块节点返回的一致性校验结果;根据入链预操作的执行结果向每个区块节点发送入链指令,包括:若存在半数以上区块节点返回的一致性校验结果为校验通过,向每个区块节点发送入链指令。
在其中一个实施例中,如图4所示,若接收到新的数据更新请求,对新的数据更新请求进行暂缓处理,即对新数据更新请求暂缓处理的步骤,包括:
步骤402,若接收到新的数据更新请求,将发出新的数据更新请求的区块节点标记为暂缓节点,向暂缓节点返回错误标识码。
错误标识码可以是用于表征暂缓处理的特定字符或字符串。暂缓节点在 接收到错误标识码后,可以重新广播对应的更新区块,直至将更新区块写入链内账本。
步骤404,当接收到暂缓节点根据错误标识码重新发送的数据更新请求时,检测目标区块是否写入链内账本;重新发送的数据更新请求携带了更新区块。
步骤406,若是,将更新区块广播至其他区块节点,使各区块节点将更新区块写入链内账本。
步骤408,否则,返回向发出新的数据更新请求返回错误标识码的步骤。
在将错误标识发送至暂缓节点后,服务器实时检测目标区块是否已经写入链内账本。如果在目标区块还没写入链内账本之前接收到暂缓节点重新发送的数据更新请求或者其他区块节点发送的新的数据更新请求,依旧按照上述方式对接收到的重新发送的数据更新请求及新的数据更新请求进行暂缓处理。
若目标区块已经写入链内账本,服务器等待新的数据跟新请求,并可以及时响应新的数据更新请求,即按照上述方式将接收到的新的数据更新请求携带的更新区块写入链内账本。
本实施例中,在数据更新过程中接收到另一数据处理平台的数据更新请求时,向发出新的数据更新请求的区块节点返回错误标识码,使其在接收到错误标识码后,可以重新广播对应的更新区块,从而可在保证每个数据更新请求均得以响应的情况下很好的解决多数据处理平台并发更新数据的冲突问题。
在其中一个实施例中,若接收到新的数据更新请求,对新的数据更新请求进行暂缓处理,包括:获取新的数据更新请求携带的更新数据;对更新数据进行缓存;检测目标区块是否写入链内账本;若是,根据缓存的更新数据生成对应的更新区块,将更新区块广播至其他区块节点,使各区块节点将更新区块写入链内账本;否则,返回检测目标区块是否写入链内账本的步骤。
在将目标区块写入区块链后,区块节点发送的更新区块中包含的前一区 块的哈希码已经发送变化。为了保证数据更新成功,服务器获取新的数据更新请求携带的更新区块,在更新区块中提取更新数据,并对更新数据进行缓存,以便在将目标区块写入区块链后基于更新数据重新生成具有正确哈希码的更新区块。对更新数据进行缓存,使得每个区块节点无需反复广播同一数据,可以节省区块节点计算资源。
例如,在区块节点3将第一区块写入链内账本之前,区块节点3又接收区块节点2广播的第二区块以及区块节点1广播的第三区块,则先将第二区块携带的第一更新数据及第三区块携带的第二更新数据缓存起来。当第一区块写入链内账本时,若根据时间戳先接收到第二区块,则服务器再基于第一更新数据重新生成第二区块,将重新生成的第二区块广播至其他区块节点;按照上述方式重新生成第三区块并对重新生成的第三区块进行广播。
本实施例中,在新的数据更新请求携带的更新区块中提取更新数据,并对更新数据进行缓存,不仅可以保证数据更新成功,还可节省区块节点计算资源。
应该理解的是,虽然图2~图4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2~图4中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图5所示,提供了一种基于区块链的跨平台数据更新装置,包括:更新请求处理模块502、并发请求处理模块504和更新数据共享模块506,其中:
更新请求处理模块502,用于接收区块节点基于相应数据处理平台发送 的数据更新请求;数据更新请求携带了目标区块;将目标区块广播至其他区块节点;使其他区块节点对目标区块进行入链预操作。
并发请求处理模块504,用于监听是否接收到新的数据更新请求;若接收到新的数据更新请求,对新的数据更新请求进行暂缓处理。
更新数据共享模块506,用于根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将目标区块分别写入对应的链内账本。
在其中一个实施例中,该装置还包括区块链部署模块508,用于获取基础镜像文件,获取各个区块节点的网段信息;根据网段信息,向每个网段的区块节点返回对应的访问端口信息;接收每个区块节点通过对应网段的访问端口发送的区块参数;根据基础镜像文件及区块参数,生成各网段对应的目标镜像文件;将多个目标镜像文件分别发送至对应网段的区块节点,使区块节点基于预存储的自动化部署脚本启动目标镜像文件,实现目标镜像服务的部署。
在其中一个实施例中,更新请求处理模块502还用于接收多个区块节点基于相应数据处理平台并发发送的数据更新请求;数据更新请求携带了更新数据和时间戳;根据时间戳,将第一时间顺序的数据更新请求标记为目标更新请求,对其他时间顺序的数据更新请求进行暂缓处理;将目标更新请求携带的更新数据标记为目标数据;根据目标数据生成对应的目标区块。
在其中一个实施例中,更新请求处理模块502还用于将目标区块广播至区块节点所在区块链内其他每个区块节点;使其他每个区块节点获取目标区块中携带了前一区块的区块哈希码,并对获取到的区块哈希码与预存储的前一区块的区块哈希码进行一致性校验;采集各区块节点返回的一致性校验结果;根据入链预操作的执行结果向每个区块节点发送入链指令,包括:若存在半数以上区块节点返回的一致性校验结果为校验通过,向每个区块节点发送入链指令。
在其中一个实施例中,并发请求处理模块504还用于若接收到新的数据更新请求,将发出新的数据更新请求的区块节点标记为暂缓节点,向暂缓节 点返回错误标识码;当接收到暂缓节点根据错误标识码重新发送的数据更新请求时,检测目标区块是否写入链内账本;重新发送的数据更新请求携带了更新区块;若是,将更新区块广播至其他区块节点,使各区块节点将更新区块写入链内账本;否则,返回向发出新的数据更新请求返回错误标识码的步骤。
在其中一个实施例中,并发请求处理模块504还用于获取新的数据更新请求携带的更新数据;对更新数据进行缓存;检测目标区块是否写入链内账本;若是,根据缓存的更新数据生成对应的更新区块,将更新区块广播至其他区块节点,使各区块节点将更新区块写入链内账本;否则,返回检测目标区块是否写入链内账本的步骤。
关于基于区块链的跨平台数据更新装置的具体限定可以参见上文中对于基于区块链的跨平台数据更新方法的限定,在此不再赘述。上述基于区块链的跨平台数据更新装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储更新数据。该计算机设备的网络接口用于与外部终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种基于区块链的跨平台数据更新方法。
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相 关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一个或多个存储有计算机可读指令的非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的基于区块链的跨平台数据更新方法的步骤。
本领域普通技术人员可理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(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 (20)

  1. 一种基于区块链的跨平台数据更新方法,由计算机设备执行,包括:
    接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;
    将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作;
    监听是否接收到新的数据更新请求;
    若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;及
    根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别写入对应的链内账本。
  2. 根据权利要求1所述的方法,其特征在于,所述接收区块节点基于相应数据处理平台发送的数据更新请求之前,还包括:
    获取基础镜像文件,获取各个区块节点的网段信息;
    根据所述网段信息,向每个网段的区块节点返回对应的访问端口信息;
    接收每个区块节点通过对应网段的访问端口发送的区块参数;
    根据所述基础镜像文件及所述区块参数,生成各网段对应的目标镜像文件;及
    将多个目标镜像文件分别发送至对应网段的区块节点,使所述区块节点基于预存储的自动化部署脚本启动所述目标镜像文件,实现目标镜像服务的部署。
  3. 根据权利要求1所述的方法,其特征在于,所述接收区块节点基于相应数据处理平台发送的数据更新请求,包括:
    接收多个区块节点基于相应数据处理平台并发发送的数据更新请求;所述数据更新请求携带了更新数据和时间戳;
    根据所述时间戳,将第一时间顺序的数据更新请求标记为目标更新请求,对其他时间顺序的数据更新请求进行暂缓处理;
    将所述目标更新请求携带的更新数据标记为目标数据;及
    根据所述目标数据生成对应的目标区块。
  4. 根据权利要求1所述的方法,其特征在于,所述将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作,包括:
    将所述目标区块广播至所述区块节点所在区块链内其他每个区块节点;使其他每个区块节点获取所述目标区块中携带了前一区块的区块哈希码,并对获取到的区块哈希码与预存储的前一区块的区块哈希码进行一致性校验;
    采集各区块节点返回的一致性校验结果;及
    所述根据入链预操作的执行结果向每个区块节点发送入链指令,包括:
    若存在半数以上区块节点返回的一致性校验结果为校验通过,向每个区块节点发送入链指令。
  5. 根据权利要求1所述的方法,其特征在于,所述若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理,包括:
    若接收到新的数据更新请求,将发出所述新的数据更新请求的区块节点标记为暂缓节点,向所述暂缓节点返回错误标识码;
    当接收到所述暂缓节点根据错误标识码重新发送的数据更新请求时,检测所述目标区块是否写入链内账本;所述重新发送的数据更新请求携带了更新区块;及
    若是,将所述更新区块广播至其他区块节点,使各区块节点将所述更新区块写入链内账本;
    否则,返回所述向发出所述新的数据更新请求返回错误标识码的步骤。
  6. 根据权利要求1所述的方法,其特征在于,所述若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理,包括:
    获取所述新的数据更新请求携带的更新数据;
    对所述更新数据进行缓存;
    检测所述目标区块是否写入链内账本;
    若是,根据缓存的更新数据生成对应的更新区块,将所述更新区块广播 至其他区块节点,使各区块节点将所述更新区块写入链内账本;及
    否则,返回所述检测所述目标区块是否写入链内账本的步骤。
  7. 一种基于区块链的跨平台数据更新装置,所述装置包括:
    更新请求处理模块,用于接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作;
    并发请求处理模块,用于监听是否接收到新的数据更新请求;若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;
    更新数据共享模块,用于根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别写入对应的链内账本。
  8. 根据权利要求7所述的装置,其特征在于,所述装置还包括区块链部署模块,用于获取基础镜像文件,获取各个区块节点的网段信息;根据所述网段信息,向每个网段的区块节点返回对应的访问端口信息;接收每个区块节点通过对应网段的访问端口发送的区块参数;根据所述基础镜像文件及所述区块参数,生成各网段对应的目标镜像文件;将多个目标镜像文件分别发送至对应网段的区块节点,使所述区块节点基于预存储的自动化部署脚本启动所述目标镜像文件,实现目标镜像服务的部署。
  9. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;
    将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块进行入链预操作;
    监听是否接收到新的数据更新请求;
    若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;及
    根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别写入对应的链内账本。
  10. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取基础镜像文件,获取各个区块节点的网段信息;
    根据所述网段信息,向每个网段的区块节点返回对应的访问端口信息;
    接收每个区块节点通过对应网段的访问端口发送的区块参数;
    根据所述基础镜像文件及所述区块参数,生成各网段对应的目标镜像文件;及
    将多个目标镜像文件分别发送至对应网段的区块节点,使所述区块节点基于预存储的自动化部署脚本启动所述目标镜像文件,实现目标镜像服务的部署。
  11. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    接收多个区块节点基于相应数据处理平台并发发送的数据更新请求;所述数据更新请求携带了更新数据和时间戳;
    根据所述时间戳,将第一时间顺序的数据更新请求标记为目标更新请求,对其他时间顺序的数据更新请求进行暂缓处理;
    将所述目标更新请求携带的更新数据标记为目标数据;及
    根据所述目标数据生成对应的目标区块。
  12. 根据权利要求9所述的计算机设备,其特征在于,所述将所述目标区块广播至其他区块节点;所述处理器执行所述计算机可读指令时还执行以下步骤:
    将所述目标区块广播至所述区块节点所在区块链内其他每个区块节点;使其他每个区块节点获取所述目标区块中携带了前一区块的区块哈希码,并对获取到的区块哈希码与预存储的前一区块的区块哈希码进行一致性校验;
    采集各区块节点返回的一致性校验结果;及
    所述根据入链预操作的执行结果向每个区块节点发送入链指令,包括:
    若存在半数以上区块节点返回的一致性校验结果为校验通过,向每个区块节点发送入链指令。
  13. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    若接收到新的数据更新请求,将发出所述新的数据更新请求的区块节点标记为暂缓节点,向所述暂缓节点返回错误标识码;
    当接收到所述暂缓节点根据错误标识码重新发送的数据更新请求时,检测所述目标区块是否写入所述链内账本;所述重新发送的数据更新请求携带了更新区块;及
    若是,将所述更新区块广播至其他区块节点,使各区块节点将所述更新区块写入所述链内账本;
    否则,返回所述向发出所述新的数据更新请求返回错误标识码的步骤。
  14. 根据权利要求9所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取所述新的数据更新请求携带的更新数据;
    对所述更新数据进行缓存;
    检测所述目标区块是否写入所述链内账本;
    若是,根据缓存的更新数据生成对应的更新区块,将所述更新区块广播至其他区块节点,使各区块节点将所述更新区块写入所述链内账本;及
    否则,返回所述检测所述目标区块是否写入所述链内账本的步骤。
  15. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    接收区块节点基于相应数据处理平台发送的数据更新请求;所述数据更新请求携带了目标区块;
    将所述目标区块广播至其他区块节点;使所述其他区块节点对目标区块 进行入链预操作;
    监听是否接收到新的数据更新请求;
    若接收到新的数据更新请求,对所述新的数据更新请求进行暂缓处理;及
    根据入链预操作的执行结果向每个区块节点发送入链指令,使每个区块节点将所述目标区块分别写入对应的链内账本。
  16. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    获取基础镜像文件,获取各个区块节点的网段信息;
    根据所述网段信息,向每个网段的区块节点返回对应的访问端口信息;
    接收每个区块节点通过对应网段的访问端口发送的区块参数;
    根据所述基础镜像文件及所述区块参数,生成各网段对应的目标镜像文件;及
    将多个目标镜像文件分别发送至对应网段的区块节点,使所述区块节点基于预存储的自动化部署脚本启动所述目标镜像文件,实现目标镜像服务的部署。
  17. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    接收多个区块节点基于相应数据处理平台并发发送的数据更新请求;所述数据更新请求携带了更新数据和时间戳;
    根据所述时间戳,将第一时间顺序的数据更新请求标记为目标更新请求,对其他时间顺序的数据更新请求进行暂缓处理;
    将所述目标更新请求携带的更新数据标记为目标数据;及
    根据所述目标数据生成对应的目标区块。
  18. 根据权利要求15所述的存储介质,其特征在于,所述将所述目标区块广播至其他区块节点;所述计算机可读指令被所述处理器执行时还执行以下步骤:
    将所述目标区块广播至所述区块节点所在区块链内其他每个区块节点;使其他每个区块节点获取所述目标区块中携带了前一区块的区块哈希码,并对获取到的区块哈希码与预存储的前一区块的区块哈希码进行一致性校验;
    采集各区块节点返回的一致性校验结果;及
    所述根据入链预操作的执行结果向每个区块节点发送入链指令,包括:
    若存在半数以上区块节点返回的一致性校验结果为校验通过,向每个区块节点发送入链指令。
  19. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    若接收到新的数据更新请求,将发出所述新的数据更新请求的区块节点标记为暂缓节点,向所述暂缓节点返回错误标识码;
    当接收到所述暂缓节点根据错误标识码重新发送的数据更新请求时,检测所述目标区块是否写入所述链内账本;所述重新发送的数据更新请求携带了更新区块;及
    若是,将所述更新区块广播至其他区块节点,使各区块节点将所述更新区块写入所述链内账本;
    否则,返回所述向发出所述新的数据更新请求返回错误标识码的步骤。
  20. 根据权利要求15所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    获取所述新的数据更新请求携带的更新数据;
    对所述更新数据进行缓存;
    检测所述目标区块是否写入所述链内账本;
    若是,根据缓存的更新数据生成对应的更新区块,将所述更新区块广播至其他区块节点,使各区块节点将所述更新区块写入所述链内账本;及
    否则,返回所述检测所述目标区块是否写入所述链内账本的步骤。
PCT/CN2019/093183 2019-01-23 2019-06-27 基于区块链的跨平台数据更新方法、装置和计算机设备 WO2020151181A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910063926.8A CN109857751A (zh) 2019-01-23 2019-01-23 基于区块链的跨平台数据更新方法、装置和计算机设备
CN201910063926.8 2019-01-23

Publications (1)

Publication Number Publication Date
WO2020151181A1 true WO2020151181A1 (zh) 2020-07-30

Family

ID=66895934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093183 WO2020151181A1 (zh) 2019-01-23 2019-06-27 基于区块链的跨平台数据更新方法、装置和计算机设备

Country Status (2)

Country Link
CN (1) CN109857751A (zh)
WO (1) WO2020151181A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857751A (zh) * 2019-01-23 2019-06-07 平安科技(深圳)有限公司 基于区块链的跨平台数据更新方法、装置和计算机设备
WO2019170177A2 (en) * 2019-06-28 2019-09-12 Alibaba Group Holding Limited System and method for updating data in blockchain
SG11202003891YA (en) 2019-06-28 2020-05-28 Advanced New Technologies Co Ltd System and method for blockchain address mapping
CN110543488B (zh) * 2019-09-11 2022-06-07 深圳市迅雷网络技术有限公司 一种验证节点更新方法、装置及设备
CN110989934B (zh) * 2019-12-05 2023-08-25 达闼机器人股份有限公司 区块链节点数据存储方法、区块链系统及区块链节点
CN111182527B (zh) * 2019-12-27 2022-07-26 深圳市云伽智能技术有限公司 Ota固件升级方法、装置、终端设备及其存储介质
CN112016922A (zh) * 2020-08-22 2020-12-01 王红建 应用于区块链金融和在线支付的信息安全防护方法及设备
CN112434311B (zh) * 2020-11-05 2022-05-20 德州职业技术学院(德州市技师学院) 一种区块链数据加密共享方法和系统
CN113535855B (zh) * 2021-07-28 2024-01-26 卫宁健康科技集团股份有限公司 基于区块链的主数据管理方法、系统、计算机设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (zh) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 分布式系统及消息处理方法
CN108650223A (zh) * 2018-04-02 2018-10-12 江苏中控安芯信息安全技术有限公司 一种网络设备点对点可信认证方法及系统
CN108881231A (zh) * 2018-06-21 2018-11-23 郑州云海信息技术有限公司 一种集群系统中同步账户信息的方法、装置和存储介质
CN109257334A (zh) * 2018-08-21 2019-01-22 广州杰赛科技股份有限公司 一种基于区块链的数据上链系统、方法及存储介质
CN109857751A (zh) * 2019-01-23 2019-06-07 平安科技(深圳)有限公司 基于区块链的跨平台数据更新方法、装置和计算机设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107450979B (zh) * 2017-03-28 2020-06-02 创新先进技术有限公司 一种区块链共识方法及装置
CN108696358B (zh) * 2017-04-06 2021-05-04 中国移动通信有限公司研究院 数字证书的管理方法、装置、可读存储介质及服务终端
CN107395353B (zh) * 2017-04-24 2020-01-31 阿里巴巴集团控股有限公司 一种区块链共识方法及装置
CN109213900B (zh) * 2018-09-18 2020-10-16 百度在线网络技术(北京)有限公司 一种区块链的数据修改方法、装置、设备和介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789095A (zh) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 分布式系统及消息处理方法
CN108650223A (zh) * 2018-04-02 2018-10-12 江苏中控安芯信息安全技术有限公司 一种网络设备点对点可信认证方法及系统
CN108881231A (zh) * 2018-06-21 2018-11-23 郑州云海信息技术有限公司 一种集群系统中同步账户信息的方法、装置和存储介质
CN109257334A (zh) * 2018-08-21 2019-01-22 广州杰赛科技股份有限公司 一种基于区块链的数据上链系统、方法及存储介质
CN109857751A (zh) * 2019-01-23 2019-06-07 平安科技(深圳)有限公司 基于区块链的跨平台数据更新方法、装置和计算机设备

Also Published As

Publication number Publication date
CN109857751A (zh) 2019-06-07

Similar Documents

Publication Publication Date Title
WO2020151181A1 (zh) 基于区块链的跨平台数据更新方法、装置和计算机设备
US11068449B2 (en) Data migration method, apparatus, and storage medium
WO2020186809A1 (zh) 基于大数据平台的hive任务调度方法、装置、设备及存储介质
WO2019127916A1 (zh) 基于分布式一致性协议实现的数据读写方法及装置
CN109905457B (zh) 主从服务器数据同步方法、装置、计算机设备和存储介质
WO2020181810A1 (zh) 应用于集群内多级缓存的数据处理方法和装置
CN108965383B (zh) 文件同步方法、装置、计算机设备和存储介质
CN112867988A (zh) 由移动设备实现合规设置以遵循配置场景
WO2019127890A1 (zh) 漏洞扫描方法、装置、计算机设备和存储介质
CN111628886B (zh) 私有云环境下组建区块链网络的方法、装置、计算机设备
CN110555041A (zh) 数据处理方法、装置、计算机设备和存储介质
WO2015062228A1 (zh) 一种访问共享内存的方法和装置
CN110597918A (zh) 一种账户管理方法、装置及计算机可读存储介质
CN111078451A (zh) 分布式事务处理方法、装置、计算机设备及存储介质
WO2020224100A1 (zh) 区块链配置文件的处理装置、系统、方法及存储介质
CN107659663A (zh) 一种数据同步的方法、装置、设备和存储介质
CN111159233A (zh) 分布式缓存方法、系统、计算机设备以及存储介质
CN110602165A (zh) 政务数据同步方法、装置、系统、计算机设备和存储介质
CN114356521A (zh) 任务调度方法、装置、电子设备及存储介质
CN113704790A (zh) 一种异常日志信息汇总方法及计算机设备
CN112035418B (zh) 多机房同步方法、计算设备及计算机存储介质
CN112711606A (zh) 数据库访问方法、装置、计算机设备和存储介质
CN112199441A (zh) 基于大数据平台的数据同步处理方法、装置、设备及介质
WO2023077748A1 (zh) 一种账户管理方法、装置、计算机设备和存储介质
CN111431951B (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: 19912142

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: 19912142

Country of ref document: EP

Kind code of ref document: A1