WO2019100597A1 - 交易数据处理方法、装置、计算机设备及存储介质 - Google Patents

交易数据处理方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2019100597A1
WO2019100597A1 PCT/CN2018/075500 CN2018075500W WO2019100597A1 WO 2019100597 A1 WO2019100597 A1 WO 2019100597A1 CN 2018075500 W CN2018075500 W CN 2018075500W WO 2019100597 A1 WO2019100597 A1 WO 2019100597A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
node
channel
result
preliminary
Prior art date
Application number
PCT/CN2018/075500
Other languages
English (en)
French (fr)
Inventor
刘雄文
陆陈一帆
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Priority to SG11201913408RA priority Critical patent/SG11201913408RA/en
Publication of WO2019100597A1 publication Critical patent/WO2019100597A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Definitions

  • the application relates to a transaction data processing method, device, computer device and storage medium.
  • a blockchain is generally understood to be a distributed ledger, which is essentially a distributed computing and storage system.
  • a blockchain or a distributed trading system based on the PaxOS algorithm multiple trading nodes are required to participate in the transaction, and a final confirmation of the calculation result is achieved based on a certain processing strategy.
  • the inventor realizes that in the conventional technology, after receiving the transaction request, the client directly allocates the transaction request to different transaction nodes for calculation, and the transaction nodes obtain the transaction result according to the processing strategy and feed back to the client. Since the transaction result requires the transaction nodes to communicate with each other, when the transaction volume is large, the transaction data is highly confusing, and the transaction result is wrong.
  • a transaction data processing method, apparatus, computer device, and storage medium are provided.
  • a transaction data processing method comprising:
  • the client receives a transaction data processing request, the transaction data processing request carries a transaction type and transaction data; the client sends the transaction data to a corresponding channel according to the transaction type;
  • the channel transmits transaction data to a transaction node in the channel
  • the transaction node processes the transaction data to obtain a preliminary transaction result, and feeds back the preliminary transaction result to the channel;
  • the channel calculates a target transaction result according to the preliminary transaction result, and returns the target transaction result to the client;
  • the client issues the target transaction result.
  • a blockchain transaction data processing system comprising a client, a channel and a transaction node
  • the client is configured to receive a transaction data processing request, where the transaction data processing request carries a transaction type and transaction data; the client sends the transaction data to a corresponding channel according to the transaction type;
  • the channel is for transmitting transaction data to a transaction node in the channel
  • the transaction node is configured to process the transaction data to obtain a preliminary transaction result, and feed back the preliminary transaction result to the channel;
  • the channel is further configured to calculate a target transaction result according to the preliminary transaction result, and return the target transaction result to the client;
  • the client is also used to issue the target transaction result.
  • a computer system including a client, a channel, and a transaction node
  • the client includes a first memory and one or more first processors having stored therein computer readable instructions that, when executed by the first processor, cause the one or more first processors to execute the following Step: receiving a transaction data processing request, the transaction data processing request carrying a transaction type and transaction data; transmitting the transaction data to a corresponding channel according to the transaction type, and issuing a target transaction result;
  • the channel includes a second memory and one or more second processors having stored therein computer readable instructions that, when executed by the second processor, cause the one or more second processors to perform the following steps Transmitting the transaction data to the transaction node in the channel, calculating the target transaction result according to the preliminary transaction result fed back by the transaction node, and returning the target transaction result to the client;
  • the transaction node includes a third memory and one or more third processors having stored therein computer readable instructions, the computer readable instructions being executed by the third processor such that the one or more third processors execute the following Step: processing the transaction data to obtain a preliminary transaction result, and feeding back the preliminary transaction result to the channel.
  • One or more non-transitory computer readable storage media storing computer readable instructions, when executed by one or more first processors, causing said one or more first processors Performing the following steps: receiving a transaction data processing request, the transaction data processing request carrying a transaction type and transaction data; transmitting the transaction data to a corresponding channel according to the transaction type, and issuing a target transaction result;
  • the computer readable instructions are executed by one or more second processors such that the one or more second processors perform the step of transmitting transaction data to a trading node in the channel, based on feedback from the trading node
  • the preliminary transaction result calculates a target transaction result, and returns the target transaction result to the client;
  • the computer readable instructions are executed by one or more third processors such that the one or more third processors perform the steps of processing the transaction data to obtain preliminary transaction results, and The result of the transaction is fed back to the channel.
  • FIG. 1 is an application environment diagram of a transaction data processing method in accordance with one or more embodiments.
  • FIG. 2 is a flow diagram of a transaction data processing method in accordance with one or more embodiments.
  • FIG. 3 is a block diagram of a computer system in accordance with one or more embodiments.
  • FIG. 1 is an application environment diagram of a transaction data processing method in an embodiment.
  • the computer system includes a client, a channel, a transaction node, an organization, and a CA server, wherein the client is independent of the transaction node, and the The cluster is deployed in a form of load balancing to provide external transactions.
  • the external transaction is generally required to include transaction types and transaction data.
  • the client will agree with the external encryption and decryption algorithms and the algorithm key length (ie, security). Level), the algorithm for signing and checking, and the key length of the algorithm and the format of the certificate.
  • the client generates a transaction identifier according to the transaction type, and selects a matching channel according to the transaction type, and sends the transaction identifier and transaction data to the matching channel through security processing.
  • the transaction data processing method can be applied to a blockchain or a distributed transaction system implemented based on a PaxOS algorithm.
  • the CA server provides the download of the root CA certificate and provides the user with the key and certificate generation for each organization, and can provide the security elements required for TLS (Transport Layer Security Protocol).
  • the CA server can be clustered outward. Provide services.
  • the organization first downloads the root CA certificate from the CA server, then receives the user registration, and provides each user with a key and certificate according to the root CA certificate.
  • One or more users can be registered in the organization, and the organization allocates appropriate transactions for each user. Node, and the transaction node is assigned to the appropriate channel according to the transaction type, and the user's authority can be set, wherein the permission can include the transaction execution permission and the transaction data read permission, wherein the user with the transaction execution permission can have the transaction data read at the same time. Permissions are granted, while users with read access to transaction data do not have transaction execution permissions.
  • the transaction node can support the cluster and load balancing mode in the deployment.
  • the attributes of the transaction node include the IP address of the transaction node, the port of the transaction node, the IP address of the event, the port of the event, and the organization of the organization in addition to the basic attributes. Identify and organize the user on the channel where the transaction node is located, the encryption key of the user, the certificate, the format of the certificate, the encryption and decryption algorithm of the organization and channel, the algorithm of the signing and verification, and the key length of each algorithm.
  • the transaction node After receiving the transaction request of the channel, the transaction node first checks the signed field. After the successful verification, it determines whether the organization identifier in the received field is consistent with the organization identifier stored in the transaction node. If not, directly The transaction is rejected. If it is consistent, it continues to judge whether the user authority is correct. If it is not correct, the transaction is directly rejected. If it is correct, the trading node executes the transaction and then returns the preliminary transaction result to the channel.
  • the channel When the channel is initialized, the key and certificate of the user of the organization to which each transaction node belongs in the channel are obtained. After the CA server successfully authenticates, the key and the certificate are stored, so that the user's key and certificate can be prevented. tamper. After receiving the message request sent by the client, the channel traverses the transaction node in the channel, and reads the user key and certificate of the transaction node stored in the channel, and sends the obtained transaction identifier, transaction data, and organization identifier to The corresponding transaction node can be encrypted by the agreed encryption method and the agreed signing method before the transmission.
  • a transaction data processing method is provided. This embodiment is exemplified by applying the method to the computer system of FIG. 1 described above.
  • a blockchain transaction data processing readable instruction is run on the computer system, and the transaction data processing method is implemented by the blockchain transaction data processing readable instruction.
  • the method specifically includes the following steps:
  • the client receives the transaction data processing request, where the transaction data processing request carries the transaction type and the transaction data; the client sends the transaction data to the corresponding channel according to the transaction type.
  • the client may receive an externally sent transaction data processing request, wherein the transaction data processing request carries a transaction type and transaction data.
  • the client can pre-agreed with the external encryption and decryption algorithm as well as the algorithm length, the signature verification algorithm, the algorithm length, the certificate format, the definition of the transaction type, the transaction data that needs to be encrypted and decrypted, and the data that needs to be checked.
  • the transaction type, transaction data, and the like are sent to the client externally
  • the client first verifies the legality of the transaction data processing request, for example, according to the verification algorithm, the signed data is checked. After the verification is successful, the encrypted data is decrypted to obtain the transaction type and the transaction data, and the transaction identifier is generated according to the transaction type, and the transaction identifier and the transaction data are sent to the channel corresponding to the transaction type.
  • the transaction identifier is an identifier that can uniquely determine the transaction, which can be determined according to the transaction type and the serial number. For example, the transaction number of the transaction is incremented and unique.
  • the client uses the transaction identifier as the header field of the packet, and the transaction data is used as the body field of the packet to generate the first packet, and the first packet is sent to the channel corresponding to the transaction type.
  • S204 The channel sends the transaction data to the transaction node in the channel.
  • the channel of the first packet is received, the transaction node in the channel is traversed, and the user key and certificate of the transaction node stored in the channel are read, and the transaction identifier and the organization identifier of the organization to which the transaction node belongs are used as the header field.
  • the main field is tagged, and then the signature and all fields are sent to each transaction node in the channel.
  • the transaction node of each channel and each organization can stipulate the secure communication mode in two ways: the first is that the channel obtains the user of the corresponding transaction type of the organization to which each transaction node belongs to the channel through the CA server. User key, certificate, or obtain the user's user key and certificate from the organization offline, and verify the obtained user key and certificate through the CA server, and save the successfully verified user key and certificate.
  • the organization and the organization agree on the algorithm and algorithm length (ie security level), the algorithm and algorithm length of the signing and verification, and the certificate format.
  • the second is to TLS protocol version and secure communication series options through TLS (Transport Layer Security Protocol) and each organization's trading nodes.
  • the client and channel are intranet communication, which further ensures communication security.
  • the transaction node processes the transaction data to obtain a preliminary transaction result, and feeds the preliminary transaction result to the channel.
  • the transaction node has two response modes to the channel request: one is a response mode of the synchronized API call, and the other is an asynchronous event message response mode.
  • the transaction node After receiving the transaction request of the channel, the transaction node first checks the signed field. If the verification fails, the transaction result of the transaction failure is directly returned. If the verification is successful, the encrypted field is continuously encrypted. If the failure is successful, the initial transaction result of the transaction failure is directly returned. If the decryption is successful, the transaction data obtained by the decryption is processed according to the preset transaction logic. If the transaction is successful, the preliminary transaction result of the transaction is successful, and if the transaction fails, The preliminary transaction result of the transaction failure is obtained, and the preliminary transaction result is fed back to the channel, so that the channel obtains the target transaction result.
  • the preliminary transaction result is returned to the channel, and the second message can be sent to the channel through the response mode, wherein the second message can also include the header field and the subject field, and the subject field Signing, where the header field can store the transaction identifier and the organization identifier, and the main field stores the preliminary transaction result.
  • S208 The channel calculates the target transaction result according to the preliminary transaction result, and returns the target transaction result to the client.
  • the channel calculates the target transaction result according to the preliminary transaction result returned by the trading node participating in the transaction in the channel.
  • the channel may first find the public key in the certificate of the user corresponding to the organization identifier stored locally according to the organization identifier, and perform verification on the second packet. After the verification is successful, the channel passes.
  • the transaction identifier records the preliminary transaction result, and then obtains the target transaction result according to the preset trading strategy and all the preliminary transaction results received, and feeds the target transaction result to the client.
  • S210 The client issues a target transaction result.
  • the client after receiving the target transaction result, the client encrypts and adds the target transaction result according to the externally agreed encryption and decryption algorithm, the signing and the verification algorithm, and then sends the encrypted and tagged target transaction result. .
  • the above transaction data processing method first receives a transaction data processing request through a client, and allocates a specific channel for the transaction data processing request according to the transaction type, the channel allocates the transaction data to the transaction node in the channel, and the transaction node processes the transaction data to obtain The preliminary transaction result, so that the channel can obtain the target transaction result according to the preliminary transaction result of the transaction node participating in the transaction and feed back to the client, without interaction between the transaction nodes, thereby reducing the interaction of data, thereby avoiding between different transaction nodes
  • the occurrence of data confusion has further ensured the reliability of the transaction results.
  • the transaction data processing method may further include: the organization assigning one or more transaction nodes to users registered in the organization, each transaction node corresponding to one transaction type; the organization assigns the transaction node to the transaction type according to the transaction type Different channels.
  • the organization applies for the user name and related user key and certificate of the user registered in the organization through the CA server, establishes a channel, and the organization allocates one or more transaction nodes to the users registered in the organization, each of which The transaction node corresponds to a transaction type, and the organization assigns the transaction node to different channels according to the transaction type, and the channel acquires the attributes of each transaction node, thereby ensuring that the channel and the transaction type have a one-to-one correspondence, and each organization allocates a corresponding transaction.
  • Type of user each organization assigns one trading node or multiple trading nodes to the corresponding channel.
  • the attributes of the transaction node may include the basic attributes of the transaction node, the IP address of the transaction node, the port number of the transaction node, the IP address of the event and the port number of the event, the organization to which the transaction node belongs, the user who is organized on the channel, The user's authority, the user's encryption key and certificate, the format of the certificate, the encryption and decryption algorithm of the organization and channel convention, the algorithm of the signing and verification, the key length of the algorithm, and so on.
  • the response mode of the trading node is the event mode
  • the channel establishes an event connection with each trading node joining the channel.
  • the client establishes a mapping relationship between the transaction type and the channel, and an external agreement encryption and decryption algorithm, an algorithm for signing and checking, a key length of the algorithm, and the like.
  • the first user and the second user wherein the first user corresponds to the fifth transaction node, and the second user corresponds to the second transaction node.
  • the five trading nodes belong to the first channel, and the second trading node belongs to the second channel, so the transaction types processed by the fifth trading node and the second trading node are different.
  • the transaction data is allocated to the corresponding channel according to the transaction type, for example, the first channel, and the first channel allocates the transaction data to all the transaction nodes in the first channel, that is, the first
  • the trading node and the fifth trading node, the first trading node and the fifth trading node respectively calculate the preliminary trading result and feed back to the first channel, and the first channel feeds back the target trading result after obtaining the target trading result according to the preliminary trading result.
  • the client is then sent by the client.
  • the organization may also update the user information of the transaction type or the expired user certificate, and send the updated user information and the updated user certificate to the corresponding channel.
  • the first organization may update the user information of the user corresponding to the fifth transaction node, and then notify the first channel.
  • the changed user information is an encryption and decryption algorithm
  • the first channel needs to be notified in time, otherwise the transaction may fail. The emergence of the situation.
  • the organization attribute of the organization is introduced in the process of initialization, which improves the visibility of the organization participating in the transaction, thereby improving the scalability of the system.
  • an organization only one trading node is generally involved in the calculation, which improves the utilization of resources.
  • Multiple trading nodes in an organization participate in the calculation of different types of transactions, and different computing nodes of the same organization are designed when calculating different transaction types.
  • the isolation between the data avoids confusion and confusion of data and improves the visibility of transaction calculations.
  • the step of transmitting the transaction data to the transaction node in the channel may include: the channel acquiring the organization identifier corresponding to the transaction node in the channel, and transmitting the transaction data and the organization identifier to the corresponding transaction node in the channel.
  • the transaction node may further include: the transaction node verifies the organization identifier, and after the verification of the organization identifier is passed, the transaction node verifies the user authority corresponding to the transaction node, and the user authority After the verification is passed, the step of processing the transaction data to obtain the preliminary transaction result is continued.
  • the step of the channel sending the transaction data to the transaction node in the channel may include acquiring an organization identifier corresponding to the transaction node in the channel, and using the organization identifier and the transaction identifier as a header field, and transmitting the transaction data as a main field to the corresponding transaction.
  • a node for example, the first channel in FIG.
  • the organization identifier of the second organization is sent as a header field, and the transaction data is sent as a body field to the first transaction node, so that the first transaction node and the fifth transaction node process the corresponding transaction data to obtain a preliminary transaction result.
  • the first transaction node is taken as an example.
  • the first transaction node receives the transaction data and the organization identifier sent by the first channel, it determines that the organization identifier sent by the first channel is stored in the first transaction node. Whether the organization identifiers are consistent, that is, whether they are the organization identifiers of the second organization. If the two are inconsistent, the transaction is directly rejected, that is, the initial transaction result of the transaction failure is returned. If the two are consistent, the current user may continue to determine whether the current user has a transaction. Execute authority, if there is no transaction execution permission, directly reject the transaction, that is, return the preliminary transaction result of the transaction failure. If there is transaction execution permission, the first transaction node processes the received transaction data to obtain the preliminary transaction result.
  • the attributes of the organization are introduced in the transaction process, thereby improving the visibility of the participation of the organization, thereby improving the scalability of the system, for example, adding a new organization according to the attributes of the organization, and setting the rights of the user. Therefore, it can be ensured that the user without permission can not access the corresponding transaction data, that is, in one transaction, one user performs login transaction, and if multiple transaction nodes belong to different organizations, the user can only access one of the transaction nodes, if the user If you want to access other trading nodes, you need to pass the corresponding signature verification, etc., thus ensuring the security of the transaction data.
  • the transaction node is a trading node cluster, and the trading nodes in the trading node cluster share the storage space; the step of the transaction node processing the transaction data to obtain the preliminary transaction result may include: the trading node cluster detecting the transaction currently participating in the transaction Whether the node has a fault; if the trading node currently participating in the transaction has a fault, the trading node cluster selects the trading node that has not failed; the selected unbroken trading node is stored in the shared storage space according to the failed trading node Information and continue to process the transaction data to get the initial transaction results.
  • the transaction node may exist in the form of a cluster, and the cluster shares a common storage space, and after receiving the transaction data sent by the channel, the transaction node processes the transaction data, if the transaction is currently processed in the process. If the transaction node fails, the cluster allocates another non-faulty transaction node to the current transaction to continue to participate in the transaction.
  • the transaction may be assigned according to the serial number. If the serial number of the transaction node currently participating in the transaction is 5, the transaction node with the sequence number 6 is queried. If the transaction node with sequence number 6 has no fault, directly assign the transaction node with sequence number 6 to continue to participate in the transaction. If the transaction node with sequence number 6 fails, continue to traverse the next transaction node until the transaction node is obtained. The current transaction is processed, and since all of the transaction nodes in the cluster share the same storage space, the selected non-faulty transaction node can continue processing the transaction at the breakpoint without reprocessing the transaction.
  • the new transaction node if the transaction node currently processing the transaction is faulty, the new transaction node is reselected to continue the processing of the transaction, and since all the transaction nodes in the cluster share the storage space, the new transaction node can continue to process the transaction, and There is no need to repeat the processing of the last failed trading node.
  • the step of calculating the target transaction result according to the preliminary transaction result may include: the channel determining that the preliminary transaction result fed back by the transaction node participating in the transaction indicates whether the number of successful transactions is greater than or equal to a preset value; when the transaction is successful If the number of preliminary transaction results is greater than or equal to the preset value, the target transaction result indicates that the transaction is successful; when the number of preliminary transaction results indicating that the transaction is successful is less than the preset value, the target transaction result indicates that the transaction has failed.
  • the channel after receiving the preliminary transaction result fed back by the transaction node, the channel queries the number of successful transaction results, and obtains the target transaction result according to the transaction strategy.
  • the target trading result is the transaction success. If the initial trading result of one trading node indicates that the transaction is unsuccessful, the target trading result is the transaction failure. . Under this trading strategy, the channel queries the preliminary transaction result returned by the trading node. When all the preliminary transaction results indicate that the transaction is successful, the target transaction result indicating that the transaction is successful is output, when there is a preliminary transaction result indicating that the transaction fails. , the result of the target transaction indicating that the transaction failed.
  • the target trading result is the transaction success. If there is no n/2+1 trading nodes, the initial trading result is represented. If successful, the target trading result is a transaction failure, where n is the number of trading nodes.
  • the channel queries the preliminary transaction result returned by the trading node, and when at least n/2+1 preliminary transaction results indicate that the transaction is successful, the target transaction result indicating that the transaction is successful is output, when there is no at least n
  • the target transaction result indicating that the transaction failed is output.
  • the channel obtains the target transaction result according to the preliminary transaction result returned by the transaction node, instead of relying on only one transaction node for processing, or the transaction nodes communicate with each other to obtain the target transaction result, and the processing procedure is simple and the result is reliable.
  • steps in the flowchart of FIG. 2 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other orders. Moreover, at least some of the steps in FIG. 2 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
  • the client, channel, and transaction nodes in Figure 1 form a blockchain transaction data processing system, where:
  • the client is configured to receive a transaction data processing request, and the transaction data processing request carries the transaction type and the transaction data; the client sends the transaction data to the corresponding channel according to the transaction type.
  • the channel is used to send transaction data to the trading node in the channel.
  • the trading node is used to process the transaction data to obtain the preliminary transaction result, and feed back the preliminary transaction result to the channel.
  • the channel is also used to calculate the target trading result based on the preliminary trading result and return the target trading result to the client.
  • the client is also used to issue the target transaction results.
  • the system further includes an organization for assigning one or more transaction nodes to users registered in the organization, and each transaction node corresponds to a transaction type, and the organization assigns the transaction nodes to different ones according to the transaction type. Channel.
  • the organization sets corresponding transaction permissions for users registered in the organization.
  • the channel is also used to obtain the organization identifier corresponding to the transaction node in the channel, and send the transaction data and the organization identifier to the corresponding transaction node in the channel.
  • the transaction node is also used to verify the organization identifier. After the verification of the organization identifier is passed, the transaction node verifies the user authority corresponding to the transaction node, and after the user authority verification is passed, the transaction data is processed to obtain the preliminary transaction result.
  • the trading node is a trading node cluster, and the trading nodes in the trading node cluster share storage space.
  • the trading node cluster is used to monitor whether the trading node currently participating in the transaction has a fault. If the trading node currently participating in the transaction has a fault, the trading node cluster selects the trading node that has not failed.
  • the selected transaction node that has not issued a horizontal fault continues to process the transaction data according to the information stored in the shared storage space by the failed transaction node to obtain a preliminary transaction result.
  • the channel is further configured to determine whether the preliminary transaction result fed back by the transaction node participating in the transaction indicates whether the number of successful transactions is greater than or equal to a preset value; when the number of preliminary transaction results indicating that the transaction is successful is greater than or equal to a preset value , the target transaction result indicates that the transaction is successful; when the number of preliminary transaction results indicating that the transaction is successful is less than the preset value, the target transaction result indicates that the transaction has failed.
  • the various modules in the blockchain transaction data processing system described above may be implemented in whole or in part by software, hardware, and combinations thereof. Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
  • a computer system in one embodiment, is provided, the internal structure of which may be as shown in FIG.
  • the computer system includes a client, a channel, and a transaction node, the client including a first processor, a first memory, a first network interface, and a first database connected by a system bus.
  • the first processor is configured to provide computing and control capabilities.
  • the first memory includes a non-transitory computer readable instruction storage medium, an internal memory.
  • the non-transitory computer readable instruction storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable instruction storage medium.
  • the first network interface is configured to communicate with an external terminal through a network connection.
  • the channel includes a second processor, a second memory, a second network interface, and a second database connected by a system bus.
  • the second processor is configured to provide computing and control capabilities.
  • the second memory includes a non-transitory computer readable instruction storage medium, an internal memory.
  • the non-transitory computer readable instruction storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable instruction storage medium.
  • the second network interface is configured to communicate with an external terminal through a network connection. .
  • the transaction node includes a third processor, a third memory, a third network interface, and a third database connected by a system bus.
  • the third processor is used to provide computing and control capabilities.
  • the third memory includes a non-transitory computer readable instruction storage medium, an internal memory.
  • the non-transitory computer readable instruction storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable instruction storage medium.
  • the third network interface is configured to communicate with an external terminal through a network connection.
  • the computer readable instructions are executed by the first processor, the second processor, and the third processor to implement a blockchain transaction data processing method.
  • FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer system to which the solution of the present application is applied.
  • the specific computer system may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
  • a computer device comprising a memory and one or more processors, the memory storing computer readable instructions, the computer readable instructions being executed by the processor, causing the one or more processors to perform the following steps: wherein the first processing The processor executes the following steps: receiving a transaction data processing request, the transaction data processing request carrying the transaction type and the transaction data; transmitting the transaction data to the corresponding channel according to the transaction type, and issuing the target transaction result; When executing the computer readable instructions, the following steps are performed: sending the transaction data to the transaction node in the channel, calculating the target transaction result according to the preliminary transaction result fed back by the transaction node, and returning the target transaction result to the client; the third processor The following steps are performed when the computer readable instructions are executed: the transaction data is processed to obtain preliminary transaction results, and the preliminary transaction results are fed back to the channel.
  • the computer system further includes an organization comprising a fourth processor, a fourth memory, a fourth network interface, and a fourth database connected by a system bus.
  • the fourth processor is configured to provide computing and control capabilities.
  • the fourth memory includes a non-transitory computer readable instruction storage medium, an internal memory.
  • the non-transitory computer readable instruction storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of an operating system and computer readable instructions in a non-transitory computer readable instruction storage medium.
  • the fourth network interface is configured to communicate with an external terminal through a network connection.
  • the organization includes a fourth memory and one or more fourth processors having stored therein computer readable instructions, the computer readable instructions being executed by the fourth processor such that the one or more fourth processors perform the following steps: Users registered in the organization are assigned one or more trading nodes, each trading node corresponding to one transaction type; the trading nodes are assigned to different channels according to the transaction type.
  • transmitting the transaction data to the transaction node in the channel implemented by the second processor when executing the computer readable instructions comprises: acquiring an organization identifier corresponding to the transaction node in the channel, and the transaction data and the organization identifier Sending to the corresponding transaction node in the channel; before the third processor executes the computer readable instruction to process the transaction data to obtain the preliminary transaction result, the method further includes: verifying the organization identifier, and after the verification of the organization identifier is passed, The transaction node verifies the user authority corresponding to the transaction node, and after the user authority verification is passed, continues to process the transaction data to obtain a preliminary transaction result.
  • the transaction node is a transaction node cluster, and the transaction nodes in the transaction node cluster share a storage space; the third processor executes the computer readable instructions to process the transaction data to obtain preliminary transaction results, including: Detecting whether there is a fault in the trading node currently participating in the transaction; if there is a fault in the trading node currently participating in the transaction, selecting a trading node that has not failed; and through the selected unbroken trading node according to the failed trading node in the shared storage The information stored in the space continues to process the transaction data to obtain preliminary transaction results.
  • the second transaction processor calculates the target transaction result according to the preliminary transaction result when the computer readable instruction is executed, including: determining whether the preliminary transaction result fed back by the transaction node participating in the transaction indicates that the number of successful transactions is greater than Equal to the preset value; when the number of preliminary transaction results indicating that the transaction is successful is greater than or equal to the preset value, the target transaction result indicates that the transaction is successful; when the number of preliminary transaction results indicating that the transaction is successful is less than the preset value, the target transaction result is Indicates that the transaction failed.
  • One or more non-transitory computer readable storage mediums storing computer readable instructions, when executed by one or more first processors, cause one or more first processors to perform the following steps: Receiving a transaction data processing request, the transaction data processing request carries a transaction type and transaction data; transmitting the transaction data to a corresponding channel according to the transaction type, and issuing a target transaction result; the computer readable instructions are executed by one or more second processors And causing the one or more second processors to perform the following steps: sending the transaction data to the transaction node in the channel, calculating the target transaction result according to the preliminary transaction result fed back by the transaction node, and returning the target transaction result to the location a client; when the computer readable instructions are executed by one or more third processors, causing the one or more third processors to perform the following steps to process the transaction data to obtain preliminary transaction results and to feed back preliminary transaction results to the channel .
  • the computer readable instructions are executed by the one or more fourth processors such that the one or more fourth processors perform the step of assigning one or more transactions to users registered in the organization a node, each of the transaction nodes corresponding to a transaction type; and assigning the transaction node to a different channel according to the transaction type.
  • the channel readable by the computer readable instructions when executed by the one or more second processors transmits the transaction data to the transaction node in the channel, including: obtaining an organization identifier corresponding to the transaction node in the channel, and Transaction data and organization identification are sent to corresponding transaction nodes in the channel; before the computer readable instructions are processed by one or more of the third processors to process the transaction data to obtain preliminary transaction results, the method further includes: identifying the organization The verification is performed. After the verification of the organization identifier is passed, the user authority corresponding to the transaction node is verified. After the user authority verification is passed, the transaction node is continuously executed to process the transaction data to obtain a preliminary transaction result.
  • the transaction node is a cluster of transaction nodes, and the transaction nodes in the cluster of transaction nodes share a storage space; the transaction nodes implemented by one or more third processors are processed by the transaction node to process the transaction data.
  • the preliminary transaction result includes: detecting whether the trading node currently participating in the transaction has a fault; if the trading node currently participating in the transaction has a fault, the trading node cluster selects the trading node that has not failed; and passes the selected unbroken trading node
  • the transaction data is processed according to the information stored in the shared storage space by the failed transaction node to obtain a preliminary transaction result.
  • the computer readable instructions are executed by the one or more second processors to calculate the target transaction result according to the preliminary transaction result, including: determining that the preliminary transaction result fed back by the transaction node participating in the transaction indicates that the transaction is successful. Whether the quantity is greater than or equal to the preset value; when the number of preliminary transaction results indicating that the transaction is successful is greater than or equal to the preset value, the target transaction result indicates that the transaction is successful; when the number of preliminary transaction results indicating that the transaction is successful is less than the preset value, Then the target trading result indicates that the transaction failed.
  • Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • Synchlink DRAM SLDRAM
  • Memory Bus Radbus
  • RDRAM Direct RAM
  • DRAM Direct Memory Bus Dynamic RAM
  • RDRAM Memory Bus Dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Signal Processing (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Storage Device Security (AREA)

Abstract

一种交易数据处理方法,包括:客户端接收交易数据处理请求,交易数据处理请求携带有交易类型和交易数据;并根据交易类型将交易数据发送至对应的通道;通道将交易数据发送至所述通道中的交易节点;交易节点对交易数据进行处理得到初步交易结果,并将初步交易结果反馈至通道;通道根据初步交易结果计算得到目标交易结果,并将目标交易结果返回至客户端;客户端发出所述目标交易结果。

Description

交易数据处理方法、装置、计算机设备及存储介质
相关申请的交叉引用
本申请要求于2017年11月23日提交中国专利局,申请号为2017111807450,申请名称为“交易数据处理方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种交易数据处理方法、装置、计算机设备及存储介质。
背景技术
区块链一般被理解为一个分布式的账本,它实质上也是一个分布式计算和存储系统。在区块链或基于PaxOS算法实现的分布式的交易系统中,需要多个交易节点参与交易,基于一定的处理策略达成计算结果的最终确认。
发明人意识到,传统技术中,客户端在接收到交易请求后,直接将交易请求分配给不同的交易节点进行计算,不同交易节点之间根据处理策略得到交易结果并反馈给客户端。由于交易结果需要交易节点相互通信得到,当交易量较大的时候,极易出现交易数据混乱的情况,从而使得交易结果错误。
发明内容
根据本申请公开的各种实施例,提供一种交易数据处理方法、装置、计算机设备及存储介质。
一种交易数据处理方法,包括:
客户端接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;所述客户端根据所述交易类型将所述交易数据发送至对应的通道;
所述通道将交易数据发送至所述通道中的交易节点;
所述交易节点对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道;
所述通道根据所述初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;及
所述客户端发出所述目标交易结果。
一种区块链交易数据处理系统,包括客户端、通道以及交易节点;
所述客户端用于接收交易数据处理请求,所述交易数据处理请求携带有 交易类型和交易数据;所述客户端根据所述交易类型将所述交易数据发送至对应的通道;
所述通道用于将交易数据发送至所述通道中的交易节点;
所述交易节点用于对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道;
所述通道还用于根据所述初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;及
所述客户端还用于发出所述目标交易结果。
一种计算机系统,包括客户端、通道和交易节点;
所述客户端包括第一存储器和一个或多个第一处理器,存储器中储存有计算机可读指令,计算机可读指令被第一处理器执行时,使得一个或多个第一处理器执行以下步骤:接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;根据所述交易类型将所述交易数据发送至对应的通道,并发出目标交易结果;
所述通道包括第二存储器和一个或多个第二处理器,存储器中储存有计算机可读指令,计算机可读指令被第二处理器执行时,使得一个或多个第二处理器执行以下步骤:将交易数据发送至所述通道中的交易节点,根据交易节点反馈的初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;
所述交易节点包括第三存储器和一个或多个第三处理器,存储器中储存有计算机可读指令,计算机可读指令被第三处理器执行时,使得一个或多个第三处理器执行以下步骤:对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个第一处理器执行时,使得所述一个或多个第一处理器执行以下步骤:接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;根据所述交易类型将所述交易数据发送至对应的通道,并发出目标交易结果;
所述计算机可读指令被一个或多个第二处理器执行时,使得所述一个或多个第二处理器执行以下步骤:将交易数据发送至所述通道中的交易节点,根据交易节点反馈的初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;
所述计算机可读指令被一个或多个第三处理器执行时,使得所述一个或多个第三处理器执行以下步骤:对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中交易数据处理方法的应用环境图。
图2为根据一个或多个实施例中的交易数据处理方法的流程图。
图3为根据一个或多个实施例中的计算机系统的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用于解释本申请,并不用于限定本申请。
请参阅图1,图1为一实施例中交易数据处理方法的应用环境图,计算机系统包括客户端、通道、交易节点、组织和CA服务器,其中客户端是独立于交易节点的,其可以以集群的形式部署,并以负载均衡的方式向外部提供交易强求,外部的交易强求一般包括交易类型和交易数据,客户端会与外部约定好加密和解密的算法以及算法的密钥长度(即安全等级)、加签和验签的算法以及算法的密钥长度、证书的格式。客户端根据交易类型生成交易标识,并根据交易类型选择匹配的通道,并把交易标识、交易数据通过安全处理后发给匹配的通道。该交易数据处理方法可以应用于区块链或基于PaxOS算法实现的分布式的交易系统中。
CA服务器是提供根CA证书的下载以及为每个组织提供用户的密钥和证书生成,并能提供TLS(传输层安全协议)所需的安全要素的生成,CA服务器可以以集群的方式向外提供服务。组织首先从CA服务器下载根CA证书,然后接收用户注册,并根据根CA证书为每一个用户提供密钥和证书,其中组织中可以注册一个或多个用户,组织为每一个用户分配合适的交易节点,并将交易节点根据交易类型分配到合适的通道中,且可以设置用户的权限,其中权限可以包括交易执行权限和交易数据读取权限,其中具有交易执行权限的用户可以同时具有交易数据读取权限,而具有交易数据读取权限的用户则不具有交易执行权限。
交易节点在部署上可以支持集群和负载均衡的模式,交易节点的属性除 了基本属性外,还包括交易节点的IP地址、交易节点的端口、事件的IP地址、事件的端口、所述组织的组织标识、组织在交易节点所在通道上的用户、用户的加密密钥、证书、证书的格式,组织和通道约定的加解密算法、加签和验签的算法、各个算法的密钥长度等。交易节点接收到通道的交易请求后,首先对签名的字段进行验签,在验签成功后,判断接收到的字段中的组织标识与交易节点中存储的组织标识是否一致,如果不一致,则直接拒绝交易,如果一致,则继续判断用户权限是否正确,如果不正确,则直接拒绝交易,如果正确,则交易节点执行交易,然后把初步交易结果返回至通道。
通道在初始化的时候获取通道中每个交易节点所属组织的用户的密钥和证书,经过CA服务器验证成功后,才会将该密钥和证书进行存储,这样可以防止用户的密钥和证书被篡改。通道接收到客户端发送的报文请求后,遍历通道内的交易节点,并读取存储在通道内部的交易节点的用户密钥和证书,将所获取的交易标识、交易数据以及组织标识发送到对应的交易节点,在发送之前可以通过约定的加密方式进行加密以及约定的加签方式进行加签。
在其中一个实施例中,请参阅图2,提供一种交易数据处理方法,本实施例以该方法应用到上述图1中计算机系统的来举例说明。该计算机系统上运行有区块链交易数据处理可读指令,通过该区块链交易数据处理可读指令来实施交易数据处理方法。该方法具体包括如下步骤:
S202:客户端接收交易数据处理请求,交易数据处理请求携带有交易类型和交易数据;客户端根据交易类型将交易数据发送至对应的通道。
具体地,客户端可以接收外部发送的交易数据处理请求,其中该交易数据处理请求中携带有交易类型和交易数据。其中客户端可以与外部预先约定好加密解密算法以及算法长度、加签验签算法以及算法长度、证书格式、交易类型的定义、需要加解密的交易数据和需要加验签的数据等,在交易时,外部将交易类型、交易数据等发送给客户端,客户端接收到交易数据处理请求时,首先验证该交易数据处理请求的合法性,例如根据验签算法对加签的数据进行验签,验签成功后,再对加密的数据进行解密得到交易类型和交易数据,并根据交易类型生成交易标识,将交易标识和交易数据发送到与交易类型对应的通道中。
交易标识是可以唯一确定本次交易的标识,其可以是根据交易类型和流水号来确定,例如相同交易类型则交易的流水号递增并具有唯一性。客户端将交易标识作为报文的头字段,交易数据作为报文的主体字段生成第一报文,并将该第一报文发送给与交易类型对应的通道。
S204:通道将交易数据发送至通道中的交易节点。
具体地,接收到第一报文的通道,遍历通道内的交易节点,并读取存储 在通道内的交易节点的用户密钥和证书,将交易标识和交易节点所属组织的组织标识作为头字段,将交易数据作为主体字段生成第二报文,并根据预先约定的加密算法对预先预定的字段进行加密,例如对主体字段进行加密,然后根据预先预定的加签字段进行加签,例如对头字段和主体字段均进行加签,然后把签名和所有的字段发送给通道中的每一个交易节点。
需要说明的是,每个通道和每个组织的交易节点可以通过两种方式约定安全通信模式:第一种是通道通过CA服务器获取加入到通道的每个交易节点所属组织的对应交易类型的用户的用户密钥、证书或者通过线下向组织获取用户的用户密钥和证书,并通过CA服务器对所获取到的用户密钥和证书进行验证,保存验证成功的用户密钥和证书,通过线下和组织约定好加解密的算法及算法长度(即安全等级)、加签和验签的算法和算法长度、证书格式。第二种是通过TLS(传输层安全协议)和每个组织的交易节点约定TLS协议版本以及安全通信系列选项。另外客户端和通道是内网通信,进一步保证了通信安全。
S206:交易节点对交易数据进行处理得到初步交易结果,并将初步交易结果反馈至通道。
具体地,交易节点对通道请求的响应模式有两种:一种是同步的API调用的响应模式,另外一种是异步的事件消息响应模式。交易节点接收到通道的交易请求后,首先对签名的字段进行验签,如果验签失败,则直接返回交易失败的初步交易结果,如果验签成功,则继续对加密的字段进行加密,如果解密失败,则直接返回交易失败的初步交易结果,如果解密成功,则对解密得到的交易数据按照预先设置的交易逻辑进行处理,如果交易成功,则得到交易成功的初步交易结果,如果交易失败,则得到交易失败的初步交易结果,并将该初步交易结果反馈给通道,以便于通道得到目标交易结果。
无论初步交易结果是否为交易成功,均将该初步交易结果返回给通道,该第二报文可以通过响应模式发送给通道,其中第二报文也可以包括头字段和主体字段,并对主体字段进行签名,其中头字段中可以存储交易标识和组织标识,主体字段中存储初步交易结果,
S208:通道根据初步交易结果计算得到目标交易结果,并将目标交易结果返回至客户端。
具体地,通道根据通道中参与交易的交易节点所返回的初步交易结果计算得到目标交易结果。通道在接收到交易节点返回的第二报文时,可以首先根据组织标识找到本地存储的组织标识对应的用户的证书中的公钥,对第二报文进行验签,验签成功后,通过交易标识记录下初步交易结果,然后根据预设的交易策略以及所接收到的所有的初步交易结果得到目标交易结果,并 将目标交易结果反馈给客户端。
S210:客户端发出目标交易结果。
具体地,客户端在接收到目标交易结果后,按照与外部约定的加密解密算法、加签和验签算法对目标交易结果进行加密和加签,然后将加密和加签后的目标交易结果发出。
上述交易数据处理方法,首先通过客户端接收交易数据处理请求,并根据交易类型为交易数据处理请求分配特定的通道,通道将交易数据分配给通道中的交易节点,交易节点对交易数据进行处理得到初步交易结果,从而通道可以根据参与交易的交易节点的初步交易结果得到目标交易结果并反馈给客户端,不需要交易节点之间进行交互,减少了数据的交互,从而可以避免不同交易节点之间数据混乱的现象的发生,进一步保证了交易结果的可靠性。
在其中一个实施例中,该交易数据处理方法还可以包括:组织为组织中注册的用户分配一个或多个交易节点,每个交易节点对应一种交易类型;组织根据交易类型将交易节点分配至不同的通道。
具体地,计算机系统在初始化时,组织通过CA服务器申请组织中注册的用户的用户名和相关的用户密钥、证书,建立通道,组织为组织中注册的用户分配一个或多个交易节点,每个交易节点对应一种交易类型,组织根据交易类型将交易节点分配至不同的通道,通道获取每个交易节点的属性,从而保证了通道和交易类型具有一一对应的关系,每个组织分配对应交易类型的用户,每个组织分配一个交易节点或多个交易节点给对应的通道。其中,交易节点的属性可以包括交易节点的基本属性、交易节点的IP地址、交易节点的端口号、事件的IP地址和事件的端口号、交易节点所属的组织、组织在该通道上的用户、用户的权限、用户的加密密钥和证书、证书的格式、组织和通道约定的加解密算法、加签和验签的算法、算法的密钥长度等。如果交易节点的响应模式为事件模式则通道与每个加入通道的交易节点建立事件连接。此外,在初始化时,客户端建立交易类型与通道的映射关系,并与外约定加解密算法、加签和验签的算法、算法的密钥长度等。
具体地,可以结合图1,其中组织1中注册有两个用户,分别为第一用户和第二用户,其中第一用户与第五交易节点对应,第二用户与第二交易节点对应,第五交易节点属于第一通道,第二交易节点属于第二通道,因此第五交易节点和第二交易节点所处理的交易类型不同。这样在客户端接收到交易数据处理请求时,首先根据交易类型将交易数据分配到对应的通道,例如第一通道,第一通道将该交易数据分配给第一通道中所有的交易节点即第一交易节点和第五交易节点,第一交易节点和第五交易节点分别计算得到初步交易结果并反馈给第一通道,第一通道在根据初步交易结果得到目标交易结 果后,将目标交易结果反馈给客户端,再由客户端发出。
具体地,组织还可以更新交易类型的用户信息或者过期的用户证书,并将更新的用户信息和更新的用户证书发送到相应的通道。例如第一组织可以更新与第五交易节点对应的用户的用户信息,然后通知第一通道,例如当更改的用户信息为加密解密算法时,则需要及时通知到第一通道,否则会造成交易失败的情况的出现。
在上述实施例中,在初始化的过程引入了组织的组织属性,提高了组织参与交易的可见性,从而提高了系统的扩展性。且一个组织中一般仅由一个交易节点参与计算,提高了资源的利用率,一个组织中的多个交易节点分别参与不同类型的交易的计算,在不同交易类型计算时设计相同组织的不同计算节点之间的隔离,避免数据的混淆和混乱,提升交易计算的可见性。
在其中一个实施例中,通道将交易数据发送至通道中的交易节点的步骤可以包括:通道获取通道中交易节点对应的组织标识,并将交易数据和组织标识发送至通道中对应的交易节点。在交易节点对交易数据进行处理得到初步交易结果的步骤之前还可以包括:交易节点对组织标识进行验证,当组织标识的验证通过后,交易节点对交易节点对应的用户权限进行验证,在用户权限验证通过后,继续执行交易节点对交易数据进行处理得到初步交易结果的步骤。
具体地,通道将交易数据发送至通道中的交易节点的步骤可以包括获取通道中交易节点对应的组织标识,并将组织标识和交易标识作为头字段,将交易数据作为主体字段发送至对应的交易节点,例如图1中第一通道获取到第一组织的组织标识和第二组织的组织标识,并将第一组织的组织标识作为头字段、交易数据作为主体字段发送给第五交易节点,将第二组织的组织标识作为头字段、交易数据作为主体字段发送给第一交易节点,从而第一交易节点和第五交易节点对对应的交易数据进行处理得到初步交易结果。
具体地,以第一交易节点为例进行说明,当第一交易节点接收到第一通道发送来的交易数据和组织标识时,则判断第一通道发送来的组织标识与第一交易节点中存储的组织标识是否一致,即是否均为第二组织的组织标识,如果两者不一致,则直接拒绝交易,即返回交易失败的初步交易结果,如果两者一致,则可以继续判断当前用户是否具有交易执行权限,如果不具有交易执行权限,则直接拒绝交易,即返回交易失败的初步交易结果,如果具有交易执行权限,则第一交易节点对所接收的交易数据进行处理得到初步交易结果。
上述实施例中在交易过程中引入了组织的属性,提高了组织参与的可见性,从而提高了系统的可扩展性,例如可以根据组织的属性增加新的组织等, 另外设置了用户的权限,从而可以保证没有权限的用户无法访问相应的交易数据,即在一次交易中,一个用户进行登录交易,多个交易节点如果属于不同的组织,则该用户只能访问其中一个交易节点,如果该用户想要访问其他的交易节点,则需要通过相应的签名验证等,从而保证了交易数据的安全性。
在其中一个实施例中,交易节点为交易节点集群,交易节点集群中的交易节点共享存储空间;交易节点对交易数据进行处理得到初步交易结果的步骤可以包括:交易节点集群检测当前参与交易的交易节点是否存在故障;若当前参与交易的交易节点存在故障时,则交易节点集群选择未发生故障的交易节点;所选择的未发生故障的交易节点根据发生故障的交易节点在共享存储空间中存储的信息并继续对交易数据进行处理得到初步交易结果。
具体地,交易节点可以以集群的形式存在,且该集群共享一共同的存储空间,交易节点在接收到通道所发送的交易数据后,对交易数据进行处理,若在该过程中当前处理交易的交易节点出现故障,则该集群为当前交易分配另一无故障的交易节点继续参与交易,例如可以根据序号进行分配,当前参与交易的交易节点的序号为5,则查询序号为6的交易节点是否故障,如序号为6的交易节点无故障,则直接分配序号为6的交易节点继续参与交易,如果序号为6的交易节点故障,则继续遍历下一交易节点直至获取到无故障的交易节点来处理当前交易,且由于集群中所有的交易节点共享同一存储空间,因此所选择的无故障的交易节点可以在断点处继续处理该交易,而不需要重新处理该交易。
上述实施例中,若当前处理交易的交易节点故障,则重新选择新的交易节点继续该交易的处理,且由于集群中所有交易节点共享存储空间,因此新的交易节点可以继续处理该交易,而不需要重复上一故障的交易节点的处理过程。
在其中一个实施例中,通道根据初步交易结果计算得到目标交易结果的步骤可以包括:通道判断参与交易的交易节点反馈的初步交易结果表示交易成功的数量是否大于等于预设值;当表示交易成功的初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;当表示交易成功的初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
具体地,通道在接收到交易节点反馈的初步交易结果后,查询表示成功的交易结果的数量,并根据交易策略得到目标交易结果。
例如,交易策略是通道中所有的交易节点的初步交易结果均需表示交易成功,则目标交易结果才是交易成功,若存在一个交易节点的初步交易结果表示未成功,则目标交易结果是交易失败。在这种交易策略下,通道查询交易节点所返回的初步交易结果,当所有的初步交易结果均表示交易成功时, 则输出表示交易成功的目标交易结果,当存在一个初步交易结果表示交易失败时,则输出表示交易失败的目标交易结果。
当交易策略是通道中至少n/2+1个交易节点的初步交易结果均需表示交易成功,则目标交易结果才是交易成功,若不存在n/2+1个交易节点的初步交易结果表示成功,则目标交易结果是交易失败,其中n为交易节点的个数。在这种交易策略下,通道查询交易节点所返回的初步交易结果,当至少n/2+1个初步交易结果均表示交易成功时,则输出表示交易成功的目标交易结果,当不存在至少n/2+1个初步交易结果表示交易成功时,则输出表示交易失败的目标交易结果。
上述实施例中,通道根据交易节点返回的初步交易结果得到目标交易结果,而不是仅仅依靠一个交易节点进行处理,或者交易节点之间互相通信得到目标交易结果,处理过程简单、结果可靠。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
继续参阅图1,图1中的客户端、通道以及交易节点组成了区块链交易数据处理系统,其中:
客户端用于接收交易数据处理请求,交易数据处理请求携带有交易类型和交易数据;客户端根据交易类型将交易数据发送至对应的通道。
通道用于将交易数据发送至通道中的交易节点。
交易节点用于对交易数据进行处理得到初步交易结果,并将初步交易结果反馈至通道。
通道还用于根据初步交易结果计算得到目标交易结果,并将目标交易结果返回至客户端。
客户端还用于发出目标交易结果。
在其中一个实施例中,系统还包括组织,组织用于为组织中注册的用户分配一个或多个交易节点,且每个交易节点对应一种交易类型,组织根据交易类型将交易节点分配至不同的通道。
在其中一个实施例中,组织为组织中注册的用户设置对应的交易权限。
通道还用于获取通道中交易节点对应的组织标识,并将交易数据和组织 标识发送至通道中对应的交易节点。
交易节点还用于对组织标识进行验证,当组织标识的验证通过后,交易节点对交易节点对应的用户权限进行验证,在用户权限验证通过后,继续对交易数据进行处理得到初步交易结果。
在其中一个实施例中,交易节点为交易节点集群,交易节点集群中的交易节点共享存储空间。
交易节点集群用于监测当前参与交易的交易节点是否存在故障,若当前参与交易的交易节点存在故障,则交易节点集群选择未发生故障的交易节点。
所选择的未发横故障的交易节点根据发生故障的交易节点在共享存储空间中存储的信息继续对交易数据进行处理得到初步交易结果。
在其中一个实施例中,通道还用于判断参与交易的交易节点反馈的初步交易结果表示交易成功的数量是否大于等于预设值;当表示交易成功的初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;当表示交易成功的初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
关于区块链交易数据处理系统的具体限定可以参见上文中对于交易数据处理方法的限定,在此不再赘述。上述区块链交易数据处理系统中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机系统,该计算机系统的内部结构图可以如图3所示。其中该计算机系统包括客户端、通道和交易节点,该客户端包括通过系统总线连接的第一处理器、第一存储器、第一网络接口和第一数据库。其中,该第一处理器用于提供计算和控制能力。该第一存储器包括非易失性计算机可读指令存储介质、内存储器。该非易失性计算机可读指令存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性计算机可读指令存储介质中的操作系统和计算机可读指令的运行提供环境。该第一网络接口用于与外部的终端通过网络连接通信。通道包括通过系统总线连接的第二处理器、第二存储器、第二网络接口和第二数据库。其中,该第二处理器用于提供计算和控制能力。该第二存储器包括非易失性计算机可读指令存储介质、内存储器。该非易失性计算机可读指令存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性计算机可读指令存储介质中的操作系统和计算机可读指令的运行提供环境。该第二网络接口用于与外部的终端通过网络连接通信。。交易节点包括通过系统总线连接的第三处理器、第三存储器、第三网络接口和第三数据库。其中,该第三处 理器用于提供计算和控制能力。该第三存储器包括非易失性计算机可读指令存储介质、内存储器。该非易失性计算机可读指令存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性计算机可读指令存储介质中的操作系统和计算机可读指令的运行提供环境。该第三网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被第一处理器、第二处理器和第三处理器执行时以实现一种区块链交易数据处理方法。
本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机系统的限定,具体的计算机系统可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:其中,第一处理器执行计算机可读指令时实现以下步骤:接收交易数据处理请求,交易数据处理请求携带有交易类型和交易数据;根据交易类型将交易数据发送至对应的通道,并发出目标交易结果;第二处理器执行计算机可读指令时实现以下步骤:将交易数据发送至通道中的交易节点,根据交易节点反馈的初步交易结果计算得到目标交易结果,并将目标交易结果返回至客户端;第三处理器执行计算机可读指令时实现以下步骤:对交易数据进行处理得到初步交易结果,并将初步交易结果反馈至通道。
在其中一个实施例中,该计算机系统还包括组织,组织包括通过系统总线连接的第四处理器、第四存储器、第四网络接口和第四数据库。其中,该第四处理器用于提供计算和控制能力。该第四存储器包括非易失性计算机可读指令存储介质、内存储器。该非易失性计算机可读指令存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性计算机可读指令存储介质中的操作系统和计算机可读指令的运行提供环境。该第四网络接口用于与外部的终端通过网络连接通信。
组织包括第四存储器和一个或多个第四处理器,存储器中储存有计算机可读指令,计算机可读指令被第四处理器执行时,使得一个或多个第四处理器执行以下步骤:为组织中注册的用户分配一个或多个交易节点,每个交易节点对应一种交易类型;根据交易类型将交易节点分配至不同的通道。
在其中一个实施例中,第二处理器执行计算机可读指令时所实现的将交易数据发送至通道中的交易节点,包括:获取通道中交易节点对应的组织标识,并将交易数据和组织标识发送至通道中对应的交易节点;第三处理器执行计算机可读指令时所实现的对交易数据进行处理得到初步交易结果之前, 还包括:对组织标识进行验证,当组织标识的验证通过后,交易节点对交易节点对应的用户权限进行验证,在用户权限验证通过后,继续对交易数据进行处理得到初步交易结果。
在其中一个实施例中,交易节点为交易节点集群,交易节点集群中的交易节点共享存储空间;第三处理器执行计算机可读指令时所实现的对交易数据进行处理得到初步交易结果,包括:检测当前参与交易的交易节点是否存在故障;若当前参与交易的交易节点存在故障时,则选择未发生故障的交易节点;通过所选择的未发生故障的交易节点根据发生故障的交易节点在共享存储空间中存储的信息继续对交易数据进行处理得到初步交易结果。
在其中一个实施例中,第二处理器执行计算机可读指令时所实现的根据初步交易结果计算得到目标交易结果,包括:判断参与交易的交易节点反馈的初步交易结果表示交易成功的数量是否大于等于预设值;当表示交易成功的初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;当表示交易成功的初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个第一处理器执行时,使得一个或多个第一处理器执行以下步骤:接收交易数据处理请求,交易数据处理请求携带有交易类型和交易数据;根据交易类型将交易数据发送至对应的通道,并发出目标交易结果;计算机可读指令被一个或多个第二处理器执行时,使得一个或多个第二处理器执行以下步骤:将交易数据发送至通道中的交易节点,根据交易节点反馈的初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;计算机可读指令被一个或多个第三处理器执行时,使得一个或多个第三处理器执行以下步骤对交易数据进行处理得到初步交易结果,并将初步交易结果反馈至通道。
在其中一个实施例中,计算机可读指令被一个或多个第四处理器执行时,使得一个或多个第四处理器执行以下步骤:为所述组织中注册的用户分配一个或多个交易节点,每个所述交易节点对应一种交易类型;及根据所述交易类型将所述交易节点分配至不同的通道。
在其中一个实施例中,计算机可读指令被一个或多个第二处理器执行时实现的通道将交易数据发送至通道中的交易节点,包括:获取通道中交易节点对应的组织标识,并将交易数据和组织标识发送至通道中对应的交易节点;计算机可读指令被一个或多个所述第三处理器执行时实现的对交易数据进行处理得到初步交易结果之前,还包括:对组织标识进行验证,当组织标识的验证通过后,对交易节点对应的用户权限进行验证,在用户权限验证通过后, 继续执行交易节点对交易数据进行处理得到初步交易结果。
在其中一个实施例中,交易节点为交易节点集群,交易节点集群中的交易节点共享存储空间;计算机可读指令被一个或多个第三处理器执行时实现的交易节点对交易数据进行处理得到初步交易结果,包括:检测当前参与交易的交易节点是否存在故障;若当前参与交易的交易节点存在故障时,则交易节点集群选择未发生故障的交易节点;通过所选择的未发生故障的交易节点根据发生故障的交易节点在共享存储空间中存储的信息继续对交易数据进行处理得到初步交易结果。
在其中一个实施例中,计算机可读指令被一个或多个第二处理器执行时实现的根据初步交易结果计算得到目标交易结果,包括:判断参与交易的交易节点反馈的初步交易结果表示交易成功的数量是否大于等于预设值;当表示交易成功的初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;当表示交易成功的初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围 应以所附权利要求为准。

Claims (20)

  1. 一种交易数据处理方法,包括:
    客户端接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;所述客户端根据所述交易类型将所述交易数据发送至对应的通道;
    所述通道将交易数据发送至所述通道中的交易节点;
    所述交易节点对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道;
    所述通道根据所述初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;及
    所述客户端发出所述目标交易结果。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    组织为所述组织中注册的用户分配一个或多个交易节点,每个所述交易节点对应一种交易类型;及
    所述组织根据所述交易类型将所述交易节点分配至不同的通道。
  3. 根据权利要求1所述的方法,其特征在于,所述通道将交易数据发送至所述通道中的交易节点,包括:
    所述通道获取所述通道中交易节点对应的组织标识,并将所述交易数据和所述组织标识发送至所述通道中对应的交易节点;
    所述交易节点对所述交易数据进行处理得到初步交易结果之前,还包括:
    所述交易节点对所述组织标识进行验证,当所述组织标识的验证通过后,所述交易节点对所述交易节点对应的用户权限进行验证,在所述用户权限验证通过后,继续执行所述交易节点对所述交易数据进行处理得到初步交易结果。
  4. 根据权利要求1所述的方法,其特征在于,所述交易节点为交易节点集群,所述交易节点集群中的交易节点共享存储空间;
    所述交易节点对所述交易数据进行处理得到初步交易结果,包括:
    所述交易节点集群检测当前参与交易的交易节点是否存在故障;
    若当前参与交易的交易节点存在故障时,则所述交易节点集群选择未发生故障的交易节点;及
    所选择的未发生故障的交易节点根据发生故障的交易节点在所述共享存储空间中存储的信息继续对所述交易数据进行处理得到初步交易结果。
  5. 根据权利要求1所述的方法,其特征在于,所述通道根据所述初步交易结果计算得到目标交易结果,包括:
    所述通道判断参与交易的所述交易节点反馈的初步交易结果表示交易成 功的数量是否大于等于预设值;
    当表示交易成功的所述初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;及
    当表示交易成功的所述初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
  6. 一种区块链交易数据处理系统,包括客户端、通道以及交易节点;
    所述客户端用于接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;所述客户端根据所述交易类型将所述交易数据发送至对应的通道;
    所述通道用于将交易数据发送至所述通道中的交易节点;
    所述交易节点用于对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道;
    所述通道还用于根据所述初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;及
    所述客户端还用于发出所述目标交易结果。
  7. 根据权利要求6所述的系统,其特征在于,所述系统还包括组织,所述组织用于为所述组织中注册的用户分配一个或多个交易节点,且每个所述交易节点对应一种交易类型,所述组织根据所述交易类型将所述交易节点分配至不同的通道。
  8. 根据权利要求6所述的系统,其特征在于,所述组织为所述组织中注册的用户设置对应的交易权限;
    所述通道还用于获取所述通道中交易节点对应的组织标识,并将所述交易数据和所述组织标识发送至所述通道中对应的交易节点;及
    所述交易节点还用于对所述组织标识进行验证,当所述组织标识的验证通过后,所述交易节点对所述交易节点对应的用户权限进行验证,在所述用户权限验证通过后,继续对所述交易数据进行处理得到初步交易结果。
  9. 根据权利要求6所述的系统,其特征在于,所述交易节点为交易节点集群,所述交易节点集群中的交易节点共享存储空间;
    所述交易节点集群用于检测当前参与交易的交易节点是否存在故障;
    若当前参与交易的交易节点存在故障时,则所述交易节点集群选择未发生故障的交易节点;及
    所选择的未发生故障的交易节点用于根据发生故障的交易节点在所述共享存储空间中存储的信息继续对所述交易数据进行处理得到初步交易结果。
  10. 根据权利要求6所述的系统,其特征在于,所述通道还用于判断参与交易的所述交易节点反馈的初步交易结果表示交易成功的数量是否大于等 于预设值;
    当表示交易成功的所述初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;及
    当表示交易成功的所述初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
  11. 一种计算机系统,其特征在于,包括客户端、通道和交易节点;
    所述客户端包括第一存储器和一个或多个第一处理器,存储器中储存有计算机可读指令,计算机可读指令被第一处理器执行时,使得一个或多个第一处理器执行以下步骤:接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;根据所述交易类型将所述交易数据发送至对应的通道,并发出目标交易结果;
    所述通道包括第二存储器和一个或多个第二处理器,存储器中储存有计算机可读指令,计算机可读指令被第二处理器执行时,使得一个或多个第二处理器执行以下步骤:将交易数据发送至所述通道中的交易节点,根据交易节点反馈的初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;
    所述交易节点包括第三存储器和一个或多个第三处理器,存储器中储存有计算机可读指令,计算机可读指令被第三处理器执行时,使得一个或多个第三处理器执行以下步骤:对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道。
  12. 根据权利要求11所述的计算机系统,其特征在于,还包括组织,所述组织包括第四存储器和一个或多个第四处理器,存储器中储存有计算机可读指令,计算机可读指令被第四处理器执行时,使得一个或多个第四处理器执行以下步骤:
    为所述组织中注册的用户分配一个或多个交易节点,每个所述交易节点对应一种交易类型;及
    根据所述交易类型将所述交易节点分配至不同的通道。
  13. 根据权利要求11所述的计算机系统,其特征在于,所述第二处理器执行计算机可读指令时所实现的将交易数据发送至通道中的交易节点,包括:
    获取所述通道中交易节点对应的组织标识,并将所述交易数据和所述组织标识发送至所述通道中对应的交易节点;
    所述第三处理器执行计算机可读指令时所实现的对所述交易数据进行处理得到初步交易结果之前,还包括:
    对所述组织标识进行验证,当所述组织标识的验证通过后,对所述交易节点对应的用户权限进行验证,在所述用户权限验证通过后,继续执行所述 交易节点对所述交易数据进行处理得到初步交易结果。
  14. 根据权利要求11所述的计算机系统,其特征在于,所述交易节点为交易节点集群,所述交易节点集群中的交易节点共享存储空间;
    所述第三处理器执行计算机可读指令时所实现的对所述交易数据进行处理得到初步交易结果,包括:
    检测当前参与交易的交易节点是否存在故障;
    若当前参与交易的交易节点存在故障时,则所述交易节点集群选择未发生故障的交易节点;及
    通过所选择的未发生故障的交易节点根据发生故障的交易节点在所述共享存储空间中存储的信息继续对所述交易数据进行处理得到初步交易结果。
  15. 根据权利要求10所述的计算机系统,其特征在于,所述第二处理器执行计算机可读指令时所实现的根据所述初步交易结果计算得到目标交易结果,包括:
    判断参与交易的所述交易节点反馈的初步交易结果表示交易成功的数量是否大于等于预设值;
    当表示交易成功的所述初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;及
    当表示交易成功的所述初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个第一处理器执行时,使得所述一个或多个第一处理器执行以下步骤:接收交易数据处理请求,所述交易数据处理请求携带有交易类型和交易数据;根据所述交易类型将所述交易数据发送至对应的通道,并发出目标交易结果;
    所述计算机可读指令被一个或多个第二处理器执行时,使得所述一个或多个第二处理器执行以下步骤:将交易数据发送至所述通道中的交易节点,根据交易节点反馈的初步交易结果计算得到目标交易结果,并将所述目标交易结果返回至所述客户端;
    所述计算机可读指令被一个或多个第三处理器执行时,使得所述一个或多个第三处理器执行以下步骤:对所述交易数据进行处理得到初步交易结果,并将所述初步交易结果反馈至所述通道。
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个第四处理器执行时,使得一个或多个第四处理器执行以下步骤:
    为所述组织中注册的用户分配一个或多个交易节点,每个所述交易节点 对应一种交易类型;及
    根据所述交易类型将所述交易节点分配至不同的通道。
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个所述第二处理器执行时,使得一个或多个第二处理器执行的将交易数据发送至通道中的交易节点,包括:
    获取所述通道中交易节点对应的组织标识,并将所述交易数据和所述组织标识发送至所述通道中对应的交易节点;
    所述计算机可读指令被一个或多个所述第三处理器执行时,使得一个或多个第三处理器执行的对所述交易数据进行处理得到初步交易结果之前,还包括:
    对所述组织标识进行验证,当所述组织标识的验证通过后,对所述交易节点对应的用户权限进行验证,在所述用户权限验证通过后,继续执行所述交易节点对所述交易数据进行处理得到初步交易结果。
  19. 根据权利要求16所述的存储介质,其特征在于,所述交易节点为交易节点集群,所述交易节点集群中的交易节点共享存储空间;
    所述计算机可读指令被一个或多个所述第三处理器执行时,使得一个或多个第三处理器执行的对所述交易数据进行处理得到初步交易结果,包括:
    检测当前参与交易的交易节点是否存在故障;
    若当前参与交易的交易节点存在故障时,则所述交易节点集群选择未发生故障的交易节点;及
    通过所选择的未发生故障的交易节点根据发生故障的交易节点在所述共享存储空间中存储的信息继续对所述交易数据进行处理得到初步交易结果。
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个所述第二处理器执行时,使得一个或多个第二处理器执行的根据所述初步交易结果计算得到目标交易结果,包括:
    判断参与交易的所述交易节点反馈的初步交易结果表示交易成功的数量是否大于等于预设值;
    当表示交易成功的所述初步交易结果的数量大于等于预设值时,则目标交易结果表示交易成功;及
    当表示交易成功的所述初步交易结果的数量小于预设值时,则目标交易结果表示交易失败。
PCT/CN2018/075500 2017-11-23 2018-02-06 交易数据处理方法、装置、计算机设备及存储介质 WO2019100597A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SG11201913408RA SG11201913408RA (en) 2017-11-23 2018-02-06 Transaction data processing method and device, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711180745.0 2017-11-23
CN201711180745.0A CN107833139B (zh) 2017-11-23 2017-11-23 交易数据处理方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2019100597A1 true WO2019100597A1 (zh) 2019-05-31

Family

ID=61652335

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/075500 WO2019100597A1 (zh) 2017-11-23 2018-02-06 交易数据处理方法、装置、计算机设备及存储介质

Country Status (3)

Country Link
CN (1) CN107833139B (zh)
SG (1) SG11201913408RA (zh)
WO (1) WO2019100597A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11100092B2 (en) * 2019-06-17 2021-08-24 Bank Of America Corporation Database tool

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108830709A (zh) * 2018-04-17 2018-11-16 中车工业研究院有限公司 一种基于区块链的众包交易系统
CN110557416B (zh) * 2018-05-31 2022-02-18 本无链科技(深圳)有限公司 一种多节点协同打块的方法及系统
CN109005208B (zh) * 2018-06-11 2021-03-30 北京京东尚科信息技术有限公司 用于推送信息的方法和装置
CN109064168A (zh) * 2018-06-12 2018-12-21 深圳前海微众银行股份有限公司 基于区块链的权限控制方法、装置及计算机可读存储介质
CN109242681B (zh) * 2018-08-21 2020-11-20 京东数字科技控股有限公司 资产数据的存储方法、装置、设备及系统
CN109144970A (zh) * 2018-08-23 2019-01-04 中国建设银行股份有限公司 流水数据处理方法及系统
CN109544144A (zh) * 2018-10-25 2019-03-29 平安科技(深圳)有限公司 交易处理方法、装置、计算机设备和存储介质
CN109493046A (zh) * 2018-11-12 2019-03-19 平安科技(深圳)有限公司 基于区块链的商机信息共享方法、电子装置及可读存储介质
CN109726048A (zh) * 2018-12-13 2019-05-07 中国银联股份有限公司 一种交易系统中数据恢复方法及装置
CN109754321B (zh) * 2018-12-27 2022-02-11 石更箭数据科技(上海)有限公司 一种数据处理方法及其装置、介质、终端
CN110290168B (zh) * 2019-05-08 2022-04-12 深圳壹账通智能科技有限公司 数据发送方法、装置、服务器及存储介质
CN110401656B (zh) * 2019-07-24 2021-11-30 西安纸贵互联网科技有限公司 区块链管理系统
CN110516417B (zh) * 2019-08-09 2021-04-16 中国银联股份有限公司 一种智能合约的权限验证方法及装置
CN112650666B (zh) * 2019-10-12 2024-04-09 北京达佳互联信息技术有限公司 一种软件测试系统、方法、装置、控制设备及存储介质
CN111222989B (zh) * 2019-12-31 2023-07-07 远光软件股份有限公司 多通道区块链的交易方法、电子设备和存储介质
CN111241594B (zh) * 2020-01-06 2023-10-13 平安科技(深圳)有限公司 交易信息的加签方法、装置、计算机设备和存储介质
CN112132674A (zh) * 2020-09-16 2020-12-25 建信金融科技有限责任公司 一种交易处理方法和装置
US11463250B2 (en) * 2020-12-14 2022-10-04 Kyndryl, Inc. Sharing data among different service providers at edge level through collaboration channels

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635495A (zh) * 2003-12-31 2005-07-06 中国银联股份有限公司 一种交易结算处理系统及其信息传送与处理方法
CN101930640A (zh) * 2009-06-26 2010-12-29 海南新生信息技术有限公司 一卡多账户多交易方法和系统
CN102567908A (zh) * 2010-12-30 2012-07-11 同方股份有限公司 一种基于电子商务的数据处理方法及系统
WO2013134811A1 (en) * 2012-03-12 2013-09-19 Zomojo Pty Ltd A method and a system for sending an electronic message
CN106970934A (zh) * 2017-01-16 2017-07-21 平安银行股份有限公司 交易处理控制方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017178956A1 (en) * 2016-04-11 2017-10-19 nChain Holdings Limited A method for secure peer-to-peer communication on a blockchain
CN107040594B (zh) * 2017-04-12 2020-04-10 山大地纬软件股份有限公司 基于pbft的许可区块链节点准入的方法及装置
CN107358417B (zh) * 2017-06-23 2021-12-28 苏州缓流科技有限公司 基于区块链技术的可监管的支付方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1635495A (zh) * 2003-12-31 2005-07-06 中国银联股份有限公司 一种交易结算处理系统及其信息传送与处理方法
CN101930640A (zh) * 2009-06-26 2010-12-29 海南新生信息技术有限公司 一卡多账户多交易方法和系统
CN102567908A (zh) * 2010-12-30 2012-07-11 同方股份有限公司 一种基于电子商务的数据处理方法及系统
WO2013134811A1 (en) * 2012-03-12 2013-09-19 Zomojo Pty Ltd A method and a system for sending an electronic message
CN106970934A (zh) * 2017-01-16 2017-07-21 平安银行股份有限公司 交易处理控制方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11100092B2 (en) * 2019-06-17 2021-08-24 Bank Of America Corporation Database tool

Also Published As

Publication number Publication date
CN107833139A (zh) 2018-03-23
SG11201913408RA (en) 2020-01-30
CN107833139B (zh) 2021-08-24

Similar Documents

Publication Publication Date Title
WO2019100597A1 (zh) 交易数据处理方法、装置、计算机设备及存储介质
WO2019100598A1 (zh) 交易处理方法、装置、计算机设备及存储介质
WO2019061983A1 (zh) 区块链数据上传方法、系统、计算机系统及存储介质
WO2021159606A1 (zh) 基于区块链的组织节点上链方法和系统
US20210167947A1 (en) System and method for processing secret sharing authentication
CN111064569B (zh) 可信计算集群的集群密钥获取方法及装置
US11108545B2 (en) Creating a blockchain account and verifying blockchain transactions
WO2022193984A1 (zh) 跨链进行数据传输的方法、装置、计算机设备、存储介质和计算机程序产品
CN110740038B (zh) 区块链及其通信方法、网关、通信系统和存储介质
CN113824674B (zh) 联盟链式数据结构网络管理方法、管理节点及介质
CN111835512A (zh) 私钥碎片管理方法、签名碎片生成方法、系统与节点设备
WO2023124746A1 (zh) 跨子网交互的权限控制
WO2021068477A1 (zh) 区块处理方法、装置、计算机设备及存储介质
CN113872990B (zh) 基于ssl协议的vpn网络证书认证方法、装置和计算机设备
CN109492384B (zh) 接收实体访问、访问密码设备的方法、密码设备和实体
CN113315630A (zh) 区块链、量子密钥分发方法和装置
CN114679269B (zh) 基于区块链的凭证传输方法及装置、电子设备及存储介质
WO2019100596A1 (zh) 分布式系统操作方法及系统
US11646884B2 (en) Database key management
EP4220518A1 (en) Blockchain network-based device management method, related device, and storage medium
CN113452519B (zh) 密钥同步方法、装置、计算机设备及存储介质
CN113132982B (zh) 数据转发方法、装置、计算机设备和存储介质
CN112242976B (zh) 一种身份认证方法及装置
US20210258295A1 (en) Device and Method for Mediating Configuration of Authentication Information
CN115022406B (zh) 电力现货系统的通信方法、装置、设备、介质和程序产品

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18880596

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 22.09.2020.)

122 Ep: pct application non-entry in european phase

Ref document number: 18880596

Country of ref document: EP

Kind code of ref document: A1