HK1247301B - Data processing method and equipment based on blockchain - Google Patents
Data processing method and equipment based on blockchain Download PDFInfo
- Publication number
- HK1247301B HK1247301B HK18106425.2A HK18106425A HK1247301B HK 1247301 B HK1247301 B HK 1247301B HK 18106425 A HK18106425 A HK 18106425A HK 1247301 B HK1247301 B HK 1247301B
- Authority
- HK
- Hong Kong
- Prior art keywords
- processing
- data
- business
- business data
- level
- Prior art date
Links
Description
技术领域Technical Field
本申请涉及互联网信息处理技术及计算机技术领域,尤其涉及一种基于区块链的数据处理方法及设备。The present application relates to the fields of Internet information processing technology and computer technology, and in particular to a data processing method and device based on blockchain.
背景技术Background Art
区块链技术也称为分布式账本技术,是一种分布式互联网数据库技术,其特点是去中心化、公开透明、不可篡改、可信任。基于区块链技术构建的网络可以称之为区块链网络,在该区块链网络中包含网络节点(也可以称之为区块链节点),每一个网络节点对应至少一个区块链,每一个区块链上至少包含一个区块。Blockchain technology, also known as distributed ledger technology, is a distributed internet database technology characterized by decentralization, transparency, immutability, and trustworthiness. A network built on blockchain technology is called a blockchain network. This network consists of network nodes (also called blockchain nodes). Each network node corresponds to at least one blockchain, and each blockchain contains at least one block.
由于网络节点在接收到待存储的数据时,通过广播的方式发送给区块链网络中的其他网络节点,所以区块链网络中的每一个网络节点都存储了该区块链网络的全量数据,且各个网络节点上存储的数据一致。Since a network node sends the data to be stored to other network nodes in the blockchain network by broadcasting when receiving the data to be stored, each network node in the blockchain network stores the full amount of data of the blockchain network, and the data stored on each network node is consistent.
具体地,在区块链网络中存储数据一般分为两个阶段:第一个阶段,区块链网络接收到待存储的数据,并将该数据通过广播的方式在区块链网络中进行全网广播,这样区块链网络中的所有节点接收到该待存储的数据,此时,区块链网络中各个网络节点将该待存储的数据写入缓存中;第二个阶段,对于区块链网络中获取该待存储的数据的存储权的网络节点,在获取记录权时,将该待存储数据写入某一区块中,并将该区块上链至已存在的区块链上。由此可见,在区块链网络中采用异步写入策略存储数据。Specifically, data storage in a blockchain network generally involves two phases: First, the blockchain network receives the data to be stored and broadcasts it across the entire network. This allows all nodes in the blockchain network to receive the data and, at this point, write it into their cache. Second, the nodes in the blockchain network that have acquired storage rights for the data, upon obtaining recording rights, write the data into a block and then add the block to the existing blockchain. This demonstrates that blockchain networks employ an asynchronous write strategy for data storage.
然而,在实际业务场景中,采用异步写入策略将业务数据存储至区块链网络中,通常在第一个阶段维护一个数据处理队列,按照待存储数据的时间戳依次将待存储的数据写入数据处理队列中,这样,在第二阶段,按照先进先出的原则将数据处理队列中的待存储数据写入区块中。However, in actual business scenarios, an asynchronous write strategy is adopted to store business data in the blockchain network. Usually, a data processing queue is maintained in the first stage, and the data to be stored is written into the data processing queue in sequence according to the timestamp of the data to be stored. In this way, in the second stage, the data to be stored in the data processing queue is written into the block according to the first-in-first-out principle.
经研究发现,按照上述方式在区块链网络中存储数据存在以下问题:对于业务优先级比较高的业务,业务数据处理效率比较低,进而导致这些业务的处理效率也比较低。Research has found that storing data in the blockchain network in the above manner has the following problems: for businesses with higher business priorities, the business data processing efficiency is relatively low, which in turn leads to relatively low processing efficiency of these businesses.
发明内容Summary of the Invention
有鉴于此,本申请实施例提供了一种基于区块链的数据处理方法及设备,用于解决现有技术中存在的业务优先级比较高的业务的业务数据处理效率比较低的问题。In view of this, the embodiments of the present application provide a blockchain-based data processing method and device for solving the problem of low efficiency in processing business data for businesses with relatively high business priorities in the prior art.
本申请实施例提供了一种基于区块链的数据处理方法,包括:The present invention provides a data processing method based on blockchain, including:
所述区块链中的节点获取设定时间周期中产生的至少一个业务数据,所述业务数据中包含用于表征产生所述业务数据的业务的处理等级;A node in the blockchain obtains at least one piece of business data generated in a set time period, wherein the business data includes a processing level for characterizing the business generating the business data;
所述节点根据所述处理等级,将所述业务数据存储至与所述处理等级匹配的数据处理队列中;The node stores the service data in a data processing queue matching the processing level according to the processing level;
在新的区块产生时,所述节点分别从不同的所述数据处理队列中读取满足设定条件的业务数据,并将读取到的所述业务数据存储至所述区块中。When a new block is generated, the nodes read the business data that meets the set conditions from different data processing queues respectively, and store the read business data in the block.
本申请实施例还提供了一种基于区块链的数据处理设备,包括:The present application also provides a blockchain-based data processing device, including:
获取单元,获取设定时间周期中产生的至少一个业务数据,所述业务数据中包含用于表征产生所述业务数据的业务的处理等级;an acquiring unit, configured to acquire at least one piece of service data generated in a set time period, wherein the service data includes a processing level for characterizing a service generating the service data;
存储单元,根据所述处理等级,将所述业务数据存储至与所述处理等级匹配的数据处理队列中;a storage unit, storing the service data in a data processing queue matching the processing level according to the processing level;
处理单元,在新的区块产生时,分别从不同的所述数据处理队列中读取满足设定条件的业务数据,并将读取到的所述业务数据存储至所述区块中。The processing unit reads the business data that meets the set conditions from different data processing queues when a new block is generated, and stores the read business data in the block.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
通过按照处理等级将不同的业务数据存储至不同的数据处理队列中,以及在向区块中存储数据时,按照设定条件从不同的数据处理队列中读取一定数量的业务数据,以实现不同处理等级的业务数据都可以得到处理,打破了现有技术中单一按照时间因素处理业务数据的规定,避免了现有技术中业务优先级比较高的业务的处理效率比较低的问题,本申请实施例提供出的方案既保证了业务优先级高的业务的业务数据的处理效率,也保证了业务优先级低的业务的业务数据的处理效率,在满足业务处理优先级时,增加了区块链中业务数据处理的灵活性,也提升了区块链在业务应用领域的使用价值。By storing different business data in different data processing queues according to processing levels, and reading a certain amount of business data from different data processing queues according to set conditions when storing data in the block, business data of different processing levels can be processed, breaking the regulations of the existing technology that only process business data according to time factors, and avoiding the problem of low processing efficiency of businesses with higher business priorities in the existing technology. The solution provided in the embodiment of the present application not only ensures the processing efficiency of business data of businesses with high business priorities, but also ensures the processing efficiency of business data of businesses with low business priorities. When meeting the business processing priority, it increases the flexibility of business data processing in the blockchain and enhances the use value of the blockchain in the field of business applications.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1为本申请实施例提供的一种基于区块链的数据处理方法的流程示意图;FIG1 is a flow chart of a data processing method based on blockchain provided in an embodiment of the present application;
图2(a)为本申请实施例提供的不同处理等级的业务数据对应的数据处理队列的示意图;FIG2( a ) is a schematic diagram of data processing queues corresponding to service data of different processing levels provided in an embodiment of the present application;
图2(b)为本申请实施例提供的不同处理等级的业务数据对应的数据处理队列的示意图;FIG2( b ) is a schematic diagram of data processing queues corresponding to service data of different processing levels provided in an embodiment of the present application;
图3为本申请实施例提供的一种基于区块链的数据处理方法的场景示意图;FIG3 is a schematic diagram of a scenario of a blockchain-based data processing method provided in an embodiment of the present application;
图4为本申请实施例提供的一种基于区块链的数据处理设备的结构示意图。FIG4 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
以下结合附图,详细说明本申请各实施例提供的技术方案。The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.
图1为本申请实施例提供的一种基于区块链的数据处理方法的流程示意图。所述方法可以如下所示。本申请实施例中的执行主体可以为区块链中的任一业务节点(又可以称之为区块链节点,以下简称为节点),这里不做具体限定。在本申请实施例中以执行主体为节点为例进行详细说明。Figure 1 is a flow chart of a blockchain-based data processing method provided in an embodiment of the present application. The method may be as follows. The execution subject in the embodiment of the present application may be any business node in the blockchain (also referred to as a blockchain node, hereinafter referred to as a node), without specific limitation here. In the embodiment of the present application, the execution subject is taken as an example to be described in detail.
步骤101:所述区块链中的节点获取设定时间周期中产生的至少一个业务数据。Step 101: A node in the blockchain obtains at least one piece of business data generated in a set time period.
其中,所述业务数据中包含用于表征产生所述业务数据的业务的处理等级。The service data includes a processing level for characterizing the service generating the service data.
在本申请实施例中,首先,为不同的业务确定业务优先级。这里的业务优先级与业务数据的处理等级相对应,即业务优先级越高,那么该业务所产生的业务数据的处理等级越高。其次,在业务数据中增加一个表征产生该业务数据的业务的业务优先级(或者处理等级)的字段,这样节点在接收到该业务数据,能够通过该字段确定该业务数据的处理等级。In the embodiment of the present application, first, a service priority is determined for different services. The service priority here corresponds to the processing level of the service data, that is, the higher the service priority, the higher the processing level of the service data generated by the service. Secondly, a field representing the service priority (or processing level) of the service that generates the service data is added to the service data, so that when a node receives the service data, it can determine the processing level of the service data through this field.
通常业务数据中包含的字段包含但不限于:哈希值、版本号、公钥、签名、所属区块的哈希值、时间戳(即节点受理该业务数据的时间)等,那么本申请实施例中所记载的业务数据中包含的字段包含但不限于:如表1所示。表1中描述各个字段的具体属性:Typically, the fields included in business data include but are not limited to: hash value, version number, public key, signature, hash value of the block to which it belongs, timestamp (i.e., the time when the node accepts the business data), etc., and the fields included in the business data recorded in the embodiment of the present application include but are not limited to: as shown in Table 1. Table 1 describes the specific attributes of each field:
表1Table 1
较优地,本申请实施例中,还可以根据确定的业务优先级,为不同业务优先级配置数据处理队列,这样在接收到业务数据时,可以按照业务优先级进行分开存储。Preferably, in the embodiment of the present application, data processing queues can also be configured for different business priorities based on the determined business priorities, so that when business data is received, it can be stored separately according to the business priority.
在本申请实施例中,以业务优先级分为“高”和“低”两种为例进行后续内容的说明。如果业务优先级分为“高”和“低”两种,那么相应地处理等级也分为“高”和“低”两种,即高处理等级和低处理等级。In the embodiment of the present application, the following description is based on the example of service priorities being divided into "high" and "low". If the service priorities are divided into "high" and "low", then the corresponding processing levels are also divided into "high" and "low", i.e., high processing level and low processing level.
需要说明的是,由于区块链中产生相邻两个区块之间存在一个时间间隔,那么这个时间间隔可以作为本申请实施例中设定时间周期的参考条件,这里不做具体限定。It should be noted that since there is a time interval between two adjacent blocks generated in the blockchain, this time interval can be used as a reference condition for setting the time period in the embodiments of the present application, and is not specifically limited here.
步骤102:所述节点根据所述处理等级,将所述业务数据存储至与所述处理等级匹配的数据处理队列中。Step 102: The node stores the service data in a data processing queue that matches the processing level according to the processing level.
在本申请实施例中,由于预先可以根据业务的业务优先级(或者业务的处理等级)创建不同的数据处理队列,那么建立处理等级与数据处理队列的标识之间的映射关系。In the embodiment of the present application, since different data processing queues can be created in advance according to the service priority (or processing level of the service), a mapping relationship between the processing level and the identifier of the data processing queue is established.
节点在接收到业务数据时,提取该业务数据的处理等级(这里提取的方式可以是读取该业务数据中的处理等级字段,根据该处理等级字段确定该业务数据的处理等级);根据预先建立的处理等级与数据处理队列的标识之间的映射关系,确定与所述业务数据中包含的处理等级对应的数据处理队列;并将所述业务数据存储至确定的所述数据处理队列中。When a node receives business data, it extracts the processing level of the business data (the extraction method here can be to read the processing level field in the business data and determine the processing level of the business data based on the processing level field); based on the pre-established mapping relationship between the processing level and the identifier of the data processing queue, it determines the data processing queue corresponding to the processing level contained in the business data; and stores the business data in the determined data processing queue.
图2(a)为本申请实施例提供的不同处理等级的业务数据对应的数据处理队列的示意图。从图2(a)中可以看出包含两个数据处理队列,其中,一个数据处理队列对应于高处理等级,即在该数据处理队列中存储的业务数据属于业务优先级高(或者业务处理等级高)的业务产生的;另一个数据处理队列对应于低处理等级,即在该数据处理队列中存储的业务数据属于业务优先级低(或者业务处理等级低)的业务产生的。Figure 2(a) is a schematic diagram of data processing queues corresponding to business data of different processing levels provided in an embodiment of the present application. As can be seen from Figure 2(a), it contains two data processing queues, one of which corresponds to a high processing level, that is, the business data stored in this data processing queue is generated by businesses with high business priority (or high business processing level); and the other data processing queue corresponds to a low processing level, that is, the business data stored in this data processing queue is generated by businesses with low business priority (or low business processing level).
需要说明的是,数据处理队列中存储的业务数据可以按照业务数据的受理时间进行排列,也可以按照业务数据中包含的业务属性进行排列,还可以按照队列的原理(先进先出)进行排列,这里不做具体限定。It should be noted that the business data stored in the data processing queue can be arranged according to the acceptance time of the business data, or according to the business attributes contained in the business data, or according to the queue principle (first in, first out), which is not specifically limited here.
步骤103:在新的区块产生时,所述节点分别从不同的所述数据处理队列中读取满足设定条件的业务数据,并将读取到的所述业务数据存储至所述区块中。Step 103: When a new block is generated, the node reads the business data that meets the set conditions from different data processing queues, and stores the read business data in the block.
在本申请实施例中,区块链网络中的各节点在处理业务数据时分为两个阶段,第一个阶段可以对应于本申请实施例的步骤101和步骤102,第二个阶段可以对应于本申请实施例的步骤103,即如何将业务数据存储至区块中。需要说明的是,本申请实施例所记载的方案的重点在于描述从不同数据处理队列中读取哪些业务数据以存储在区块中,所以在本申请实施例中不再详细介绍验证、共识等情形,这些处理方式可以按照现有技术的方式进行。In the embodiment of the present application, each node in the blockchain network processes business data in two stages. The first stage can correspond to steps 101 and 102 of the embodiment of the present application, and the second stage can correspond to step 103 of the embodiment of the present application, that is, how to store the business data in the block. It should be noted that the focus of the solution described in the embodiment of the present application is to describe which business data is read from different data processing queues to be stored in the block. Therefore, the verification, consensus, etc. are not described in detail in the embodiment of the present application. These processing methods can be carried out according to the existing technology.
较优地,本申请实施例中所记载的所述设定条件可以根据所述区块的存储容量和预设的不同处理等级的业务数据的处理比例确定,也可以采取其他方式,只要保证不同业务处理等级的业务数据能够均衡写入区块中即可。Preferably, the setting conditions recorded in the embodiments of the present application can be determined based on the storage capacity of the block and the preset processing ratio of business data of different processing levels, or other methods can be adopted as long as it is ensured that business data of different business processing levels can be written into the block evenly.
下面详细描述所述节点如何分别从不同的所述数据处理队列中读取满足设定条件的业务数据。The following describes in detail how the node reads the service data that meets the set conditions from different data processing queues.
具体地,所述节点针对不同的所述数据处理队列,分别执行以下操作:Specifically, the node performs the following operations for different data processing queues:
确定第一数据处理队列对应的处理等级;Determining a processing level corresponding to the first data processing queue;
若所述处理等级为第一处理等级,那么确定预设的第二处理等级的业务数据的处理比例,所述第一处理等级高于所述第二处理等级;If the processing level is the first processing level, determining a processing ratio of the business data of a preset second processing level, the first processing level being higher than the second processing level;
根据确定的所述处理比例和所述区块的存储容量,确定所述第一处理等级的业务数据的第一处理数量;determining a first processing quantity of the business data of the first processing level according to the determined processing ratio and the storage capacity of the block;
根据所述第一处理数量,从所述第一数据处理队列中依次读取满足所述处理数量的业务数据。According to the first processing quantity, business data that meets the processing quantity is read sequentially from the first data processing queue.
需要说明的是,本申请实施例中所记载的“第一数据处理队列”和“第二数据处理队列”中的“第一”和“第二”没有特殊含义,仅表示两个不同的数据处理队列。It should be noted that the “first” and “second” in the “first data processing queue” and “second data processing queue” recorded in the embodiments of the present application have no special meanings and only represent two different data processing queues.
本申请实施例中所记载的“第一处理等级”和“第二处理等级”中的“第一”和“第二”没有特殊含义,仅表示两个不同的处理等级,在本申请实施例中假设第一处理等级高于第二处理等级。The "first" and "second" in the "first processing level" and "second processing level" recorded in the embodiments of the present application have no special meanings and only represent two different processing levels. In the embodiments of the present application, it is assumed that the first processing level is higher than the second processing level.
需要说明的是,本申请实施例中所记载的“第一处理数量”和“第二处理数量”中的“第一”和“第二”没有特殊含义,仅表示两个不同的数值。It should be noted that the “first” and “second” in the “first processing quantity” and “second processing quantity” recorded in the embodiments of the present application have no special meaning and only represent two different numerical values.
以第一数据处理队列为研究对象。The first data processing cohort was taken as the research object.
第一,确定第一数据处理队列对应的处理等级。First, determine the processing level corresponding to the first data processing queue.
第二,判断该处理等级是第一处理等级还是第二处理等级,若是第一处理等级,则执行第三;若是第二处理等级,则执行第四。Second, determine whether the processing level is the first processing level or the second processing level. If it is the first processing level, execute the third step; if it is the second processing level, execute the fourth step.
第三,确定预设的第二处理等级的业务数据的处理比例,根据确定的所述处理比例和所述区块的存储容量,确定所述第一处理等级的业务数据的第一处理数量;并根据所述第一处理数量,从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据。Third, determine the processing ratio of the business data of the preset second processing level, and determine the first processing quantity of the business data of the first processing level based on the determined processing ratio and the storage capacity of the block; and based on the first processing quantity, read the business data that meets the first processing quantity from the first data processing queue in sequence.
第四,确定预设的第二处理等级的业务数据的处理比例,根据确定的所述处理比例和所述区块的存储容量,确定第二处理等级的业务数据的第二处理数量;并根据所述第二处理数量,从所述第一数据处理队列中依次读取满足所述第二处理数量的业务数据。Fourth, determine the processing ratio of the business data of the preset second processing level, and determine the second processing quantity of the business data of the second processing level based on the determined processing ratio and the storage capacity of the block; and based on the second processing quantity, read the business data that meets the second processing quantity from the first data processing queue in sequence.
需要说明的是,本申请实施例中“预设的第二处理等级的业务数据的处理比例”可以理解为本申请实施例中对于处理等级较低的业务数据的最少比例,即在本次向区块中存储数据时,最少需要存储的处理等级较低的业务数据占区块的存储容量的比例,这里处理比例可以根据实际需要进行调整,这里不做限定。It should be noted that the "preset processing ratio of business data of the second processing level" in the embodiment of the present application can be understood as the minimum ratio of business data with a lower processing level in the embodiment of the present application, that is, when storing data in the block this time, the minimum ratio of business data with a lower processing level that needs to be stored to the storage capacity of the block. The processing ratio here can be adjusted according to actual needs and is not limited here.
假设预设的第二处理等级的业务数据的处理比例为p,区块的存储容量(还可以理解区块所能转载的业务数据的上限数值)为x,那么确定所述第一处理等级的业务数据的第一处理数量可以表示为(1-p)x,确定第二处理等级的业务数据的第二处理数量可以表示为px。Assuming that the processing ratio of the business data of the preset second processing level is p, and the storage capacity of the block (which can also be understood as the upper limit of the business data that the block can reprint) is x, then the first processing quantity of the business data of the first processing level can be expressed as (1-p)x, and the second processing quantity of the business data of the second processing level can be expressed as px.
在本申请实施例中,还存在另外一种情况,即所述第一数据处理队列中存储的业务数据的处理数量小于所述第一处理数量,也就意味着,在确定第一处理数量之后,第一数据处理队列中存储的业务数据不能够满足第一处理数量的要求,为了实现资源的合理使用,那么在这种情况下,按照所述第一数据处理队列中存储的业务数据的处理数量,从所述第一数据处理队列中依次读取业务数据。即将第一数据处理队列中存储的业务数据全部读取出。In an embodiment of the present application, there is another situation where the processing quantity of the business data stored in the first data processing queue is less than the first processing quantity, which means that after determining the first processing quantity, the business data stored in the first data processing queue cannot meet the requirements of the first processing quantity. In order to achieve reasonable use of resources, in this case, the business data is read from the first data processing queue in sequence according to the processing quantity of the business data stored in the first data processing queue. That is, all the business data stored in the first data processing queue is read out.
那么此时根据所述第一数据处理队列中存储的业务数据的处理数量和所述区块的存储容量,确定从第二数据处理队列中读取业务数据的处理数量;并根据确定的从第二数据处理队列中读取业务数据的处理数量,依次从所述第二数据处理队列中读取业务数据。At this time, the processing quantity of business data stored in the first data processing queue and the storage capacity of the block are determined, and the business data are read from the second data processing queue in sequence according to the determined processing quantity of business data read from the second data processing queue.
仍以上述方式表示的话,假设所述第一数据处理队列中存储的业务数据的处理数量为m,由于(1-p)x对应的数值大于m,那么此时第一处理数量应该为m,这样确定的第二处理数量应该为(x-m)。也就是说,当业务优先级比较高的业务数据量较小时,在保证业务优先级较高的业务数据优先被处理的同时,可以尽可能多的处理业务优先级较低的业务数据。Still expressing this in the above manner, assuming the number of service data stored in the first data processing queue is m, since the value corresponding to (1-p)x is greater than m, the first processing number should be m, and the second processing number determined in this way should be (x-m). In other words, when the amount of service data with higher service priority is small, while ensuring that service data with higher service priority is processed first, as much service data with lower service priority as possible can be processed.
在本申请实施例中,从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据,包括:In the embodiment of the present application, sequentially reading service data that meets the first processing quantity from the first data processing queue includes:
根据所述业务数据对应的受理时间的先后,从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据。The business data that meets the first processing quantity is read in sequence from the first data processing queue according to the order of the acceptance times corresponding to the business data.
同样,也可以按照所述业务数据对应的受理时间的先后,从所述第二数据处理队列中依次读取满足所述第二处理数量的业务数据。Similarly, business data that meets the second processing quantity may be read from the second data processing queue in sequence according to the order of the acceptance time corresponding to the business data.
在本申请实施例中,将读取到的所述业务数据存储至所述区块中,包括:In the embodiment of the present application, storing the read business data in the block includes:
根据所述业务数据对应的受理时间的先后,依次将读取到的所述业务数据存储至所述区块中。The read business data are stored in the blocks in sequence according to the order of the acceptance times corresponding to the business data.
例如:图2(b)为本申请实施例提供的不同处理等级的业务数据对应的数据处理队列的示意图。从图2(b)中可以看出,按照步骤103中记载的方式依次从两个数据处理队列中读取不同数量的业务数据。For example, Figure 2(b) is a schematic diagram of data processing queues corresponding to business data of different processing levels provided in an embodiment of the present application. As can be seen from Figure 2(b), different amounts of business data are read from the two data processing queues in sequence according to the method described in step 103.
假设预设的每次处理等级低的业务数据存储至区块中的处理比例为30%,区块的存储容量为10,即可以存储10个业务数据。其中,处理等级高的数据处理队列中存储4个业务数据,处理等级低的数据处理队列中存储8个业务数据。通过判断,按照系统配置的策略需要选择的处理等级高的业务数据的处理量为(1-30%)*10=7个,显然4小于7,因此,从处理等级高的数据处理队列中将存储的4个业务数据全部取出,再从处理等级低的数据处理队列中取出6个业务数据,将得到的10个业务数据按照业务数据的受理时间的先后存储至区块中。Assume that the preset processing ratio of low-level business data stored in the block each time is 30%, and the storage capacity of the block is 10, that is, it can store 10 business data. Among them, the data processing queue with a high processing level stores 4 business data, and the data processing queue with a low processing level stores 8 business data. Through judgment, according to the system configuration strategy, the processing volume of high-level business data that needs to be selected is (1-30%)*10=7. Obviously, 4 is less than 7. Therefore, all 4 business data stored in the high-level data processing queue are taken out, and then 6 business data are taken out from the low-level data processing queue. The resulting 10 business data are stored in the block in the order of the business data acceptance time.
假设预设的每次处理等级低的业务数据存储至区块中的处理比例为30%,区块的存储容量为10,即可以存储10个业务数据。其中,处理等级高的数据处理队列中存储8个业务数据,处理等级低的数据处理队列中存储8个业务数据。通过判断,按照系统配置的策略需要选择的处理等级高的业务数据的处理量为(1-30%)*10=7个,显然8大于7,因此,从处理等级高的数据处理队列中读取出7个业务数据,再从处理等级低的数据处理队列中取出3个业务数据,将得到的10个业务数据按照业务数据的受理时间的先后存储至区块中。Assume that the preset processing ratio of storing low-level business data in the block each time is 30%, and the storage capacity of the block is 10, that is, it can store 10 business data. Among them, 8 business data are stored in the data processing queue with a high processing level, and 8 business data are stored in the data processing queue with a low processing level. Through judgment, according to the system configuration strategy, the processing volume of high-level business data that needs to be selected is (1-30%)*10=7. Obviously, 8 is greater than 7. Therefore, 7 business data are read from the data processing queue with a high processing level, and then 3 business data are taken from the data processing queue with a low processing level. The resulting 10 business data are stored in the block in the order of the business data acceptance time.
在本申请实施例中,所述节点分别从不同的所述数据处理队列中读取满足设定条件的业务数据,还可以按照如下方式执行:In the embodiment of the present application, the nodes read the service data that meets the set conditions from different data processing queues respectively, and can also be executed in the following manner:
所述节点针对不同的所述数据处理队列,分别执行以下操作:The node performs the following operations respectively for different data processing queues:
确定第一数据处理队列对应的处理等级,并获取预设的所述处理等级对应的处理比例;Determining a processing level corresponding to the first data processing queue, and obtaining a preset processing ratio corresponding to the processing level;
根据确定的所述处理比例和所述区块的存储容量,确定处理数量,并从所述第一数据处理队列中依次读取满足所述处理数量的业务数据。The processing quantity is determined according to the determined processing ratio and the storage capacity of the block, and the business data that meets the processing quantity is read sequentially from the first data processing queue.
具体地,针对每一个数据处理队列,确定该数据处理队列对应的处理等级,进而按照预设的处理等级对应的处理比例,确定该数据处理队列对应的处理比例。根据确定的所述处理比例和所述区块的存储容量,确定处理数量,并从该数据处理队列中依次读取满足所述处理数量的业务数据。Specifically, for each data processing queue, a processing level corresponding to the data processing queue is determined, and then a processing ratio corresponding to the preset processing level is determined for the data processing queue. Based on the determined processing ratio and the storage capacity of the block, a processing quantity is determined, and business data that meets the processing quantity is sequentially read from the data processing queue.
例如:包含n个数据处理队列,那么这n个数据处理队列对应n个处理等级,不同处理等级对应的处理比例可以用ai表示,即第一处理等级对应的处理比例为a1,第i处理等级对应的处理比例为ai,第n处理等级对应的处理比例为an,那么(a1+a2+......+ai+......+an)=1。针对每一个数据处理队列,若区块的存储容量为X,那么第一处理等级对应的数据处理队列所对应的处理数量为a1*X;第i处理等级对应的数据处理队列所对应的处理数量为ai*X;第n处理等级对应的数据处理队列所对应的处理数量为an*X。For example, if there are n data processing queues, then these n data processing queues correspond to n processing levels. The processing ratios corresponding to different processing levels can be represented by ai. That is, the processing ratio corresponding to the first processing level is a1 , the processing ratio corresponding to the i-th processing level is ai , and the processing ratio corresponding to the n-th processing level is an . Then, ( a1 + a2 +... + ai +... + an ) = 1. For each data processing queue, if the storage capacity of the block is X, then the processing quantity corresponding to the data processing queue corresponding to the first processing level is a1 *X; the processing quantity corresponding to the data processing queue corresponding to the i-th processing level is ai *X; and the processing quantity corresponding to the data processing queue corresponding to the n-th processing level is an *X.
通过本申请实施例提供的技术方案,通过按照处理等级将不同的业务数据存储至不同的数据处理队列中,以及在向区块中存储数据时,按照设定条件从不同的数据处理队列中读取一定数量的业务数据,以实现不同处理等级的业务数据都可以得到处理,打破了现有技术中单一按照时间因素处理业务数据的规定,避免了现有技术中业务优先级比较高的业务的处理效率比较低的问题,本申请实施例提供出的方案既保证了业务优先级高的业务的业务数据的处理效率,也保证了业务优先级低的业务的业务数据的处理效率,在满足业务处理优先级时,增加了区块链中业务数据处理的灵活性,也提升了区块链在业务应用领域的使用价值。Through the technical solution provided in the embodiment of the present application, different business data are stored in different data processing queues according to the processing level, and when storing data in the block, a certain amount of business data is read from different data processing queues according to the set conditions, so that business data of different processing levels can be processed. This breaks the provision of the existing technology that only processes business data according to time factors, and avoids the problem of low processing efficiency of businesses with higher business priorities in the existing technology. The solution provided in the embodiment of the present application not only ensures the processing efficiency of business data of businesses with high business priority, but also ensures the processing efficiency of business data of businesses with low business priority. When meeting the business processing priority, it increases the flexibility of business data processing in the blockchain and enhances the use value of the blockchain in the field of business applications.
图3为本申请实施例提供的一种基于区块链的数据处理方法的场景示意图。从图3中可以看出,区块链中的节点在接收到业务数据时,可以根据业务数据的处理等级为其选择数据处理队列,并将该业务数据写入该数据处理队列中。当产生新的区块时,按照业务数据选择策略(即上述实施例中步骤103中所记载的方式)从不同的数据处理队列中选择业务数据,并将选择的业务数据存储至区块中。FIG3 is a schematic diagram of a scenario of a blockchain-based data processing method provided in an embodiment of the present application. As can be seen from FIG3, when a node in the blockchain receives business data, it can select a data processing queue for it based on the processing level of the business data and write the business data into the data processing queue. When a new block is generated, business data is selected from different data processing queues according to the business data selection strategy (i.e., the method described in step 103 in the above embodiment), and the selected business data is stored in the block.
实施例2Example 2
图4为本申请实施例提供的一种基于区块链的数据处理设备的结构示意图。所述数据处理设备包括:获取单元401、存储单元402和处理单元403,其中:Figure 4 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The data processing device includes: an acquisition unit 401, a storage unit 402, and a processing unit 403, wherein:
获取单元401,获取设定时间周期中产生的至少一个业务数据,所述业务数据中包含用于表征产生所述业务数据的业务的处理等级;An acquiring unit 401 acquires at least one piece of service data generated in a set time period, wherein the service data includes a processing level for characterizing a service generating the service data;
存储单元402,根据所述处理等级,将所述业务数据存储至与所述处理等级匹配的数据处理队列中;The storage unit 402 stores the service data in a data processing queue that matches the processing level according to the processing level;
处理单元403,在新的区块产生时,分别从不同的所述数据处理队列中读取满足设定条件的业务数据,并将读取到的所述业务数据存储至所述区块中。The processing unit 403 reads the business data that meets the set conditions from different data processing queues when a new block is generated, and stores the read business data in the block.
在本申请的另一个实施例中,所述设定条件根据所述区块的存储容量和预设的不同处理等级的业务数据的处理比例确定。In another embodiment of the present application, the setting condition is determined according to the storage capacity of the block and the processing ratio of business data of different preset processing levels.
在本申请的另一个实施例中,所述处理单元403分别从不同的所述数据处理队列中读取满足设定条件的业务数据,包括:In another embodiment of the present application, the processing unit 403 reads the service data that meets the set conditions from different data processing queues, including:
针对不同的所述数据处理队列,分别执行以下操作:For different data processing queues, the following operations are performed respectively:
确定第一数据处理队列对应的处理等级;Determining a processing level corresponding to the first data processing queue;
若所述处理等级为第一处理等级,那么确定预设的第二处理等级的业务数据的处理比例,所述第一处理等级高于所述第二处理等级;If the processing level is the first processing level, determining a processing ratio of the business data of a preset second processing level, the first processing level being higher than the second processing level;
根据确定的所述处理比例和所述区块的存储容量,确定所述第一处理等级的业务数据的第一处理数量;determining a first processing quantity of the business data of the first processing level according to the determined processing ratio and the storage capacity of the block;
根据所述第一处理数量,从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据。According to the first processing quantity, business data that meets the first processing quantity is read sequentially from the first data processing queue.
在本申请的另一个实施例中,所述处理单元403根据所述第一处理数量,从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据,包括:In another embodiment of the present application, the processing unit 403 sequentially reads the business data that meets the first processing quantity from the first data processing queue according to the first processing quantity, including:
在所述第一数据处理队列中存储的业务数据的处理数量小于所述第一处理数量时,按照所述第一数据处理队列中存储的业务数据的处理数量,从所述第一数据处理队列中依次读取业务数据。When the processing quantity of the business data stored in the first data processing queue is less than the first processing quantity, the business data is read from the first data processing queue in sequence according to the processing quantity of the business data stored in the first data processing queue.
在本申请的另一个实施例中,所述数据处理设备还包括:确定单元404,其中:In another embodiment of the present application, the data processing device further includes: a determining unit 404, wherein:
所述确定单元404,根据所述第一数据处理队列中存储的业务数据的处理数量和所述区块的存储容量,确定从第二数据处理队列中读取业务数据的处理数量;The determining unit 404 determines the processing quantity of the business data to be read from the second data processing queue according to the processing quantity of the business data stored in the first data processing queue and the storage capacity of the block;
根据确定的从第二数据处理队列中读取业务数据的处理数量,依次从所述第二数据处理队列中读取业务数据。The business data is read from the second data processing queue in sequence according to the determined processing quantity of the business data to be read from the second data processing queue.
在本申请的另一个实施例中,所述处理单元403,还若所述处理等级为第二处理等级,那么确定预设的第二处理等级的业务数据的处理比例;In another embodiment of the present application, the processing unit 403 further determines a processing ratio of the business data of a preset second processing level if the processing level is the second processing level;
根据确定的所述处理比例和所述区块的存储容量,确定第二处理等级的业务数据的第二处理数量;determining a second processing quantity of the business data of a second processing level according to the determined processing ratio and the storage capacity of the block;
根据所述第二处理数量,从所述第一数据处理队列中依次读取满足所述第二处理数量的业务数据。According to the second processing quantity, business data that meets the second processing quantity is read sequentially from the first data processing queue.
在本申请的另一个实施例中,所述处理单元403从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据,包括:In another embodiment of the present application, the processing unit 403 sequentially reads the business data that meets the first processing quantity from the first data processing queue, including:
根据所述业务数据对应的受理时间的先后,从所述第一数据处理队列中依次读取满足所述第一处理数量的业务数据。The business data that meets the first processing quantity is read in sequence from the first data processing queue according to the order of the acceptance times corresponding to the business data.
在本申请的另一个实施例中,所述处理单元403将读取到的所述业务数据存储至所述区块中,包括:In another embodiment of the present application, the processing unit 403 stores the read business data in the block, including:
根据所述业务数据对应的受理时间的先后,依次将读取到的所述业务数据存储至所述区块中。The read business data are stored in the blocks in sequence according to the order of the acceptance times corresponding to the business data.
在本申请的另一个实施例中,所述数据处理设备还包括:创建单元405,其中:In another embodiment of the present application, the data processing device further includes: a creation unit 405, wherein:
所述创建单元405,预先根据业务的处理等级创建不同的数据处理队列;The creation unit 405 creates different data processing queues in advance according to the processing level of the business;
所述存储单元402根据所述处理等级,将所述业务数据存储至与所述处理等级匹配的数据处理队列中,包括:The storage unit 402 stores the service data in a data processing queue matching the processing level according to the processing level, including:
根据处理等级与数据处理队列之间的对应关系,确定与所述业务数据中包含的处理等级对应的数据处理队列;determining, according to a correspondence between processing levels and data processing queues, a data processing queue corresponding to the processing level contained in the business data;
将所述业务数据存储至确定的所述数据处理队列中。The business data is stored in the determined data processing queue.
在本申请的另一个实施例中,所述处理单元403分别从不同的所述数据处理队列中读取满足设定条件的业务数据,包括:In another embodiment of the present application, the processing unit 403 reads the service data that meets the set conditions from different data processing queues, including:
针对不同的所述数据处理队列,分别执行以下操作:For different data processing queues, the following operations are performed respectively:
确定第一数据处理队列对应的处理等级,并获取预设的所述处理等级对应的处理比例;Determining a processing level corresponding to the first data processing queue, and obtaining a preset processing ratio corresponding to the processing level;
根据确定的所述处理比例和所述区块的存储容量,确定处理数量,并从所述第一数据处理队列中依次读取满足所述处理数量的业务数据。The processing quantity is determined according to the determined processing ratio and the storage capacity of the block, and the business data that meets the processing quantity is read sequentially from the first data processing queue.
需要说明的是,本申请实施例提供的数据处理设备可以通过软件方式实现,也可以通过硬件方式实现,这里不做具体限定。数据处理设备通过按照处理等级将不同的业务数据存储至不同的数据处理队列中,以及在向区块中存储数据时,按照设定条件从不同的数据处理队列中读取一定数量的业务数据,以实现不同处理等级的业务数据都可以得到处理,打破了现有技术中单一按照时间因素处理业务数据的规定,避免了现有技术中业务优先级比较高的业务的处理效率比较低的问题,本申请实施例提供出的方案既保证了业务优先级高的业务的业务数据的处理效率,也保证了业务优先级低的业务的业务数据的处理效率,在满足业务处理优先级时,增加了区块链中业务数据处理的灵活性,也提升了区块链在业务应用领域的使用价值。It should be noted that the data processing device provided in the embodiment of the present application can be implemented by software or hardware, which is not specifically limited here. The data processing device stores different business data in different data processing queues according to the processing level, and when storing data in the block, reads a certain amount of business data from different data processing queues according to the set conditions, so that business data of different processing levels can be processed, breaking the provisions of the prior art that only process business data according to time factors, and avoiding the problem of low processing efficiency of businesses with higher business priorities in the prior art. The solution provided in the embodiment of the present application not only ensures the processing efficiency of business data of businesses with high business priorities, but also ensures the processing efficiency of business data of businesses with low business priorities. When meeting the business processing priority, it increases the flexibility of business data processing in the blockchain and enhances the use value of the blockchain in the field of business applications.
在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable GateArray,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware DescriptionLanguage)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(RubyHardware Description Language)等,目前最普遍使用的是VHDL(Very-High-SpeedIntegrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and/or hardware.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to the flowcharts and/or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and/or box in the flowchart and/or block diagram, as well as the combination of processes and/or boxes in the flowchart and/or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims (18)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| HK18106425.2A HK1247301B (en) | 2018-05-17 | Data processing method and equipment based on blockchain |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| HK18106425.2A HK1247301B (en) | 2018-05-17 | Data processing method and equipment based on blockchain |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1247301A1 HK1247301A1 (en) | 2018-09-21 |
| HK1247301B true HK1247301B (en) | 2021-07-23 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI691855B (en) | Blockchain-based data processing method and equipment | |
| TWI660274B (en) | Data processing method and equipment based on blockchain | |
| CN111756550B (en) | A blockchain consensus method and device | |
| TWI695260B (en) | Block data verification method and device | |
| CN107450981A (en) | A kind of block chain common recognition method and apparatus | |
| CN107402824A (en) | A kind of method and device of data processing | |
| WO2024250650A1 (en) | Heterogeneous chip task scheduling method and apparatus based on sequence generation | |
| CN111967767A (en) | Business risk identification method, device, equipment and medium | |
| HK1247301B (en) | Data processing method and equipment based on blockchain | |
| CN116954954A (en) | Method and device for processing multi-task queues, storage medium and electronic equipment | |
| HK1247300B (en) | Data processing method and equipment based on blockchain | |
| CN114296709A (en) | Code processing method, device, equipment and medium | |
| CN107645541B (en) | Data storage method and device and server | |
| HK1247301A1 (en) | Data processing method and equipment based on blockchain | |
| HK1248349B (en) | Data processing method and equipment based on blockchain | |
| HK1247357B (en) | Block chain consensus method and device | |
| CN116232919A (en) | Method, device, storage medium and electronic equipment for dense state data statistics | |
| HK40039065B (en) | Blockchain consensus method and device | |
| HK1247300A1 (en) | Data processing method and equipment based on blockchain | |
| HK1247359B (en) | Block chain consensus method and device | |
| HK1248378B (en) | Service publishing method and device, and equipment | |
| HK1248841B (en) | Data processing method and equipment based on blockchain | |
| HK1247325B (en) | Data processing method and device | |
| HK1247457B (en) | Block chain service acceptance and consensus methods and devices | |
| HK1247358B (en) | Block chain-based data processing method and device |