CN114416871A - Blockchain-based data processing method, device, equipment, system and medium - Google Patents
Blockchain-based data processing method, device, equipment, system and medium Download PDFInfo
- Publication number
- CN114416871A CN114416871A CN202210023766.6A CN202210023766A CN114416871A CN 114416871 A CN114416871 A CN 114416871A CN 202210023766 A CN202210023766 A CN 202210023766A CN 114416871 A CN114416871 A CN 114416871A
- Authority
- CN
- China
- Prior art keywords
- blockchain
- uplink
- information
- baas platform
- virtualized
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 claims abstract description 50
- 238000004891 communication Methods 0.000 claims description 23
- 238000012545 processing Methods 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 abstract description 13
- 239000013598 vector Substances 0.000 description 17
- 238000010586 diagram Methods 0.000 description 13
- 238000012549 training Methods 0.000 description 11
- 238000003062 neural network model Methods 0.000 description 7
- 230000008859 change Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000002452 interceptive effect Effects 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 210000002569 neuron Anatomy 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000011144 upstream manufacturing Methods 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000011478 gradient descent method Methods 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本申请提供的基于区块链的数据处理方法、装置、设备、系统及介质,该方法包括虚拟BaaS平台接收来自用户的终端设备的包括用户的上链需求信息的请求消息,虚拟BaaS平台获取与上链需求信息匹配的第一区块链,向终端设备发送包括第一区块链的第一标识的反馈消息。虚拟BaaS平台接收来自终端设备的包括第一标识和待上链信息的上链请求,向第一区块链的第一BaaS平台发送上链请求,以使待上链信息写入第一区块链。本申请使得用户使用联盟链的过程更加简单方便,提高了用户的使用体验。
The blockchain-based data processing method, device, device, system and medium provided by this application, the method includes the virtual BaaS platform receiving a request message including the user's uplink demand information from the user's terminal device, and the virtual BaaS platform obtaining and The first blockchain that matches the demand information on the chain sends a feedback message including the first identifier of the first blockchain to the terminal device. The virtual BaaS platform receives the chain request including the first identifier and the information to be chained from the terminal device, and sends the chain request to the first BaaS platform of the first blockchain, so that the information to be chained is written into the first block chain. This application makes the process of using the consortium chain simpler and more convenient for users, and improves the user experience.
Description
技术领域technical field
本申请涉及区块链领域,尤其涉及一种基于区块链的数据处理方法、装置、设备、系统及介质。The present application relates to the field of blockchain, and in particular, to a method, device, device, system and medium for data processing based on blockchain.
背景技术Background technique
区块链是分布在计算机节点上,用分布式数据库识别、传播和记载信息的智能化对等网络,具有不可伪造、全程留痕、可以追溯、公开透明、集体维护等特征。Blockchain is an intelligent peer-to-peer network that is distributed on computer nodes and uses distributed databases to identify, disseminate and record information.
区块链主要划分为公有链、联盟链和私有链。其中,现有技术中存在多种异构类型的联盟链,比如星火链、长安链、超级链、联通链。对于每种联盟链,均设置有相应的区块链即服务(Blockchain as a Service,简称BaaS)平台,用户可通过相应的BaaS平台在该联盟链上进行智能合约上链存证和查询。Blockchain is mainly divided into public chain, alliance chain and private chain. Among them, there are various heterogeneous types of alliance chains in the prior art, such as Spark Chain, Changan Chain, Super Chain, and China Unicom Chain. For each consortium chain, a corresponding Blockchain as a Service (BaaS) platform is set up, and users can perform smart contract storage and query on the consortium chain through the corresponding BaaS platform.
也就是说,用户更换使用另一种类型的联盟链时,需要更换相应的BaaS平台。且由于每种类型的联盟链的使用规则不相同,在用户更换使用另一种类型的联盟链时,需要更换联盟链的使用规则,造成了用户对联盟链的使用过程比较繁琐。That is to say, when users change to use another type of consortium chain, they need to replace the corresponding BaaS platform. And because the usage rules of each type of consortium chain are different, when users change to use another type of consortium chain, they need to change the usage rules of the consortium chain, which makes the process of using the consortium chain more cumbersome for users.
发明内容SUMMARY OF THE INVENTION
本申请提供一种基于区块链的数据处理方法、装置、设备、系统及介质,用于解决用户对联盟链的使用过程比较繁琐的问题。This application provides a blockchain-based data processing method, device, device, system and medium, which are used to solve the problem that the user's use of the alliance chain is cumbersome.
第一方面,本申请提供一种基于区块链的数据处理方法,应用于虚拟化区块链即服务BaaS平台,所述虚拟化BaaS平台与多种类型的联盟链的多个BaaS平台通信连接;所述方法包括:In the first aspect, the present application provides a blockchain-based data processing method, which is applied to a virtualized blockchain-as-a-service BaaS platform, and the virtualized BaaS platform is communicatively connected to multiple BaaS platforms of various types of consortium chains. ; the method includes:
接收来自用户的终端设备的请求消息,其中,所述请求消息包括所述用户的上链需求信息;receiving a request message from a user's terminal device, wherein the request message includes the user's uplink demand information;
获取与所述上链需求信息匹配的第一区块链;Obtain the first blockchain that matches the on-chain demand information;
向所述终端设备发送反馈消息,所述反馈消息包括所述第一区块链的第一标识;sending a feedback message to the terminal device, where the feedback message includes the first identifier of the first blockchain;
接收来自终端设备的上链请求,所述上链请求包括所述第一标识和待上链信息;receiving an on-chain request from a terminal device, where the on-chain request includes the first identifier and information to be on-chain;
向所述第一区块链的第一BaaS平台发送所述上链请求,以使所述待上链信息写入所述第一区块链。Send the on-chain request to the first BaaS platform of the first blockchain, so that the information to be on-chain is written into the first blockchain.
在一种具体实施方式中,所述获取与所述上链需求信息匹配的第一区块链,包括:In a specific embodiment, the obtaining the first blockchain matching the on-chain requirement information includes:
根据所述上链需求信息和匹配模型,获取与所述上链需求信息匹配的第一区块链。According to the on-chain demand information and the matching model, obtain a first blockchain that matches the on-chain demand information.
在一种具体实施方式中,所述第一区块链为所述多种类型的联盟链中的一个区块链。In a specific embodiment, the first blockchain is one blockchain among the multiple types of consortium chains.
在一种具体实施方式中,所述获取与所述上链需求信息匹配的第一区块链,包括:In a specific embodiment, the obtaining the first blockchain matching the on-chain requirement information includes:
根据所述上链需求信息和所述匹配模型,确定所述多种类型的联盟链中不存在与所述上链需求信息匹配的区块链;According to the on-chain demand information and the matching model, it is determined that there is no blockchain matching the on-chain demand information in the multiple types of consortium chains;
根据所述上链需求信息搭建与所述上链需求信息匹配的所述第一区块链;Build the first blockchain matching the on-chain demand information according to the on-chain demand information;
建立所述虚拟化BaaS平台与所述第一BaaS平台的通信连接。A communication connection between the virtualized BaaS platform and the first BaaS platform is established.
在一种具体实施方式中,所述请求消息还包括用于指示第二区块链的指示信息;则在获取与所述上链需求信息匹配的第一区块链之后、向所述终端设备发送反馈消息之前,还包括:In a specific implementation manner, the request message further includes indication information for indicating the second blockchain; then, after obtaining the first blockchain matching the on-chain requirement information, send a message to the terminal device. Before sending a feedback message, also include:
根据所述指示信息,确定第二区块链与所述第一区块链相同;According to the indication information, it is determined that the second blockchain is the same as the first blockchain;
相应地,所述反馈消息还包括第一提醒信息,所述第一提醒信息用于向用户提醒所述第二区块链与所述第一区块链相同。Correspondingly, the feedback message further includes first reminder information, and the first reminder information is used to remind the user that the second blockchain is the same as the first blockchain.
在一种具体实施方式中,所述请求消息还包括用于指示第二区块链的指示信息;则在获取与所述上链需求信息匹配的第一区块链之后、向所述终端设备发送反馈消息之前,还包括:In a specific implementation manner, the request message further includes indication information for indicating the second blockchain; then, after obtaining the first blockchain matching the on-chain requirement information, send a message to the terminal device. Before sending a feedback message, also include:
根据所述指示信息,确定第二区块链与所述第一区块链不相同;According to the indication information, it is determined that the second blockchain is different from the first blockchain;
相应地,所述反馈消息包括第二提醒信息,所述第二提醒信息用于向用户建议使用所述第一区块链进行上链操作。Correspondingly, the feedback message includes second reminder information, and the second reminder information is used to suggest to the user to use the first blockchain to perform an on-chain operation.
在一种具体实施方式中,所述第二提醒信息还用于向用户提醒所述第二区块链与所述第一区块链不相同。In a specific implementation manner, the second reminder information is further used to remind the user that the second blockchain is different from the first blockchain.
在一种具体实施方式中,所述方法还包括:接收来自终端设备的查询请求,所述查询请求用于请求查询所述上链操作的上链数据,所述查询请求包括所述第一标识;所述待上链信息包括所述上链数据;In a specific embodiment, the method further includes: receiving a query request from a terminal device, where the query request is used to request to query the uplink data of the uplink operation, and the query request includes the first identifier ; the information to be uploaded includes the data on the chain;
向所述第一BaaS平台发送所述查询请求,以使所述第一BaaS平台根据查询请求获取所述上链数据;sending the query request to the first BaaS platform, so that the first BaaS platform obtains the on-chain data according to the query request;
接收来自所述第一BaaS平台的所述上链数据;receiving the on-chain data from the first BaaS platform;
向所述终端设备发送所述上链数据。Send the uplink data to the terminal device.
第二方面,本申请提供一种基于区块链的数据处理方法,应用于终端设备;所述方法包括:In a second aspect, the present application provides a blockchain-based data processing method applied to a terminal device; the method includes:
接收用户输入的上链需求信息;Receive the information on the demand for the chain entered by the user;
向所述虚拟化BaaS平台发送包括所述上链需求信息的请求消息;所述虚拟化BaaS平台与多种类型的联盟链的多个BaaS平台通信连接;所述请求消息用于所述虚拟化BaaS平台获取与所述上链需求信息匹配的第一区块链;Send a request message including the on-chain demand information to the virtualized BaaS platform; the virtualized BaaS platform is in communication connection with multiple BaaS platforms of various types of alliance chains; the request message is used for the virtualization The BaaS platform obtains the first blockchain that matches the on-chain demand information;
接收来自所述虚拟化BaaS平台的反馈消息,所述反馈消息包括所述第一区块链的第一标识;receiving a feedback message from the virtualized BaaS platform, the feedback message including the first identifier of the first blockchain;
向所述虚拟化BaaS平台发送上链请求,所述上链请求包括所述第一标识和待上链信息。Send an on-chain request to the virtualized BaaS platform, where the on-chain request includes the first identifier and information to be on-chain.
在一种具体实施方式中,所述方法还包括:In a specific embodiment, the method further includes:
接收用户输入的查询信息;Receive the query information entered by the user;
向所述虚拟化BaaS平台发送包括所述查询信息的查询请求,所述查询请求用于请求查询所述上链操作的上链数据,所述查询请求包括所述第一标识;所述待上链信息包括所述上链数据;Send a query request including the query information to the virtualized BaaS platform, where the query request is used to request to query the on-chain data of the on-chain operation, and the query request includes the first identifier; The chain information includes the on-chain data;
接收来自所述虚拟化BaaS平台的所述上链数据。The on-chain data from the virtualized BaaS platform is received.
第三方面,本申请提供一种基于区块链的数据处理装置,包括:In a third aspect, the present application provides a blockchain-based data processing device, comprising:
接收模块,用于接收来自用户的终端设备的请求消息,其中,所述请求消息包括所述用户的上链需求信息;a receiving module, configured to receive a request message from a user's terminal device, wherein the request message includes the user's uplink demand information;
处理模块,用于获取与所述上链需求信息匹配的第一区块链;a processing module, used to obtain the first blockchain matching the on-chain demand information;
发送模块,用于向所述终端设备发送反馈消息,所述反馈消息包括所述第一区块链的第一标识;a sending module, configured to send a feedback message to the terminal device, where the feedback message includes the first identifier of the first blockchain;
所述接收模块,还用于接收来自终端设备的上链请求,所述上链请求包括所述第一标识和待上链信息;The receiving module is further configured to receive an uplink request from a terminal device, where the uplink request includes the first identifier and information to be linked;
所述发送模块,还用于向所述第一区块链的第一BaaS平台发送所述上链请求,以使所述待上链信息写入所述第一区块链。The sending module is further configured to send the on-chain request to the first BaaS platform of the first blockchain, so that the information to be on-chain is written into the first blockchain.
第四方面,本申请提供一种基于区块链的数据处理装置,包括:In a fourth aspect, the present application provides a blockchain-based data processing device, including:
接收模块,用于接收用户输入的上链需求信息;The receiving module is used to receive the uplink demand information input by the user;
发送模块,用于向所述虚拟化BaaS平台发送包括所述上链需求信息的请求消息;所述虚拟化BaaS平台与多种类型的联盟链的多个BaaS平台通信连接;所述请求消息用于所述虚拟化BaaS平台获取与所述上链需求信息匹配的第一区块链;A sending module is used to send a request message including the on-chain demand information to the virtualized BaaS platform; the virtualized BaaS platform is in communication connection with multiple BaaS platforms of various types of consortium chains; the request message uses Obtain the first blockchain matching the on-chain requirement information from the virtualized BaaS platform;
所述接收模块,还用于接收来自所述虚拟化BaaS平台的反馈消息,所述反馈消息包括所述第一区块链的第一标识;The receiving module is further configured to receive a feedback message from the virtualized BaaS platform, where the feedback message includes the first identifier of the first blockchain;
所述发送模块,还用于向所述虚拟化BaaS平台发送上链请求,所述上链请求包括所述第一标识和待上链信息。The sending module is further configured to send an on-chain request to the virtualized BaaS platform, where the on-chain request includes the first identifier and information to be on-chain.
第五方面,本申请提供一种电子设备,包括:In a fifth aspect, the application provides an electronic device, comprising:
处理器,存储器,通信接口;processor, memory, communication interface;
所述存储器用于存储所述处理器的可执行指令;the memory for storing executable instructions for the processor;
其中,所述处理器配置为经由执行所述可执行指令来执行第一方面或第二方面任一项所述的基于区块链的数据处理方法。Wherein, the processor is configured to execute the blockchain-based data processing method according to any one of the first aspect or the second aspect by executing the executable instructions.
第六方面,本申请提供一种区块链系统,包括虚拟化BaaS平台以及多种类型的联盟链的多个BaaS平台,所述虚拟化BaaS平台与所述多种类型的联盟链的所述多个BaaS平台通信连接;In a sixth aspect, the present application provides a blockchain system, including a virtualized BaaS platform and multiple BaaS platforms of various types of consortium chains, the virtualized BaaS platform and the various types of consortium chains. Multiple BaaS platform communication connections;
所述虚拟化BaaS平台用于执行第一方面任一项所述的基于区块链的数据处理方法。The virtualized BaaS platform is used to execute the blockchain-based data processing method described in any one of the first aspects.
第七方面,本申请提供一种可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现第一方面或第二方面任一项所述的基于区块链的数据处理方法。In a seventh aspect, the present application provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, realizes the blockchain-based data according to any one of the first aspect or the second aspect Approach.
本申请提供基于区块链的数据处理方法、装置、设备、系统及介质。本申请提供的基于区块链的数据处理方法,通过如下步骤执行,终端设备接收用户输入的上链需求信息后,向虚拟化BaaS平台发送包括用户的上链需求信息的请求消息。虚拟化BaaS平台根据请求消息获取与上链需求信息匹配的第一区块链,虚拟化BaaS平台向终端设备发送包括第一区块链的第一标识的反馈消息。终端设备向虚拟化BaaS平台发送包括第一标识和待上链信息的上链请求,虚拟化BaaS平台向第一区块链的第一BaaS平台发送上链请求,以使待上链信息写入第一区块链。相较于现有技术,本申请中用户有任何上链需求时,均可通过终端设备直接向虚拟化BaaS平台发送包括上链需求信息的请求信息,以使虚拟化BaaS平台获取到与上链需求信息匹配的区块链;终端设备向虚拟化BaaS平台发送包括该区块链的标识的上链请求,以使该区块链的BaaS平台完成上链操作。也就是说,用户使用任何类型的联盟链,均与虚拟化BaaS平台对接,无需更换BaaS平台;且由于用户使用任何类型的联盟链均与虚拟化BaaS平台对接,因此用户使用任何类型的联盟链,均采用的是相同的规则,从而使得用户使用联盟链的简单方便,提高了用户的使用体验。The present application provides blockchain-based data processing methods, devices, equipment, systems and media. The blockchain-based data processing method provided by the present application is performed through the following steps. After receiving the uplink demand information input by the user, the terminal device sends a request message including the user's uplink demand information to the virtualized BaaS platform. The virtualized BaaS platform acquires the first blockchain matching the on-chain requirement information according to the request message, and the virtualized BaaS platform sends a feedback message including the first identifier of the first blockchain to the terminal device. The terminal device sends an on-chain request including the first identifier and the information to be on-chain to the virtualized BaaS platform, and the virtualized BaaS platform sends the on-chain request to the first BaaS platform of the first blockchain, so that the on-chain information is written The first blockchain. Compared with the prior art, in this application, when the user has any demand for on-chain, he can directly send the request information including the on-chain demand information to the virtualized BaaS platform through the terminal device, so that the virtualized BaaS platform can obtain and upload the chain. A blockchain matching the demand information; the terminal device sends an on-chain request including the identity of the blockchain to the virtualized BaaS platform, so that the BaaS platform of the blockchain can complete the on-chain operation. That is to say, any type of alliance chain used by the user is connected to the virtualized BaaS platform, and there is no need to replace the BaaS platform; and because the user uses any type of alliance chain to connect with the virtualized BaaS platform, the user can use any type of alliance chain. , all adopt the same rules, which makes it simple and convenient for users to use the alliance chain and improves the user experience.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为本申请提供的基于区块链的数据处理方法的应用场景示意图;1 is a schematic diagram of an application scenario of the blockchain-based data processing method provided by the present application;
图2为本申请提供的基于区块链的数据处理方法实施例一的交互示意图;FIG. 2 is an interactive schematic diagram of Embodiment 1 of the blockchain-based data processing method provided by the present application;
图3为本申请提供的基于区块链的数据处理方法实施例二的流程示意图;3 is a schematic flowchart of Embodiment 2 of the blockchain-based data processing method provided by the present application;
图4为本申请提供的基于区块链的数据处理方法实施例三的流程示意图;4 is a schematic flowchart of Embodiment 3 of the blockchain-based data processing method provided by the present application;
图5为本申请提供的基于区块链的数据处理方法实施例四的交互示意图;5 is an interactive schematic diagram of Embodiment 4 of the blockchain-based data processing method provided by the present application;
图6为本申请提供的基于区块链的数据处理装置实施例一的结构示意图;6 is a schematic structural diagram of Embodiment 1 of the blockchain-based data processing apparatus provided by the present application;
图7为本申请提供的基于区块链的数据处理装置实施例二的结构示意图;7 is a schematic structural diagram of Embodiment 2 of the blockchain-based data processing apparatus provided by the present application;
图8为本申请提供的一种电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在根据本实施例的启示下作出的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by persons of ordinary skill in the art under the inspiration of the present embodiments fall within the protection scope of the present application.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to Describe a particular order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
首先对本申请所涉及的名词进行解释:First, the terms involved in this application are explained:
区块链:区块链是一个分布式账本,分布在计算机节点上,记录网络上发生的所有交易。上链是指把转账记录、订单、数据分配表等需要上链的信息记录在区块上。区块是一个一个的存储单元,记录了一定时间内各个区块节点全部的交流信息。各个区块之间通过随机散列(也称哈希算法)实现链接,后一个区块包含前一个区块的哈希值,随着信息交流的扩大,一个区块与一个区块相继接续,形成的结果就叫区块链。Blockchain: A blockchain is a distributed ledger, distributed across computer nodes, that records all transactions that take place on the network. On-chain refers to the recording of transfer records, orders, data distribution tables and other information that needs to be on-chain on the block. A block is a storage unit that records all the communication information of each block node within a certain period of time. Each block is linked through random hashing (also called hash algorithm), and the next block contains the hash value of the previous block. The result is called a blockchain.
区块链即服务(Blockchain as a Service,简称BaaS)平台:是指将区块链框架嵌入云计算平台,利用云服务基础设施的部署和管理优势,为开发者提供便捷、高性能的区块链生态环境和生态配套服务,支持开发者的业务拓展及运营支持的区块链开放平台。BaaS平台将区块链技术组合封装,模块化成常用的主机管理、区块链网络管理、通道管理、智能合约、区块链浏览器管理、区块链监控、证书管理和用户管理等功能,当用户需要在区块链上进行上链存证和查询时,只需通过应用程序接口(Application ProgrammingInterface,简称API)和软件开发工具包(Software Development Kit,简称SDK)等接口,连接这些功能,即可直接使用区块链BaaS平台进行智能合约上链存证和查询。Blockchain as a Service (BaaS) platform: refers to embedding the blockchain framework into a cloud computing platform, and using the deployment and management advantages of cloud service infrastructure to provide developers with convenient and high-performance blocks Chain ecological environment and ecological supporting services, a blockchain open platform that supports developers' business expansion and operation support. The BaaS platform combines and encapsulates the blockchain technology, and modularizes it into commonly used functions such as host management, blockchain network management, channel management, smart contracts, blockchain browser management, blockchain monitoring, certificate management, and user management. When users need to perform on-chain storage and query on the blockchain, they only need to connect these functions through interfaces such as Application Programming Interface (API) and Software Development Kit (SDK), that is, You can directly use the blockchain BaaS platform for smart contract on-chain storage and query.
虚拟化BaaS平台:基于软件定义将各种类型的联盟链的Baas平台进行虚拟化管理和链的虚拟化管理,最后提供统一对外服务能力的平台。Virtualized BaaS platform: Based on software definition, the Baas platform of various types of alliance chains is virtualized and managed, and finally a platform that provides unified external service capabilities.
终端设备:是指经由通信设施向计算机输入程序和数据或接收计算机输出处理结果的设备。终端设备通常设置在能利用通信设施与远处计算机联接工作的方便场所,它主要由通信接口控制装置与专用或选定的输入输出装置组合而成。终端设备包括但不限于经由数据连接/网络和/或经由无线接口进行通信的装置,如,针对蜂窝网络、无线局域网(Wireless Local Area Network,简称WLAN)的通信装置。终端设备是具有发送、接收、输入功能的设备,具有显示器,它可以是台式电脑,也可以是笔记本电脑等其他智能终端,本申请实施例不对终端设备的具体形态进行限定,可以根据实际需求确定。Terminal equipment: refers to the equipment that inputs programs and data to the computer or receives the output processing results of the computer via communication facilities. Terminal equipment is usually set in a convenient place where communication facilities can be used to connect with a remote computer to work. It is mainly composed of a communication interface control device and a dedicated or selected input and output device. Terminal devices include, but are not limited to, devices that communicate via data connections/networks and/or via wireless interfaces, such as communication devices for cellular networks and wireless local area networks (WLAN for short). A terminal device is a device with sending, receiving, and input functions, and has a display. It can be a desktop computer or other intelligent terminals such as a notebook computer. The embodiment of this application does not limit the specific form of the terminal device, which can be determined according to actual needs. .
区块链主要划分为公有链、联盟链和私有链。其中,现有技术中存在多种异构类型的联盟链。对于每种联盟链,均设置有相应的BaaS平台,用户可通过相应的BaaS平台在该联盟链上进行智能合约上链存证和查询。即用户仅可以根据某种类型的联盟链的使用规则,通过该种联盟链对应的BaaS平台在该联盟链上进行智能合约上链存证和查询。当用户需要使用另一种类型的联盟链时,需要更换相应的BaaS平台,而且每种类型的联盟链的使用规则不相同,所以当用户更换使用另一种类型的联盟链时,需要更换联盟链的使用规则,造成了用户对联盟链的使用过程比较繁琐。Blockchain is mainly divided into public chain, alliance chain and private chain. Among them, there are multiple heterogeneous types of alliance chains in the prior art. For each consortium chain, a corresponding BaaS platform is set up, and users can use the corresponding BaaS platform to store and query smart contracts on the consortium chain. That is, users can only perform smart contract on-chain certification and query on the alliance chain through the BaaS platform corresponding to the alliance chain according to the usage rules of a certain type of alliance chain. When the user needs to use another type of consortium chain, the corresponding BaaS platform needs to be replaced, and the usage rules of each type of consortium chain are different, so when the user changes to use another type of consortium chain, it is necessary to change the consortium The use rules of the chain make the process of using the alliance chain more cumbersome for users.
针对现有技术中存在的问题,发明人在对通过区块链BaaS平台在区块链上进行智能合约上链存证和查询进行研究的过程中发现,如果存在能够与各种类型的联盟链对接从而实现对各种类型联盟链的调用的虚拟化BaaS平台,则可以解决用户在对联盟链的使用过程比较繁琐的技术问题。即通过虚拟化BaaS平台实现对多种类型的联盟链的集中管控和统一服务,无论哪个区块链符合用户的使用需求,均可通过虚拟化BaaS平台采用相同的规则与相应的区块链对接,使得用户使用联盟链的过程更加简单方便。基于上述发明构思,设计了本申请中的基于区块链的数据处理方案。In view of the problems existing in the prior art, the inventor found in the process of researching the storage and query of smart contracts on the blockchain through the blockchain BaaS platform. The virtualized BaaS platform that is connected to realize calls to various types of consortium chains can solve the cumbersome technical problems of users in the use of consortium chains. That is, the centralized control and unified service of various types of alliance chains are realized through the virtualized BaaS platform. No matter which blockchain meets the user's needs, the same rules can be used to connect with the corresponding blockchain through the virtualized BaaS platform. , making the process of using the alliance chain more simple and convenient for users. Based on the above inventive concept, the blockchain-based data processing scheme in this application is designed.
下面对本申请的基于区块链的数据处理方案进行详细的说明。The block chain-based data processing solution of the present application will be described in detail below.
图1为本申请提供的基于区块链的数据处理方法的应用场景示意图,如图1所示,该应用场景可以包括:终端设备101、虚拟化BaaS平台102、多种类型的联盟链各自对应的BaaS平台(图1示出了三个BaaS平台,分别为BaaS平台103、BaaS平台104、BaaS平台105)、至少一个区块链(图1示出了四个区块链,分别为区块链106、区块链107、区块链108、区块链109)。其中,BaaS平台103、BaaS平台104、BaaS平台105为三种不同类型的区块链对应的BaaS平台;BaaS平台103可以为星火链BaaS平台、长安链BaaS平台、超级链BaaS平台、联通链BaaS平台中的任一种,BaaS平台104可以为星火链BaaS平台、长安链BaaS平台、超级链BaaS平台、联通链BaaS平台中的任一种,BaaS平台105可以为星火链BaaS平台、长安链BaaS平台、超级链BaaS平台、联通链BaaS平台中的任一种。示例性的,BaaS平台103可以为星火链BaaS平台,BaaS平台104可以为联通链BaaS平台,BaaS平台105可以为长安链BaaS平台。其中,区块链106、区块链107可以为BaaS平台103对应的区块链,区块链108可以为BaaS平台104对应的区块链,区块链109可以为BaaS平台105对应的区块链。FIG. 1 is a schematic diagram of an application scenario of the blockchain-based data processing method provided by this application. As shown in FIG. 1 , the application scenario may include: a
示例性的,在图1所示的应用场景中,在用户想要在区块链上进行上链存证时,通过终端设备101向虚拟化BaaS平台102发送包含上链需求信息的请求消息。虚拟化BaaS平台102根据终端设备101发送的请求信息,获取与上链需求信息匹配的区块链106,进而虚拟化BaaS平台102向终端设备101发送包括第一区块链的第一标识的反馈消息。终端设备101接收虚拟化BaaS平台102发送的反馈消息后,根据用户输入的待上链信息和第一标识生成上链请求,向虚拟化BaaS平台102发送上链请求。Exemplarily, in the application scenario shown in FIG. 1 , when the user wants to store the certificate on the blockchain, the
虚拟化BaaS平台102接收终端设备101发送的上链请求,基于第一标识确定区块链106对应的BaaS平台103。虚拟化BaaS平台103将上链请求转发至BaaS平台103。The
BaaS平台103接收虚拟化BaaS平台102转发的上链请求,执行上链操作,即执行将待上链信息写入至区块链106的操作。The
基于上述过程,用户有任何上链需求时,均可通过终端设备直接向虚拟化BaaS平台发送包括上链需求信息的请求信息,虚拟化BaaS平台获取到与上链需求信息匹配的目标区块链后,终端设备向虚拟化BaaS平台发送包括目标区块链的上链请求,以完成上链操作。也就是说,用户使用任何类型的联盟链,均与虚拟化BaaS平台对接,无需更换BaaS平台;且由于用户使用任何类型的联盟链均与虚拟化BaaS平台对接,因此用户使用任何类型的联盟链,均采用的是相同的规则,从而使得用户使用联盟链的过程更加简单方便,提高了用户的使用体验。Based on the above process, when the user has any demand on the chain, he can directly send the request information including the demand information to the virtualized BaaS platform through the terminal device, and the virtualized BaaS platform can obtain the target blockchain that matches the demand information of the chain. Afterwards, the terminal device sends an on-chain request including the target blockchain to the virtualized BaaS platform to complete the on-chain operation. That is to say, any type of alliance chain used by the user is connected to the virtualized BaaS platform, and there is no need to replace the BaaS platform; and because the user uses any type of alliance chain to connect with the virtualized BaaS platform, the user can use any type of alliance chain. , all adopt the same rules, which makes the process of using the alliance chain simpler and more convenient for users and improves the user experience.
需要说明的是,图1仅是本申请实施例提供的一种应用场景的示意图,本申请实施例不对图1中包括的各种设备的实际形态进行限定,也不对图1中设备之间的交互方式进行限定,在方案的具体应用中,可以根据实际需求设定。It should be noted that FIG. 1 is only a schematic diagram of an application scenario provided by the embodiment of the present application, and the embodiment of the present application does not limit the actual forms of the various devices included in FIG. The interaction mode is limited, and in the specific application of the scheme, it can be set according to actual needs.
下面,通过具体实施例对本申请的技术方案进行详细说明。需要说明的是,下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。Hereinafter, the technical solutions of the present application will be described in detail through specific embodiments. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
图2为本申请提供的基于区块链的数据处理方法实施例一的交互示意图。参见图2,该基于区块链的数据处理方法具体包括以下步骤:FIG. 2 is an interactive schematic diagram of Embodiment 1 of the blockchain-based data processing method provided by the present application. Referring to Figure 2, the blockchain-based data processing method specifically includes the following steps:
步骤S201:终端设备接收用户输入的上链需求信息。Step S201: The terminal device receives the uplink requirement information input by the user.
当用户需要在区块链上进行上链存证时,用户在终端设备上输入上链需求信息,终端设备根据用户输入的上链需求信息生成请求消息。When the user needs to store the certificate on the blockchain, the user enters the on-chain demand information on the terminal device, and the terminal device generates a request message according to the on-chain demand information input by the user.
在一种具体实施方式中,终端设备显示有可视化界面,可视化界面中显示多个可选择的参数信息,多个可选择的参数信息属于参数信息集中的参数信息。参数信息集中的参数信息可以划分为不同类别,举例来说,区块交易笔数和区块所需容量可以为一类参数信息,区块链的共识节点数量和共识策略可以为一类参数信息。用户根据上链需求确定所需的参数,终端设备根据用户选择的参数信息可得到上链需求信息。其中,多个可选择的参数信息可包括如下中的至少两项:In a specific implementation manner, the terminal device displays a visual interface, and the visual interface displays multiple selectable parameter information, and the multiple selectable parameter information belongs to the parameter information in the parameter information set. The parameter information in the parameter information set can be divided into different categories. For example, the number of block transactions and the required capacity of the block can be one type of parameter information, and the number of consensus nodes and the consensus strategy of the blockchain can be one type of parameter information. . The user determines the required parameters according to the on-chain demand, and the terminal device can obtain the on-chain demand information according to the parameter information selected by the user. Wherein, the multiple optional parameter information may include at least two of the following:
密码算法:区块链网络密码算法,可以是标准版,还可以是国密版;Cryptographic algorithm: The blockchain network cryptographic algorithm can be the standard version or the national secret version;
共识策略:可以是RAFT策略,还可以是solo策略;其中,RAFT的英文全称为Replicated And Fault Tolerant。Consensus strategy: It can be a RAFT strategy or a solo strategy; among them, the full English name of RAFT is Replicated And Fault Tolerant.
区块链的共识节点数量:默认是3,还可以是5,本申请实施例不对共识节点数量进行具体限定,可根据实际情况进行选择;The number of consensus nodes in the blockchain: the default is 3, and it can also be 5. The embodiment of this application does not specifically limit the number of consensus nodes, and can be selected according to the actual situation;
区块链的账本存储方式:可以是CouchDB,还可以是LevelDB。其中,CouchDB的英文全称为Cluster of unreliable commodity hardware Data Base,LevelDB的英文全称为Level Data Base;The ledger storage method of the blockchain: it can be CouchDB or LevelDB. Among them, the English full name of CouchDB is Cluster of unreliable commodity hardware Data Base, and the English full name of LevelDB is Level Data Base;
区块链的节点数量:业务组织下对应节点(peer)数量,可以是3,还可以是5,本申请实施例不对节点数量进行具体限定,可根据实际情况进行选择。The number of nodes of the blockchain: the number of corresponding nodes (peers) under the business organization, which can be 3 or 5. The embodiment of this application does not specifically limit the number of nodes, and can be selected according to the actual situation.
支持版本:区块链支持的分布式账本平台版本;Supported version: The distributed ledger platform version supported by the blockchain;
部署集群:可以是已有集群中的一种,还可以是新建集群;Deployment cluster: It can be one of the existing clusters, or it can be a new cluster;
上链过程是否启用安全传输协议(Transport Layer Security,简称TLS);Whether to enable Transport Layer Security (TLS) in the chaining process;
上链过程是否启用数字证书认证系统(Certification Authority,简称CA);Whether the digital certificate authentication system (Certification Authority, CA) is enabled in the chain process;
区块产生时间:可以是2s,还可以是4s,本申请实施例不对区块产生时间进行具体限定,可根据实际情况进行选择;Block generation time: it can be 2s or 4s. The embodiment of this application does not specifically limit the block generation time, and can be selected according to the actual situation;
区块交易笔数:区块可以存证的交易笔数的最大值,可以是100,还可以是200,本申请实施例不对区块交易笔数进行具体限定,可根据实际情况进行选择;Number of block transactions: the maximum number of transactions that can be stored in a block, which can be 100 or 200. The embodiment of this application does not specifically limit the number of block transactions, and can be selected according to the actual situation;
区块所需容量:区块可以存证交易的最大容量,区块交易笔数和区块所需容量相关,示例性的,一笔交易约250字节,1M可容纳4000笔交易。区块所需容量可以是99MB,还可以是50MB,本申请实施例不对区块所需容量进行具体限定,可根据实际情况进行选择。Required capacity of a block: The maximum capacity of transactions that can be stored in a block. The number of transactions in a block is related to the required capacity of a block. For example, a transaction is about 250 bytes, and 1M can hold 4000 transactions. The required capacity of a block may be 99MB or 50MB, and the embodiment of the present application does not specifically limit the required capacity of a block, and can be selected according to actual conditions.
可选的,可视化界面中还可包含“完成”图标,当用户选择完毕所需的参数后,点击“完成”图标。终端设备根据用户选择的参数信息得到上链需求信息,以及基于上链需求信息生成请求消息。Optionally, the visual interface may further include a "complete" icon. After the user selects the required parameters, the "complete" icon is clicked. The terminal device obtains the uplink demand information according to the parameter information selected by the user, and generates a request message based on the uplink demand information.
在另一种具体实施方式中,终端设备设置有物理按键。当用户选择完毕所需的参数后,操作该物理按键。终端设备根据用户选择的参数信息得到上链需求信息,以及基于上链需求信息生成请求消息。对该物理键的操作可以为长按该物理按键达到预设时长,也可以为点击该物理按键,也可以为点击该物理按键达到预设次数。In another specific implementation, the terminal device is provided with physical keys. After the user selects the required parameters, the physical button is operated. The terminal device obtains the uplink demand information according to the parameter information selected by the user, and generates a request message based on the uplink demand information. The operation on the physical key may be long-pressing the physical key for a preset duration, or clicking the physical key, or clicking the physical key for a preset number of times.
步骤S202:终端设备向虚拟化BaaS平台发送请求消息,其中,请求消息包括用户的上链需求信息;虚拟化BaaS平台与多种类型的联盟链的多个BaaS平台通信连接。Step S202: The terminal device sends a request message to the virtualized BaaS platform, wherein the request message includes the user's uplink demand information; the virtualized BaaS platform communicates with multiple BaaS platforms of various types of consortium chains.
终端设备根据用户输入的上链需求信息生成请求消息后,终端设备向虚拟化BaaS平台发送包括用户的上链需求信息的请求消息。可选的,终端设备可通过API和SDK等接口将请求消息发送至虚拟化BaaS平台。其中,请求消息中包含用户的上链需求信息。After the terminal device generates the request message according to the uplink requirement information input by the user, the terminal device sends the request message including the user's uplink requirement information to the virtualized BaaS platform. Optionally, the terminal device can send the request message to the virtualized BaaS platform through interfaces such as API and SDK. Among them, the request message contains the user's on-chain demand information.
虚拟化BaaS平台与多种类型的联盟链各自对应的BaaS平台可通过接口通信连接,即虚拟化BaaS平台与多个BaaS平台通信连接。其中,每种类型的联盟链下可包括至少一个区块链。The virtualized BaaS platform and the corresponding BaaS platforms of various types of alliance chains can be connected through interface communication, that is, the virtualized BaaS platform is connected to multiple BaaS platforms through communication. Among them, each type of consortium chain may include at least one blockchain.
可选的,多种类型的联盟链包括但不限于如下联盟链中的至少两项:星火链、联通链、长安链、超级链。比如,图1中的区块链106、区块链108、区块链109可以为星火链、联通链、长安链、超级链中的三种不同类型的区块链。区块链107可以为和区块链106相同类型的区块链。Optionally, multiple types of consortium chains include, but are not limited to, at least two of the following consortium chains: Spark Chain, Unicom Chain, Changan Chain, and Super Chain. For example, the
步骤S203:虚拟化BaaS平台获取与上链需求信息匹配的第一区块链。Step S203: The virtualized BaaS platform obtains the first blockchain matching the on-chain requirement information.
终端设备向虚拟化BaaS平台发送包括上链需求信息的请求消息后,虚拟化BaaS平台接收终端设备发送的包括上链需求信息的请求消息。虚拟化BaaS平台根据该包含上链需求信息的请求消息获取与上链需求信息匹配的第一区块链。After the terminal device sends the request message including the uplink requirement information to the virtualized BaaS platform, the virtualized BaaS platform receives the request message including the uplink requirement information sent by the terminal device. The virtualized BaaS platform obtains the first blockchain matching the on-chain requirement information according to the request message including the on-chain requirement information.
在一种实现中,第一区块链为上述多个BaaS平台所对应的多种类型的联盟链中的一个区块链。In one implementation, the first blockchain is one blockchain among multiple types of consortium chains corresponding to the above-mentioned multiple BaaS platforms.
在另一种实现中,上述多个BaaS平台所对应的多种类型的联盟链中不存在与上链需求信息匹配的区块链,此时第一区块链为根据上链需求信息搭建的与上链需求信息匹配的区块链。In another implementation, there is no blockchain matching the on-chain demand information in the various types of consortium chains corresponding to the above-mentioned multiple BaaS platforms, and the first blockchain is constructed according to the on-chain demand information at this time. The blockchain that matches the on-chain demand information.
步骤S204:虚拟化BaaS平台向终端设备发送反馈消息,反馈消息包括第一区块链的第一标识。Step S204: The virtualized BaaS platform sends a feedback message to the terminal device, where the feedback message includes the first identifier of the first blockchain.
虚拟化BaaS平台获取与上链需求信息匹配的第一区块链后,可通过接口向终端设备发送反馈消息,反馈消息包括第一区块链的第一标识。After the virtualized BaaS platform obtains the first blockchain that matches the on-chain demand information, it can send a feedback message to the terminal device through the interface, where the feedback message includes the first identifier of the first blockchain.
可选的,第一标识为第一区块链的唯一ID。Optionally, the first identifier is the unique ID of the first blockchain.
需要说明的是,本申请实施例不对第一标识进行具体限定,可根据实际情况进行选择。It should be noted that, the embodiment of the present application does not specifically limit the first identifier, and can be selected according to the actual situation.
可选的,在步骤S202中终端设备向虚拟化BaaS平台发送的请求消息还可包括用于指示第二区块链的指示信息,其中,第二区块链可以为用户指定的其希望使用的区块链,则在虚拟化BaaS平台获取与上链需求信息匹配的第一区块链之后、向终端设备发送反馈消息之前,虚拟化BaaS平台根据指示信息,确定第二区块链与第一区块链是否相同。Optionally, in step S202, the request message sent by the terminal device to the virtualized BaaS platform may further include indication information for indicating the second blockchain, where the second blockchain may be specified by the user and desired to be used. blockchain, after the virtualized BaaS platform obtains the first blockchain that matches the on-chain demand information and before sending the feedback message to the terminal device, the virtualized BaaS platform determines the second blockchain and the first blockchain according to the instruction information. Is the blockchain the same.
当第二区块链与第一区块链相同时,相应地,反馈消息还包括第一提醒信息,第一提醒信息用于向用户提醒第二区块链与第一区块链相同。When the second blockchain is the same as the first blockchain, correspondingly, the feedback message further includes first reminder information, and the first reminder information is used to remind the user that the second blockchain is the same as the first blockchain.
可选的,当第二区块链与第一区块链不相同时,相应地,反馈消息还包括第二提醒信息,第二提醒信息用于向用户建议使用第一区块链进行上链操作。可选的,第二提醒信息还用于向用户提醒第二区块链与第一区块链不相同。Optionally, when the second blockchain is not the same as the first blockchain, correspondingly, the feedback message further includes second reminder information, and the second reminder information is used to suggest to the user to use the first blockchain to upload the blockchain. operate. Optionally, the second reminder information is further used to remind the user that the second blockchain is different from the first blockchain.
其中,当用户指定区块链时,请求消息中还包括用于指示第二区块链的指示信息。虚拟化BaaS平台根据请求消息中包含的指示信息确定用户指示的第二区块链与虚拟化BaaS平台获取的与上链需求信息匹配的第一区块链是否相同。本实施例可以使得用户获知其希望使用的区块链与虚拟化BaaS平台获取的与上链需求信息匹配的第一区块链是否一致,在充分考虑用户需求的同时,确保用户选择所使用的区块链的准确性。Wherein, when the user specifies the blockchain, the request message further includes indication information for indicating the second blockchain. The virtualized BaaS platform determines, according to the indication information contained in the request message, whether the second blockchain indicated by the user is the same as the first blockchain obtained by the virtualized BaaS platform that matches the on-chain requirement information. This embodiment allows users to know whether the blockchain they want to use is consistent with the first blockchain obtained by the virtualized BaaS platform that matches the on-chain demand information. The accuracy of the blockchain.
步骤S205:终端设备向虚拟化BaaS平台发送上链请求,上链请求包括第一标识和待上链信息。Step S205: The terminal device sends an on-chain request to the virtualized BaaS platform, where the on-chain request includes the first identifier and the information to be linked.
当用户需要在区块链上进行上链存证时,用户通过终端设备向虚拟化BaaS平台发送上链请求,上链请求包括第一标识和待上链信息。可选的,待上链信息包括上链数据和上链数据对应的第二标识。When the user needs to store the certificate on the blockchain, the user sends an on-chain request to the virtualized BaaS platform through the terminal device, and the on-chain request includes the first identifier and the information to be on-chain. Optionally, the information to be uploaded includes the on-chain data and the second identifier corresponding to the on-chain data.
举例来说,当需要将视频信息进行上链存证时,待上链信息中的上链数据可以包括视频数据、视频拍摄时间、拍摄视频的设备名称等。当需要将一个合同进行上链存证时,待上链信息中的上链数据可以包括该合同的哈希值。For example, when the video information needs to be uploaded to the chain for certification, the up-chain data in the information to be uploaded may include the video data, the video shooting time, the name of the device that captured the video, and so on. When a contract needs to be put on the chain for certification, the on-chain data in the information to be put on the chain can include the hash value of the contract.
步骤S206:虚拟化BaaS平台向第一区块链的第一BaaS平台发送上链请求,以使待上链信息写入第一区块链。Step S206: The virtualized BaaS platform sends an on-chain request to the first BaaS platform of the first blockchain, so that the information to be on-chain is written into the first blockchain.
虚拟化BaaS平台接收终端设备发送的上链请求,虚拟化BaaS平台根据上链请求中的第一标识确定与上链需求信息匹配的第一区块链,虚拟化BaaS平台存储有BaaS平台与区块链的对应关系。虚拟化BaaS平台根据该对应关系确定与第一区块链对应的BaaS平台,从而虚拟化BaaS平台确定第一区块链的第一BaaS平台。虚拟化BaaS平台向第一区块链的第一BaaS平台发送来自终端设备的上链请求,以使待上链信息写入第一区块链。The virtualized BaaS platform receives the on-chain request sent by the terminal device, the virtualized BaaS platform determines the first blockchain that matches the on-chain demand information according to the first identifier in the on-chain request, and the virtualized BaaS platform stores the BaaS platform and the blockchain. Correspondence to the blockchain. The virtualized BaaS platform determines the BaaS platform corresponding to the first blockchain according to the corresponding relationship, so that the virtualized BaaS platform determines the first BaaS platform of the first blockchain. The virtualized BaaS platform sends an on-chain request from the terminal device to the first BaaS platform of the first blockchain, so that the information to be on-chain is written into the first blockchain.
本实施例提供的基于区块链的数据处理方法,通过如下步骤执行,终端设备接收用户输入的上链需求信息后,向虚拟化BaaS平台发送包括用户的上链需求信息的请求消息。虚拟化BaaS平台根据请求消息获取与上链需求信息匹配的第一区块链,虚拟化BaaS平台向终端设备发送包括第一区块链的第一标识的反馈消息。终端设备向虚拟化BaaS平台发送包括第一标识和待上链信息的上链请求,虚拟化BaaS平台向第一区块链的第一BaaS平台发送上链请求,以使待上链信息写入第一区块链。相较于现有技术,本实施例中用户有任何上链需求时,均可通过终端设备直接向虚拟化BaaS平台发送包括上链需求信息的请求信息,以使虚拟化BaaS平台获取到与上链需求信息匹配的区块链;终端设备向虚拟化BaaS平台发送包括该区块链的标识的上链请求,以使该区块链的BaaS平台完成上链操作。也就是说,用户使用任何类型的联盟链,均与虚拟化BaaS平台对接,无需更换BaaS平台;且由于用户使用任何类型的联盟链均与虚拟化BaaS平台对接,因此用户使用任何类型的联盟链,均采用的是相同的规则,从而使得用户使用联盟链的简单方便,提高了用户的使用体验。The blockchain-based data processing method provided by this embodiment is performed through the following steps: after receiving the uplink demand information input by the user, the terminal device sends a request message including the user's uplink demand information to the virtualized BaaS platform. The virtualized BaaS platform acquires the first blockchain matching the on-chain requirement information according to the request message, and the virtualized BaaS platform sends a feedback message including the first identifier of the first blockchain to the terminal device. The terminal device sends an on-chain request including the first identifier and the information to be on-chain to the virtualized BaaS platform, and the virtualized BaaS platform sends the on-chain request to the first BaaS platform of the first blockchain, so that the on-chain information is written The first blockchain. Compared with the prior art, in this embodiment, when the user has any demand for linking, the terminal device can directly send the request information including the linking demand information to the virtualized BaaS platform, so that the virtualized BaaS platform can obtain and upload the link. The blockchain that matches the chain demand information; the terminal device sends an on-chain request including the identifier of the blockchain to the virtualized BaaS platform, so that the BaaS platform of the blockchain completes the on-chain operation. That is to say, any type of alliance chain used by the user is connected to the virtualized BaaS platform, and there is no need to replace the BaaS platform; and since the user uses any type of alliance chain to connect with the virtualized BaaS platform, the user uses any type of alliance chain. , all adopt the same rules, which makes it simple and convenient for users to use the alliance chain and improves the user experience.
下面采用图3所示的实施例对实施一中的步骤S203“虚拟化BaaS平台获取与上链需求信息匹配的第一区块链”的一种实现方式进行详细的说明。The following uses the embodiment shown in FIG. 3 to describe in detail an implementation manner of step S203 "the virtualized BaaS platform obtains the first blockchain matching the on-chain demand information" in the first implementation.
图3为本申请提供的基于区块链的数据处理方法实施例二的流程示意图;3 is a schematic flowchart of Embodiment 2 of the blockchain-based data processing method provided by the present application;
步骤S301:虚拟化BaaS平台获取请求消息中的上链需求信息。Step S301: The virtualized BaaS platform acquires the uplink requirement information in the request message.
虚拟化BaaS平台接收到请求消息后,获取该请求消息中的上链需求信息。After receiving the request message, the virtualized BaaS platform obtains the uplink requirement information in the request message.
步骤S302:虚拟化BaaS平台根据上链需求信息,通过匹配模型获取与上链需求信息匹配的第一区块链。Step S302: The virtualized BaaS platform obtains a first blockchain matching the on-chain demand information through a matching model according to the on-chain demand information.
在第一区块链为上述多个BaaS平台所对应的多种类型的联盟链中的一个区块链时,虚拟化BaaS平台根据上链需求信息,通过匹配模型从多个BaaS平台所对应的多种类型的联盟链中的多个区块链中,获取与上链需求信息匹配的第一区块链。When the first blockchain is one of the various types of consortium chains corresponding to the above-mentioned multiple BaaS platforms, the virtualized BaaS platform, according to the on-chain demand information, uses the matching model from the corresponding blockchains of the multiple BaaS platforms. From multiple blockchains in multiple types of consortium chains, obtain the first blockchain that matches the on-chain demand information.
在第一区块链为根据上链需求信息搭建的与上链需求信息匹配的区块链时,虚拟化BaaS平台根据上链需求信息,通过匹配模型获取与上链需求信息匹配的第一区块链,包括:When the first blockchain is a blockchain built according to the on-chain demand information that matches the on-chain demand information, the virtualized BaaS platform obtains the first area that matches the on-chain demand information through the matching model according to the on-chain demand information. Blockchain, including:
虚拟化BaaS平台根据上链需求信息和匹配模型,确定多种类型的联盟链中不存在与上链需求信息匹配的区块链;According to the on-chain demand information and matching model, the virtualized BaaS platform determines that there is no blockchain matching the on-chain demand information in various types of alliance chains;
虚拟化BaaS平台根据上链需求信息搭建与上链需求信息匹配的第一区块链;The virtualized BaaS platform builds the first blockchain matching the on-chain demand information according to the on-chain demand information;
虚拟化BaaS平台建立虚拟化BaaS平台与第一BaaS平台的通信连接,第一BaaS平台为第一区块链的BaaS平台。The virtualized BaaS platform establishes a communication connection between the virtualized BaaS platform and the first BaaS platform, and the first BaaS platform is the BaaS platform of the first blockchain.
若与虚拟化BaaS平台建立通信连接的第一BaaS平台中不存在与第一区块链通信连接的第一BaaS平台,则还包括:If there is no first BaaS platform communicatively connected to the first blockchain in the first BaaS platform that establishes a communication connection with the virtualized BaaS platform, it further includes:
虚拟化BaaS平台搭建与第一区块链通信连接的第一BaaS平台。The virtualized BaaS platform builds the first BaaS platform that communicates with the first blockchain.
具体来说,在一种实施方式中,本实施例中虚拟化BaaS平台获取到上链需求信息后,将上链需求信息转化成多维向量,该多维向量为匹配模型的输入向量;将该多维向量输入至该匹配模型,根据该匹配模型的输出确定第一区块链。Specifically, in one embodiment, after the virtualized BaaS platform obtains the uplink demand information in this embodiment, it converts the uplink demand information into a multi-dimensional vector, and the multi-dimensional vector is the input vector of the matching model; the multi-dimensional vector is the input vector of the matching model; The vector is input to the matching model, and the first blockchain is determined according to the output of the matching model.
可选的,虚拟化BaaS平台利用TextRank算法将上链需求信息转化成多维向量,具体可包括:Optionally, the virtualized BaaS platform uses the TextRank algorithm to convert the on-chain demand information into multi-dimensional vectors, which may include:
a1、虚拟化BaaS平台对上链需求信息包括的每项信息进行分词、词标注,剔除无用的词保留关键的词,提取出上链需求信息的关键词集合;其中,用户基于终端设备选择的每类参数信息对应上链需求信息中的一项信息。a1. The virtualized BaaS platform performs word segmentation and word tagging on each piece of information included in the on-chain demand information, removes useless words and retains key words, and extracts a set of keywords for the on-chain demand information; Each type of parameter information corresponds to a piece of information in the chain requirement information.
举例来说,区块交易笔数和区块所需容量可以为一类参数信息,区块链的共识节点数量和共识策略可以为一类参数信息。For example, the number of block transactions and the required capacity of the block can be a type of parameter information, and the number of consensus nodes and consensus strategies of the blockchain can be a type of parameter information.
a2、虚拟化BaaS平台基于每项信息对应的关键词,将关键词集合进行矩阵转换,得到关键词矩阵。a2. Based on the keywords corresponding to each item of information, the virtualized BaaS platform performs matrix conversion on the keyword set to obtain a keyword matrix.
可选的,关键词矩阵的每列对应一项信息的关键词。Optionally, each column of the keyword matrix corresponds to a keyword of an item of information.
a3、基于关键词矩阵,构建多维向量。a3. Based on the keyword matrix, construct a multi-dimensional vector.
其中,多维向量的每一维向量为上链需求信息中的一项信息所对应的向量。Wherein, each dimension vector of the multi-dimensional vector is a vector corresponding to an item of information in the uplink demand information.
可选的,匹配模型可以为预先训练的神经网络模型,比如反向传播神经网络模型,深度神经网络模型,双向神经网络模型。此时,将该多维向量输入至该匹配模型,根据该匹配模型的输出确定第一区块链的一种具体实现可如下:Optionally, the matching model may be a pre-trained neural network model, such as a back-propagation neural network model, a deep neural network model, and a bidirectional neural network model. At this time, the multi-dimensional vector is input into the matching model, and a specific implementation of determining the first blockchain according to the output of the matching model may be as follows:
将多维向量输入神经网络模型其中,激活函数wi为权重值,θ为阈值,xi代表输入值,y为输出结果。虚拟化BaaS平台中存储y与区块链的匹配关系,根据输出结果y可确定匹配的区块链,或者根据输出结果y可确定未匹配到区块链。Feed a multidimensional vector into a neural network model Among them, the activation function w i is the weight value, θ is the threshold, xi is the input value, and y is the output result. The virtualized BaaS platform stores the matching relationship between y and the blockchain, and the matching blockchain can be determined according to the output result y, or the unmatched blockchain can be determined according to the output result y.
下面对匹配模型的一种训练方法进行说明。A training method of the matching model is described below.
在一种实施方式中,获取匹配模型包括:In one embodiment, obtaining a matching model includes:
b1、获取多个训练样本,每个训练样本包括上链需求信息以及标签。b1. Acquire multiple training samples, each training sample includes on-chain requirement information and labels.
其中,每个训练样本包括的上链需求信息并不相同。每个训练样本包括的上链需求信息可以是用户基于参数信息集得到的。训练样本的标签用于指示与该训练样本包括的上链需求信息匹配的区块链。可选的,该标签可为一向量。Among them, each training sample includes different on-chain demand information. The uplink requirement information included in each training sample may be obtained by the user based on the parameter information set. The label of the training sample is used to indicate the blockchain that matches the on-chain requirement information included in the training sample. Optionally, the label can be a vector.
b2、确定初始化神经网络模型,根据初始化神经网络模型和多个训练样本进行训练,得到匹配模型。b2. Determine the initialized neural network model, and perform training according to the initialized neural network model and multiple training samples to obtain a matching model.
对于每个训练样本,采用上述根据请求消息获取多维向量的方法,获取该训练样本对应的多维向量,将该多维向量输入当前得到的中间状态的匹配模型,得到一实际输出,根据实际输出、标签(也就是期望输出)以及损失函数,计算期望输出与实际输出的误差。如果误差大则采用梯度下降法调整当前得到的中间状态的匹配模型,得到新的中间状态的匹配模型,直到误差低于预设阈值为止,最终得到匹配模型。其中,预设阈值为用户设置的。本申请实施例不对预设阈值进行具体限定,可根据实际情况进行限定。For each training sample, the above method of obtaining a multi-dimensional vector according to the request message is used to obtain the multi-dimensional vector corresponding to the training sample, and the multi-dimensional vector is input into the matching model of the currently obtained intermediate state to obtain an actual output. (that is, the expected output) and the loss function to calculate the error between the expected output and the actual output. If the error is large, the gradient descent method is used to adjust the currently obtained matching model of the intermediate state, and a new matching model of the intermediate state is obtained until the error is lower than the preset threshold, and finally the matching model is obtained. The preset threshold is set by the user. This embodiment of the present application does not specifically limit the preset threshold, which may be limited according to the actual situation.
可选的,匹配模型的隐藏层神经元个数c为输入层神经元个数,d为输出层神经元个数,a为[1,10]之间的常数。Optionally, the number of hidden layer neurons to match the model c is the number of neurons in the input layer, d is the number of neurons in the output layer, and a is a constant between [1, 10].
本实施例提供的基于区块链的数据处理方法,虚拟化BaaS平台根据请求消息中的上链需求信息和匹配模型,确定第一区块链,确定第一区块链的效率和准确率均较高。In the blockchain-based data processing method provided in this embodiment, the virtualized BaaS platform determines the first blockchain according to the on-chain requirement information and matching model in the request message, and determines that the efficiency and accuracy of the first blockchain are equal. higher.
下面采用图4所示的实施例对实施一中的步骤S203“虚拟化BaaS平台获取与上链需求信息匹配的第一区块链”的另一种实现方式进行详细的说明。The following uses the embodiment shown in FIG. 4 to describe in detail another implementation manner of step S203 "the virtualized BaaS platform obtains the first blockchain matching the on-chain demand information" in the first implementation.
图4为本申请提供的基于区块链的数据处理方法实施例三的流程示意图;4 is a schematic flowchart of Embodiment 3 of the blockchain-based data processing method provided by the present application;
步骤S401、虚拟化BaaS平台获取请求消息中的上链需求信息。Step S401, the virtualized BaaS platform obtains the uplink requirement information in the request message.
虚拟化BaaS平台接收到请求消息后,获取该请求消息中的上链需求信息。After receiving the request message, the virtualized BaaS platform obtains the uplink requirement information in the request message.
步骤S402、虚拟化BaaS平台根据该上链需求信息和对应关系,获取与该上链需求信息匹配的第一区块链;对应关系包括多个预设上链需求信息以及每个预设上链需求信息所对应的区块链。Step S402, the virtualized BaaS platform obtains a first blockchain matching the on-chain demand information according to the on-chain demand information and the corresponding relationship; the corresponding relationship includes a plurality of preset on-chain demand information and each preset on-chain demand information The blockchain corresponding to the demand information.
在第一区块链为上述多个BaaS平台所对应的多种类型的联盟链中的一个区块链时,虚拟化BaaS平台根据该上链需求信息和对应关系获取与该上链需求信息对应的第一区块链,包括:虚拟化BaaS平台获取该对应关系中指示的该上链需求信息对应的目标区块链,确定目标区块链为上述多个BaaS平台所对应的多种类型的联盟链中的一个区块链,将目标区块链作为第一区块链。When the first blockchain is one of the multiple types of consortium chains corresponding to the above-mentioned multiple BaaS platforms, the virtualized BaaS platform obtains the corresponding linking demand information according to the linking demand information and the corresponding relationship The first blockchain includes: the virtualized BaaS platform obtains the target blockchain corresponding to the on-chain demand information indicated in the corresponding relationship, and determines that the target blockchain is a variety of types corresponding to the above-mentioned multiple BaaS platforms A blockchain in the alliance chain, with the target blockchain as the first blockchain.
在第一区块链为根据该上链需求信息搭建的与上链需求信息匹配的区块链时,虚拟化BaaS平台根据该上链需求信息和对应关系,获取与该上链需求信息匹配的第一区块链,包括:When the first blockchain is a blockchain built according to the on-chain demand information and matched with the on-chain demand information, the virtualized BaaS platform obtains the blockchain matching the on-chain demand information according to the on-chain demand information and the corresponding relationship. The first blockchain, including:
虚拟化BaaS平台根据上链需求信息和该对应关系,确定多种类型的联盟链中不存在与上链需求信息匹配的区块链;According to the on-chain demand information and the corresponding relationship, the virtualized BaaS platform determines that there is no blockchain matching the on-chain demand information in various types of alliance chains;
虚拟化BaaS平台根据上链需求信息搭建与上链需求信息匹配的第一区块链;The virtualized BaaS platform builds the first blockchain matching the on-chain demand information according to the on-chain demand information;
虚拟化BaaS平台建立虚拟化BaaS平台与第一BaaS平台的通信连接,第一BaaS平台为第一区块链的BaaS平台。The virtualized BaaS platform establishes a communication connection between the virtualized BaaS platform and the first BaaS platform, and the first BaaS platform is the BaaS platform of the first blockchain.
本实施例提供的基于区块链的数据处理方法,虚拟化BaaS平台根据预设上链需求信息与区块链的对应关系获取与该上链需求信息对应的第一区块链,进一步提高了确定第一区块链的准确率。In the blockchain-based data processing method provided in this embodiment, the virtualized BaaS platform obtains the first blockchain corresponding to the upstream demand information according to the preset corresponding relationship between the upstream demand information and the blockchain, which further improves the Determine the accuracy of the first blockchain.
图5为本申请提供的基于区块链的数据处理方法实施例四的交互示意图。参见图5,在步骤S206“虚拟化BaaS平台向第一区块链的第一BaaS平台发送上链请求,以使第一BaaS平台执行上链操作,以将待上链信息写入第一区块链”后,该基于区块链的数据处理方法还包括以下步骤:FIG. 5 is an interactive schematic diagram of Embodiment 4 of the blockchain-based data processing method provided by the present application. Referring to Fig. 5, in step S206 "the virtualized BaaS platform sends an on-chain request to the first BaaS platform of the first blockchain, so that the first BaaS platform performs the on-chain operation to write the information to be on-chain into the first area. After “blockchain”, the blockchain-based data processing method also includes the following steps:
步骤S501:终端设备接收用户输入的查询信息。Step S501: The terminal device receives the query information input by the user.
当用户需要查询上链操作的上链数据时,用户在终端设备上输入查询信息。查询信息可包括第一区块链的第一标识,以及上链数据对应的第二标识。When the user needs to query the on-chain data of the on-chain operation, the user enters the query information on the terminal device. The query information may include the first identifier of the first blockchain and the second identifier corresponding to the data on the chain.
步骤S502:终端设备向虚拟化BaaS平台发送查询请求。Step S502: The terminal device sends a query request to the virtualized BaaS platform.
在上述步骤中,当用户需要查询上链操作的上链数据时,用户在终端设备上输入查询信息,终端设备根据用户输入的查询信息生成查询请求。查询请求包括上述查询信息,查询请求用于请求查询上链操作的上链数据。终端设备将生成的查询请求发送至虚拟化BaaS平台。In the above steps, when the user needs to query the on-chain data of the on-chain operation, the user inputs query information on the terminal device, and the terminal device generates a query request according to the query information input by the user. The query request includes the above-mentioned query information, and the query request is used to request to query the on-chain data of the on-chain operation. The terminal device sends the generated query request to the virtualized BaaS platform.
步骤S503:虚拟化BaaS平台根据查询请求,确定第一区块链的第一BaaS平台。Step S503: The virtualized BaaS platform determines the first BaaS platform of the first blockchain according to the query request.
虚拟化BaaS平台接收到查询请求后,虚拟化BaaS平台根据查询请求中的第一区块链的第一标识确定第一区块链,根据BaaS平台与区块链的对应关系确定第一BaaS平台。After the virtualized BaaS platform receives the query request, the virtualized BaaS platform determines the first blockchain according to the first identifier of the first blockchain in the query request, and determines the first BaaS platform according to the corresponding relationship between the BaaS platform and the blockchain .
步骤504:虚拟化BaaS平台向第一区块链的第一BaaS平台发送查询请求。Step 504: The virtualized BaaS platform sends a query request to the first BaaS platform of the first blockchain.
虚拟化BaaS平台确定第一区块链的第一BaaS平台后,虚拟化BaaS平台向第一区块链的第一BaaS平台发送查询请求。After the virtualized BaaS platform determines the first BaaS platform of the first blockchain, the virtualized BaaS platform sends a query request to the first BaaS platform of the first blockchain.
步骤S505:第一BaaS平台根据查询请求获取查询的上链数据。Step S505: The first BaaS platform obtains the queried uplink data according to the query request.
第一BaaS平台接收查询请求,以实现获取第一区块链上存储的第二标识所对应的上链数据。The first BaaS platform receives the query request, so as to obtain the on-chain data corresponding to the second identifier stored on the first blockchain.
步骤S506:第一BaaS平台向虚拟化BaaS平台发送查询到的上链数据。Step S506: The first BaaS platform sends the queried on-chain data to the virtualized BaaS platform.
第一BaaS平台根据查询请求获取查询的上链数据后,向虚拟化BaaS平台发送查询到的上链数据。After obtaining the queried on-chain data according to the query request, the first BaaS platform sends the queried on-chain data to the virtualized BaaS platform.
步骤S507:虚拟化BaaS平台向终端设备发送查询到的上链数据。Step S507: The virtualized BaaS platform sends the queried uplink data to the terminal device.
在上述步骤中,第一BaaS平台向虚拟化BaaS平台发送上链操作的上链数据后,虚拟化BaaS平台接收,进而可通过接口发送至终端设备,用户即可在终端设备上进行查看上链数据。In the above steps, after the first BaaS platform sends the on-chain data of the on-chain operation to the virtualized BaaS platform, the virtualized BaaS platform receives it, and then sends it to the terminal device through the interface, and the user can view the on-chain data on the terminal device. data.
本实施例提供的基于区块链的数据处理方法,终端设备接收用户输入的查询信息,终端设备向虚拟化BaaS平台发送查询请求。虚拟化BaaS平台根据查询请求,确定第一区块链的第一BaaS平台,虚拟化BaaS平台向第一区块链的第一BaaS平台发送查询请求。第一BaaS平台根据查询请求获取查询的上链数据,第一BaaS平台向虚拟化BaaS平台发送查询到的上链数据。虚拟化BaaS平台向终端设备发送查询到的上链数据。本申请中的方法可以使用户在获取在任何类型的区块链上上链存证的数据时,均采用相同的规则直接通过终端设备与虚拟化BaaS平台交互查询上链结果,使得用户查询在联盟链上上链存证的数据的过程更加简单方便,提高了查询效率,提高了用户的使用体验。In the blockchain-based data processing method provided in this embodiment, the terminal device receives the query information input by the user, and the terminal device sends a query request to the virtualized BaaS platform. The virtualized BaaS platform determines the first BaaS platform of the first blockchain according to the query request, and the virtualized BaaS platform sends a query request to the first BaaS platform of the first blockchain. The first BaaS platform obtains the queried on-chain data according to the query request, and the first BaaS platform sends the queried on-chain data to the virtualized BaaS platform. The virtualized BaaS platform sends the queried uplink data to the terminal device. The method in this application enables users to use the same rules to directly interact with the virtualized BaaS platform through the terminal device to query the results of the chain when obtaining the data that is stored on the blockchain on any type of blockchain, so that the user can query the results in the virtualized BaaS platform. The process of uploading the data stored on the consortium chain is simpler and more convenient, which improves the query efficiency and improves the user experience.
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are apparatus embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
图6为本申请提供的基于区块链的数据处理装置实施例一的结构示意图;如图6所示,该基于区块链的数据处理装置装置60包括:FIG. 6 is a schematic structural diagram of Embodiment 1 of the blockchain-based data processing device provided by the application; as shown in FIG. 6 , the blockchain-based data
接收模块61,用于接收来自用户的终端设备的请求消息,其中,请求消息包括用户的上链需求信息;A receiving
处理模块62,用于获取与上链需求信息匹配的第一区块链;a
发送模块63,用于向终端设备发送反馈消息,反馈消息包括第一区块链的第一标识;a sending
接收模块61,还用于接收来自终端设备的上链请求,上链请求包括第一标识和待上链信息;The receiving
发送模块63,还用于向第一区块链的第一BaaS平台发送上链请求,以使待上链信息写入第一区块链。The sending
进一步地,处理模块62,具体用于:Further, the
根据上链需求信息和匹配模型,获取与上链需求信息匹配的第一区块链。According to the on-chain demand information and the matching model, obtain the first blockchain that matches the on-chain demand information.
进一步地,第一区块链为多种类型的联盟链中的一个区块链。Further, the first blockchain is one blockchain among multiple types of consortium chains.
进一步地,处理模块62,具体还用于:Further, the
根据上链需求信息和匹配模型,确定多种类型的联盟链中不存在与上链需求信息匹配的区块链;According to the on-chain demand information and matching model, it is determined that there is no blockchain matching the on-chain demand information in various types of consortium chains;
根据上链需求信息搭建与上链需求信息匹配的第一区块链;Build the first blockchain that matches the on-chain demand information according to the on-chain demand information;
建立虚拟化BaaS平台与第一BaaS平台的通信连接。A communication connection between the virtualized BaaS platform and the first BaaS platform is established.
进一步地,请求消息还包括用于指示第二区块链的指示信息;则在获取与上链需求信息匹配的第一区块链之后、向终端发送反馈消息之前,处理模块62具体还用于:Further, the request message also includes indication information for indicating the second block chain; then after acquiring the first block chain that matches the on-chain demand information and before sending the feedback message to the terminal, the
根据指示信息,确定第二区块链与第一区块链相同;According to the indication information, it is determined that the second blockchain is the same as the first blockchain;
相应地,反馈消息还包括第一提醒信息,第一提醒信息用于向用户提醒第二区块链与第一区块链相同。Correspondingly, the feedback message further includes first reminder information, and the first reminder information is used to remind the user that the second blockchain is the same as the first blockchain.
进一步地,请求消息还包括用于指示第二区块链的指示信息;则在获取与上链需求信息匹配的第一区块链之后、向终端设备发送反馈消息之前,处理模块62具体还用于:Further, the request message also includes indication information for indicating the second block chain; then after acquiring the first block chain that matches the on-chain demand information and before sending the feedback message to the terminal device, the
根据指示信息,确定第二区块链与第一区块链不相同;According to the indication information, it is determined that the second blockchain is not the same as the first blockchain;
相应地,反馈消息包括第二提醒信息,第二提醒信息用于向用户建议使用第一区块链进行上链操作。Correspondingly, the feedback message includes the second reminder information, and the second reminder information is used to suggest to the user to use the first blockchain for the on-chain operation.
进一步地,第二提醒信息还用于向用户提醒第二区块链与第一区块链不相同。Further, the second reminder information is also used to remind the user that the second blockchain is different from the first blockchain.
进一步地,接收模块61,还用于接收来自终端设备的查询请求,查询请求用于请求查询上链操作的上链数据,查询请求包括第一标识;待上链信息包括上链数据;Further, the receiving
进一步地,发送模块63,还用于向第一BaaS平台发送查询请求,以使第一BaaS平台根据查询请求获取上链数据;Further, the sending
进一步地,接收模块61,还用于接收来自第一BaaS平台的上链数据;Further, the receiving
进一步地,发送模块63,还用于向终端设备发送上链数据。Further, the sending
本实施例提供的基于区块链的数据处理装置,用于执行前述任一方法实施例中虚拟化BaaS平台的技术方案,其实现原理和技术效果类似,在此不再赘述。The blockchain-based data processing device provided in this embodiment is used to execute the technical solution of the virtualized BaaS platform in any of the foregoing method embodiments, and its implementation principle and technical effect are similar, and are not repeated here.
图7为本申请提供的基于区块链的数据处理装置实施例二的结构示意图;如图7所示,该装置70包括:FIG. 7 is a schematic structural diagram of Embodiment 2 of the blockchain-based data processing device provided by the application; as shown in FIG. 7 , the
接收模块71,用于接收用户输入的上链需求信息;The receiving
发送模块72,用于向虚拟化BaaS平台发送包括上链需求信息的请求消息;虚拟化BaaS平台与多种类型的联盟链的多个BaaS平台通信连接;请求消息用于虚拟化BaaS平台获取与上链需求信息匹配的第一区块链;The sending
接收模块71,还用于接收来自虚拟化BaaS平台的反馈消息,反馈消息包括第一区块链的第一标识;The receiving
发送模块72,还用于向虚拟化BaaS平台发送上链请求,上链请求包括第一标识和待上链信息。The sending
进一步地,接收模块71,还用于接收用户输入的查询信息;Further, the receiving
进一步地,发送模块72,还用于向虚拟化BaaS平台发送查询请求,查询请求用于请求查询上链操作的上链数据,查询请求包括第一标识;待上链信息包括上链数据;Further, the sending
进一步地,接收模块71,还用于接收来自虚拟化BaaS平台的上链数据。Further, the receiving
本实施例提供的基于区块链的数据处理装置,用于执行前述任一方法实施例中终端设备的技术方案,其实现原理和技术效果类似,在此不再赘述。The blockchain-based data processing apparatus provided in this embodiment is used to execute the technical solution of the terminal device in any of the foregoing method embodiments, and its implementation principle and technical effect are similar, and are not repeated here.
图8为本申请提供的一种电子设备的结构示意图。如图8所示,该电子设备80包括:FIG. 8 is a schematic structural diagram of an electronic device provided by the present application. As shown in Figure 8, the electronic device 80 includes:
处理器81,存储器82,以及通信接口83;processor 81, memory 82, and communication interface 83;
存储器82用于存储处理器81的可执行指令;The memory 82 is used to store executable instructions of the processor 81;
其中,处理器81配置为经由执行可执行指令来执行前述任一方法实施例中的虚拟化BaaS平台的技术方案。The processor 81 is configured to execute the technical solution of the virtualized BaaS platform in any of the foregoing method embodiments by executing executable instructions.
可选的,存储器82既可以是独立的,也可以跟处理器81集成在一起。Optionally, the memory 82 may be independent or integrated with the processor 81 .
可选的,当存储器82是独立于处理器81之外的器件时,电子设备80还可以包括:Optionally, when the memory 82 is a device independent of the processor 81, the electronic device 80 may further include:
总线,用于将上述器件连接起来。bus to connect the above devices together.
该电子设备用于执行前述任一方法实施例中虚拟化BaaS平台的技术方案,其实现原理和技术效果类似,在此不再赘述。The electronic device is used to execute the technical solution of the virtualized BaaS platform in any of the foregoing method embodiments, and the implementation principle and technical effect thereof are similar, which will not be repeated here.
本申请实施例还提供一种区块链系统,包括虚拟化BaaS平台以及多种类型的联盟链的多个BaaS平台,虚拟化BaaS平台与多种类型的联盟链的多个BaaS平台通信连接;Embodiments of the present application also provide a blockchain system, including a virtualized BaaS platform and multiple BaaS platforms of various types of consortium chains, and the virtualized BaaS platform is communicatively connected to multiple BaaS platforms of various types of consortium chains;
虚拟化BaaS平台用于执行前述任一方法实施例中虚拟化BaaS平台的技术方案,其实现原理和技术效果类似,在此不再赘述。The virtualized BaaS platform is used to execute the technical solution of the virtualized BaaS platform in any of the foregoing method embodiments, and its implementation principles and technical effects are similar, and are not repeated here.
本申请实施例还提供一种可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现前述任一实施例提供的技术方案。The embodiments of the present application further provide a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the technical solutions provided in any of the foregoing embodiments are implemented.
本申请实施例还提供一种计算机程序产品,包括计算机程序,计算机程序被处理器执行时用于实现前述任一方法实施例提供的技术方案。Embodiments of the present application further provide a computer program product, including a computer program, which is used to implement the technical solution provided by any of the foregoing method embodiments when the computer program is executed by a processor.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by program instructions related to hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或对其中部分或全部技术特征进行等同替换;而这些修改或替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present application. scope.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210023766.6A CN114416871B (en) | 2022-01-10 | 2022-01-10 | Blockchain-based data processing method, device, equipment, system and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210023766.6A CN114416871B (en) | 2022-01-10 | 2022-01-10 | Blockchain-based data processing method, device, equipment, system and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114416871A true CN114416871A (en) | 2022-04-29 |
CN114416871B CN114416871B (en) | 2025-01-28 |
Family
ID=81270547
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210023766.6A Active CN114416871B (en) | 2022-01-10 | 2022-01-10 | Blockchain-based data processing method, device, equipment, system and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114416871B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115086353A (en) * | 2022-05-06 | 2022-09-20 | 讯飞智元信息科技有限公司 | Block chain event processing method and related device, equipment, platform and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109462505A (en) * | 2018-11-12 | 2019-03-12 | 上海点融信息科技有限责任公司 | Realize the method and apparatus across chain communication between multiple block chain networks |
WO2020155167A1 (en) * | 2019-02-02 | 2020-08-06 | Microsoft Technology Licensing, Llc | Application of cross-organizational transactions to blockchain |
CN111797173A (en) * | 2020-09-10 | 2020-10-20 | 联通(浙江)产业互联网有限公司 | Alliance chain sharing system, method and device, electronic equipment and storage medium |
-
2022
- 2022-01-10 CN CN202210023766.6A patent/CN114416871B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109462505A (en) * | 2018-11-12 | 2019-03-12 | 上海点融信息科技有限责任公司 | Realize the method and apparatus across chain communication between multiple block chain networks |
WO2020155167A1 (en) * | 2019-02-02 | 2020-08-06 | Microsoft Technology Licensing, Llc | Application of cross-organizational transactions to blockchain |
CN111797173A (en) * | 2020-09-10 | 2020-10-20 | 联通(浙江)产业互联网有限公司 | Alliance chain sharing system, method and device, electronic equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
CHEN, YAOLIANG等: "A Full-Spectrum Blockchain-as-a-Service for Business Collaboration", 《2019 IEEE INTERNATIONAL CONFERENCE ON WEB SERVICES (IEEE ICWS 2019)》, 15 March 2020 (2020-03-15), pages 219 - 223 * |
张彭奕等: "区块链共识算法效能优化研究进展", 《计算机科学》, 15 December 2020 (2020-12-15), pages 296 - 303 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115086353A (en) * | 2022-05-06 | 2022-09-20 | 讯飞智元信息科技有限公司 | Block chain event processing method and related device, equipment, platform and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114416871B (en) | 2025-01-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106779527A (en) | Commodity circulation information inquiry system and method based on block chain | |
CN104092555B (en) | A kind of methods, devices and systems of undated parameter value | |
WO2018201887A1 (en) | Data response method, apparatus, terminal device, and medium | |
CN112445700B (en) | Test method and device | |
WO2021139476A1 (en) | Intersection data generation method, and federated model training method based on intersection data | |
CN111506589A (en) | Blockchain data service system, access method and storage medium based on alliance chain | |
CN110910143A (en) | Identity identification generation method, device, related node and medium | |
CN116910524A (en) | Federal learning method, apparatus, device and storage medium | |
CN114090388A (en) | Information acquisition method, server cluster, server and device | |
WO2018227695A1 (en) | Subscription data sending and receiving method, device and system | |
CN110618999A (en) | Data query method and device, computer storage medium and electronic equipment | |
CN107506494B (en) | file processing method, mobile terminal and computer readable storage medium | |
CN111291084A (en) | Sample ID alignment method, device, equipment and storage medium | |
CN114416871A (en) | Blockchain-based data processing method, device, equipment, system and medium | |
CN110808974A (en) | Data acquisition method and device, computer device and storage medium | |
CN118555305A (en) | Message transmission method, device, equipment, storage medium and program product | |
CN118138448A (en) | Method, related device and computer program product for providing cloud phone configuration | |
CN116745782A (en) | Distributed machine learning with new tags distributed using heterogeneous tags | |
CN111339189A (en) | Data processing method and device and computer readable storage medium | |
CN109298956A (en) | File transfer method, device and terminal device | |
CN109597679A (en) | A kind of distributed computing processing method | |
CN114254278A (en) | User account merging method and device, computer equipment and storage medium | |
CN204669390U (en) | A kind of electronic equipment | |
CN114840372B (en) | Interface testing method, device, electronic device and computer readable storage medium | |
US20250086050A1 (en) | Data reconciliation for a multi-channel pipeline |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |