Disclosure of Invention
An embodiment of the present specification provides a data processing method and apparatus based on a block chain, and an electronic device:
according to a first aspect of embodiments herein, there is provided a method of data processing based on a blockchain,
receiving a transaction which is initiated by a service party and carries out multi-dimensional processing aiming at target data;
responding to the transaction, and inquiring an intelligent contract corresponding to each dimension;
calling data processing logic declared in the intelligent contract corresponding to the inquired dimensions; wherein the data processing logic comprises:
acquiring target data of a current dimension and historical data of the current dimension in historical transactions, and processing the target data and the historical data of the current dimension.
Optionally, the historical data of the current dimension in the historical transaction is associated by a digital summary of the historical transaction;
the acquiring of the historical data of the current dimension in the historical transaction specifically includes:
acquiring a digital abstract of a parent transaction recorded in an intelligent contract corresponding to the current dimension; wherein the parent transaction is a historical latest transaction of a current dimension;
and acquiring historical data corresponding to the digital abstract from historical data.
Optionally, the digital summary of the parent transaction includes:
and performing hash calculation on the historical data of the current dimension in the parent transaction to obtain a hash value.
Optionally, the method further includes:
calculating a digital summary of the target data of the current dimension;
and updating the digital abstract of the parent transaction recorded in the intelligent contract under the current dimension into the digital abstract of the target data.
Optionally, the calculating the digital summary of the target data of the current dimension specifically includes:
performing hash calculation on the target data of the current dimension;
and determining the hash value obtained by the hash calculation as a digital abstract.
Optionally, the querying, in response to the transaction, an intelligent contract corresponding to each dimension specifically includes:
and responding to the transaction, calling a routing logic declared in a master control intelligent contract issued in the block chain, and inquiring an intelligent contract corresponding to the dimension parameter carried in the transaction.
Optionally, the block chain is a federation chain.
Optionally, the method further includes:
receiving an intelligent contract corresponding to any dimension created by any alliance party in the alliance chain;
invoking voting logic declared in a smart contract published on the federation chain; wherein the voting logic is:
writing a voting event in a transaction log, and submitting voting transaction to the intelligent contract after a coalition party of the coalition chain monitors the voting event; and the intelligent contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract corresponding to any dimension.
According to a second aspect of embodiments herein, there is provided a block chain based data processing apparatus,
the receiving unit is used for receiving the transaction which is initiated by the service party and carries out multi-dimensional processing aiming at the target data;
the query unit is used for responding to the transaction and querying the intelligent contract corresponding to each dimension;
the processing unit is used for calling the data processing logic declared in the intelligent contract corresponding to each inquired dimension; wherein the data processing logic comprises: acquiring target data of a current dimension and historical data of the current dimension in historical transactions, and processing the target data and the historical data of the current dimension.
Optionally, the historical data of the current dimension in the historical transaction is associated by a digital summary of the historical transaction;
the acquiring of the historical data of the current dimension in the historical transaction specifically includes:
acquiring a digital abstract of a parent transaction recorded in an intelligent contract corresponding to the current dimension; wherein the parent transaction is a historical latest transaction of a current dimension;
and acquiring historical data corresponding to the digital abstract from historical data.
Optionally, the apparatus further comprises:
the calculation subunit calculates a digital abstract of the target data of the current dimension;
and the updating subunit is used for updating the digital abstract of the parent transaction recorded in the intelligent contract under the current dimensionality into the digital abstract of the target data.
Optionally, the querying unit specifically includes:
and responding to the transaction, calling a routing logic declared in a master control intelligent contract issued in the block chain, and inquiring an intelligent contract corresponding to the dimension parameter carried in the transaction.
Optionally, the block chain is a federation chain.
Optionally, the apparatus further comprises:
receiving an intelligent contract corresponding to any dimension created by any alliance party in the alliance chain;
invoking voting logic declared in a smart contract published on the federation chain; wherein the voting logic is:
writing a voting event in a transaction log, and submitting voting transaction to the intelligent contract after a coalition party of the coalition chain monitors the voting event; and the intelligent contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract corresponding to any dimension.
According to a third aspect of embodiments herein, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured as any one of the above block chain based data processing methods.
The embodiment of the specification provides a data processing scheme based on a block chain, and an intelligent contract corresponding to each dimension required for multi-dimensional data processing is issued in the block chain in advance; after a business party initiates a transaction for carrying out multi-dimensional processing on target data, a data processing logic declared in an intelligent contract corresponding to each dimension is called, and the target data and the historical data of each dimension are processed. The description also provides an association structure of the uplink transaction, wherein the hash value calculated according to the parent transaction content is used as the digital abstract of the sub-transaction, so that the transactions in all dimensions are connected in series, and the digital abstract of the latest transaction is recorded in the intelligent contract of the corresponding dimension; therefore, when the target data is processed, historical data of each dimension can be obtained based on the parent transaction digital abstract recorded in the intelligent contract of each dimension. On one hand, the multi-dimensional data processing based on the block chain can be realized, and the validity of the data processing is ensured due to the fact that the block chain cannot be tampered; on the other hand, the block chains are transparent in disclosure, so that data processing results can be shared in the whole network, and the data circulation efficiency is improved.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Data processing generally refers to a process of processing target data according to a certain processing rule. For example, data analysis is to analyze target data based on preset rules to obtain an analysis result.
Most of the traditional data processing is private; that is, the enterprise uses its own data processing system to process data, and the processing result is also private. Because the data processing system is customized for the user's private, the final data processing result can only be private and is difficult to share publicly. For example, for internet finance companies, the credit scoring system and the user portrait of the internet finance companies are owned respectively.
Private data processing is realized in an enterprise; the method is not disclosed externally, and no external supervision exists; the lack of disclosure and regulatory mechanisms presents the problem of being untrusted by the enterprise.
The embodiment of the specification provides a data processing scheme based on a block chain, and an intelligent contract corresponding to each dimension required for multi-dimensional data processing is issued in the block chain in advance; after a business party initiates a transaction for carrying out multi-dimensional processing on target data, a data processing logic declared in an intelligent contract corresponding to each dimension is called, and the target data and the historical data of each dimension are processed. The description also provides an association structure of the uplink transaction, wherein the hash value calculated according to the parent transaction content is used as the digital abstract of the sub-transaction, so that the transactions in all dimensions are connected in series, and the digital abstract of the latest transaction is recorded in the intelligent contract of the corresponding dimension; therefore, when the target data is processed, historical data of each dimension can be obtained based on the parent transaction digital abstract recorded in the intelligent contract of each dimension. On one hand, the multi-dimensional data processing based on the block chain can be realized, and the validity of the data processing is ensured due to the fact that the block chain cannot be tampered; on the other hand, the block chains are transparent in disclosure, so that data processing results can be shared in the whole network, and the data circulation efficiency is improved.
It should be noted that the association structure of the uplink transaction provided in the present specification may refer to an association relationship between historical data of the same dimension in the transaction of the evidence stored in the block chain. In this way, the association between the multidimensional data is realized and the data cannot be tampered.
Please refer to fig. 1, which is a schematic diagram illustrating an association structure of history data with the same dimension between different blocks in a block chain. In fig. 1, tile 0, tile 1, tile …, tile N-1, and tile N are generated according to the conventional tile generation method in the tile chain. The block header of the block is the hash value of the block body of the previous block. For example, the block header of block 1 is the hash value calculated from the block body hash of block 0; as indicated by the solid arrows in fig. 1.
The historical transactions are typically recorded within the tile body of the tile. A transaction may include multiple dimensions of data. Assume that data Tx 1 belongs to the first dimension, data Tx 2 belongs to the second dimension, and data Tx N belongs to the third dimension in block 0. In fig. 1, the data belonging to the first dimension includes Tx 1 in block 0, Tx 1 in block 1, Tx 1 in block N-1 and Tx 2 in block N, and the data of the first dimension is related to each other by a dashed arrow 1;
similarly, the data belonging to the second dimension includes Tx 2 in block 0, Tx N in block 1, Tx 2 in block N-1 and Tx 1 in block N, and the data of the second dimension are related to each other by a dashed arrow 2;
the data belonging to the third dimension includes Tx N in block 0, Tx 2 in block 1, Tx N in block N-1 and Tx N in block N, and the data of the third dimension is related to each other by a dotted arrow 3.
It should be noted that fig. 1 is for convenience of understanding, one datum corresponds to only one dimension, and in practical applications, one datum may correspond to multiple dimensions.
In particular, the dashed arrows actually represent the digital abstract. For example, in the first dimension, the association relationship between Tx 1 of block 0 and Tx 2 of block 1 is actually:
the digital digest of Tx 2 of block 1 includes a hash value calculated for the content hash of Tx 1 of block 0; 0 denotes a block, and Tx 1 denotes data. The digital digest of Tx 2 of block N is the hash value calculated for the content hash of Tx 1 of block N-1.
Similarly, in the second dimension, the digital digest of Tx N of block 1 is a hash value calculated for the content hash of Tx 2 of block 0; etc. will not be described in detail.
And the hash value calculated according to the parent transaction content is used as the digital abstract of the child transaction, so that the transactions in all dimensions are connected in series, and the digital abstract of the latest transaction is recorded in the intelligent contract of the corresponding dimension.
Taking the first dimension as an example, when there is no historical transaction, the digital abstract of the parent transaction in the intelligent contract corresponding to the first dimension is null; when the first block 0 appears, the digital abstract of the parent transaction recorded in the intelligent contract is updated to hash (0, Tx 1), wherein 0 can represent the parent transaction (block), and Tx 1 represents data; when the second block 1 appears, the second block is updated to hash (1, Tx 1) again; when the (N-1) th block appears, the block is updated to be hash (N-1, Tx 1); when the nth block occurs, the hash is updated to be (N, Tx 2).
The following is a flow chart of a data processing method based on block chains as proposed in the present specification, which is described with reference to fig. 2. The method comprises the following steps:
step 110: receiving a transaction which is initiated by a service party and carries out multi-dimensional processing aiming at target data;
step 120: responding to the transaction, and inquiring an intelligent contract corresponding to each dimension;
step 130: calling data processing logic declared in the intelligent contract corresponding to the inquired dimensions; wherein the data processing logic comprises: acquiring target data of a current dimension and historical data of the current dimension in historical transactions, and processing the target data and the historical data of the current dimension.
The blockchain described in this specification may specifically include a private chain, a common chain, a federation chain, and the like, and is not particularly limited in this specification.
For example, in one scenario, the block chain may specifically be a federation chain formed by enterprises performing data processing as federation members; the operator of the alliance chain can deploy corresponding business by relying on the alliance chain; the enterprise described above as a member of the federation may act as a service node for the service. Each service node can issue the generated or received service data in the form of transaction in the alliance chain, and after the transaction is subjected to consensus processing of the consensus nodes in the alliance chain, the transaction data is stored in a distributed database in the alliance chain, and uplink storage of the transaction information is completed.
It should be noted that the Transaction (Transaction) described in this specification refers to a piece of data created by a client of a blockchain and needs to be finally issued to a distributed database of the blockchain.
Transactions in a blockchain, generally have a narrow sense of transaction and a broad sense of transaction score. A narrowly defined transaction refers to a transfer of value issued by a user to a blockchain; for example, in a conventional bitcoin blockchain network, the transaction may be a transfer initiated by the user in the blockchain. The broad transaction refers to a piece of business data with business intention, which is issued to the blockchain by a user; for example, an operator may build a federation chain based on actual business requirements, relying on the federation chain to deploy some other types of online services (e.g., a credentialing service, a data processing service, etc.) unrelated to value transfer, and in such federation chain, a transaction may be a business message or business request issued by a user in the federation chain with a business intent.
The client may include any type of upper layer application that uses the bottom layer service data stored in the blockchain as a data support to implement a specific service function.
In block chain techniques, nodes in a block chain typically need to rely on a corresponding Smart contract (Smart contract) to operate on the block. Operations such as storing, modifying, deleting, etc. in a blockchain all need to rely on smart contracts. The intelligent contract may be a computer protocol intended for application to propagate, verify, or execute contracts in an informational manner that may be deployed on a blockchain. Performing the corresponding operation can be realized by declaring the business logic in the smart contract. Smart contracts allow trusted transactions to be conducted without third parties. These transactions are traceable and irreversible. Smart contracts can provide security over traditional contract methodologies and reduce other transaction costs associated with contracts. In general, the intelligent contracts can be deployed locally at the block link points, and when the nodes need to execute a certain action, the corresponding intelligent contracts can be called, and the intelligent contracts are operated to execute the service logic stated in the intelligent contracts, so that the execution result is obtained.
The intelligent contracts for each dimension in the blockchain in this specification may be created by any federation party. Specifically, in an embodiment, the method further includes:
receiving an intelligent contract corresponding to any dimension created by any alliance party in the alliance chain;
invoking voting logic declared in a smart contract published on the federation chain; wherein the voting logic is:
writing a voting event in a transaction log, and submitting voting transaction to the intelligent contract after a coalition party of the coalition chain monitors the voting event; and the intelligent contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract corresponding to any dimension.
A federation party (also referred to as a federation node) in any one federation chain may initiate a transaction to the federation chain that creates an intelligent contract for multidimensional data processing. Each party in the chain of the alliances to be waited to examine the created intelligent contract and return a voting result; and if the statistical voting result meets the preset condition, the created intelligent contract takes effect.
A schematic flow diagram for creating an intelligent contract for multidimensional data processing is described below in conjunction with fig. 3.
1. The alliance chain initializes the general control intelligent contract.
And the master control intelligent contract is used for routing to the intelligent contract with the corresponding dimension according to the transaction submitted by the service party.
2. The federation chain initializes a voting intelligence contract.
The voting intelligence industry is used for voting by all alliance parties in an alliance chain to determine whether the created intelligent contract is effective.
3. Federation party a in the federation chain initiates a transaction to create an intelligent contract for multidimensional data processing.
A coalition party may submit multiple intelligent contracts, each representing one dimension of data processing.
And 3.1, after the intelligent contract is successfully created, returning a creation result and a contract address to the alliance party.
If intelligent contracts are chained, each intelligent contract can be assigned a unique contract address, and can be routed to the stored intelligent contracts according to the contract addresses.
4. The alliance party A initiates a registration request of the created intelligent contract;
and 4.1, registering the intelligent contract by the master control intelligent contract and recording the contract address.
The general control intelligent contract records the contract address of the intelligent contract so as to carry out subsequent routing.
And 4.2, returning a registration result to the alliance party A.
5. The alliance chain broadcasts a notice to the whole network to inform all alliance parties to vote on the intelligent contract.
6. And each alliance party audits the intelligent contract and submits the voting result to the voting contract.
7. And (4) counting the voting result by the voting contract of the alliance chain, and if the voting result reaches a preset condition, informing the alliance party A that the intelligent contract takes effect.
The preset condition may include that the number of votes that pass the audit reaches a threshold, and the votes are considered to pass. The threshold value can be flexibly adjusted according to requirements, and if the auditing tends to be strict, the threshold value can be set to be 90% of the number of the parties in the coalition; if the auditing tends to be relaxed, the threshold may be set to 50% of the federating party's quantity.
Therefore, the intelligent contract for multi-dimensional data processing is effective, and the service of multi-dimensional data processing can be provided for business parties.
In an embodiment, the querying, in response to the transaction, an intelligent contract corresponding to each dimension specifically includes:
and responding to the transaction, calling a routing logic declared in a master control intelligent contract issued in the block chain, and inquiring an intelligent contract corresponding to the dimension parameter carried in the transaction.
In practical application, if a business party needs to call a target intelligent contract, the contract address of the target intelligent contract needs to be written in a transaction; however, in practical applications, since the number of intelligent contracts is large, especially the intelligent contracts of multidimensional data processing shown in this specification, one dimension corresponds to one intelligent contract, and many intelligent contracts are created by a coalition party, and if a business party needs to memorize the contract address of each intelligent contract, the cost is high. Therefore, the specification provides a general control intelligent contract for routing, a business party only needs to write dimension parameters needing to be executed in transaction submission, and the comprehensive intelligent contract can be automatically routed to the intelligent contract with the corresponding dimension according to the dimension parameters.
Furthermore, whether the inquired intelligent contract takes effect or not can be judged, and the data processing logic declared in the intelligent contract which takes effect and corresponding to each inquired dimension is called.
As shown in fig. 3, after the intelligent contract is created, the coalition parties are required to perform audit voting, and the intelligent contract can take effect only when the voting passes. Therefore, only valid smart contracts can be invoked even when data processing is performed.
The digital digest described in this specification may be a hash value obtained by performing hash (hash, also referred to as hash) calculation on original data.
In an embodiment, the acquiring historical data of a current dimension in historical transactions specifically includes:
acquiring a digital abstract of a parent transaction recorded in an intelligent contract corresponding to the current dimension; wherein the parent transaction is a historical latest transaction of a current dimension;
and acquiring historical data corresponding to the digital abstract from historical data.
Wherein the digital summary of the parent transaction comprises:
and performing hash calculation on the historical data of the current dimension in the parent transaction to obtain a hash value.
In an embodiment, the method further comprises:
calculating a digital summary of the target data of the current dimension;
and updating the digital abstract of the parent transaction recorded in the intelligent contract under the current dimension into the digital abstract of the target data.
The calculating the digital summary of the target data of the current dimension specifically includes:
performing hash calculation on the target data of the current dimension;
and determining the hash value obtained by the hash calculation as a digital abstract.
As shown in fig. 1, the historical data of the current dimension in the historical transaction is related by the digital summary of the historical transaction.
In the execution process of the intelligent contract of each dimension, a digital abstract of a parent transaction recorded in the intelligent contract can be obtained;
assembling a new transaction according to the summary data of the parent transaction;
and after the transaction assembly is completed, calculating the digital abstract of the current transaction, and updating the digital abstract of the parent transaction.
After the new transaction is assembled and generated and the intelligent contract is executed, the new transaction is generated independently to complete the execution process of the intelligent contract.
Similarly, the master control intelligent contract can call the registered and effective intelligent contract of each dimension to perform the same operation.
To sum up, the embodiments of the present specification provide a data processing scheme based on a block chain, and issue, in advance, an intelligent contract corresponding to each dimension required for performing multidimensional data processing in the block chain; after a business party initiates a transaction for carrying out multi-dimensional processing on target data, a data processing logic declared in an intelligent contract corresponding to each dimension is called, and the target data and the historical data of each dimension are processed. The description also provides an association structure of the uplink transaction, wherein the hash value calculated according to the parent transaction content is used as the digital abstract of the sub-transaction, so that the transactions in all dimensions are connected in series, and the digital abstract of the latest transaction is recorded in the intelligent contract of the corresponding dimension; therefore, when the target data is processed, historical data of each dimension can be obtained based on the parent transaction digital abstract recorded in the intelligent contract of each dimension. On one hand, the multi-dimensional data processing based on the block chain can be realized, and the validity of the data processing is ensured due to the fact that the block chain cannot be tampered; on the other hand, the block chains are transparent in disclosure, so that data processing results can be shared in the whole network, and the data circulation efficiency is improved.
Corresponding to the foregoing embodiments of the data processing method based on a blockchain, the present specification also provides embodiments of a data processing apparatus based on a blockchain. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer business program instructions in the nonvolatile memory into the memory for operation through the processor of the device in which the device is located. From a hardware aspect, as shown in fig. 4, the hardware structure diagram of the device in which the data processing apparatus based on the blockchain is located in this specification is shown, except for the processor, the network interface, the memory, and the nonvolatile memory shown in fig. 4, the device in which the apparatus is located in the embodiment may also include other hardware generally according to the actual function of data processing based on the blockchain, which is not described again.
Referring to fig. 5, a block diagram of a data processing apparatus based on a blockchain according to an embodiment of the present disclosure is provided, where the apparatus corresponds to the embodiment shown in fig. 2, and the apparatus includes:
the receiving unit 310 receives a transaction initiated by a service party and performing multidimensional processing on target data;
the query unit 320 is used for responding to the transaction and querying the intelligent contract corresponding to each dimension;
the processing unit 330 is used for calling data processing logic declared in the intelligent contract corresponding to the inquired dimensions; wherein the data processing logic comprises: acquiring target data of a current dimension and historical data of the current dimension in historical transactions, and processing the target data and the historical data of the current dimension.
Optionally, the historical data of the current dimension in the historical transaction is associated by a digital summary of the historical transaction;
the acquiring of the historical data of the current dimension in the historical transaction specifically includes:
acquiring a digital abstract of a parent transaction recorded in an intelligent contract corresponding to the current dimension; wherein the parent transaction is a historical latest transaction of a current dimension;
and acquiring historical data corresponding to the digital abstract from historical data.
Optionally, the digital summary of the parent transaction includes:
and performing hash calculation on the historical data of the current dimension in the parent transaction to obtain a hash value.
Optionally, the apparatus further comprises:
the calculation subunit calculates a digital abstract of the target data of the current dimension;
and the updating subunit is used for updating the digital abstract of the parent transaction recorded in the intelligent contract under the current dimensionality into the digital abstract of the target data.
Optionally, the calculating the digital summary of the target data of the current dimension specifically includes:
performing hash calculation on the target data of the current dimension;
and determining the hash value obtained by the hash calculation as a digital abstract.
Optionally, the querying unit specifically includes:
and responding to the transaction, calling a routing logic declared in a master control intelligent contract issued in the block chain, and inquiring an intelligent contract corresponding to the dimension parameter carried in the transaction.
Optionally, the block chain is a federation chain.
Optionally, the apparatus further comprises:
receiving an intelligent contract corresponding to any dimension created by any alliance party in the alliance chain;
invoking voting logic declared in a smart contract published on the federation chain; wherein the voting logic is:
writing a voting event in a transaction log, and submitting voting transaction to the intelligent contract after a coalition party of the coalition chain monitors the voting event; and the intelligent contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract corresponding to any dimension.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Fig. 5 above describes the internal functional modules and the structural schematic of the data processing apparatus based on the block chain, and the substantial execution subject thereof may be an electronic device, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
receiving a transaction which is initiated by a service party and carries out multi-dimensional processing aiming at target data;
responding to the transaction, and inquiring an intelligent contract corresponding to each dimension;
calling data processing logic declared in the intelligent contract corresponding to the inquired dimensions; wherein the data processing logic comprises:
acquiring target data of a current dimension and historical data of the current dimension in historical transactions, and processing the target data and the historical data of the current dimension.
Optionally, the historical data of the current dimension in the historical transaction is associated by a digital summary of the historical transaction;
the acquiring of the historical data of the current dimension in the historical transaction specifically includes:
acquiring a digital abstract of a parent transaction recorded in an intelligent contract corresponding to the current dimension; wherein the parent transaction is a historical latest transaction of a current dimension;
and acquiring historical data corresponding to the digital abstract from historical data.
Optionally, the digital summary of the parent transaction includes:
and performing hash calculation on the historical data of the current dimension in the parent transaction to obtain a hash value.
Optionally, the method further includes:
calculating a digital summary of the target data of the current dimension;
and updating the digital abstract of the parent transaction recorded in the intelligent contract under the current dimension into the digital abstract of the target data.
Optionally, the calculating the digital summary of the target data of the current dimension specifically includes:
performing hash calculation on the target data of the current dimension;
and determining the hash value obtained by the hash calculation as a digital abstract.
Optionally, the querying, in response to the transaction, an intelligent contract corresponding to each dimension specifically includes:
and responding to the transaction, calling a routing logic declared in a master control intelligent contract issued in the block chain, and inquiring an intelligent contract corresponding to the dimension parameter carried in the transaction.
Optionally, the block chain is a federation chain.
Optionally, the method further includes:
receiving an intelligent contract corresponding to any dimension created by any alliance party in the alliance chain;
invoking voting logic declared in a smart contract published on the federation chain; wherein the voting logic is:
writing a voting event in a transaction log, and submitting voting transaction to the intelligent contract after a coalition party of the coalition chain monitors the voting event; and the intelligent contract collects and sorts the voting transactions to obtain an auditing result of the intelligent contract corresponding to any dimension.
In the above embodiments of the electronic device, it should be understood that the Processor may be a Central Processing Unit (CPU), other general-purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the aforementioned memory may be a read-only memory (ROM), a Random Access Memory (RAM), a flash memory, a hard disk, or a solid state disk. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiment of the electronic device, since it is substantially similar to the embodiment of the method, the description is simple, and for the relevant points, reference may be made to part of the description of the embodiment of the method.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.