CN114817229B - Block chain based score clearing data processing method and block chain system - Google Patents

Block chain based score clearing data processing method and block chain system Download PDF

Info

Publication number
CN114817229B
CN114817229B CN202210705751.8A CN202210705751A CN114817229B CN 114817229 B CN114817229 B CN 114817229B CN 202210705751 A CN202210705751 A CN 202210705751A CN 114817229 B CN114817229 B CN 114817229B
Authority
CN
China
Prior art keywords
data
contract
bank
clearing
target
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
CN202210705751.8A
Other languages
Chinese (zh)
Other versions
CN114817229A (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.)
Bubi Beijing Network Technology Co ltd
Original Assignee
Bubi Beijing Network Technology 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 Bubi Beijing Network Technology Co ltd filed Critical Bubi Beijing Network Technology Co ltd
Priority to CN202210705751.8A priority Critical patent/CN114817229B/en
Publication of CN114817229A publication Critical patent/CN114817229A/en
Application granted granted Critical
Publication of CN114817229B publication Critical patent/CN114817229B/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/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The disclosure relates to a score clearing data processing method based on a block chain, which can be applied to user nodes or bank nodes. The user node and at least one bank node form a blockchain system. The method applied to the user node comprises the following steps: receiving a clearing data packet to be processed, wherein the clearing data packet has clearing data needing to be processed by one or more target bank nodes in a targeted manner; loading and carrying out data conversion loading on the clearing data packet based on an intelligent contract data conversion protocol to obtain encrypted target clearing protocol data which is suitable for the entry form of bank clearing data; synchronizing the target liquidation protocol data to the bank nodes in the blockchain system, wherein the bank nodes comprise the target bank nodes; and the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node. The method has high data conversion processing efficiency, is safe and accurate, and can be used for retrospective verification.

Description

Block chain based score clearing data processing method and block chain system
Technical Field
The present disclosure relates to the field of finance, blockchain technology, and data processing technology, and in particular, to a method for sorting data processing based on a blockchain and a blockchain system.
Background
In the financial field, the clearing data refers to a set of payment data formed by supply chain finance accounts receivable and cash. The liquidation data is generally sent to a corresponding bank for processing by a financial system or a liquidation system at the enterprise end, for example, a group of to-be-processed liquidation data comprises liquidation data D 1 And score data D 2 Score data D 1 : business A accounts payable 10000 Yuan to business B, the liquidation data D 1 Should be processed by X bank; score data D 2 : business B accounts payable 5000 to business C, the liquidation data D 2 Processing by a Y bank; the financial system or the clearing system of the enterprise end needs to divide the data D 1 Sending to bank X for processing, and sorting data D 2 And sending the data to a bank Y for processing.
In the existing scheme for transmitting and processing the liquidation data at the enterprise end and the bank equipment end, the following technical problems exist in the existing scheme: the method comprises the following steps that transmission and processing of clearing data are carried out based on a Direct connection (Direct connection) mode of an enterprise end and a bank equipment end, the application range of the bank equipment end is narrow, the efficiency of upgrading and modifying a scene with a changed data structure of a certain bank or some banks is low, and data transmission and processing of other banks are influenced; the clearing data is transmitted and processed based on routing modes (Router Mode) of an enterprise end and a bank device end, clearing formation of the data is completed at the enterprise end, an internal flow of the clearing processing is uncontrollable, business logic secondary clearing processing is easily caused, a data clearing process is easily hijacked, and if the content of the clearing data is illegally changed, great economic loss is caused.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, embodiments of the present disclosure provide a method for partition chain based inventory data processing and a partition chain system.
In a first aspect, an embodiment of the present disclosure provides a method for score clearing data processing based on a blockchain, where the method is applied to a user node, and the user node and at least one bank node form a blockchain system. The method comprises the following steps: receiving a clearing data packet to be processed, wherein the clearing data packet has clearing data needing to be processed by one or more target bank nodes in a targeted manner; loading and carrying out data conversion loading on the clearing data packet based on an intelligent contract data conversion protocol to obtain encrypted target clearing protocol data which is suitable for the entry form of bank clearing data; synchronizing the target liquidation protocol data to the bank nodes in the blockchain system, wherein the bank nodes comprise the target bank nodes; and the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node.
According to the embodiment of the present disclosure, the loading and data conversion loading of the liquidation data packet based on the intelligent contract data conversion protocol to obtain the encrypted target liquidation protocol data adapted to the entry form of the bank liquidation data includes: loading an intelligent contract data conversion protocol, taking the clearing data as an input parameter of the intelligent contract data conversion protocol and carrying out initialization processing to obtain contract general parameters related to the clearing data; checking whether the contract general parameters are legal or not; generating initial protocol data according to the contract general parameters under the condition that the contract general parameters are verified to be legal; and converting the initial protocol data to obtain the target clearing protocol data.
According to an embodiment of the present disclosure, the contract general parameters include: public parameter key factor, contract state, initialized public parameter, initialized clearing parameter and signature parameter; the public parameter key factor is a parameter generated by first calculation according to the node information of the target bank node; the contract state is used for representing the execution state of the intelligent contract data conversion protocol, and is an initialization state in the stage of entering into initialization processing; the initialized public parameters comprise contract addresses and bank node addresses of the target bank nodes; the contract address is used for limiting the storage position of the liquidized data after initialization processing; the initialization score clearing parameter includes score clearing key information in a unified format, and the score clearing key information includes: payment source, payment destination, payment amount and bank identification of the target bank node; the signature parameter is generated by performing second calculation according to the initialized public parameter and the initialized score parameter; wherein the first calculation and the second calculation are performed by an agreed calculation method between the user node and the target bank node.
According to the embodiment of the present disclosure, generating initial protocol data according to the contract general parameters includes: generating contract header data according to the contract address and the contract state; generating contract body data according to the initialized public parameters, the initialized liquidity parameters and the signature parameters; and splicing the contract header data and the contract body data to obtain initial protocol data.
According to an embodiment of the present disclosure, the loading an intelligent contract data conversion protocol, taking the liquidation data as an input parameter of the intelligent contract data conversion protocol, and performing initialization processing to obtain a contract general parameter related to the liquidation data includes: loading a score clearing data general template in an intelligent contract data conversion protocol, and synchronously generating a unique contract address for the score clearing data; the score clearing data general template is used for limiting a unified format of score clearing data protocol entry parameters; initializing the score clearing data based on the score clearing data general template to obtain score clearing key information in a unified format; determining a bank node address corresponding to the bank identifier in the clearing key information based on the built-in parameters of the block chain system; and generating a contract general parameter according to the clearing key information, the contract address and the bank node address.
According to an embodiment of the present disclosure, the converting the initial protocol data to obtain the target liquidation protocol data includes: converting the initial protocol data based on one or more bank clearing data templates corresponding to the target bank node to obtain specific bank parameter data; and encrypting the specific bank parameter data to obtain encrypted target clearing protocol data which is suitable for the entry form of the bank clearing data.
According to an embodiment of the present disclosure, the method further includes: and under the condition that the contract general parameters are not verified to be legal, terminating the execution of the intelligent contract data conversion protocol and updating the contract state corresponding to the intelligent contract data conversion protocol to be the end state.
According to an embodiment of the present disclosure, the method further includes: and storing the processing progress state or the processing result in the ledger of the user node when receiving the processing progress state or the processing result of the liquidation data synchronized from the target bank node.
According to an embodiment of the present disclosure, synchronizing the target protocol data to the bank node in the blockchain system includes: broadcasting the target protocol data to all bank nodes in the blockchain system based on a blockchain P2P network; or, based on the blockchain P2P network, the target protocol data is synchronized to the target bank node in the blockchain system in the form of event notification.
In a second aspect, an embodiment of the present disclosure provides a method for score clearing data processing based on a blockchain, where the method is applied to a bank node, and the bank node and a user node form a blockchain system. The method comprises the following steps: receiving the target clearing protocol data synchronized by the user node; the target clearing protocol data is encrypted data obtained by data conversion loading of a clearing data packet to be processed by the user node based on an intelligent contract data conversion protocol; loading and carrying out analysis and verification processing on the target clearing protocol data based on the intelligent contract data conversion protocol; sending the analyzed and verified target clearing data to a bank equipment end corresponding to the bank node; and the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node.
According to the embodiment of the present disclosure, the loading and the analysis and the verification processing of the target liquidation protocol data based on the intelligent contract data conversion protocol include: loading an initialization analysis service in the intelligent contract data conversion protocol, and analyzing the target liquidation protocol data to obtain contract analysis data; checking whether the contract analysis data is valid; decrypting the contract analysis data when the contract analysis data is valid; under the condition that decryption is successful, performing tamper-proof verification on the target liquidation data obtained through decryption; and under the condition that the target clearing data is subjected to tamper-proof verification, the target clearing data is sent to the bank equipment side.
According to an embodiment of the present disclosure, the contract parsing data includes: contract header parsing data and contract body parsing data; the target score data includes: and analyzing the public parameters, the clear score parameters and the signature parameters. Wherein, the step of checking whether the contract analysis data is valid comprises the following steps: checking whether the contract state in the contract head analysis data is an initialization state; when the contract state is the initialized state, the contract analysis data is considered valid. Wherein, the decryption processing of the contract analysis data comprises: based on the public parameter key factor, carrying out decryption processing on the contract body analysis data; the public parameter key factor is a parameter generated by performing a first calculation according to the node information of the bank node. Wherein, the tamper-proof verification of the target liquidation data obtained by the decryption comprises the following steps: performing second calculation according to the analysis public parameter and the analysis clearing parameter to generate a reference signature parameter; checking whether the analysis signature parameter is consistent with the reference signature parameter; and when the analysis signature parameter is consistent with the reference signature parameter, the verification of the target liquidation data against tampering is regarded as passing. The first calculation and the second calculation are performed by an agreed calculation method between the user node and the bank node.
According to an embodiment of the present disclosure, the method further includes: and terminating the execution of the intelligent contract data conversion protocol and updating the contract state corresponding to the intelligent contract data conversion protocol to be the end state when the contract analysis data is invalid, or when the decryption of the contract analysis data is unsuccessful, or when the target definition data tamper-proof check is not passed.
According to an embodiment of the present disclosure, the method further includes: receiving a processing progress state or a processing result of the target liquidation data sent by the banking equipment terminal; storing the processing progress state or the processing result in an account book of the bank node and synchronizing the processing progress state or the processing result to the user node; and updating the contract state corresponding to the intelligent contract data conversion protocol to be the end state when the processing result of the target liquidation data is received.
In a third aspect, embodiments of the present disclosure provide a blockchain system. The block chain system comprises: user nodes and bank nodes. The user node includes: the system comprises a score clearing data receiving module, a data conversion module and a synchronization module; the score clearing data receiving module is used for receiving score clearing data packets to be processed, and the score clearing data packets have score clearing data which are required to be processed by one or more target bank nodes in a targeted mode; the data conversion module is used for loading and carrying out data conversion loading on the liquidation data packet based on an intelligent contract data conversion protocol to obtain encrypted target liquidation protocol data which is suitable for the entry form of bank liquidation data; the synchronization module is configured to synchronize the target liquidation protocol data to a bank node in the blockchain system, where the bank node includes the target bank node; the above-mentioned bank node includes: the system comprises a clearing protocol data receiving module, a data analyzing module and an analyzed data sending module; the clearing protocol data receiving module is used for receiving the target clearing protocol data synchronized by the user node; the data analysis module is used for loading and analyzing and verifying the target liquidation protocol data based on the intelligent contract data conversion protocol; the analysis data sending module is used for sending the target clearing data which passes the analysis and the verification to the bank equipment end corresponding to the bank node; and the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node.
In a fourth aspect, embodiments of the present disclosure provide an electronic device. The electronic equipment comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; a memory for storing a computer program; and the processor is used for realizing the method for clearing and classifying data based on the block chain when executing the program stored on the memory.
In a fifth aspect, embodiments of the present disclosure provide a computer-readable storage medium. The above-mentioned computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the method for partition chain-based inventory data processing as described above.
Some technical solutions provided by the embodiments of the present disclosure have at least some or all of the following advantages:
the user node and the bank node are built in the same block chain system, and the user node can convert and load the clearing data based on a general intelligent contract data conversion protocol to obtain encrypted target clearing protocol data which is suitable for the entry form of the bank clearing data; the score clearing data in various forms are subjected to protocol loading and conversion processing through the intelligent contract data conversion protocol, the safety and traceability verification of data input can be guaranteed, data tampering is avoided, meanwhile, the score clearing data after conversion processing are adapted to the entry form of the bank equipment end to be processed respectively, the data conversion processing efficiency is high, the safety, the accuracy and the traceability verification are achieved, and the complicated and inefficient upgrading on-line process caused by upgrading or reconstructing the data structure version of the bank equipment end is avoided. Meanwhile, the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node, so that the consistency of the running state of the intelligent contract can be ensured, and the correctness and the safety of data processing in the process of clearing and distributing data processing by the user node and the bank node based on the intelligent contract data conversion protocol are further ensured. In addition, the distributed network based on the block chain network can avoid the problem that data cannot be transmitted or converted in a direct connection mode or a routing mode due to partial line faults of data transmission.
Some technical solutions provided by the embodiments of the present disclosure have at least some or all of the following advantages:
the user nodes and the bank nodes are constructed in the same block chain system, and the bank nodes can analyze and check the target clearing protocol data based on a general intelligent contract data conversion protocol; the method has the advantages that the target clearing protocol data after being converted and loaded are analyzed and checked based on the intelligent contract data conversion protocol, the target clearing data passing analysis and checking are automatically output and sent to the bank equipment end corresponding to the bank node, so that the bank equipment end can process the clearing data, the data conversion processing efficiency is high, the safety and the accuracy are high, the verification can be traced, and the complicated and inefficient upgrading on-line process caused by upgrading or transforming the data structure version of the bank equipment end is avoided. Meanwhile, the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node, so that the consistency of the running state of the intelligent contract can be ensured, and the correctness and the safety of data processing in the process of clearing and distributing data processing by the user node and the bank node based on the intelligent contract data conversion protocol are further ensured. In addition, the distributed network based on the block chain network can avoid the problem that data cannot be transmitted or converted in a direct connection mode or a routing mode due to partial line faults of data transmission.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the related art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 schematically illustrates a system architecture of a method of partition chain based liquidation data processing suitable for use in an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method of partition chain based inventory data processing according to an embodiment of the present disclosure;
fig. 3 schematically shows a detailed implementation flowchart of step S220 of the embodiment of the present disclosure;
fig. 4 schematically shows a detailed implementation flowchart of step S310 of the embodiment of the present disclosure;
fig. 5 schematically shows a detailed implementation flowchart of step S340a of the embodiment of the present disclosure;
FIG. 6 schematically illustrates a flow diagram of a method of partition chain based inventory data processing according to another embodiment of the disclosure;
fig. 7 schematically shows a detailed implementation flowchart of step S620 of the embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of the structure of a blockchain system of an embodiment of the present disclosure; and
fig. 9 schematically shows a block diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
During the development process, the following are found: in the related art, the process of transmitting and processing the clearing data based on the Direct connection (Direct connection) mode of the enterprise side and the banking device side is as follows: after the enterprise terminal financial/clearing system sends clearing data, the clearing information integration conversion system is used for butt joint with settlement channels of a plurality of banks, the clearing information integration conversion system is used for carrying out data filtration and conversion on the clearing data, and the converted clearing data message is directly sent to a corresponding bank equipment terminal. The method can only support the bank equipment end with the direct connection function, the application of the bank equipment end which does not support the direct connection function is limited, and in a scene that the enterprise end corresponds to a plurality of bank equipment ends, if the data structure of one or some banks is upgraded and changed, the transaction of data transmission is abnormal, components in the direct connection mode need to be repaired or upgraded and modified, and the data processing process of other banks is affected.
The process of transmitting and processing the liquidation data based on the routing Mode (Router Mode) of the enterprise terminal and the banking device terminal is as follows: after a financial system or a clearing system of an enterprise end sends clearing data, the clearing data routing independently transmits the corresponding bank clearing data to a bank front-end processor, and the bank front-end processor receives and converts the clearing data message and sends the clearing data message to a bank equipment end through the Internet of things or a private line. In this way, the clearing formation of the data is completed at the enterprise end, and the internal flow of the clearing processing is uncontrollable, so that the secondary clearing processing of business logic is easily caused; moreover, the data sorting process is easy to hijack, and the sorting data content is changed, so that the major economic loss of an enterprise end is easily caused.
In view of this, embodiments of the present disclosure provide a method for processing liquidation data based on a block chain and a block chain system, where a user node and a bank node are built in the same block chain system, and the user node can perform conversion loading of liquidation data based on a general intelligent contract data conversion protocol to obtain encrypted target liquidation protocol data adapted to a participation form of the bank liquidation data; the bank node can analyze and check the target clearing protocol data based on a general intelligent contract data conversion protocol; the data conversion processing efficiency is high, the safety and the accuracy are realized, the traceable verification can be realized, and the complicated and inefficient upgrading on-line process caused by upgrading or transforming the version of the data structure at the bank equipment end is avoided. Meanwhile, the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node, so that the consistency of the running state of the intelligent contract can be ensured, and the correctness and the safety of data processing in the process of clearing and distributing data processing by the user node and the bank node based on the intelligent contract data conversion protocol are further ensured.
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Fig. 1 schematically shows a system architecture of a method for partition chain-based inventory data processing applicable to an embodiment of the present disclosure.
Referring to fig. 1, a system architecture 100 suitable for the method for partition chain based inventory data processing according to the embodiment of the present disclosure includes: the user equipment terminal 110, the user node 120, the bank node 130 and the bank equipment terminal 140, where the user node 120 and the bank node 130 form a blockchain system (also can be understood as a blockchain network), and in the blockchain system, the nodes implement processing of clearing data by loading and executing the intelligent contract data conversion protocol 101.
The user device side 110 is an electronic device side of an enterprise user, and may also be an electronic device side of an individual user. The electronic equipment end can be a terminal device or a server, the user equipment end can be provided with applications such as a financial system or a clearing system or provide data service support for the applications, and clearing data are obtained by collecting and sorting information such as transaction data and accounts.
User node 120 is a node registered by an enterprise user or an individual user in the blockchain system, and the user node can perform data transmission and data consensus, blockchain ledger recording and synchronization, and the like with other nodes in the blockchain system, such as bank nodes, based on a blockchain P2P (peer-to-peer) network.
The banking device side 140 may be an electronic device side of a financial institution for performing a payment operation of the liquidation data, and may be a server or a terminal of each bank, for example.
The bank node 130 is a node registered in the blockchain system by a financial institution for performing a payment operation of the liquidation data, and the bank node can perform data transmission and data consensus, blockchain ledger recording and synchronization, and the like with a user node in the blockchain based on a blockchain P2P (peer-to-peer) network. In fig. 1, two bank nodes are an X bank node and a Y bank node, respectively, as an example, in an embodiment of the present disclosure, the bank nodes of the blockchain system may be one or more, and a financial institution processing the liquidation data may join the blockchain system according to its own needs.
In embodiments of the present disclosure, the clearing data refers to a set of payment data formed by supply chain financial receivables redemption.
For example, a set of liquidation data generated by a financial system or a liquidation system in the user equipment terminal 110 is as follows:
business a accounts payable 10000 to business B, for example the liquidation data needs to be processed by X bank,
the accounts payable 5000 of the B enterprise to the C enterprise, for example, the liquidation data needs to be processed by the Y bank,
enterprise C accounts payable 2000 to enterprise D, for example, the liquidation data needs to be processed by bank Y.
The user equipment terminal 110 sends the clearing data packet containing the group of clearing data to the user node 120, and the user node 120 loads and carries out data conversion loading on the clearing data packet based on the intelligent contract data conversion protocol 101 to obtain encrypted target clearing protocol data which is suitable for the entry form of bank clearing data; the target liquidation protocol data is synchronized to the bank nodes 130 in the blockchain system. The bank node 130 receives the target liquidation agreement data synchronized by the user node 120; loading and carrying out analysis and verification processing on the target clearing protocol data based on the intelligent contract data conversion protocol 101; and sending the analyzed and verified target liquidation data to the banking equipment end 140 corresponding to the banking node. Therefore, the bank equipment terminal can carry out transaction payment processing according to the clearing data to obtain a processing result of the clearing data.
The life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node. For example, in the process of processing a certain group of liquidation data packets based on the intelligent contract data conversion protocol, when a certain execution condition of a user node or a bank node triggers a contract termination condition, the user node or the bank node correspondingly terminates the execution of the intelligent contract data conversion protocol, updates a contract state corresponding to the intelligent contract data conversion protocol to be an end state, and synchronizes the contract state to other nodes in the block chain system. In one embodiment, the user node performs data conversion loading on the liquidity data packet based on an intelligent contract data conversion protocol, and a contract state corresponding to the intelligent contract data conversion protocol is in an initialization state; after receiving the target clearing data, the bank node loads and analyzes and checks the target clearing protocol data based on the intelligent contract data conversion protocol, and at the moment, the contract state corresponding to the intelligent contract data conversion protocol is in an initialized analysis state (the continuation of the contract state is realized); after the bank node sends the target clearing data to the bank equipment end corresponding to the bank node, the bank node waits for the processing progress state or the processing result of the target clearing data fed back by the bank equipment end; and after the bank node receives the processing result of the target clearing data, updating the contract state of the intelligent contract data conversion protocol to be the end state, and synchronizing the contract state to the user node (realizing synchronous updating of the contract state).
Specific embodiments are described below with reference to the accompanying drawings.
A first exemplary embodiment of the present disclosure provides a method for processing liquidation data based on a blockchain, where the method of this embodiment is applied to the user node 120 in the system architecture 100, and the user node 120 and at least one bank node 130 form a blockchain system.
Fig. 2 schematically shows a flowchart of a method for partition chain based inventory data processing according to an embodiment of the present disclosure.
Referring to fig. 2, a method for processing liquidation data based on a block chain according to an embodiment of the present disclosure includes the following steps: s210, S220 and S230.
In step S210, an inventory data packet to be processed is received, where the inventory data packet has inventory data that needs to be processed by one or more target bank nodes in a targeted manner.
In one implementation scenario, the received credit packets may be credit packets of different representations. For example, different enterprise users each have an independent set of expression form of score clearing data, the enterprise users upload the score clearing data to the user node through the enterprise user equipment, and accordingly, the user node receives the score clearing data packet to be processed, and performs data conversion loading on the score clearing data packet based on the intelligent contract data conversion protocol by executing the subsequent step S220.
For example, the score data included in the score packet is in the following form: { Enterprise A → Enterprise B, 10000, Bank X; business B → business C, 5000, bank Y; c corporation → D corporation, 2000, Y Bank }. Or, some of the sorting packets are in the following form: { X Bank: enterprise a, enterprise B, 10000; and (5) bank Y: enterprise B, enterprise C, 5000; and bank Y: enterprise C, enterprise D, 2000 }. In this embodiment, the target bank nodes are an X bank node and a Y bank node.
In step S220, the data conversion and loading are performed on the clearing data packet based on the intelligent contract data conversion protocol, so as to obtain encrypted target clearing protocol data adapted to the bank clearing data entry form.
Because different banks respectively have a set of system of oneself to stipulate the parameter form, carry out data conversion loading through intelligent contract data conversion agreement to the packet of clearing, can unify each clearing data of the packet of clearing the same group and load and convert the adaptation to different bank equipment ends.
The intelligent contract is a section of code written on a block chain, a section of event triggers terms in the contract, the content of the contract automatically executed by the code (executed when the condition is met), parameters, triggering conditions and the like are correspondingly designed.
The life cycle state of the intelligent contract data conversion protocol is updated and continued synchronously between the user node and the bank node, and specific description of the life cycle state of the intelligent contract data conversion protocol in the system framework can be referred to, which is not described herein again.
The intelligent contract data conversion protocol is used for loading various input forms of score clearing data packets into a unified entry-parameter form and performing conversion processing to obtain encrypted target score clearing protocol data which is suitable for the entry-parameter form of the bank score clearing data.
For example, based on the intelligent contract data conversion protocol, the liquidation data packets in the two examples are loaded into a unified entry form: { from: A, to: B, atmospheric: 10000, Code X ;from:B,to:C,amount:5000,Code Y ;from:C,to:D,amount:2000,Code Y }. That is, the unified reference form is<from,to,amount,code>. After the entry of the liquidation data in the unified form is further converted, encrypted target liquidation protocol data in the entry form suitable for the X bank and the Y bank is obtained, for example, the entry form of the X bank is as follows: { payee business name and abbreviation, payer business name and abbreviation, transaction amount }, entry form of bank Y: { payer Enterprise organization codePayee enterprise organization code, payment amount }; the target liquidation protocol data is in encrypted form and contains the following: { payee business name and abbreviation: business name and abbreviation, payer business name and abbreviation: business name and abbreviation, transaction amount: 10000; payer enterprise organization code: b enterprise organization code, payee enterprise organization code: c enterprise organization code, payment amount: 5000; payer enterprise organization code: enterprise organization code, payee enterprise organization code: enterprise organization code, payment amount: 2000}.
When the intelligent contract data conversion protocol initializes the loading parameters, the score clearing data general template can be utilized to load the score clearing data packet into a unified entry form.
Each bank has a bank clearing data template corresponding to each bank, and the bank clearing data template has a specification setting of a reference form. The intelligent contract data conversion protocol is internally provided with a bank clearing data template or can call the bank clearing data template.
In step S230, the target liquidation protocol data is synchronized to the bank nodes in the blockchain system, where the bank nodes include the target bank node.
According to an embodiment of the present disclosure, in the step S230, synchronizing the target protocol data to the bank node in the blockchain system includes: broadcasting the target protocol data to all bank nodes in the blockchain system based on a blockchain P2P network; or, based on the blockchain P2P network, the target protocol data is synchronized to the target bank node in the blockchain system in the form of event notification.
The data synchronization is carried out in the form of event notification, so that a mode of actively notifying the target object related to the target object is embodied, and the method is not limited to a traditional mode of broadcasting nearby according to the network in a block chain network.
Based on the steps S210-S230, the user node and the bank node are built in the same block chain system, the user node can convert and load the clearing data based on a general intelligent contract data conversion protocol, and encrypted target clearing protocol data which is suitable for the entry form of the bank clearing data is obtained; the score clearing data in various forms are subjected to protocol loading and conversion processing through the intelligent contract data conversion protocol, the safety and traceability verification of data input can be guaranteed, data tampering is avoided, meanwhile, the score clearing data after conversion processing are adapted to the entry form of the bank equipment end to be processed respectively, the data conversion processing efficiency is high, the safety, the accuracy and the traceability verification are achieved, and the complicated and inefficient upgrading on-line process caused by upgrading or reconstructing the data structure version of the bank equipment end is avoided. Meanwhile, the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node, so that the consistency of the running state of the intelligent contract can be ensured, and the correctness and the safety of data processing in the process of clearing and distributing data processing by the user node and the bank node based on the intelligent contract data conversion protocol are further ensured. In addition, the distributed network based on the block chain network can avoid the problem that data cannot be transmitted or converted in a direct connection mode or a routing mode due to partial line faults of data transmission.
Fig. 3 schematically shows a detailed implementation flowchart of step S220 of the embodiment of the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 3, in the step S220, loading and performing data conversion loading on the liquidation data packet based on an intelligent contract data conversion protocol to obtain encrypted target liquidation protocol data adapted to a banking liquidation data entry form, includes the following steps: s310, S320, S330a, and S340 a.
In step S310, an intelligent contract data conversion protocol is loaded, and the liquidation data is used as an input parameter of the intelligent contract data conversion protocol and is initialized to obtain a contract general parameter related to the liquidation data.
According to an embodiment of the present disclosure, the contract general parameters include: a public parameter key factor, a contract state, an initialization public parameter, an initialization clearing parameter, and a signature parameter.
The public parameter key factor is a parameter generated by performing a first calculation according to the node information (e.g., a bank node address) of the target bank node. The first calculation mode is an appointed calculation mode between the user node and the target bank node. For example, if the first calculation is a hash calculation, the calculation formula of the public parameter key factor pri1 is expressed as: pri 1= hash (B1), B1 represents the banking node address of the target banking node.
The contract state is used for representing the execution state of the intelligent contract data conversion protocol, and is an initialization state in the stage of entering into initialization processing. For example, representing the contract state as status1, the contract state as initialized state may be represented as: status1= init.
The initialized public parameters comprise a contract address and a bank node address of the target bank node. The contract address is used for limiting the storage position of the liquidized data after initialization processing. For example, if the initialization common parameter is denoted pubData1, the parameter of the initialization common parameter takes the following form: pubData1= con1 (C1, B1). con1 represents a splice function and C1 represents a contract address.
The initialization score clearing parameter includes score clearing key information in a unified format, and the score clearing key information includes: payment source, payment destination, payment amount, and bank identification of the target bank node. For example, if the initialization score parameter is represented as preData1, the initialization score parameter containing the key information of the score may be represented in the form of: preData 1= con2(from, to, amplitude, code), con2 represents the concatenation function.
The signature parameter is generated by performing a second calculation according to the initialized common parameter and the initialized score parameter. The second calculation method is an agreed calculation method between the user node and the target bank node, and for example, the second calculation method is as follows: splicing the initialized public parameters and the initialized clearing parameters to obtain splicing parameters; performing Hash calculation on the splicing parameters; then the signature parameters sign1 satisfy the following expression: sign1= hash (pubData1+ preData 1).
In step S320, it is checked whether the contract general parameters are legal.
For example, the verification is performed based on the following function: checkIsNull (PreData1, pubData1, sign 1).
In the case where the above-described contract common argument check is legal, steps S330a and S340a are performed.
In step S330a, initial protocol data is generated according to the contract general parameters.
According to an embodiment of the present disclosure, in the step S330a, generating initial protocol data according to the contract general parameters includes: generating contract header data according to the contract address and the contract state; generating contract body data according to the initialized public parameters, the initialized liquidity parameters and the signature parameters; and splicing the contract header data and the contract body data to obtain initial protocol data.
For example, the process of generating the contract header data may be represented in the form of: conthead = con3(C1, status1), the process of generating contractual volume data may be represented in the form: privacyData 1= con4(preData1, pubData1, sign 1).
In step S340a, the initial protocol data is converted to obtain the target liquidation protocol data.
Based on the steps S310-S340 a, the clearing data is initialized based on the intelligent contract data conversion protocol to obtain a uniform entry form, so that contract general parameters related to the clearing data are obtained, the contract general parameters are further converted to obtain encrypted target clearing protocol data which is suitable for the entry form of the bank clearing data, and the clearing data in various forms and data structures of various banks to be docked need to be automatically converted and loaded, so that the application range is wide.
According to an embodiment of the present disclosure, as shown with reference to another branch indicated by a dotted line in fig. 3, the step S220 further includes the following step S330 b.
In the case where the contract general parameter check described above is not legal, step S330b is executed.
In step S330b, the execution of the intelligent contract data conversion protocol is terminated, and the contract status corresponding to the intelligent contract data conversion protocol is updated to the end status.
Fig. 4 schematically shows a detailed implementation flowchart of step S310 of the embodiment of the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 4, in the step S310, loading an intelligent contract data conversion protocol, taking the liquidation data as an input parameter of the intelligent contract data conversion protocol, and performing initialization processing to obtain a contract general parameter related to the liquidation data, includes the following steps: s410, S420, S430 and S440.
In step S410, the score data general template in the intelligent contract data conversion protocol is loaded, and a unique contract address is synchronously generated for the score data.
The general template for the score clearing data is used for limiting a uniform format of the entry parameter of the score clearing data protocol, the specific form of the specific uniform format is agreed by the protocol, and the score clearing data in any form can be converted into the format required by the template in the initialization step.
In step S420, the score data is initialized based on the score data general template to obtain the score key information in a unified format.
For example, the unified parameter is from, to, amount, code >. The sorting key information includes: payment source, payment destination, payment amount, and bank identification of the target bank node.
In step S430, a bank node address corresponding to the bank identifier in the key information for clearing is determined based on the built-in parameters of the blockchain system.
The built-in parameters include node information of each node in the blockchain system, including but not limited to: node identification information (for example, a node identification of a user node and a node identification of a bank node) of each node in the same blockchain system (or referred to as a blockchain network) and node address information corresponding to each node.
In step S440, a contract general parameter is generated according to the liquidation key information, the contract address and the bank node address.
For example, the contract general parameters generated are:
public parameter key factor: pri 1= hash (B1);
contract state: status1= init;
initializing common parameters: pubData1= con1 (C1, B1);
initializing a score clearing parameter: preData 1= con2(from, to, amount, code);
signature parameters: sign1= hash (pubData1+ preData 1).
The public parameter key factor is held between the user node and the corresponding bank node and is kept secret from outside, and is used for decrypting the encrypted parameter. The signature parameter is used for proving the uniqueness of the to-be-processed liquidation data corresponding to a group of contract general parameters in the transmission and processing processes, and if the liquidation data is illegally intercepted and tampered during transmission, the signature parameter cannot pass during verification, so that the correctness and the safety during the liquidation data processing can be ensured.
Fig. 5 schematically shows a detailed implementation flowchart of step S340a of the embodiment of the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 5, in the step S340a, performing a conversion process on the initial protocol data to obtain the target liquidation protocol data includes the following steps: s510 and S520.
In step S510, based on one or more bank clearing data templates corresponding to the target bank node, the initial agreement data is converted to obtain specific bank parameter data.
The bank clearing data template can be obtained through the node identification of the target bank node, for example, the node identification of the bank node is a bank code, such as boc (Chinese bank), icbc (industrial and commercial bank), and the like. The process of determining the bank liquidation data template can be represented by the following functions: conttctemplate = contcttemplate (bankcode).
The process of converting the initial protocol data to obtain the specific bank parameter data privcybankdata can be expressed as the following form:
privacybankData=contractConverts(contractTemplate)。
in step S520, the specific bank parameter data is encrypted to obtain encrypted target liquidation protocol data adapted to the entry form of the bank liquidation data.
For example, the target liquidation protocol data is represented as a contictbody, and the encryption process is represented as follows:
containtbody = sm4.encryption (privcybankdata). Encryption is an encryption algorithm.
SM4.0 (original name SMs 4.0) is a block cipher standard adopted in our country and issued by the national cipher administration in 3/21/2012. The relevant standard is "GM/T0002-.
In an embodiment, the method for processing liquidation data based on a block chain according to the embodiment of the present disclosure includes, in addition to the above steps S210 to S230, the following steps: and storing the processing progress state or the processing result in the ledger of the user node when receiving the processing progress state or the processing result of the liquidation data synchronized from the target bank node.
The processing result includes processing success, processing failure, and the like.
For example, the bank node receives the processing progress state or the processing result of the clearing data from the bank equipment terminal, and synchronizes the processing progress state or the processing result to the user node; the user node can continue to synchronize to the user equipment.
A second exemplary embodiment of the present disclosure provides a method of partition chain based inventory data processing. The method of the present embodiment is applied to each bank node, and the bank node and the user node form a blockchain system, which may specifically refer to the description of the system architecture 100. The method described in this embodiment may be referred to in conjunction with the method described in the first embodiment to understand the interaction process between the user node and the bank node.
Fig. 6 schematically shows a flowchart of a method for partition chain based inventory data processing according to another embodiment of the present disclosure.
Referring to fig. 6, a method for processing score clearing data based on a block chain, which is provided by the embodiment of the present disclosure, includes the following steps: s610, S620, and S630.
In step S610, the target liquidation protocol data synchronized by the user node is received.
The target clearing protocol data is encrypted data obtained by data conversion and loading of the clearing data packet to be processed by the user node based on an intelligent contract data conversion protocol.
In step S620, the target liquidation protocol data is loaded and analyzed and verified based on the intelligent contract data conversion protocol.
And the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node.
In step S630, the target score clearing data that passes the analysis and verification is sent to the banking device side corresponding to the banking node.
Based on the steps S610-S630, the user node and the bank node are built in the same block chain system, and the bank node can analyze and verify the target clearing protocol data based on a general intelligent contract data conversion protocol; the method has the advantages that the target clearing protocol data after being converted and loaded are analyzed and checked based on the intelligent contract data conversion protocol, the target clearing data passing analysis and checking are automatically output and sent to the bank equipment end corresponding to the bank node, so that the bank equipment end can process the clearing data, the data conversion processing efficiency is high, the safety and the accuracy are high, the verification can be traced, and the complicated and inefficient upgrading on-line process caused by upgrading or transforming the data structure version of the bank equipment end is avoided. Meanwhile, the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node, so that the consistency of the running state of the intelligent contract can be ensured, and the correctness and the safety of data processing in the process of clearing and distributing data processing by the user node and the bank node based on the intelligent contract data conversion protocol are further ensured. In addition, the distributed network based on the block chain network can avoid the problem that data cannot be transmitted or converted in a direct connection mode or a routing mode due to partial line faults of data transmission.
Fig. 7 schematically shows a detailed implementation flowchart of step S620 of the embodiment of the present disclosure.
According to an embodiment of the present disclosure, as shown in fig. 7, in the step S620, the step of loading and performing analysis and verification processing on the target liquidation protocol data based on the intelligent contract data conversion protocol includes the following steps: s710, S720 and S730.
In step S710, the initialization analysis service in the intelligent contract data conversion protocol is loaded, and the target liquidation protocol data is analyzed to obtain contract analysis data.
According to an embodiment of the present disclosure, the contract parsing data includes: contract header parsing data and contract body parsing data.
The description of loading the initialization analysis service in the intelligent contract data conversion protocol is as the following expression:
contractData = getContractInit(C1);
analyzing the target liquidation protocol data based on the initialized analysis service to obtain contract header analysis data and contract body analysis data, which are respectively expressed as follows:
contract header 2 (contract header parsing data) = contract data. contract header (where the contract header data is actually in encrypted form),
contract body2 (contract body parsing data) = contract data. contract body (contract body data here is actually in encrypted form).
In step S720, it is checked whether the contract parsing data is valid.
In one embodiment, the checking whether the contract parsing data is valid includes: checking whether the contract state in the contract header analysis data is an initialization state; when the contract state is the initialized state, the contract analysis data is considered valid.
For example, the process of checking whether the above-described contract parsing data is valid is expressed in the form:
status2 = contractHead2. status1,
checkStatus(C1, status2)。
in step S730a, when the contract analysis data is valid, the decryption process is performed on the contract analysis data.
In an embodiment, decrypting the contract parsing data includes: based on the public parameter key factor, carrying out decryption processing on the contract body analysis data; the public parameter key factor is a parameter generated by performing a first calculation according to node information of the bank node (for example, a bank node address).
The bank node obtains a public parameter key factor by adopting a first calculation mode appointed with the user node: pri2 = hash (B1),
the process of performing decryption processing is represented in the form:
privacyData2 = sm4.decrypt(contractBody, pri2)。
in step S740a, if the decryption is successful, tamper-proof verification is performed on the decrypted target score data.
The target score data includes: and analyzing the public parameters, the clear score parameters and the signature parameters.
In an embodiment, performing tamper-proof verification on the decrypted target liquidity data includes: performing second calculation according to the analysis public parameter and the analysis clearing parameter to generate a reference signature parameter; checking whether the analysis signature parameter is consistent with the reference signature parameter; and when the analysis signature parameter is consistent with the reference signature parameter, the verification of the target liquidation data against tampering is regarded as passing.
The process of performing tamper-proof verification on the decrypted target liquidized data is represented as follows:
preData2 (analytic liquidation parameter) = privacyData2 preData 1;
pubData2 (public parameter resolved) = privacyData2 pubData 1;
sign2 (reference signature parameters) = privacyData2. sign 1;
checkSign(preData2+ pubData2,sign2)。
the second calculation method is an agreed calculation method between the user node and the target bank node, and for example, the second calculation method is as follows: splicing the initialized public parameters and the initialized clearing parameters to obtain splicing parameters; and carrying out Hash calculation on the splicing parameters.
And executing step S630 to send the target clearing data to the banking device side when the target clearing data is verified to be tampered.
According to the embodiment of the present disclosure, referring to the branch of the dashed line in fig. 7, the step S620 further includes the following steps: one or more of S730b, S740b, or S750.
In step S730b, when the contract analysis data is invalid, the execution of the intelligent contract data conversion protocol is terminated, and the contract status corresponding to the intelligent contract data conversion protocol is updated to the end status.
In step S740b, if the contract analysis data is not decrypted successfully, the execution of the intelligent contract data conversion protocol is terminated, and the contract status corresponding to the intelligent contract data conversion protocol is updated to the end status.
In step S750, in a case that the target specification data tamper-proof check fails, the execution of the intelligent contract data conversion protocol is terminated, and the contract state corresponding to the intelligent contract data conversion protocol is updated to an end state.
According to an embodiment of the present disclosure, the method further includes, in addition to the steps S610 to S630: receiving a processing progress state or a processing result of the target liquidation data sent by the banking equipment terminal; storing the processing progress state or the processing result in an account book of the bank node and synchronizing the processing progress state or the processing result to the user node; and updating the contract state corresponding to the intelligent contract data conversion protocol into an end state when the processing result of the target liquidation data is received.
A third exemplary embodiment of the present disclosure provides a blockchain system. The block chain system comprises: user nodes and bank nodes. The user node is, for example, an enterprise node.
The user node is used for executing the following steps or comprises a functional module for executing the following steps: receiving a clearing data packet to be processed, wherein the clearing data packet has clearing data needing to be processed by one or more target bank nodes in a targeted manner; loading and carrying out data conversion loading on the clearing data packet based on an intelligent contract data conversion protocol to obtain encrypted target clearing protocol data which is suitable for the entry form of bank clearing data; and synchronizing the target liquidation protocol data to the bank nodes in the blockchain system, wherein the bank nodes comprise the target bank nodes.
The bank node is used for executing the following steps or comprises a functional module for executing the following steps: receiving the target clearing protocol data synchronized by the user node; loading and carrying out analysis and verification processing on the target clearing protocol data based on the intelligent contract data conversion protocol; and sending the analyzed and verified target clearing data to the bank equipment end corresponding to the bank node. And the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node.
The user node or the bank node may further include steps or detailed implementation steps of the above steps may refer to descriptions incorporated in the foregoing two embodiments, and are not described herein again.
Fig. 8 schematically shows a block diagram of the block chain system of the embodiment of the present disclosure.
For example, in one embodiment, referring to fig. 8, a blockchain system 800 includes: a user node 810 and a bank node 820, wherein the user node 810 comprises: an inventory data receiving module 811, a data conversion module 812, and a synchronization module 813.
The score data receiving module 811 is configured to receive a score data packet to be processed, where the score data packet has score data that needs to be processed by one or more target banking nodes in a targeted manner.
The data conversion module 812 is configured to load and perform data conversion loading on the liquidation data packets based on the intelligent contract data conversion protocol, so as to obtain encrypted target liquidation protocol data adapted to the entry form of the bank liquidation data.
The synchronization module 813 is configured to synchronize the target liquidation protocol data to the bank nodes in the blockchain system, where the bank nodes include the target bank node.
The banking node 820 includes: an inventory protocol data receiving module 821, a data parsing module 822 and a parsed data transmitting module 823.
The distribution protocol data receiving module 821 is configured to receive the target distribution protocol data synchronized by the user node.
The data analysis module 822 is configured to load and analyze and verify the target liquidation protocol data based on the intelligent contract data conversion protocol.
The analysis data sending module 823 is configured to send the target score clearing data that is passed through analysis and verification to the banking device side corresponding to the banking node; and the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node.
Any number of the modules included in the user node 810 or the bank node 820 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. At least one of the modules comprised by the user node 810 or the bank node 820 may be implemented at least partly as a hardware circuit, e.g. a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or by hardware or firmware in any other reasonable way of integrating or packaging a circuit, or in any one of three implementations of software, hardware and firmware, or in a suitable combination of any of them. Alternatively, at least one of the modules comprised by the user node 810 or the bank node 820 may be at least partly implemented as a computer program module, which when executed may perform a corresponding function.
A fourth exemplary embodiment of the present disclosure provides an electronic apparatus.
Fig. 9 schematically shows a block diagram of an electronic device provided by an embodiment of the present disclosure.
Referring to fig. 9, an electronic device 900 provided in the embodiment of the present disclosure includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete communication with each other through the communication bus 904; a memory 903 for storing computer programs; the processor 901 is configured to implement the above-described method for sorting data based on a block chain when executing a program stored in the memory.
A fifth exemplary embodiment of the present disclosure also provides a computer-readable storage medium. The above-mentioned computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, implements the method for partition chain-based inventory data processing as described above.
The computer-readable storage medium may be contained in the apparatus/device described in the above embodiments; or may be separate and not incorporated into the device/apparatus. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (13)

1. A score data processing method based on a block chain is applied to a user node, the user node and at least one bank node form a block chain system, and the method comprises the following steps:
receiving a score clearing data packet to be processed, wherein the score clearing data packet has score clearing data needing to be processed by one or more target bank nodes in a targeted mode;
loading an intelligent contract data conversion protocol, taking the clearing data as an input parameter of the intelligent contract data conversion protocol, and carrying out initialization processing to obtain contract general parameters related to the clearing data;
checking whether the contract general parameters are legal or not;
generating initial protocol data according to the contract general parameters under the condition that the contract general parameters are verified to be legal;
converting the initial protocol data based on one or more bank clearing data templates corresponding to the target bank node to obtain corresponding bank parameter data;
encrypting the corresponding bank parameter data to obtain encrypted target clearing protocol data which is suitable for the entry form of the bank clearing data;
synchronizing the target liquidation protocol data to bank nodes in the blockchain system, wherein the bank nodes comprise the target bank nodes;
wherein the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node;
the contract general parameters include: public parameter key factor, contract state, initialized public parameter, initialized clearing parameter and signature parameter;
the public parameter key factor is a parameter generated by first calculation according to the node information of the target bank node;
the contract state is used for representing the execution state of the intelligent contract data conversion protocol, and is an initialization state in the stage of entering initialization processing;
the initialized public parameters comprise contract addresses and bank node addresses of the target bank nodes; the contract address is used for limiting the storage position of the score clearing data after initialization processing;
the initialized score clearing parameter comprises score clearing key information in a unified format, and the score clearing key information comprises: a payment source, a payment destination, a payment amount, and a bank identification of the target bank node;
the signature parameter is generated by second calculation according to the initialized public parameter and the initialized score clearing parameter;
wherein the first calculation and the second calculation are in an agreed calculation mode between the user node and the target bank node.
2. The method of claim 1, wherein generating initial protocol data according to the contract common parameters comprises:
generating contract header data according to the contract address and the contract state;
generating contract body data according to the initialized public parameters, the initialized liquidity parameters and the signature parameters;
and splicing the contract header data and the contract body data to obtain initial protocol data.
3. The method according to claim 1 or 2, wherein the loading of the intelligent contract data conversion protocol, taking the liquidation data as an input parameter of the intelligent contract data conversion protocol and performing initialization processing to obtain contract general parameters of the liquidation data comprises:
loading a score clearing data general template in an intelligent contract data conversion protocol, and synchronously generating a unique contract address for the score clearing data; the score clearing data general template is used for limiting a unified format of score clearing data protocol entry parameters;
initializing the score clearing data based on the score clearing data general template to obtain score clearing key information in a unified format;
determining a bank node address corresponding to a bank identifier in the clearing key information based on the built-in parameters of the block chain system;
and generating a contract general parameter according to the clearing key information, the contract address and the bank node address.
4. The method of claim 1, further comprising:
and under the condition that the contract general parameters are not verified to be legal, terminating the execution of the intelligent contract data conversion protocol, and updating the contract state corresponding to the intelligent contract data conversion protocol to be the end state.
5. The method of claim 1, further comprising:
in the event that a processing progress status or a processing result regarding the liquidation data is received from the target bank node in synchronization, storing the processing progress status or the processing result in an ledger of the user node.
6. A score clearing data processing method based on a block chain is applied to a bank node, the bank node and a user node form a block chain system, and the method comprises the following steps:
receiving target liquidation protocol data synchronized by the user node; the target liquidation protocol data is obtained based on the method of any one of claims 1-5;
loading and carrying out analysis and verification processing on the target clearing protocol data based on the intelligent contract data conversion protocol;
sending the target clearing data passing the analysis and the verification to a bank equipment end corresponding to the bank node;
wherein the lifecycle state of the intelligent contract data conversion protocol is updated and continued synchronously between the user node and the bank node.
7. The method of claim 6, wherein the loading and the parsing and checking the target liquidation protocol data based on the intelligent contract data conversion protocol comprises:
loading an initialization analysis service in the intelligent contract data conversion protocol, and analyzing the target liquidation protocol data to obtain contract analysis data;
checking whether the contract analysis data is valid;
under the condition that the contract analysis data is effective, decrypting the contract analysis data;
under the condition that decryption is successful, performing tamper-proof verification on the target liquidation data obtained through decryption;
and under the condition that the target liquidation data is verified to be passed through the anti-tampering check, the target liquidation data is sent to the bank equipment terminal.
8. The method of claim 7, wherein the contract parsing data comprises: contract header parsing data and contract body parsing data; the target liquidation data comprises: analyzing the public parameters, the score clearing parameters and the signature parameters;
wherein, the checking whether the contract analysis data is valid comprises:
checking whether the contract state in the contract head analysis data is an initialization state;
when the contract state is the initialization state, the contract analysis data is considered to be valid;
wherein, the decryption processing of the contract analysis data comprises:
decrypting the contract body analysis data based on the public parameter key factor; the public parameter key factor is a parameter generated by first calculation according to the node information of the bank node;
wherein, the tamper-proof verification of the target liquidation data obtained by the decryption comprises the following steps:
performing second calculation according to the analysis public parameter and the analysis clearing parameter to generate a reference signature parameter;
checking whether the analysis signature parameter is consistent with the reference signature parameter;
under the condition that the analysis signature parameter is consistent with the reference signature parameter, the target liquidation data is regarded as passing the anti-tampering check;
the mode of the first calculation and the second calculation is an appointed calculation mode between the user node and the bank node.
9. The method of claim 8, further comprising:
and under the condition that the contract analysis data is invalid, or the contract analysis data is not decrypted successfully, or the target liquidity data tamper-proof check is not passed, terminating the execution of the intelligent contract data conversion protocol, and updating the contract state corresponding to the intelligent contract data conversion protocol to be the end state.
10. The method according to any one of claims 6-9, further comprising:
receiving a processing progress state or a processing result about the target liquidation data sent by the banking equipment terminal;
storing the processing progress state or the processing result in an account book of the bank node and synchronizing the processing progress state or the processing result to the user node;
and under the condition that a processing result of the target liquidation data is received, updating a contract state corresponding to the intelligent contract data conversion protocol into an end state.
11. A blockchain system, comprising: a user node and a bank node;
the user node includes: the system comprises a score clearing data receiving module, a data conversion module and a synchronization module; the point clearing data receiving module is used for receiving point clearing data packets to be processed, and the point clearing data packets have point clearing data which are required to be processed by one or more target bank nodes in a targeted mode; the data conversion module is used for: loading an intelligent contract data conversion protocol, taking the clearing data as an input parameter of the intelligent contract data conversion protocol, and carrying out initialization processing to obtain contract general parameters related to the clearing data; checking whether the contract general parameters are legal or not; generating initial protocol data according to the contract general parameters under the condition that the contract general parameters are verified to be legal; converting the initial protocol data based on one or more bank clearing data templates corresponding to the target bank node to obtain corresponding bank parameter data; encrypting the corresponding bank parameter data to obtain encrypted target clearing protocol data which is suitable for the entry form of the bank clearing data; the synchronization module is used for synchronizing the target liquidation protocol data to bank nodes in the blockchain system, and the bank nodes comprise the target bank nodes;
the bank node includes: the system comprises a clearing protocol data receiving module, a data analyzing module and an analyzed data sending module; the liquidation protocol data receiving module is used for receiving target liquidation protocol data synchronized by the user node; the data analysis module is used for loading and analyzing and verifying the target liquidation protocol data based on the intelligent contract data conversion protocol; the analysis data sending module is used for sending the target clearing data which passes the analysis and the verification to the bank equipment end corresponding to the bank node;
wherein the life cycle state of the intelligent contract data conversion protocol is synchronously updated and continued between the user node and the bank node; the contract general parameters include: public parameter key factor, contract state, initialized public parameter, initialized clearing parameter and signature parameter;
the public parameter key factor is a parameter generated by first calculation according to the node information of the target bank node;
the contract state is used for representing the execution state of the intelligent contract data conversion protocol, and is an initialization state in the stage of entering initialization processing;
the initialized public parameters comprise contract addresses and bank node addresses of the target bank nodes; the contract address is used for limiting the storage position of the score clearing data after initialization processing;
the initialization score clearing parameter comprises score clearing key information in a unified format, and the score clearing key information comprises: a payment source, a payment destination, a payment amount, and a bank identification of the target bank node;
the signature parameter is generated by second calculation according to the initialized public parameter and the initialized score clearing parameter;
wherein the first calculation and the second calculation are in an agreed calculation mode between the user node and the target bank node.
12. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any one of claims 1 to 10 when executing a program stored on a memory.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1-10.
CN202210705751.8A 2022-06-21 2022-06-21 Block chain based score clearing data processing method and block chain system Active CN114817229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210705751.8A CN114817229B (en) 2022-06-21 2022-06-21 Block chain based score clearing data processing method and block chain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210705751.8A CN114817229B (en) 2022-06-21 2022-06-21 Block chain based score clearing data processing method and block chain system

Publications (2)

Publication Number Publication Date
CN114817229A CN114817229A (en) 2022-07-29
CN114817229B true CN114817229B (en) 2022-09-20

Family

ID=82521776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210705751.8A Active CN114817229B (en) 2022-06-21 2022-06-21 Block chain based score clearing data processing method and block chain system

Country Status (1)

Country Link
CN (1) CN114817229B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311258A (en) * 2020-01-20 2020-06-19 布比(北京)网络技术有限公司 Block chain based trusted transaction method, device, system, equipment and medium
WO2020201662A1 (en) * 2019-03-29 2020-10-08 Orange System and method for enriching data
CN113222606A (en) * 2021-07-07 2021-08-06 中企链信(北京)科技有限公司 Safe transaction execution method based on intelligent contract
CN113765675A (en) * 2021-06-21 2021-12-07 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020201662A1 (en) * 2019-03-29 2020-10-08 Orange System and method for enriching data
CN111311258A (en) * 2020-01-20 2020-06-19 布比(北京)网络技术有限公司 Block chain based trusted transaction method, device, system, equipment and medium
CN113765675A (en) * 2021-06-21 2021-12-07 腾讯科技(深圳)有限公司 Transaction data processing method, device, equipment and medium
CN113222606A (en) * 2021-07-07 2021-08-06 中企链信(北京)科技有限公司 Safe transaction execution method based on intelligent contract

Also Published As

Publication number Publication date
CN114817229A (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN109327528B (en) Node management method and device based on block chain
CN109154885B (en) Business process execution on a blockchain platform
JP6532930B1 (en) Distributed ledger for block chain based user identification management, distributed ledger method
CN111681003B (en) Resource cross-chain transfer method and device, computer equipment and storage medium
CN108492183B (en) Block chain account transaction method, system and computer readable storage medium
US11182851B2 (en) Inter-ledger messaging in a blockchain
US20190172026A1 (en) Cross blockchain secure transactions
WO2021184826A1 (en) Blockchain-based resource transfer method and apparatus, and node device and storage medium
CN107730225B (en) Big data transaction method, system, equipment and computer storage medium
US20140006247A1 (en) System, device and method for the interaction of security information
CN111738725B (en) Cross-border resource transfer authenticity auditing method and device and electronic equipment
CN111951090A (en) Message interaction device and method based on bank-enterprise direct connection
CN114567643B (en) Cross-blockchain data transfer method, device and related equipment
CN110601896A (en) Data processing method and equipment based on block chain nodes
CN111461799B (en) Data processing method, data processing device, computer equipment and medium
CN113706313A (en) Financing method, system and computer readable storage medium based on block chain
CN111461881A (en) Data management method and device, computer equipment and storage medium
CN110599175A (en) Block processing method and related equipment
CN110889761A (en) Cross-chain transaction method and storage medium
CN110417917B (en) Method, system, computer device and medium for ticket circulation
CN114817229B (en) Block chain based score clearing data processing method and block chain system
CN113129002A (en) Data processing method and equipment
WO2023005500A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
CN112150157B (en) Method and device for issuing receivable certificate through block chain
WO2021121030A1 (en) Resource transfer method, settlement terminal, and server node

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