CN111506584A - Service data processing method and device based on block chain and computer equipment - Google Patents

Service data processing method and device based on block chain and computer equipment Download PDF

Info

Publication number
CN111506584A
CN111506584A CN202010224087.6A CN202010224087A CN111506584A CN 111506584 A CN111506584 A CN 111506584A CN 202010224087 A CN202010224087 A CN 202010224087A CN 111506584 A CN111506584 A CN 111506584A
Authority
CN
China
Prior art keywords
block chain
service
data
blockchain
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.)
Granted
Application number
CN202010224087.6A
Other languages
Chinese (zh)
Other versions
CN111506584B (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

Images

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 service data processing method and device based on a block chain and computer equipment. The method comprises the following steps: acquiring a block chain service call request, wherein the block chain service call request carries service data and a scene identifier, and the service data comprises the block chain identifier; calling a pre-configured block chain service according to the block chain service calling request; acquiring a first configuration file according to a pre-configured blockchain service, wherein a plurality of scene identifiers and a data processing strategy corresponding to each scene identifier 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 block chain service; calculating the service data according to the data processing strategy to obtain a data block containing a block chain identifier; and storing the data blocks into a block chain database corresponding to the block chain identification. The method can reduce the maintenance cost of the service system.

Description

Service data processing method and device based on block chain and computer equipment
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a method and an apparatus for processing service data based on a blockchain, a computer device, and a storage medium.
Background
With the development of internet technology, a blockchain technology appears, which can store some important data and ensure the security of the data. A blockchain is generally understood to be a distributed ledger, which is also essentially a distributed computing and storage system. When an enterprise provides blockchain services for a large number of users, in order to meet different requirements of people, multiple service modes are often required to be provided, and business data related to the different service modes are different. In a conventional manner, in order to meet different requirements of different users, a set of block chain services is deployed for each service mode, which results in a very large service system, and thus system maintenance also needs to take more manpower and material resources. Therefore, how to reduce the maintenance cost of the service system becomes a technical problem to be solved at present.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device and a storage medium for processing service data based on a block chain, which can reduce the maintenance cost of a service system.
A service data processing method based on a block chain, the method comprises:
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;
calling a pre-configured block chain service according to the block chain service calling request;
acquiring a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifiers and a data processing strategy corresponding to each scene identifier 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 blocks 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 block chain identifier includes:
acquiring a second configuration file according to the pre-configured block chain service, wherein a plurality of block chain identifiers and a plurality of computing node identifiers corresponding to each block chain identifier are recorded in the second configuration file;
sending the service data to the computing nodes corresponding to other computing node identifications according to the pre-configured block chain service so that the computing nodes corresponding to other computing node identifications commonly identify the service data according to the data processing strategy;
receiving the service data after consensus returned by the computing nodes corresponding to the other computing node identifications;
and calculating the identified service data according to a pre-configured block chain service to obtain a data block containing the block chain identifier.
In one embodiment, before the obtaining the blockchain call request, the method further includes:
acquiring a block chain registration request, wherein the block chain registration request carries registration information;
carrying out validity verification on the registration information;
after passing the validity verification, configuring the registration information to obtain configuration information;
and generating a block chain corresponding to the block chain registration request according to the configuration information.
In one embodiment, after the generating a blockchain corresponding to the blockchain registration request according to the configuration information, the method further includes:
creating a corresponding block chain database according to the block chain identifier of the block chain;
determining the service deadline of the block chain according to a preset strategy;
and storing the service deadline and the configuration information into a blockchain database corresponding to a blockchain identifier.
In one embodiment, the block chain registration request carries a group identifier, and after the storing the service deadline in the block chain database corresponding to the block chain identifier, the method further includes:
generating a block chain use authority certificate according to the service deadline and the configuration information;
dividing the block chain use permission certificate into at least one block chain use permission sub-certificate;
and sending the block chain use authority sub-certificate to terminals corresponding to other group member identifications in the group identification.
In one embodiment, before the invoking a preconfigured blockchain service according to the blockchain service invocation request, the method further includes:
acquiring the service deadline of the block chain corresponding to the block chain identifier from a block chain database corresponding to the block chain identifier;
identifying whether the block chain is overdue or not according to the service deadline and the current time;
and deleting the data blocks corresponding to the block chain when the block chain is expired.
A device for processing service data based on block chains, the device comprising:
the communication module is used for 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;
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 the first configuration file records a plurality of scene identifiers and a data processing strategy corresponding to each scene identifier;
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 blocks into a block chain database corresponding to the block chain identification.
In one embodiment, the calculation module is further configured to obtain a second configuration file according to the preconfigured blockchain service, where the second configuration file records a plurality of blockchain identifiers and a plurality of calculation node identifiers corresponding to each blockchain identifier; sending the service data to the computing nodes corresponding to other computing node identifications according to the pre-configured block chain service so that the computing nodes corresponding to other computing node identifications commonly identify the service data according to the data processing strategy; receiving the service data after consensus returned by the computing nodes corresponding to the other computing node identifications; and calculating the identified service data according to a pre-configured block chain service to obtain a data block containing the block chain identifier.
A computer device comprising a memory and a processor, the memory storing a computer program operable on the processor, the processor implementing the steps in the various method embodiments described above when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the respective method embodiment described above.
The block chain based service data processing method, device, computer equipment and storage medium obtain a block chain service call request, wherein the block chain service call request carries service data and a scene identifier, and the service data comprises the block chain identifier. And calling the pre-configured blockchain service according to the blockchain service calling request. And then, a first configuration file is obtained according to the pre-configured block chain service, a data processing strategy corresponding to the scene identifier is determined in the first configuration file, and then the business data is calculated according to the data processing strategy. The pre-configured block chain service determines a data processing strategy through the scene identifier, can provide corresponding scene services for different groups, realizes sharing of a set of block chain service among a plurality of groups, and effectively reduces the maintenance cost of a block chain system. The data blocks obtained through calculation are stored in the block chain database corresponding to the block chain identification, the data blocks belonging to different block chains can be better isolated, the data blocks of different block chains do not need to be stored in the same database, and the data security of the block chains is further improved.
Drawings
Fig. 1 is an application environment diagram of a service data processing method based on a block chain in an embodiment;
fig. 2 is a schematic flow chart of a service data processing method based on a block chain in an embodiment;
FIG. 3 is a block chain data structure and a block chain multi-chain data structure according to one embodiment;
fig. 4 is a schematic flowchart illustrating a step of calculating service data according to a data processing policy to obtain a data block including a block chain identifier in an embodiment;
FIG. 5 is a flow diagram illustrating an implementation of a set of blockchain services shared among different groups according to an embodiment;
FIG. 6 is a block diagram of a device for processing service data based on block chains according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The service data processing method based on the block chain can be applied to the application environment shown in fig. 1. The application environment includes a server cluster 104 composed of a terminal 102 and a plurality of servers, and the terminal 102 may be a plurality. Each server in the server cluster may act as a compute node. The server cluster may act as a compute cluster. A blockchain system 106 is deployed in the computing cluster. The terminal 102 and each server in the server cluster 104 are connected through a network, the servers are connected through a network, and the servers are connected with the blockchain system 106 through a network. The server obtains a block chain service call request sent by the terminal, wherein the block chain service call request carries service data and a scene identifier, and the service data comprises the block chain identifier. And the server calls the pre-configured blockchain service according to the blockchain service calling request. The server acquires a first configuration file according to a pre-configured blockchain service, wherein a plurality of scene identifiers and a data processing strategy corresponding to each scene identifier 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 a data block containing the block chain identifier. And the server stores the data blocks into a block chain database corresponding to the block chain identification. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
In an embodiment, as shown in fig. 2, a method for processing service data based on a blockchain is provided, which is described by taking the method as an example applied to each server in a server cluster in fig. 1, where each server is used as a computing node in a computing cluster, and includes the following steps:
step 202, a blockchain call request is obtained, where the blockchain call request carries service data and a scene identifier, and the service data includes the blockchain identifier.
The server obtains a block chain service call request sent by the terminal, and analyzes the block chain service call request to obtain service data and a scene identifier. For example, the business data may be transaction data. The traffic data may include a blockchain identification. The block chain identifier is used for marking that the service data obtained by analysis belongs to the block chain corresponding to the block chain identifier. The block chain system is pre-deployed in the computing cluster. The blockchain system is a carrier and an organization mode for running a blockchain technology, and specifically may be a blockchain cluster formed by a plurality of servers. The blockchain technology is an internet database technology that verifies and stores data using a blockchain data structure, generates and updates data using a distributed node consensus algorithm, secures data transmission and access using a cryptographic manner, and programs and manipulates data using an intelligent contract consisting of automated script codes. In this embodiment, the blockchain system may be a federation chain system. At least two blockchains may be included in the blockchain system. The block chains in the block chain system may be at the same level, and have a multi-chain block chain structure. When the block chain processes the service data, an identification field, that is, a block chain identifier, needs to be added to the data structure of the multi-chain block chain 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 scenario identification may include a scenario identification of a warranty scenario and a scenario identification of a smart contract scenario. Wherein the evidence is a general ledger for collecting all historical transactions. An intelligent contract is a computer agreement to propagate, validate or execute contracts in an informational manner. And when the scene identifier is the scene identifier of the evidence storage scene, the service data is required to be stored. At this time, the service data may be referred to as the data to be certified. According to different evidence storing scenes, the corresponding data to be stored with the evidence are different. For example, in a transaction scenario, the data to be certified may be transaction data, such as an electronic invoice; in a judicial scene, the data to be stored can be judicial data, such as copyright evidence and the like. When the scene identification is the scene identification of the intelligent contract scene, the business data needs to be formally verified, and the transaction is automatically executed.
Step 204, the pre-configured blockchain service is called according to the blockchain service calling request.
Block chain services are pre-configured in the computing cluster. When a server in the computing cluster acquires a block chain service call request sent by a terminal, a block chain service configured in advance is called according to the block chain service call request. The preset configured blockchain service can provide corresponding blockchain scenes for different groups, that is, a plurality of groups can share a set of pre-configured blockchain service. Each group may correspond to a blockchain, and the server may maintain blockchains corresponding to a plurality of groups. Group members in each group can send a block chain service call request to the server through the terminal, and the server analyzes the block chain service call request to obtain service data. The server calls the pre-configured block chain service according to the block chain identification in the service data, and then calculates the service data according to the pre-configured block chain service.
Step 206, a first configuration file is obtained according to the preconfigured blockchain service, and a plurality of scene identifiers and a data processing policy corresponding to each scene identifier are recorded in the first configuration file.
Step 208, determining a data processing policy 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 policy to obtain a data block containing a block chain identifier.
Step 212, store the data block into the block chain database corresponding to the block chain identifier.
A first configuration file corresponding to the scene identifier is pre-configured in the computing cluster, and a plurality of scene identifiers and data processing strategies corresponding to each scene identifier are recorded in the first configuration file. The data processing strategy 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 block chain service, performs consensus verification on the service data according to the corresponding data processing strategy, and calculates the consensus-verified service data by the calculating node after the consensus verification is passed, so as to obtain a data block corresponding to the scene identifier and containing the block chain identifier.
A data block is a container data structure that is contained in a block book with aggregated data to be deposited. The block book is a carrier for recording data to be stored and certified generated in a period of time, and records information of a plurality of data blocks. The data to be certified may be data that needs to be stored into the blockchain. A plurality of data chunks may be concatenated in the chunk book in chronological order of chunk generation. The data block includes a block header and a block body. Wherein, the block head records the time stamp of the previous sequential block and the time stamp of the current data block. The server connects the data blocks according to the time sequence to form a block chain.
In one embodiment, when receiving a blockchain service call request sent by terminals corresponding to different groups, the blockchain service call request is analyzed to obtain a plurality of blockchain identifiers. 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 block chains is realized. The server calculates the service data through the calculation nodes of different block chains, and can obtain the data block corresponding to each block chain, so that the corresponding block chain is generated according to the block chain identifier in the data block.
A block chain database corresponding to the block chain identifier is pre-established in the server. The blockchain database is created based on the blockchains that are successfully registered. After the server generates the data block, the server may store the data block in the blockchain database corresponding to the blockchain identifier.
In one embodiment, before the preconfigured blockchain service is called according to the blockchain service calling request, validity verification can be further performed on the terminal sending the service calling request. Specifically, the server obtains 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. And calling the pre-configured blockchain service according to the blockchain service calling request. And then, a first configuration file is obtained according to the pre-configured block chain service, a data processing strategy corresponding to the scene identifier is determined in the first configuration file, and then the business data is calculated according to the data processing strategy. The pre-configured block chain service determines a data processing strategy through the scene identifier, can provide corresponding scene services for different groups, realizes sharing of a set of block chain service among a plurality of groups, and effectively reduces the maintenance cost of a block chain system. The data blocks obtained through calculation are stored in the block chain database corresponding to the block chain identification, the data blocks belonging to different block chains can be better isolated, the data blocks of different block chains do not need to be stored in the same database, and the data security of the block chains is further improved.
In one embodiment, as shown in fig. 4, the method further includes: the step of calculating the service data according to the data processing policy to obtain a data block containing a block chain identifier specifically includes:
step 402, obtaining a second configuration file according to a pre-configured blockchain service, where the configuration file records a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier.
Step 404, sending the service data to the computing nodes corresponding to the other computing node identifiers according to the preconfigured 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 policy.
And step 406, receiving the service data after consensus returned by the computing node corresponding to the other computing node identifier.
Step 408, the service data after consensus is calculated according to the pre-configured blockchain service, and a data block containing a blockchain identifier is obtained.
A second configuration file is pre-configured in the computing cluster, and a plurality of block chain identifiers and a computing node identifier corresponding to each block chain identifier are recorded in the second configuration file. The blockchain identification may correspond to a group identification. The computing node identifier corresponding to each blockchain identifier may correspond to a group member identifier in the group identifier. The server may thereby determine, in the second configuration file, a plurality of compute node identifiers corresponding to the blockchain identifiers according to the preconfigured blockchain service. The server, as one compute node in the blockchain identification, has a corresponding compute node identification. The server may send the service data obtained by the analysis to the computing nodes of the other computing node identifiers corresponding to the blockchain identifier according to the preconfigured blockchain service. And carrying out consensus verification on the obtained service data by the computing nodes corresponding to the other computing node identifications, obtaining the service data after consensus verification after the consensus verification is passed, and returning the service data after consensus to the server. And the server further calculates the service data after the consensus according to the pre-configured block chain service to obtain a data block. The data block includes a block chain identifier.
In one embodiment, each compute node of a blockchain may include a plurality of containers such as peers, contacts, consesus, stores, and the like. The peer container is used as a carrier of the account book and the intelligent contract, is a basic node in a block chain network, and is mainly responsible for executing chain codes and realizing read-write operation on the account book. The contract container is used to execute intelligent contracts. The conseus container is used for performing consensus processing on the service data. The storage container is used for storing the service data. In the process of processing the 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 store the consensus transaction execution results into the blocks to obtain the data blocks. The data block comprises a block chain identifier, a transaction execution result after consensus and service data corresponding to the computing node.
For example, when two chains, namely a service and a find, run in the front block chain, when a block chain service invocation request is obtained, the block chain service invocation request is analyzed to obtain service data, where the service data includes a block chain identification, namely the find. And the server determines a plurality of computing node identifications corresponding to chain service in the second configuration file according to the block chain service calling request. And sending the service data to the computing nodes corresponding to other computing node identifications according to the pre-configured block chain service so that the computing nodes corresponding to other computing node identifications perform consensus on the service data and receive the consensus service data returned by the computing nodes corresponding to other computing node identifications. And calculating the service data after the consensus according to the pre-configured block chain service to obtain a data block containing a block chain identifier. The field chain in the block header information (BlockHeader) in the data block is shown as service. Since the data Block (Block) is composed of a Block header (Block header) and a Block body (Block data), as long as the Block header contains chain information, the data Block also contains corresponding chain information, i.e., a Block chain identifier.
In one embodiment, a plurality of blockchains may run on a current blockchain, each blockchain corresponds to a group identifier, and the group identifier includes a plurality of group member identifiers. Group members of multiple groups may share a set of blockchain services. When the block chain service call requests of group members in a plurality of different groups are obtained, the block chain service call requests can be processed in parallel. And analyzing the block chain service call request to obtain service data. And inputting the business data corresponding to different block chain identifications into the peer container, and reading and writing the corresponding account book according to the business data. And when the block chain is expired, deleting the data block corresponding to the block chain and returning to the initial state. When the block chain is not expired, calling a pre-configured block chain service according to the block chain service calling request, inputting service data into a contract container through the pre-configured block chain service to execute an intelligent contract, inputting the service data into the contract container to perform consensus processing on the service data, inputting the service data after the consensus processing into a storage container, and generating a data block containing a block chain identifier. And storing the data blocks into the block chain database corresponding to the corresponding block chain identification. Fig. 5 is a schematic flow chart illustrating implementation of sharing a set of blockchain services among different groups according to an embodiment. Included in fig. 5 are two population clients 1, whose population members are A, B, C, and client2, whose population members are X, Y, Z. The blockchain corresponding to the group client1 is chain kst, and the blockchain corresponding to the group client2 is chain kyc.
In this embodiment, the service data is sent to the computing nodes corresponding to the other computing node identifiers according to the preconfigured 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 policy, and the consensus service data is calculated according to the preconfigured blockchain service, so as to obtain a data block including the blockchain identifier. The service data is identified by the computing nodes corresponding to the other computing node identifiers, so that the safety of the service data is improved.
In one embodiment, before obtaining the blockchain call request, the method further comprises: acquiring a block chain registration request, wherein the block chain registration request carries registration information; carrying out validity verification on the registration information; after passing the validity verification, configuring the registration information to obtain configuration information; and generating a block chain corresponding to the block chain registration request according to the configuration information.
Servers in the computing cluster may also register for blockchains. Specifically, the group members may send a blockchain registration request to the server through the corresponding terminals. The blockchain registration request may be a plurality of blockchain registration requests. And the server analyzes the block chain registration request to obtain corresponding registration information. The registration information may include group member information, computing node information, intelligent contract information, and configuration permission policies. The group member information may include an identification of each group member, identity information, and an authentication manner of the computing node to which the group member belongs. Configuration permission policies may include how blockchains join new group members, how compute node generation parameters are changed, how intelligent contract policies are enforced, and the like. And the server carries out validity verification on the registration information, and after the verification is passed, the registration information is configured to obtain configuration information. The configuration information comprises configured group member information, configured computing node calculation node information, configured intelligent contract information and configured configuration authority strategies.
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 the 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 strategy obtained through analysis is deployed to the configured computing node added with the intelligent contract information. And the server further generates a block chain corresponding to each block chain registration request according to the configuration information and archives the registration information.
In this embodiment, the registration information is configured to obtain the configuration information by performing validity verification on the registration information and after the validity verification is passed, and then the blockchain corresponding to the blockchain registration request is generated according to the configuration information. And the subsequent group members can call the corresponding block chain 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 block chain database according to the block chain identifier of the block chain; determining the service deadline of the block chain according to a preset strategy; and storing the service deadline into a blockchain database corresponding to the blockchain identification.
After the creation of the blockchain is completed, the server may create a corresponding blockchain database according to the blockchain identifier of the blockchain, that is, the server creates a blockchain database for each blockchain identifier, for storing data of the corresponding blockchain. The server can also allocate corresponding service authority to the established block chain according to a preset strategy. And storing the service deadline and the configuration information into a blockchain database corresponding to the blockchain identifier.
In this embodiment, by creating the corresponding blockchain database according to the blockchain identifier of the blockchain, service data of different groups can be better isolated. And determining the service deadline of the block chain according to a preset strategy, and storing the service deadline into a block chain database corresponding to the block chain identifier. The data processing method and the device can prevent calling an overdue block chain for data processing, and avoid leakage of data in the data block.
In one embodiment, the blockchain registration request carries a group identifier, and after storing the service deadline in a blockchain database corresponding to the blockchain identifier, the method further includes: generating a block chain use authority certificate according to the server time limit and the configuration information; and dividing the block chain use authority certificate into at least one block chain use authority sub-certificate, and sending the block chain use authority sub-certificate to terminals corresponding to other group member identifications in the group identification.
After the server generates the block chain usage right certificate, the terminal that sends the block chain registration request may sign the block chain usage right certificate. The server can divide the signed block chain usage permission certificate into at least one block chain usage permission sub-certificate, and send the block chain usage permission sub-certificate to other members in the group, so as to realize sharing of the block chain among the group members. Other members may sign the received blockchain usage rights sub-certificate for subsequent calls to the blockchain.
In one embodiment, before invoking the preconfigured blockchain service according to the blockchain service invocation request, the method further comprises: acquiring the service deadline of the block chain corresponding to the block chain identifier from a block chain database corresponding to the block chain identifier; identifying whether the block chain is expired or not according to the service deadline and the current time; when the block chain is expired, deleting the data block corresponding to the block chain.
The blockchain system is pre-deployed with a blockchain database corresponding to a plurality of blockchain identifiers. The service period of the block chain corresponding to each block chain identifier is stored in the block chain database. After acquiring the block chain service call request sent by the terminal, the server analyzes the block chain service call request to obtain a block chain identifier. Before calling the pre-configured blockchain service according to the blockchain service calling request, the server obtains the service deadline of the blockchain corresponding to the blockchain identifier from the blockchain database corresponding to the blockchain identifier. Thereby identifying whether the blockchain is expired according to the current time and the service deadline. When the block chain is expired, the server deletes the data block corresponding to the block chain.
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 service maintenance cost of the blockchain and the hardware cost of a server provider can be saved. Meanwhile, the block chains corresponding to different block chain identifications are stored in the corresponding block chain database, so that the isolation between the data blocks of different block chains can be improved. Therefore, deleting the data blocks corresponding to the expired block chain does not affect the data blocks in other block chains.
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, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 4 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided a service data processing apparatus based on a block chain, including: a communication module 602, a calling module 604, an obtaining module 606, a first determining module 608, a calculating module 610, and a storing 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.
The invoking module 604 is configured to invoke the preconfigured blockchain service according to the blockchain service invoking request.
The obtaining module 606 obtains a first configuration file according to a pre-configured blockchain service, where the first configuration file records a plurality of scene identifiers and a data processing policy corresponding to each scene identifier.
The first determining module 608 is configured to determine a data processing policy corresponding to the scene identifier in the first configuration file according to the preconfigured blockchain service.
The calculating module 610 is configured to calculate the service data according to the data processing policy to obtain a data block including a block chain identifier.
The storage module 612 is configured to store the data block in the blockchain database corresponding to the blockchain identifier.
In an embodiment, the calculation module 610 is further configured to obtain a second configuration file according to a preconfigured blockchain service, where the second configuration file records a plurality of blockchain identifiers and a plurality of calculation node identifiers corresponding to each blockchain identifier; sending the service data to the computing nodes corresponding to other computing node identifications according to the pre-configured block chain service so that the computing nodes corresponding to other computing node identifications commonly identify the service data according to the data processing strategy; receiving the service data after consensus returned by the computing nodes corresponding to the other computing node identifications; and calculating the service data after the consensus according to the pre-configured block chain service to obtain a data block containing a block chain identifier.
In one embodiment, the above apparatus further comprises: the registration module is used for acquiring a block chain registration request, and the block chain registration request carries registration information; carrying out validity verification on the registration information; after passing the validity verification, configuring the registration information to obtain configuration information; and generating a block chain corresponding to the block chain registration request according to the configuration information.
In one embodiment, the apparatus further includes:
and the creating module is used for creating a corresponding block chain database according to the block chain identification of the block chain.
And the second determining module is used for determining the service deadline of the block chain according to a preset strategy.
The 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 block chain use permission certificate according to the service deadline and the configuration information; dividing the block chain use authority certificate into at least one block chain use authority sub-certificate; and sending the block chain use authority sub-certificate to terminals corresponding to other group member identifications in the group identification.
In one embodiment, the apparatus further includes: the identification module is used for acquiring the service deadline of the block chain corresponding to the block chain identifier from the block chain database corresponding to the block chain identifier; identifying whether the block chain is overdue or not according to the service deadline and the current time; when the block chain is expired, deleting the data block corresponding to the block chain.
For specific limitations of the device for processing service data based on a block chain, reference may be made to the above limitations of the method for processing service data based on a block chain, and details are not described herein again. The modules in the device for processing service data based on block chains may be implemented wholly or partially by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the 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 comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data blocks, service life of block chains and configuration information. The network interface of the computer device is used for communicating with an external terminal or a server in the computing cluster through network connection. The computer program is executed by a processor to implement a block chain based traffic data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those 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 processor executes the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the respective embodiments described above.
It will be understood by those of ordinary skill in the art that all or a portion of the processes of the methods of the embodiments described above may be implemented by a computer program that may be stored on a non-volatile computer-readable storage medium, which when executed, may include the processes of the embodiments of the methods described above, wherein any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A service data processing method based on a block chain is applied to a computing node in a computing cluster, and is characterized in that the method comprises the following steps:
acquiring a block chain service call request, wherein the block chain service call request carries service data and a scene identifier, and the service data comprises the block chain identifier;
calling a pre-configured block chain service according to the block chain service calling request;
acquiring a first configuration file according to the pre-configured blockchain service, wherein a plurality of scene identifiers and a data processing strategy corresponding to each scene identifier 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 blocks into a block chain database corresponding to the block chain identification.
2. The method of claim 1, wherein the calculating the service data according to the data processing policy to obtain the data block containing the block chain identifier comprises:
acquiring a second configuration file according to the pre-configured block chain service, wherein a plurality of block chain identifiers and a plurality of computing node identifiers corresponding to each block chain identifier are recorded in the second configuration file;
sending the service data to the computing nodes corresponding to other computing node identifications according to the pre-configured block chain service so that the computing nodes corresponding to other computing node identifications commonly identify the service data according to the data processing strategy;
receiving the service data after consensus returned by the computing nodes corresponding to the other computing node identifications;
and calculating the identified service data according to a pre-configured block chain service to obtain a data block containing the block chain identifier.
3. The method of claim 1, further comprising, prior to said obtaining a blockchain call request:
acquiring a block chain registration request, wherein the block chain registration request carries registration information;
carrying out validity verification on the registration information;
after passing the validity verification, configuring the registration information to obtain configuration information;
and generating a block chain corresponding to the block chain registration request according to the configuration information.
4. The method according to claim 3, further comprising, after the generating a blockchain corresponding to the blockchain registration request according to the configuration information:
creating a corresponding block chain database according to the block chain identifier of the block chain;
determining the service deadline of the block chain according to a preset strategy;
and storing the service deadline into a blockchain database corresponding to the blockchain identification.
5. The method of claim 4, wherein the blockchain registration request carries a group identifier, and after the storing the service lifetime in a blockchain database corresponding to the blockchain identifier, the method further comprises:
generating a block chain use authority certificate according to the service deadline and the configuration information;
dividing the block chain use permission certificate into at least one block chain use permission sub-certificate;
and sending the block chain use authority sub-certificate to terminals corresponding to other group member identifications in the group identification.
6. The method according to any one of claims 1 to 3, further comprising, before said invoking a preconfigured blockchain service according to the blockchain service invocation request:
acquiring the service deadline of the block chain corresponding to the block chain identifier from a block chain database corresponding to the block chain identifier;
identifying whether the block chain is overdue or not according to the service deadline and the current time;
and deleting the data blocks corresponding to the block chain when the block chain is expired.
7. An apparatus for processing service data based on block chains, the apparatus 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 the first configuration file records a plurality of scene identifiers and a data processing strategy corresponding to each scene identifier;
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 blocks into a block chain database corresponding to the block chain identification.
8. The apparatus according to claim 7, wherein the computing module is further configured to obtain a second configuration file according to the preconfigured blockchain service, where the second configuration file records a plurality of blockchain identifiers and a plurality of computing node identifiers corresponding to each blockchain identifier; sending the service data to the computing nodes corresponding to other computing node identifications according to the pre-configured block chain service so that the computing nodes corresponding to other computing node identifications commonly identify the service data according to the data processing strategy; receiving the service data after consensus returned by the computing nodes corresponding to the other computing node identifications; and calculating the identified service data according to a pre-configured block chain service to obtain a data block containing the block chain identifier.
9. A computer device comprising a memory and a processor, the memory storing a computer program operable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
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 true CN111506584A (en) 2020-08-07
CN111506584B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015964A (en) * 2020-08-22 2020-12-01 王红建 Business data processing method based on block chain and digital finance and big data platform
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
CN113312427A (en) * 2021-05-24 2021-08-27 网易(杭州)网络有限公司 Block chain calling method and device, management service platform and storage medium
CN113516541A (en) * 2021-09-14 2021-10-19 杭州小电科技股份有限公司 Dynamic configuration method and device for store distribution scene and electronic device
CN113536342A (en) * 2021-07-06 2021-10-22 招商银行股份有限公司 Block chain-based evidence storage management method, system, program product and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109785136A (en) * 2019-01-30 2019-05-21 北京京东尚科信息技术有限公司 A kind of transaction processing method of block chain, client and block chain network
CN110166442A (en) * 2019-04-30 2019-08-23 阿里巴巴集团控股有限公司 A kind of data processing method and device based on block chain
US20190342422A1 (en) * 2017-03-28 2019-11-07 Alibaba Group Holding Limited Service processing and consensus method and device
CN110598110A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Service pushing method and device
US20200026700A1 (en) * 2017-03-28 2020-01-23 Alibaba Group Holding Limited Blockchain-based data storage and query method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190342422A1 (en) * 2017-03-28 2019-11-07 Alibaba Group Holding Limited Service processing and consensus method and device
US20200026700A1 (en) * 2017-03-28 2020-01-23 Alibaba Group Holding Limited Blockchain-based data storage and query 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
CN110166442A (en) * 2019-04-30 2019-08-23 阿里巴巴集团控股有限公司 A kind of data processing method and device based on block chain
CN110598110A (en) * 2019-09-16 2019-12-20 腾讯科技(深圳)有限公司 Service pushing method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015964A (en) * 2020-08-22 2020-12-01 王红建 Business data processing method based on block chain and digital finance and big data platform
CN112015964B (en) * 2020-08-22 2021-06-04 上海大象金泰科技有限公司 Business data processing method and system based on 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
CN113312427A (en) * 2021-05-24 2021-08-27 网易(杭州)网络有限公司 Block chain calling method and device, management service platform and storage medium
CN113536342A (en) * 2021-07-06 2021-10-22 招商银行股份有限公司 Block chain-based evidence storage management method, system, program product and storage medium
CN113536342B (en) * 2021-07-06 2024-03-26 招商银行股份有限公司 Block chain-based certificate management method, system, program product and storage medium
CN113516541A (en) * 2021-09-14 2021-10-19 杭州小电科技股份有限公司 Dynamic configuration method and device for store distribution scene and electronic device
CN113516541B (en) * 2021-09-14 2022-01-11 杭州小电科技股份有限公司 Dynamic configuration method and device for store distribution scene and electronic device

Also Published As

Publication number Publication date
CN111506584B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN111506584A (en) Service data processing method and device based on block chain and computer equipment
CN110597911B (en) Certificate processing method and device for block chain network, electronic equipment and storage medium
CN111476572B (en) Block chain-based data processing method, device, storage medium and equipment
CN111131412B (en) Method, system, mobile terminal and cloud server for realizing 5G mobile terminal calculation
CN108280761B (en) Method and device for distributing increase party, computer equipment and storage medium
CN111556120A (en) Data processing method and device based on block chain, storage medium and equipment
CN111880919B (en) Data scheduling method, system and computer equipment
CN112308561A (en) Block chain-based evidence storing method and system, computer equipment and storage medium
WO2019219324A1 (en) Automated data projection for smart contract groups on a blockchain
Shen et al. Blockchain for transparent data management toward 6G
Al_Janabi et al. The reality and future of the secure mobile cloud computing (SMCC): survey
CN110266763A (en) Block chain network implementation method, system and the storage medium of cross-network segment interconnection
CN112149077B (en) Supply chain billing method, system and computer equipment based on block chain technology
CN111488372A (en) Data processing method, device and storage medium
CN110599142A (en) Data storage method and device, computer equipment and storage medium
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
CN113255014A (en) Data processing method based on block chain and related equipment
Shala et al. Blockchain-based trust communities for decentralized M2M application services
CN114116637A (en) Data sharing method, device, equipment and storage medium
CN110662210B (en) Secondary or repeated mobile phone number identification method, system and equipment based on block chain
CN114900374B (en) Intelligent remote network resource intercommunication deployment method, system and cloud platform
CN113254989B (en) Fusion method and device of target data and server
CN113034140B (en) Method, system, equipment and storage medium for realizing intelligent contract encryption
CN115514470A (en) Storage method and system for community correction data security

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