CN111506584B - Block chain-based service data processing method and device and computer equipment - Google Patents

Block chain-based service data processing method and device and computer equipment Download PDF

Info

Publication number
CN111506584B
CN111506584B CN202010224087.6A CN202010224087A CN111506584B CN 111506584 B CN111506584 B CN 111506584B CN 202010224087 A CN202010224087 A CN 202010224087A CN 111506584 B CN111506584 B CN 111506584B
Authority
CN
China
Prior art keywords
blockchain
service
data
block chain
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010224087.6A
Other languages
Chinese (zh)
Other versions
CN111506584A (en
Inventor
唐俊峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202010224087.6A priority Critical patent/CN111506584B/en
Publication of CN111506584A publication Critical patent/CN111506584A/en
Application granted granted Critical
Publication of CN111506584B publication Critical patent/CN111506584B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a block chain-based business data processing method, a block chain-based business data processing device and computer equipment. The method comprises the following steps: acquiring a block chain service calling request, wherein the block chain service calling request carries service data and a scene identifier, and the service data comprises the block chain identifier; invoking a pre-configured blockchain service according to the blockchain service invocation request; acquiring a first configuration file according to a pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file; determining a data processing strategy corresponding to the scene identifier in a first configuration file according to a pre-configured blockchain service; calculating service data according to a data processing strategy to obtain a data block containing a block chain identifier; and storing the data block into a block chain database corresponding to the block chain identification. By adopting the method, the maintenance cost of the service system can be reduced.

Description

Block chain-based service data processing method and device and computer equipment
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a blockchain-based service data processing method, device, computer device, and storage medium.
Background
With the development of internet technology, a blockchain technology has emerged, which can store some important data and ensure the security of the data. Blockchains are generally understood to be a distributed ledger that is also essentially a distributed computing and storage system. When an enterprise provides blockchain services to a large number of users, in order to meet different demands of people, multiple service modes often need to be provided, and business data related to the different service modes are also different. In the conventional manner, in order to meet different demands of different users, a set of blockchain services is deployed for each service mode, so that a service system is very huge, and more manpower and material resources are required for system maintenance. Therefore, how to reduce the maintenance cost of the service system is a technical problem to be solved at present.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a blockchain-based service data processing method, apparatus, computer device, and storage medium that can reduce maintenance costs of a service system.
A blockchain-based business data processing method, the method comprising:
Acquiring a block chain service call request, wherein the block chain service call request carries service data, and the service data comprises a block chain identifier and a scene identifier;
invoking a pre-configured blockchain service according to the blockchain service invocation request;
acquiring a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file;
determining a data processing strategy corresponding to the scene identifier in the first configuration file according to the pre-configured blockchain service;
calculating the service data according to the data processing strategy to obtain a data block containing the block chain identifier;
and storing the data block into a block chain database corresponding to the block chain identification.
In one embodiment, the calculating the service data according to the data processing policy, to obtain the data block including the blockchain identifier includes:
acquiring a second configuration file according to the pre-configured blockchain service, wherein a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier are recorded in the second configuration file;
Transmitting the service data to the computing nodes corresponding to other computing node identifiers according to the preconfigured blockchain service so that the computing nodes corresponding to the other computing node identifiers can perform consensus on the service data according to the data processing strategy;
receiving service data after consensus returned by the computing node corresponding to the other computing node identifiers;
and calculating the service data after the consensus according to a pre-configured blockchain service to obtain a data block containing the blockchain identifier.
In one embodiment, before the obtaining the blockchain invocation request, the method further includes:
acquiring a block chain registration request, wherein the block chain registration request carries registration information;
verifying the validity of the registration information;
after passing the validity verification, configuring the registration information to obtain configuration information;
and generating a blockchain corresponding to the blockchain registration request according to the configuration information.
In one embodiment, after the generating the blockchain corresponding to the blockchain registration request according to the configuration information, the method further includes:
creating a corresponding blockchain database according to the blockchain identification of the blockchain;
determining the service life of the block chain according to a preset strategy;
And storing the service deadline and the configuration information into a blockchain database corresponding to the blockchain identification.
In one embodiment, the blockchain registration request carries a group identifier, and after the storing the service deadline in a blockchain database corresponding to the blockchain identifier, the method further includes:
generating a blockchain use permission certificate according to the service deadline and the configuration information;
dividing the blockchain usage rights certificate into at least one blockchain usage rights sub-certificate;
and sending the blockchain use authority sub-certificate to terminals corresponding to other group member identifications in the group identifications.
In one embodiment, before the invoking the pre-configured blockchain service according to the blockchain service invocation request, the method further includes:
acquiring the service period of the blockchain corresponding to the blockchain identifier from a blockchain database corresponding to the blockchain identifier;
identifying whether the blockchain corresponding to the blockchain is out of date according to the service deadline and the current time;
when the blockchain expires, the data block corresponding to the blockchain is deleted.
A blockchain-based traffic data processing device, the device comprising:
The communication module is used for acquiring a block chain service calling request, wherein the block chain service calling request carries service data, and the service data comprises a block chain identifier and a scene identifier;
the calling module is used for calling the pre-configured block chain service according to the block chain service calling request;
the acquisition module acquires a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file;
a first determining module, configured to determine, according to the preconfigured blockchain service, a data processing policy corresponding to the scene identifier in the first configuration file;
the calculation module is used for calculating the service data according to the data processing strategy to obtain a data block containing the block chain identifier;
and the storage module is used for storing the data block into a block chain database corresponding to the block chain identification.
In one embodiment, the computing module is further configured to obtain a second configuration file according to the preconfigured blockchain service, where a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier are recorded in the second configuration file; transmitting the service data to the computing nodes corresponding to other computing node identifiers according to the preconfigured blockchain service so that the computing nodes corresponding to the other computing node identifiers can perform consensus on the service data according to the data processing strategy; receiving service data after consensus returned by the computing node corresponding to the other computing node identifiers; and calculating the service data after the consensus according to a pre-configured blockchain service to obtain a data block containing the blockchain identifier.
A computer device comprising a memory storing a computer program executable on the processor and a processor implementing the steps of the method embodiments described above when the computer program is executed by the processor.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the various method embodiments described above.
The method, the device, the computer equipment and the storage medium for processing the service data based on the blockchain acquire a blockchain service call request, wherein the blockchain service call request carries the service data and the scene identifier, and the service data comprises the blockchain identifier. Invoking a pre-configured blockchain service according to the blockchain service invocation request. And obtaining a first configuration file according to the pre-configured blockchain service, determining a data processing strategy corresponding to the scene identifier in the first configuration file, and further calculating the service data according to the data processing strategy. The pre-configured blockchain service determines a data processing strategy through the scene identification, can provide corresponding scene services for different groups, realizes sharing of one set of blockchain service among a plurality of groups, and effectively reduces the maintenance cost of a blockchain system. The data blocks obtained through calculation are stored in the block chain database corresponding to the block chain identification, so that the data blocks belonging to different block chains can be better isolated, the data blocks of different block chains are not required to be stored in the same database, and the data security of the block chain is further improved.
Drawings
FIG. 1 is an application environment diagram of a blockchain-based business data processing method in one embodiment;
FIG. 2 is a flow diagram of a method of processing blockchain-based business data in an embodiment;
FIG. 3 is a block diagram illustrating a conventional block chain data structure and a block chain multi-chain data structure according to one embodiment;
FIG. 4 is a flowchart illustrating a step of calculating service data according to a data processing policy to obtain a data block including a blockchain identifier in one embodiment;
FIG. 5 is a flow diagram of implementing sharing of a set of blockchain services among different groups in one embodiment;
FIG. 6 is a block diagram of a block chain based traffic data processing apparatus in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The business data processing method based on the block chain can be applied to an application environment shown in fig. 1. The application environment includes a server cluster 104 formed by a plurality of servers and a terminal 102, and the plurality of terminals 102 may be plural. Each server in the cluster of servers may act as a compute node. The server cluster may be a computing cluster. A blockchain system 106 is deployed in the computing cluster. The terminal 102 is connected to each server in the server cluster 104 via a network, the servers are connected via the network, and the servers are connected via the network to the blockchain system 106. The server acquires a block chain service calling request sent by the terminal, wherein the block chain service calling request carries service data and a scene identifier, and the service data comprises the block chain identifier. The server invokes the pre-configured blockchain service according to the blockchain service invocation request. The server acquires a first configuration file according to a pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file. And the server determines a data processing strategy corresponding to the scene identifier in the first configuration file according to the pre-configured blockchain service. And the server calculates the service data according to the data processing strategy to obtain the data block containing the block chain identifier. The server stores the data block into a blockchain database corresponding to the blockchain identifier. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, among others. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method for processing service data based on a blockchain is provided, and the method is applied to each server in the server cluster in fig. 1, and each server is used as a computing node in the computing cluster, and includes the following steps:
step 202, a blockchain invoking request is obtained, wherein the blockchain invoking request carries service data and a scene identifier, and the service data comprises the blockchain identifier.
The server acquires a block chain service call request sent by the terminal, and analyzes the block chain service call request to obtain service data and scene identification. For example, the business data may be transaction data. The traffic data may include a blockchain identification. The blockchain identifier is used for marking and analyzing that the obtained service data belongs to the blockchain corresponding to the blockchain identifier. The computing clusters have a blockchain system pre-deployed therein. The blockchain system is a carrier and organization method for running blockchain technology, and can be specifically a blockchain cluster formed by a plurality of servers. Blockchain technology is an internet database technology that utilizes a blockchain data structure to verify and store data, a distributed node consensus algorithm to generate and update data, a cryptography way to ensure the security of data transmission and access, and an intelligent contract consisting of automated script code to program and manipulate data. In this embodiment, the blockchain system may be a federated chain system. At least two blockchains may be included in the blockchain system. Multiple blockchains in a blockchain system may be at the same level, being a multi-chain blockchain structure. When the blockchain processes the service data, an identification field, namely a blockchain identification, needs to be added in a data structure of the multi-chain blockchain to mark which chain the service data belongs to. For example, an identification field may be added as chain. The conventional blockchain data structure may be compared to a blockchain multi-chain data structure as shown in fig. 3. The blockchain multi-chain data structure adds an identification field and corresponding field values chain=1 and chain=3.
The scene identification is used to mark the specific scene to which the blockchain service applies. For example, the scene identification may include a scene identification of a forensic scene and a scene identification of an intelligent contract scene. Wherein the deposit certificate is a general ledger that records all historical transactions. An intelligent contract is a computer protocol in which the contract is propagated, verified, or executed in an informative manner. When the scene identifier is the scene identifier of the evidence-storing scene, the service data is required to be stored. At this time, the service data may be referred to as to-be-authenticated data. According to different evidence-storing scenes, corresponding data to be stored are different. For example, in a transaction scenario, the to-be-authenticated data may be transaction data, such as an electronic invoice, etc.; in a judicial scene, the data to be authenticated may be judicial data, such as copyright evidence, etc. When the scene identifier is the scene identifier of the intelligent contract scene, the scene identifier indicates that formal verification of the service data is needed, and automatic execution of the transaction is realized.
Step 204, invoking the pre-configured blockchain service according to the blockchain service invocation request.
The computing clusters are pre-configured with blockchain services. When a server in the computing cluster acquires a block chain service calling request sent by a terminal, a preset block chain service is called according to the block chain service calling request. The preset configured blockchain service can provide corresponding blockchain scenes for different groups, namely, a plurality of groups can share one preset configured blockchain service. Each group may correspond to a blockchain, and the server may maintain blockchains corresponding to multiple groups. Group members in each group can send a block chain service calling request to a server through a terminal, and the server analyzes the block chain service calling request to obtain service data. The server then invokes the pre-configured blockchain service according to the blockchain identification in the business data, and further calculates the business data according to the pre-configured blockchain service.
Step 206, obtaining a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file.
Step 208, determining a data processing strategy corresponding to the scene identifier in the first configuration file according to the pre-configured blockchain service.
Step 210, calculating the service data according to the data processing strategy to obtain the data block containing the block chain identifier.
Step 212, the data block is stored in the blockchain database corresponding to the blockchain identifier.
The method comprises the steps that a first configuration file corresponding to scene identifiers is pre-configured in a computing cluster, and a plurality of scene identifiers and data processing strategies corresponding to the scene identifiers are recorded in the first configuration file. The data processing policy may be a consensus algorithm or the like. The server determines a data processing strategy corresponding to the scene identifier in the first configuration file according to the pre-configured blockchain service, further performs consensus verification on the service data according to the corresponding data processing strategy, and after the consensus verification is passed, the computing node calculates the consensus service data to obtain a data block corresponding to the scene identifier and containing the blockchain identifier.
A data block is a container data structure that is contained in a block ledger that aggregates data to be authenticated. The block ledger is a carrier for recording the data to be authenticated generated for a period of time, and records the information of a plurality of data blocks. The data to be authenticated may be data that needs to be stored into the blockchain. The plurality of data chunks may be concatenated in the chunk ledger in a temporal order of chunk generation. The data block includes a block header and a block body. Wherein the block header records the time stamp of the previous sequential block and the time stamp of the current data block. The server links the data blocks in time sequence to form a blockchain.
In one embodiment, when receiving a blockchain service call request sent by a terminal corresponding to different groups, the blockchain service call request is parsed to obtain a plurality of blockchain identifications. And the server calculates the service data through a data processing strategy corresponding to the scene identifier, so that parallel calculation among a plurality of blockchains is realized. The server calculates the service data through the calculation nodes of different block chains, and a data block corresponding to each block chain can be obtained, so that corresponding block chains are generated according to the block chain identifications in the data blocks.
A blockchain database corresponding to the blockchain identification is pre-created in the server. The blockchain database is created from the blockchains that were successfully registered. After the server generates the data block, the data block may be stored in a blockchain database corresponding to the blockchain identifier.
In one embodiment, the terminal that sent the service invocation request may also be validated before invoking the pre-configured blockchain service according to the blockchain service invocation request. Specifically, the server acquires corresponding verification information according to the terminal identifier of the terminal, and verifies the validity of the terminal according to the verification information. And after the validity verification is passed, calculating the service data according to the data processing strategy corresponding to the scene identifier. Thereby ensuring the security of the blockchain service.
In this embodiment, a blockchain service invocation request is obtained, where the blockchain service invocation request carries service data and a scene identifier, and the service data includes the blockchain identifier. Invoking a pre-configured blockchain service according to the blockchain service invocation request. The method comprises the steps of obtaining a first configuration file according to a preset blockchain service, determining a data processing strategy corresponding to a scene identifier in the first configuration file, and calculating service data according to the data processing strategy. The pre-configured blockchain service determines a data processing strategy through the scene identification, can provide corresponding scene services for different groups, realizes sharing of one set of blockchain service among a plurality of groups, and effectively reduces the maintenance cost of a blockchain system. The data blocks obtained through calculation are stored in the block chain database corresponding to the block chain identification, so that the data blocks belonging to different block chains can be better isolated, the data blocks of different block chains are not required to be stored in the same database, and the data security of the block chain is further improved.
In one embodiment, as shown in fig. 4, the method further includes: calculating the service data according to a data processing strategy to obtain a data block containing a block chain identifier, which specifically comprises the following steps:
step 402, obtaining a second configuration file according to the pre-configured blockchain service, wherein a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier are recorded in the configuration file.
And step 404, sending the service data to the computing nodes corresponding to the other computing node identifiers according to the pre-configured blockchain service, so that the computing nodes corresponding to the other computing node identifiers can perform consensus on the service data according to the data processing strategy.
And step 406, receiving the service data after consensus returned by the corresponding computing node of the other computing node identifiers.
Step 408, the service data after consensus is calculated according to the pre-configured blockchain service, so as to obtain a data block containing the blockchain identifier.
The computing cluster is pre-configured with a second configuration file, and a plurality of blockchain identifiers and computing node identifiers corresponding to the blockchain identifiers are recorded in the second configuration file. The blockchain identification may correspond to a group identification. The computing node identity corresponding to each blockchain identity may correspond to a group member identity in the group identity. The server may thereby determine a plurality of compute node identifications corresponding to the blockchain identifications in the second configuration file according to the preconfigured blockchain service. The server serves as one computing node in the blockchain identifier, and a corresponding computing node identifier exists. The server can send the service data obtained by analysis to the computing nodes of other computing node identifiers corresponding to the blockchain identifier according to the preconfigured blockchain service. And the computing nodes corresponding to the other computing node identifiers perform consensus verification on the acquired service data, obtain the service data after the consensus verification is passed, and return the service data after the consensus to the server. The server further calculates the service data after consensus according to the pre-configured block chain service to obtain a data block. The data block includes a blockchain identification.
In one embodiment, each compute node of a blockchain may include a plurality of containers peer, contract, consesus, storage or the like. The peer container is used as a carrier of the account book and the intelligent contract, is a basic node in the blockchain network and is mainly responsible for executing chain codes to realize the reading and writing operation of the account book. The contact container is used to execute a smart contract. The Conssess container is used for carrying out consensus processing on the business data. The storage container is used for storing business data. In the process of processing service data through the block chain, different computing nodes perform consensus on the service data through the data processing strategies corresponding to each container, and the transaction execution results after consensus are stored in the blocks to obtain the data blocks. The data block comprises a block chain identification, a transaction execution result after consensus and service data corresponding to the computing node.
For example, two chains are running in the current blockchain, chain=service and chain=finish, and when a blockchain service call request is acquired, the blockchain service call request is parsed to obtain service data, where the service data includes a blockchain identifier chain=service. And the server determines a plurality of computing node identifications corresponding to the chain=service in the second configuration file according to the blockchain service call request. And sending the service data to the computing nodes corresponding to the other computing node identifiers according to the pre-configured blockchain service, so that the computing nodes corresponding to the other computing node identifiers perform consensus on the service data, and receiving the service data after consensus returned by the computing nodes corresponding to the other computing node identifiers. And calculating the business data after consensus according to the pre-configured blockchain service to obtain a data block containing the blockchain identifier. A field chain in block header information (BlockHeader) in a data block is shown as a service. Since the data Block (Block) is composed of a Block header (BlockHeader) and a Block body (BlockData), as long as the Block header contains the chain information, the data Block also contains the corresponding chain information, i.e. contains the blockchain identifier.
In one embodiment, the current blockchain may be run with multiple blockchains, each blockchain corresponding to a group identifier, where the group identifier includes multiple group member identifiers. Group members of multiple groups may share a set of blockchain services. When a blockchain service invocation request of group members in a plurality of different groups is acquired, the blockchain service invocation request can be processed in parallel. And analyzing the block chain service call request to obtain service data. Business data corresponding to different blockchain identifiers are input into the peer container, and corresponding account books are read and written according to the business data. And judging whether the blockchain corresponding to the blockchain identifier is expired, deleting the data block corresponding to the blockchain when the blockchain is expired, and returning to an initial state. When the blockchain is not expired, invoking a preconfigured blockchain service according to the blockchain service invoking request, inputting service data into a contact container through the preconfigured blockchain service to execute an intelligent contract, inputting the service data into a contacts container to perform consensus processing on the service data, and inputting the service data after the consensus processing into a storage container to generate a data block containing a blockchain identifier. And further storing the data blocks into a block chain database corresponding to the corresponding block chain identifications. FIG. 5 is a flow diagram illustrating sharing of a set of blockchain services among different groups in one embodiment. Two populations, client1, with a population member A, B, C and client2, with a population member X, Y, Z, are included in FIG. 5. The blockchain corresponding to the group client1 is chain= kst, and the blockchain corresponding to the group client2 is chain= kyc.
In this embodiment, service data is sent to computing nodes corresponding to other computing node identifiers according to a pre-configured blockchain service, so that the computing nodes corresponding to the other computing node identifiers perform consensus on the service data according to a data processing policy, and the data block containing the blockchain identifier is obtained by computing the commonly-identified service data according to the pre-configured blockchain service. And the service data is required to be commonly recognized by the computing nodes corresponding to the other computing node identifiers, so that the security of the service data is improved.
In one embodiment, prior to obtaining the blockchain invocation request, further comprising: acquiring a block chain registration request, wherein the block chain registration request carries registration information; verifying the validity of the registration information; after passing the validity verification, configuring the registration information to obtain configuration information; and generating a blockchain corresponding to the blockchain registration request according to the configuration information.
Servers in the computing cluster may also register blockchains. Specifically, the group member may send a blockchain registration request to the server through the corresponding terminal. The blockchain registration request may be a plurality of blockchain registration requests. And the server analyzes the blockchain registration request to obtain corresponding registration information. Registration information may include group member information, compute node information, smart contract information, and configuration rights policies. The group member information may include an identification of each group member, identity information, and an authentication method of a computing node to which the group member belongs. Configuring entitlement policies may include how blockchains join new group members, how compute node generation parameters are changed, how intelligent contract policies are executed, and so on. The server performs validity verification on the registration information, and after verification is passed, the registration information is configured to obtain configuration information. The configuration information comprises configured group member information, configured computing node information, configured intelligent contract information and configured configuration authority policies.
The server creates a computing node for each group member, determines basic configuration information according to the blockchain registration request, and adds the created computing node and identity information of the corresponding group member to the blockchain according to the basic configuration information to obtain configured computing node information. And the server deploys the intelligent contract information obtained by analysis to the configured computing nodes. Further, the configuration authority policy obtained through analysis is deployed to the configured computing node added with the intelligent contract information. The server further generates a blockchain corresponding to each blockchain registration request according to the configuration information, and archives the registration information.
In this embodiment, the registration information is configured by performing validity verification on the registration information, and after the registration information passes the validity verification, configuration information is obtained, and then a blockchain corresponding to the blockchain registration request is generated according to the configuration information. And the method is beneficial to the subsequent group members to call the corresponding blockchains to process the service data.
In one embodiment, after generating the blockchain corresponding to the blockchain registration request according to the configuration information, the method further includes: creating a corresponding blockchain database according to the blockchain identification of the blockchain; determining the service life of the block chain according to a preset strategy; the service deadline is stored in a blockchain database corresponding to the blockchain identification.
When the blockchain creation is completed, the server may create a corresponding blockchain database from the blockchain identifications of the blockchains, i.e., the server creates one blockchain database for each blockchain identification for storing the data of the corresponding blockchain. The server can also allocate corresponding service rights for the created blockchain according to a preset strategy. And storing the service deadline and the configuration information in a blockchain database corresponding to the blockchain identification.
In this embodiment, by creating a corresponding blockchain database according to the blockchain identifier of the blockchain, service data of different groups can be better isolated. And determining the service life of the blockchain according to a preset strategy, and storing the service life into a blockchain database corresponding to the blockchain identifier. The method can prevent the expired block chain from being called to process the data, and avoid the leakage of the data in the data block.
In one embodiment, the blockchain registration request carries a group identification, and after storing the service deadline in a blockchain database corresponding to the blockchain identification, further comprises: generating a blockchain use permission certificate according to the server deadline and the configuration information; dividing the blockchain use authority certificate into at least one blockchain use authority sub-certificate, and sending the blockchain use authority sub-certificate to terminals corresponding to other group member identifications in the group identifications.
After the server generates the blockchain usage rights certificate, the terminal that sends the blockchain registration request may sign the blockchain usage rights certificate. The server may divide the signed blockchain usage rights certificate into at least one blockchain usage rights sub-certificate, and send the blockchain usage rights sub-certificate to other members in the group to enable sharing of the blockchain among the group members. Other members may sign the received blockchain usage rights sub-certificate for subsequent invocation of the blockchain.
In one embodiment, before invoking the pre-configured blockchain service according to the blockchain service invocation request, further comprising: acquiring the service period of the blockchain corresponding to the blockchain identifier from a blockchain database corresponding to the blockchain identifier; identifying whether the blockchain is out of date according to the service deadline and the current time; when the blockchain expires, the data block corresponding to the blockchain is deleted.
The blockchain system is pre-deployed with a blockchain database corresponding to a plurality of blockchain identifiers. The blockchain database stores the service deadline of each blockchain identifier corresponding to the blockchain. After obtaining the block chain service call request sent by the terminal, the server analyzes the block chain service call request to obtain the block chain identification. Before invoking a pre-configured blockchain service according to a blockchain service invocation request, the server obtains a service deadline of a blockchain corresponding to the blockchain identifier from a blockchain database corresponding to the blockchain identifier. Thereby identifying whether the blockchain is expired based on the current time and the service deadline. When the blockchain expires, the server deletes the data block corresponding to the blockchain.
In this embodiment, whether the blockchain is expired is identified according to the current time and the service deadline, and when the blockchain is expired, the server deletes the data block corresponding to the blockchain, so that the maintenance cost of the blockchain service and the hardware cost of the server provider can be saved. Meanwhile, the blockchains corresponding to the different blockchain identifiers are stored in the corresponding blockchain databases, so that the isolation between the data blocks of the different blockchains can be improved. Therefore, deleting the data blocks corresponding to the expired blockchain does not affect the data blocks in other blockchains.
It should be understood that, although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2 and 4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least some of the other steps or sub-steps of other steps.
In one embodiment, as shown in fig. 6, there is provided a block chain based service data processing apparatus, comprising: a communication module 602, a calling module 604, an acquisition module 606, a first determination module 608, a calculation module 610, and a storage module 612, wherein:
the communication module 602 is configured to obtain a blockchain service invocation request, where the blockchain service invocation request carries service data and a scene identifier, and the service data includes the blockchain identifier.
And a calling module 604, configured to call the pre-configured blockchain service according to the blockchain service calling request.
The obtaining module 606 obtains a first configuration file according to a pre-configured blockchain service, where a plurality of scene identifiers and data processing policies corresponding to each scene identifier are recorded in the first configuration file.
A first determining module 608, configured to determine, in the first configuration file, a data processing policy corresponding to the scene identifier according to a pre-configured blockchain service.
The calculating module 610 is configured to calculate the service data according to the data processing policy, so as to obtain a data block including the blockchain identifier.
The storage module 612 is configured to store the data block into a blockchain database corresponding to the blockchain identifier.
In one embodiment, the computing module 610 is further configured to obtain a second configuration file according to a pre-configured blockchain service, where a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier are recorded in the second configuration file; transmitting the service data to the computing nodes corresponding to the other computing node identifiers according to the pre-configured blockchain service, so that the computing nodes corresponding to the other computing node identifiers perform consensus on the service data according to the data processing strategy; receiving service data after consensus returned by the computing node corresponding to the other computing node identifiers; and calculating the business data after consensus according to the pre-configured blockchain service to obtain a data block containing the blockchain identifier.
In one embodiment, the apparatus further comprises: the registration module is used for acquiring a blockchain registration request, wherein the blockchain registration request carries registration information; verifying the validity of the registration information; after passing the validity verification, configuring the registration information to obtain configuration information; and generating a blockchain corresponding to the blockchain registration request according to the configuration information.
In one embodiment, the apparatus further includes:
And the creation module is used for creating a corresponding blockchain database according to the blockchain identification of the blockchain.
And the second determining module is used for determining the service life of the blockchain according to a preset strategy.
A storage module 612 is configured to store the service deadline and the configuration information in a blockchain database corresponding to the blockchain identifier.
In one embodiment, the apparatus further includes: the sharing module is used for generating a blockchain use permission certificate according to the service period and the configuration information; dividing the blockchain usage rights certificate into at least one blockchain usage rights sub-certificate; and sending the blockchain use authority sub-certificate to terminals corresponding to other group member identifications in the group identifications.
In one embodiment, the apparatus further includes: the identification module is used for acquiring the service life of the blockchain corresponding to the blockchain identifier from the blockchain database corresponding to the blockchain identifier; identifying whether the blockchain corresponding to the blockchain is out of date according to the service deadline and the current time; when the blockchain expires, the data block corresponding to the blockchain is deleted.
For specific limitations on the blockchain-based service data processing device, reference may be made to the above limitation on the blockchain-based service data processing method, and the detailed description thereof will be omitted. The various modules in the blockchain-based business data processing device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing the data blocks, the service life of the block chain and the configuration information. The network interface of the computer device is used to communicate with external terminals or servers in the computing cluster via a network connection. The computer program, when executed by a processor, implements a blockchain-based business data processing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 7 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory storing a computer program and a processor implementing the steps of the various embodiments described above when the computer program is executed.
In one embodiment, a computer readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the various embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A blockchain-based business data processing method applied to computing nodes in a computing cluster, the method comprising:
acquiring a block chain service calling request, wherein the block chain service calling request carries service data and a scene identifier, and the service data comprises the block chain identifier;
invoking a pre-configured blockchain service according to the blockchain service invocation request;
Acquiring a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file;
determining a data processing strategy corresponding to the scene identifier in the first configuration file according to the pre-configured blockchain service;
calculating the service data according to the data processing strategy to obtain a data block containing the blockchain identifier, wherein the data block comprises: acquiring a second configuration file according to the pre-configured blockchain service, wherein a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier are recorded in the second configuration file; transmitting the service data to the computing nodes corresponding to other computing node identifiers according to the preconfigured blockchain service so that the computing nodes corresponding to the other computing node identifiers can perform consensus on the service data according to the data processing strategy; receiving service data after consensus returned by the computing node corresponding to the other computing node identifiers; calculating the business data after consensus according to a pre-configured blockchain service to obtain a data block containing the blockchain identifier;
And storing the data block into a block chain database corresponding to the block chain identification.
2. The method of claim 1, further comprising, prior to the acquiring the blockchain invocation request:
acquiring a block chain registration request, wherein the block chain registration request carries registration information;
verifying the validity of the registration information;
after passing the validity verification, configuring the registration information to obtain configuration information;
and generating a blockchain corresponding to the blockchain registration request according to the configuration information.
3. The method of claim 2, further comprising, after generating the blockchain corresponding to the blockchain registration request according to the configuration information:
creating a corresponding blockchain database according to the blockchain identification of the blockchain;
determining the service life of the block chain according to a preset strategy;
and storing the service deadline into a blockchain database corresponding to the blockchain identifier.
4. The method of claim 3, wherein the blockchain registration request carries a group identification, further comprising, after the storing the service deadline in a blockchain database corresponding to the blockchain identification:
Generating a blockchain use permission certificate according to the service deadline and the configuration information;
dividing the blockchain usage rights certificate into at least one blockchain usage rights sub-certificate;
and sending the blockchain use authority sub-certificate to terminals corresponding to other group member identifications in the group identifications.
5. The method of any of claims 1 to 2, further comprising, prior to said invoking the pre-configured blockchain service in accordance with the blockchain service invocation request:
acquiring the service period of the blockchain corresponding to the blockchain identifier from a blockchain database corresponding to the blockchain identifier;
identifying whether the blockchain corresponding to the blockchain is out of date according to the service deadline and the current time;
when the blockchain expires, the data block corresponding to the blockchain is deleted.
6. A blockchain-based traffic data processing device, the device comprising:
the communication module is used for acquiring a block chain service calling request, wherein the block chain service calling request carries service data and a scene identifier, and the service data comprises the block chain identifier;
The calling module is used for calling the pre-configured block chain service according to the block chain service calling request;
the acquisition module acquires a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifications and data processing strategies corresponding to each scene identification are recorded in the first configuration file;
a first determining module, configured to determine, according to the preconfigured blockchain service, a data processing policy corresponding to the scene identifier in the first configuration file;
the calculation module is used for calculating the service data according to the data processing strategy to obtain a data block containing the block chain identifier;
the storage module is used for storing the data block into a block chain database corresponding to the block chain identification;
the computing module is further configured to obtain a second configuration file according to the pre-configured blockchain service, where a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier are recorded in the second configuration file; transmitting the service data to the computing nodes corresponding to other computing node identifiers according to the preconfigured blockchain service so that the computing nodes corresponding to the other computing node identifiers can perform consensus on the service data according to the data processing strategy; receiving service data after consensus returned by the computing node corresponding to the other computing node identifiers; and calculating the service data after the consensus according to a pre-configured blockchain service to obtain a data block containing the blockchain identifier.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the registration module is used for acquiring a blockchain registration request, wherein the blockchain registration request carries registration information; verifying the validity of the registration information; after passing the validity verification, configuring the registration information to obtain configuration information; and generating a blockchain corresponding to the blockchain registration request according to the configuration information.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the creation module is used for creating a corresponding blockchain database according to the blockchain identification of the blockchain;
the second determining module is used for determining the service period of the blockchain according to a preset strategy;
the storage module is further configured to store the service deadline to a blockchain database corresponding to a blockchain identification.
9. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
CN202010224087.6A 2020-03-26 2020-03-26 Block chain-based service data processing method and device and computer equipment Active CN111506584B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010224087.6A CN111506584B (en) 2020-03-26 2020-03-26 Block chain-based service data processing method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010224087.6A CN111506584B (en) 2020-03-26 2020-03-26 Block chain-based service data processing method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN111506584A CN111506584A (en) 2020-08-07
CN111506584B true CN111506584B (en) 2023-07-25

Family

ID=71875837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010224087.6A Active CN111506584B (en) 2020-03-26 2020-03-26 Block chain-based service data processing method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN111506584B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765435A (en) * 2020-08-22 2021-05-07 王红建 Business data processing method and big data platform combining block chain and digital finance
CN112416960A (en) * 2020-11-18 2021-02-26 腾讯科技(深圳)有限公司 Data processing method, device and equipment under multiple scenes and storage medium
CN112925584A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Scene-based file configuration method, device, storage medium, and program product
CN113312427B (en) * 2021-05-24 2023-04-28 网易(杭州)网络有限公司 Block chain calling method, device, management service platform and storage medium
CN113536342B (en) * 2021-07-06 2024-03-26 招商银行股份有限公司 Block chain-based certificate management method, system, program product and storage medium
CN113516541B (en) * 2021-09-14 2022-01-11 杭州小电科技股份有限公司 Dynamic configuration method and device for store distribution scene and electronic device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166442A (en) * 2019-04-30 2019-08-23 阿里巴巴集团控股有限公司 A kind of data processing method and device based on block chain

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107239479B (en) * 2017-03-28 2020-03-13 创新先进技术有限公司 Block chain based data storage and query method and device
CN113766035B (en) * 2017-03-28 2023-05-23 创新先进技术有限公司 Service acceptance and consensus method and device
CN109785136A (en) * 2019-01-30 2019-05-21 北京京东尚科信息技术有限公司 A kind of transaction processing method of block chain, client and block chain network
CN110598110B (en) * 2019-09-16 2021-09-28 腾讯科技(深圳)有限公司 Service pushing method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166442A (en) * 2019-04-30 2019-08-23 阿里巴巴集团控股有限公司 A kind of data processing method and device based on block chain

Also Published As

Publication number Publication date
CN111506584A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN111506584B (en) Block chain-based service data processing method and device and computer equipment
CN110365670B (en) Blacklist sharing method and device, computer equipment and storage medium
CN109492983B (en) Electronic seal signing method, device, equipment and medium based on block chain intelligent contract
CN110633963B (en) Electronic bill processing method, electronic bill processing device, computer readable storage medium and computer readable storage device
CN109191272B (en) Data processing method, device, storage medium and equipment for electronic bill
CN110430288B (en) Node access method, node access device, computer equipment and storage medium
CN112383519A (en) Enterprise authentication and authentication tracing method, device and equipment based on block chain
CN110855777B (en) Node management method and device based on block chain
CN108280761B (en) Method and device for distributing increase party, computer equipment and storage medium
CN112003858B (en) Block chain-based platform docking method, electronic device and storage medium
CN111556120A (en) Data processing method and device based on block chain, storage medium and equipment
CN110543510B (en) Bill data processing method, device, storage medium and computer equipment
CN112308561A (en) Block chain-based evidence storing method and system, computer equipment and storage medium
CN111191294B (en) Single-node accounting method, system, equipment and storage medium based on block chain
CN111314172B (en) Block chain-based data processing method, device, equipment and storage medium
CN111880919B (en) Data scheduling method, system and computer equipment
CN109144487B (en) Method, device, computer equipment and storage medium for developing business of parts
CN112149077B (en) Supply chain billing method, system and computer equipment based on block chain technology
CN108282484B (en) Password acquisition method and device, computer equipment and storage medium
CN109460995B (en) Financial certification method, device, computer equipment and storage medium
CN111881483A (en) Resource account binding method, device, equipment and medium based on block chain
CN110599267A (en) Electronic invoice billing method and device, computer readable storage medium and computer equipment
CN110011796B (en) Certificate updating method and device, computer equipment and storage medium
CN114884674A (en) Block chain-based user data transfer method, device and equipment
CN110223075B (en) Identity authentication method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant