CN115115367B - Transaction information query method and device based on block chain and electronic equipment - Google Patents

Transaction information query method and device based on block chain and electronic equipment Download PDF

Info

Publication number
CN115115367B
CN115115367B CN202211043848.3A CN202211043848A CN115115367B CN 115115367 B CN115115367 B CN 115115367B CN 202211043848 A CN202211043848 A CN 202211043848A CN 115115367 B CN115115367 B CN 115115367B
Authority
CN
China
Prior art keywords
target
information
transaction
identification information
transaction information
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
CN202211043848.3A
Other languages
Chinese (zh)
Other versions
CN115115367A (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.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank 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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211043848.3A priority Critical patent/CN115115367B/en
Publication of CN115115367A publication Critical patent/CN115115367A/en
Application granted granted Critical
Publication of CN115115367B publication Critical patent/CN115115367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/20Point-of-sale [POS] network systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a transaction information query method and device based on a block chain and electronic equipment. The transaction information query method based on the block chain comprises the following steps: receiving a query request of a target card issuing bank end aiming at a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises the information of the target card number; after determining that the target issuing bank has the access authority, determining transaction identification information according to the basic transaction information; judging whether target identification information matched with the transaction identification information exists or not; if the target transaction information exists, the target storage address corresponding to the target identification information is determined, the stored target transaction information matched with the target identification information is called through the target storage address, and the target transaction information is sent to the target issuing bank.

Description

Transaction information query method and device based on block chain and electronic equipment
Technical Field
The present application relates to the field of transaction query technologies, and in particular, to a method and an apparatus for querying transaction information based on a block chain, and an electronic device.
Background
With the progress of science and technology, more and more users use the POS to consume in the consuming and transaction processes, and at present, when the users use the POS to perform transactions or consume, transaction information in the POS is stored in an acquiring bank corresponding to each POS, and the transaction information is used as private data and is not shared.
When a user holding a credit card is doubtful about a certain transaction and wants to inquire about specific transaction information of the transaction, the card issuing bank of the credit card needs to access through the card organization platform, the card organization platform forwards information to an acquiring bank where a POS machine is located, the acquiring bank replies an information certificate of the transaction and transaction detailed information to the user, and the inquiring process is complicated and long in time, so that the inquiring efficiency is low.
Disclosure of Invention
In view of this, an object of the present application is to provide a transaction information query method and apparatus based on a block chain, and an electronic device, which implement a simplified process for querying target transaction information, so that a query process of a user is more convenient and faster, and query efficiency is improved while query time is shortened.
The embodiment of the application provides a transaction information query method, a device and electronic equipment based on a block chain, wherein the method comprises the following steps:
receiving a query request of a target card issuing bank terminal for a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises target card number information;
after the target card issuing bank terminal is determined to have the access authority, transaction identification information is determined according to the basic transaction information;
judging whether target identification information matched with the transaction identification information exists or not; the target identification information is information after signature decryption;
if the target transaction information exists, determining a target storage address corresponding to the target identification information, calling the stored target transaction information matched with the target identification information through the target storage address, and sending the target transaction information to the target card issuing bank.
Further, the basic transaction information further includes a first institution number of a target card issuing bank, public key information of the target card issuing bank and private key information of the target card issuing bank, and it is determined that the target card issuing bank has an access right by the following method:
judging whether the first organization number exists in a preset bank authority mapping table or not according to the first organization number of the target card issuing bank end;
if the target card issuing terminal exists, authority authentication of the target card issuing terminal is carried out according to the public key information of the target card issuing terminal and the private key of the target card issuing terminal;
and after the authentication is successful, determining that the target card issuing end has the access authority.
Further, the target transaction information is stored by the following method:
receiving a storage request of a target acquirer for standard transaction information generated by a target acquirer for a target transaction, wherein the standard transaction information is obtained by packaging transaction certificate information and user information by the target acquirer;
based on the storage request, performing hash encryption on the standard transaction information, and after encryption, using a private key of the target order receiving end to perform signature to determine target transaction information;
and carrying out contracting processing on the target transaction information, and storing the processed target transaction information.
Further, before the receiving a storage request of a target acquirer for standard transaction information generated by a target transaction, the transaction information query method based on the blockchain further includes:
judging whether a second organization number exists in a preset bank authority mapping table or not according to the second organization number of the target order receiving row end;
if the target order receiving line end exists, authority authentication of the target order receiving line end is carried out according to a private key of the target order receiving line end;
and after the authentication is successful, determining that the target acquiring bank end has the access authority.
Further, the performing contractual processing on the target transaction information and storing the processed target transaction information includes:
acquiring contract information associated with the target transaction information;
and block packaging is carried out on the contract information and the target transaction information, and the packaged target transaction information is sent to all slave nodes by a public link node so as to store the target transaction information in all the slave nodes.
Further, the determining whether there is target identification information matching the transaction identification information includes:
acquiring a target node matched with the transaction identification information;
decrypting the stored data by using the signature of the target order receiving line end to obtain a plurality of candidate identification information;
and judging whether candidate identification information matched with the transaction identification information exists in the matched target node, and if so, determining the candidate identification information as target identification information.
The embodiment of the present application further provides a transaction information query device based on a blockchain, where the transaction information query device based on a blockchain includes:
the receiving module is used for receiving a query request of a target card issuing bank end aiming at a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises target card number information;
the determining module is used for determining transaction identification information according to the basic transaction information after determining that the target card issuing bank has the access authority;
the judging module is used for judging whether target identification information matched with the transaction identification information exists or not; the target identification information is information after signature decryption;
and the calling module is used for determining a target storage address of the target identification information if the target storage address exists, calling the stored target transaction information matched with the target identification information through the target storage address, and sending the target transaction information to the target card issuing bank.
Further, the basic transaction information further includes a first institution number of a target card issuing bank, public key information of the target card issuing bank and private key information of the target card issuing bank, and it is determined that the target card issuing bank has an access right by the following method:
judging whether the first organization number exists in a preset bank authority mapping table or not according to the first organization number of the target card issuing bank end;
if the target card issuing terminal exists, authority authentication of the target card issuing terminal is carried out according to the public key information of the target card issuing terminal and the private key of the target card issuing terminal;
and after the authentication is successful, determining that the target card issuing end has the access authority.
An embodiment of the present application further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the blockchain based transaction information query method as described above.
Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the transaction information query method based on block chain as described above.
Compared with the prior art, the transaction information query method, the transaction information query device and the electronic equipment based on the block chains provided by the embodiment of the application determine the target transaction information corresponding to the transaction identification information based on the query request from the block chains in which the transaction information is stored through the query request of the target transaction task, and directly send the target transaction information to the user through the target issuing bank, so that the process of querying the target transaction information is simplified, the query process of the user is more convenient and faster, and the query efficiency is improved while the query time is shortened.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows one of flowcharts of a transaction information query method based on a blockchain according to an embodiment of the present application;
fig. 2 illustrates a second flowchart of a transaction information query method based on a blockchain according to an embodiment of the present application;
fig. 3 is a flowchart illustrating target transaction information stored in a transaction information query method based on a blockchain according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram illustrating a transaction information query device based on a blockchain according to an embodiment of the present application;
fig. 5 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application.
In the figure:
400-transaction information inquiry device based on block chain; 410-a receiving module; 420-a determination module; 430-a judgment module; 440-call module; 500-an electronic device; 510-a processor; 520-a memory; 530-bus.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. The components of the embodiments of the present application, as generally described and illustrated in the figures herein, could be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. Every other embodiment that can be obtained by a person skilled in the art without making creative efforts based on the embodiments of the present application falls within the protection scope of the present application.
First, an application scenario to which the present application is applicable will be described. The method and the device can be applied to the technical field of transaction query. Research shows that when a user holding a credit card is suspicious of a certain transaction and wants to inquire specific transaction information of the transaction, the card issuer of the credit card is required to access through the card organization platform, the card organization platform forwards the information to an acquirer where a POS machine is located, and the acquirer replies an information certificate of the transaction and detailed transaction information to the user, so that the inquiry process is complicated, the time is long, and the inquiry efficiency is low.
In the prior art, the query process of the user box for querying the transaction information may specifically be:
the inquiry request of a user is sent to a card issuing bank of the credit card, the card issuing bank sends inquiry information in the inquiry request to a card organization platform for access, the card organization platform forwards the information to a receiving bank where the POS machine is located, the receiving bank uploads the inquired transaction information to the card organization platform, and the card organization platform returns the corresponding transaction information to the user through the card issuing bank of the credit card again, namely, the inquiry process is realized by multiple interactions of the card issuing bank, the card organization platform and the receiving bank of the credit card.
Based on this, the embodiment of the application provides a transaction information query method and device based on a block chain, and an electronic device, which realize simplification of a process for querying target transaction information, enable a query process of a user to be more convenient and faster, and provide query efficiency while shortening query time.
Referring to fig. 1, fig. 1 is a flowchart illustrating a transaction information query method based on a blockchain according to an embodiment of the present disclosure. As shown in fig. 1, the method for querying transaction information based on a blockchain according to an embodiment of the present application includes:
s101, receiving a query request of a target card issuing bank end for a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises information of a target card number.
In this step, when a user suspects a certain transaction task, a query request for the target transaction task may be sent to a target card issuing terminal corresponding to a credit card used by the user, and the target card issuing terminal sends the query request for the target transaction task to a block chain in which target transaction information corresponding to the query request is stored.
Here, the query request of the target transaction task includes basic transaction information, and the basic transaction information includes, but is not limited to, a first institution number of the target card issuing bank, target card number information, amount information of the target transaction, transaction date of the target transaction, authorization code of the target transaction, and transaction code of the target transaction.
And S102, determining transaction identification information according to the basic transaction information after determining that the target card issuing bank has the access authority.
In this step, after the block link receives the query request corresponding to the target transaction task, the block chain may first verify whether the target card issuing bank is registered, that is, whether the target card issuing bank has its own access right on the block chain, and after determining that the target card issuing bank has the access right, encrypt the basic transaction information according to a preset hash function in the block chain, and determine the transaction identification information corresponding to the basic transaction information.
Here, the transaction identification information may be, but is not limited to, a hash value, which is a character string for fixing data according to a fixed number and format.
Further, the basic transaction information further includes a first institution number of a target card issuing bank, public key information of the target card issuing bank, and private key information of the target card issuing bank, and it is determined that the target card issuing bank in step S102 has an access right through the following substeps:
and a substep 1021, determining whether the first organization number exists in a preset bank authority mapping table or not according to the first organization number of the target card issuing bank end.
In this step, whether the target card issuing bank is registered in the blockchain is judged through a first institution number corresponding to the target card issuing bank and used for representing the unique identifier of the target card issuing bank, that is, whether the first institution number exists in a preset bank authority mapping table of the blockchain can be determined.
And a substep 1022, if yes, performing authority authentication of the target card issuing terminal according to the public key information of the target card issuing terminal and the private key of the target card issuing terminal.
In this step, after it is determined that the target card issuing bank end is registered in the block chain, the authority of the target card issuing bank end on the block chain needs to be logged in by using the public key information of the target card issuing bank end and the private key of the target card issuing bank end, and if the public key information of the target card issuing bank end and the private key of the target card issuing bank end input to the block chain are correct, it is determined that the authority authentication or login of the target card issuing bank end on the block chain is successful.
And a substep 1023 of determining that the target card issuing bank end has the access right after the authentication is successful.
In this step, the authority of the target card issuing bank end on the block chain is authenticated and successfully logged in, that is, the target card issuing bank end is determined to have the access authority for inquiry and call.
S103, judging whether target identification information matched with the transaction identification information exists or not; the target identification information is information after signature decryption.
In the step, after the target issuing bank end is determined to have the access authority, the transaction identification information is signed and decrypted according to the preset specification convention of the distributed file system in the block chain, and whether the target identification information matched with the transaction identification information exists or not is judged after analysis.
Here, the distributed File System (IPFS) is a content-addressable peer-to-peer distributed File System, and the IPFS employs a content-address addressing technique, i.e., retrieval is performed through the content of a File rather than through the network address of the File. In short, since the hash operation is performed on the file content and the hash value is stored as the file name in the local database, the file name remains unchanged as long as the file content remains unchanged.
And S104, if the target transaction information exists, determining a target storage address corresponding to the target identification information, calling the stored target transaction information matched with the target identification information through the target storage address, and sending the target transaction information to the target card issuing bank.
In the step, in the determination of the existence of the target identification information matched with the transaction identification information, based on the content addressing function of the IPFS in the block chain, a target storage address corresponding to the target identification information is determined, the target transaction information matched with the target identification information is obtained through the target storage address, and the target transaction information is sent to the user through the target issuing bank for the user to inquire.
Here, the target identification information includes, but is not limited to, basic transaction information, time of the target transaction, location of the target transaction, address of the transaction user, name of the transaction user, number of the target pos, and the like.
Further, the target transaction information in step S104 is stored by the following sub-steps:
and in the substep 1041, determining whether the second organization number exists in a preset bank authority mapping table according to the second organization number of the target order receiving line terminal.
In this step, whether the target acquirer end is registered in the blockchain is determined by a second mechanism number corresponding to the target acquirer end and used for representing the unique identifier of the target acquirer end, that is, whether the second mechanism number exists in a preset bank authority mapping table of the blockchain is determined.
And 1042, if so, performing authority authentication of the target order receiving line end according to a private key of the target order receiving line end.
In this step, after it is determined that the target order receiving line terminal is registered in the blockchain, the authority of the target order receiving line terminal on the blockchain needs to be logged in by using the private key of the target order receiving line terminal, and if the private key of the target order receiving line terminal input to the blockchain is correct, it is determined that the authority authentication or login of the target order receiving line terminal on the blockchain is successful.
In the above, the IPFS in the block chain specifically uses a self-authentication file system to authenticate the authority of the target acquirer.
And a substep 1043, after the authentication is successful, determining that the target acquirer end has the access right.
In this step, the authority authentication of the target acquirer bank on the blockchain is successful, that is, it is determined that the target acquirer bank has the access authority for storage and invocation.
And a substep 1044 of receiving a storage request of the target acquirer to the standard transaction information generated by the target acquirer for the target transaction, wherein the standard transaction information is obtained by packaging the transaction certificate information and the user information by the target acquirer.
In the step, on the premise that the target acquirer end is determined to have the intervention right or pass the verification, the target acquirer firstly encapsulates transaction certificate information and user information which are generated on a POS machine of a user and are related to the target transaction, generates standard transaction information which corresponds to the target transaction, sends the standard transaction information to a block chain, and receives a storage request of the standard transaction information generated by the target acquirer end to the target transaction by the block chain.
Here, the user information includes POS base number information of the user, business license information of the user, organization structure code of the user, and the like.
And substep 1045, based on the storage request, performing hash encryption on the standard transaction information, and after encryption, using a private key of the target transaction receipt end to perform signature to determine target transaction information.
In the step, in the process of performing hash encryption on the standard transaction information according to the storage request, a specific hash algorithm formula is as follows:
y=HASH(x);
here, x is used to characterize the transaction data of the target card.
After the Hash encryption, a private key of a target order receiving end is used for signing to obtain target transaction information.
In this way, the target transaction information can be prevented from being tampered by using the private key of the target receipt bank for signature; and on the other hand, the private key of the target card-issuing bank end is used for signing, so that the target card-issuing bank end with the private key can look up transaction information data, and the subsequent target card-issuing bank end can conveniently inquire the target transaction information.
Substep 1046, performing contractual processing on the target transaction information, and storing the processed target transaction information.
In this step, the performing of contractual processing on the target transaction information in sub-step 1046, and storing the processed target transaction information includes:
contract information associated with the target transaction information is obtained.
Here, intelligent contract information is composed according to the target transaction information and the IPFS public chain, and contract information associated with the target transaction information is determined.
The contract information treasury is not limited to the card information of the target card, the name of the holder of the target card, the card number of the target card, the consumption time of the transaction, the consumption amount of the transaction, the consumption certificate of the transaction and the related information of the POS machine.
And block packaging is carried out on the contract information and the target transaction information, and the packaged target transaction information is sent to all slave nodes by a public link node so as to store the target transaction information in all the slave nodes.
After the contract information is determined, firstly broadcasting the contract information to the whole block chain through an IPFS (internet protocol file system) public chain node, then waiting for the nodes to pack the contract information and the target transaction information in blocks, and after the block packing is completed, sending the packed target transaction information to all slave nodes from the public chain node, completing the uploading of the target transaction information in the block chain, so that all the slave nodes can store the target transaction information.
Compared with the prior art, the block chain-based transaction information query method provided by the embodiment of the application determines the target transaction information corresponding to the transaction identification information based on the query request from the block chain in which the transaction information is stored through the query request of the target transaction task, reduces the storage and acceptance of the target transaction information stored in the prior art, is used for directly sending the target transaction information to a user through a target issuing bank, simplifies the process of querying the target transaction information, enables the query process of the user to be more convenient and rapid, shortens the query time, improves the query efficiency, avoids the incomplete query result problem caused by manual operation in the query process of the traditional transaction information, further enhances the query accuracy, and enhances the experience of the user.
Referring to fig. 2, fig. 2 is a second flowchart of a transaction information query method based on a blockchain according to an embodiment of the present disclosure. As shown in fig. 2, the transaction information query based on the blockchain provided in the embodiment of the present application includes the following steps:
s201, receiving a query request of a target card issuing bank terminal for a target transaction task; the inquiry request comprises basic transaction information, and the basic transaction information comprises target card number information.
And S202, after the target card issuing bank terminal is determined to have the access authority, determining transaction identification information according to the basic transaction information.
S203, acquiring the target node matched with the transaction identification information.
In this step, the matched target node may set different node matching modes according to different process scenarios.
S204, decrypting the stored data by using the signature of the target order receiving line end to obtain a plurality of candidate identification information.
Here, the target node matching provided by the present application may specifically be: decrypting the transaction information in the node close to the transaction identification information in the blockchain according to the private key of the target order receiving end, and determining a plurality of candidate identification information of the node, or
And decrypting the signature information stored in the format type node according to a private key of a target order receiving end, and determining a plurality of candidate identification information of the node.
S205, judging whether candidate identification information matched with the transaction identification information exists in the matched target node or not, and if yes, determining the candidate identification information as target identification information.
In the step, after a target node matched with transaction identification information is determined, whether a plurality of candidate identification information matched with the transaction identification information exists in the node is judged, if not, whether the target identification information matched with the transaction identification information exists in the next node associated with the node is continuously judged; and if so, determining the candidate identification information as the target identification information.
S206, determining a target storage address corresponding to the target identification information, calling stored target transaction information matched with the target identification information through the target storage address, and sending the target transaction information to the target card issuing bank.
The descriptions of S201 to S202 and S206 may refer to the descriptions of S101 to S102 and S104, and the same technical effect can be achieved, which is not described in detail.
Optionally, the basic transaction information further includes a first institution number of the target card issuing bank, public key information of the target card issuing bank, and private key information of the target card issuing bank, and it is determined that the target card issuing bank in step S102 has an access right through the following sub-steps:
substep 2021, determining whether the first organization number exists in a preset bank authority mapping table according to the first organization number of the target card issuing bank.
And substep 2022, if the authority authentication exists, performing authority authentication of the target card issuing bank according to the public key information of the target card issuing bank and the private key of the target card issuing bank.
And substep 2023, after the authentication is successful, determining that the target card issuing terminal has the access right.
Optionally, the target transaction information in step S205 is stored through the following sub-steps:
and a substep 2051 of judging whether the second organization number exists in a preset bank authority mapping table or not according to the second organization number of the target order receiving line terminal.
And a substep 2052, if the authority authentication exists, performing authority authentication of the target order receiving line end according to the private key of the target order receiving line end.
And substep 2053, after the authentication is successful, determining that the target acquiring end has the access authority.
Substep 2054 is to receive a storage request of the target acquirer for standard transaction information generated by the target transaction, wherein the standard transaction information is obtained by packaging the transaction credential information and the user information by the target acquirer.
And substep 2055, based on the storage request, performing hash encryption on the standard transaction information, and after encryption, using a private key of the target order receiving end to perform signature to determine target transaction information.
Substep 2056 performs contracted processing on the target transaction information, and stores the processed target transaction information.
Optionally, the performing contracted processing on the target transaction information in sub-step 2056, and storing the processed target transaction information includes:
contract information associated with the target transaction information is obtained.
And block packaging is carried out on the contract information and the target transaction information, and the packaged target transaction information is sent to all slave nodes by a public link node so as to store the target transaction information in all the slave nodes.
Referring to fig. 3, fig. 3 is a flowchart illustrating target transaction information stored in a transaction information query method based on a blockchain according to the present application. As shown in fig. 3, the storage of the target transaction information in the transaction information query method based on the blockchain provided by the embodiment of the present application includes the following steps:
s301, the target acquiring bank end stores the transaction certificate information of the user.
S302, the blockchain packages the transaction certificate information and the user information of the user to determine standard transaction information.
And S303, performing authority authentication on the target acquiring bank by using the self-authentication file system in the block chain.
And S304, after the target acquirer is determined to have the access right, performing hash encryption and signature on the standard transaction information, and determining the target transaction information.
And S305, carrying out contracting processing on the target transaction information, and storing the processed target transaction information.
Compared with the prior art, the transaction information query method based on the block chain provided by the embodiment of the application determines the target transaction information corresponding to the transaction identification information based on the query request from the block chain in which the transaction information is stored through the query request of the target transaction task, reduces the storage and acceptance of the target transaction information stored in the prior art, and the embodiment of the application is used for directly sending the target transaction information to a user through a target issuing bank, so that the process of querying the target transaction information is simplified, the query process of the user is more convenient and quicker, the query time is shortened, the query efficiency is improved, the problem that the query result of the traditional transaction information in the query process is incomplete due to manual operation is avoided, the query accuracy is further improved, and the experience of the user is enhanced.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a transaction information query device based on a blockchain according to an embodiment of the present disclosure. As shown in fig. 4, the transaction information query device 400 based on the blockchain includes:
the receiving module 410 is configured to receive a query request of a target card issuing bank for a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises target card number information;
a determining module 420, configured to determine transaction identification information according to the basic transaction information after determining that the target issuer has an access right;
a judging module 430, configured to judge whether there is target identification information matching the transaction identification information; the target identification information is information subjected to signature decryption;
and the invoking module 440 is configured to determine a target storage address of the target identification information if the target storage address exists, invoke stored target transaction information matched with the target identification information through the target storage address, and send the target transaction information to the target card issuing bank.
Further, the basic transaction information further includes a first institution number of a target card issuing bank, public key information of the target card issuing bank and private key information of the target card issuing bank, and it is determined that the target card issuing bank has an access right by the following method:
and judging whether the first organization number exists in a preset bank authority mapping table or not according to the first organization number of the target card issuing bank.
And if so, performing authority authentication of the target card issuing bank terminal according to the public key information of the target card issuing bank terminal and the private key of the target card issuing bank terminal.
And after the authentication is successful, determining that the target card issuing end has the access authority.
Further, the target transaction information is stored by the following method:
and receiving a storage request of a target acquirer for standard transaction information generated by a target transaction, wherein the standard transaction information is obtained by packaging transaction certificate information and user information by the target acquirer.
And based on the storage request, carrying out hash encryption on the standard transaction information, and after encryption, using a private key of the target order receiving end to carry out signature so as to determine target transaction information.
And carrying out contracting processing on the target transaction information, and storing the processed target transaction information.
Further, before the receiving a storage request of a target acquirer for standard transaction information generated by a target transaction, the transaction information query method based on the blockchain further includes:
and judging whether the second organization number exists in a preset bank authority mapping table or not according to the second organization number of the target order receiving line terminal.
And if so, performing authority authentication of the target order receiving line end according to the private key of the target order receiving line end.
And after the authentication is successful, determining that the target acquiring bank end has the access authority.
Further, the performing contractual processing on the target transaction information and storing the processed target transaction information includes:
contract information associated with the target transaction information is obtained.
And block packaging is carried out on the contract information and the target transaction information, and the packaged target transaction information is sent to all slave nodes by a public link node so as to store the target transaction information in all the slave nodes.
Further, the determining whether there is target identification information matching the transaction identification information includes:
and acquiring a target node matched with the transaction identification information.
And decrypting the stored data by using the signature of the target order receiving line end to obtain a plurality of candidate identification information.
And judging whether candidate identification information matched with the transaction identification information exists in the matched target node, and if so, determining the candidate identification information as target identification information.
Compared with the prior art, the transaction information query device 400 based on the block chain provided by the embodiment of the application determines the target transaction information corresponding to the transaction identification information based on the query request from the block chain in which the transaction information is stored through the query request of the target transaction task, so that the storage and acceptance of the target transaction information stored in the prior art are reduced, and the embodiment of the application is used for directly sending the target transaction information to the user through the target issuing bank, so that the process of querying the target transaction information is simplified, the query process of the user is more convenient and faster, the query time is shortened, the query efficiency is improved, the problem that the query result of the traditional transaction information is incomplete due to manual operation in the query process is avoided, the query accuracy is further improved, and the experience of the user is enhanced.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, the electronic device 500 includes a processor 510, a memory 520, and a bus 530.
The memory 520 stores machine-readable instructions executable by the processor 510, when the electronic device 500 runs, the processor 510 communicates with the memory 520 through the bus 530, and when the machine-readable instructions are executed by the processor 510, the steps of the transaction information query method based on the blockchain in the method embodiments shown in fig. 1 and fig. 2 may be executed.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program may perform the steps of the transaction information query method based on a blockchain in the method embodiments shown in fig. 1 and fig. 2.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in software functional units and sold or used as a stand-alone product, may be stored in a non-transitory computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present application, and are used for illustrating the technical solutions of the present application, but not limiting the same, and the scope of the present application is not limited thereto, and although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the exemplary embodiments of the present application, and are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A transaction information query method based on a blockchain is characterized by comprising the following steps:
receiving a query request of a target card issuing bank end aiming at a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises target card number information;
after determining that the target card issuing bank end has the access authority, determining transaction identification information according to the basic transaction information;
judging whether target identification information matched with the transaction identification information exists or not; the target identification information is information subjected to signature decryption;
if the target transaction information exists, determining a target storage address corresponding to the target identification information, calling stored target transaction information matched with the target identification information through the target storage address, and sending the target transaction information to the target card issuing bank end;
determining a target storage address corresponding to the target identification information by the following method:
determining a target storage address corresponding to the target identification information through the content addressing function of the IPFS in the block chain;
the judging whether the target identification information matched with the transaction identification information exists comprises the following steps:
acquiring a target node matched with the transaction identification information;
decrypting the stored data by using the signature of the target order receiving line end to obtain a plurality of candidate identification information;
judging whether candidate identification information matched with the transaction identification information exists in the matched target nodes or not, and if so, determining the candidate identification information as target identification information;
the target node may specifically be a node close to the transaction identification information or a node of the same format type;
the candidate identification information may specifically be that the transaction information in a node close to the transaction identification information in the blockchain is decrypted according to a private key of the target order receiving end to determine multiple candidate identification information of the node, or
Decrypting the signature information stored in the nodes with the same format type according to a private key of a target order receiving end, and determining a plurality of candidate identification information of the nodes;
after determining whether candidate identification information matching the transaction identification information exists in the matched target node, the transaction information query method based on the blockchain further includes:
and if not, continuing to judge whether candidate identification information matched with the transaction identification information exists in the next node associated with the target node.
2. The method of claim 1, wherein the basic transaction information further includes a first institution number of a target card issuer, public key information of the target card issuer, and private key information of the target card issuer, and it is determined that the target card issuer has an access right by:
judging whether the first organization number exists in a preset bank authority mapping table or not according to the first organization number of the target card issuing bank end;
if the target card issuing terminal exists, authority authentication of the target card issuing terminal is carried out according to the public key information of the target card issuing terminal and the private key of the target card issuing terminal;
and after the authentication is successful, determining that the target card issuing end has the access authority.
3. The blockchain-based transaction information query method according to claim 1, wherein the target transaction information is stored by:
receiving a storage request of a target acquirer for standard transaction information generated by a target acquirer for a target transaction, wherein the standard transaction information is obtained by packaging transaction certificate information and user information by the target acquirer;
based on the storage request, performing hash encryption on the standard transaction information, and after encryption, using a private key of the target order receiving end to perform signature to determine target transaction information;
and carrying out contracting processing on the target transaction information, and storing the processed target transaction information.
4. The blockchain-based transaction information query method according to claim 3, wherein before the receiving of the storage request of the target acquirer for the standard transaction information generated by the target transaction, the blockchain-based transaction information query method further includes:
judging whether a second organization number exists in a preset bank authority mapping table or not according to the second organization number of the target order receiving line end;
if the target order receiving line end exists, the authority authentication of the target order receiving line end is carried out according to the private key of the target order receiving line end;
and after the authentication is successful, determining that the target acquirer end has the access right.
5. The method for inquiring transaction information based on blockchain according to claim 3, wherein the contracting the target transaction information and storing the processed target transaction information comprises:
acquiring contract information associated with the target transaction information;
and block packaging is carried out on the contract information and the target transaction information, and the packaged target transaction information is sent to all slave nodes by a public link node so as to store the target transaction information in all the slave nodes.
6. A transaction information inquiry device based on a blockchain is characterized in that the transaction information inquiry device based on the blockchain comprises:
the receiving module is used for receiving a query request of a target card issuing bank end aiming at a target transaction task; the query request comprises basic transaction information, and the basic transaction information comprises target card number information;
the determining module is used for determining transaction identification information according to the basic transaction information after determining that the target card issuing bank has the access authority;
the judging module is used for judging whether target identification information matched with the transaction identification information exists or not; the target identification information is information after signature decryption;
the calling module is used for determining a target storage address of the target identification information if the target storage address exists, calling stored target transaction information matched with the target identification information through the target storage address, and sending the target transaction information to the target card issuing bank end;
determining a target storage address corresponding to the target identification information by the following method:
determining a target storage address corresponding to the target identification information through the content addressing function of the IPFS in the block chain;
the judging whether the target identification information matched with the transaction identification information exists includes:
acquiring a target node matched with the transaction identification information;
decrypting the stored data by using the signature of the target order receiving line end to obtain a plurality of candidate identification information;
judging whether candidate identification information matched with the transaction identification information exists in the matched target nodes or not, and if so, determining the candidate identification information as target identification information;
the target node may be a node close to the transaction identification information or a node of the same format type;
the candidate identification information may specifically be that the transaction information in a node close to the transaction identification information in the blockchain is decrypted according to a private key of the target order receiving end to determine multiple candidate identification information of the node, or
Decrypting the signature information stored in the nodes with the same format type according to a private key of a target order receiving end, and determining a plurality of candidate identification information of the nodes;
after determining whether candidate identification information matching the transaction identification information exists in the matched target node, the transaction information query method based on the blockchain further includes:
and if not, continuing to judge whether candidate identification information matched with the transaction identification information exists in the next node associated with the target node.
7. The blockchain-based transaction information query device according to claim 6, wherein the basic transaction information further includes a first institution number of a target card issuer, public key information of the target card issuer, and private key information of the target card issuer, and it is determined that the target card issuer has an access right by:
judging whether the first organization number exists in a preset bank authority mapping table or not according to the first organization number of the target card issuing bank end;
if the public key information of the target card issuing bank end exists, authority authentication of the target card issuing bank end is carried out according to the public key information of the target card issuing bank end and the private key of the target card issuing bank end;
and after the authentication is successful, determining that the target card issuing end has the access authority.
8. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions being executed by the processor to perform the steps of the blockchain-based transaction information query method according to any one of claims 1 to 5.
9. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program is executed by a processor to perform the steps of the blockchain-based transaction information query method according to any one of claims 1 to 5.
CN202211043848.3A 2022-08-30 2022-08-30 Transaction information query method and device based on block chain and electronic equipment Active CN115115367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211043848.3A CN115115367B (en) 2022-08-30 2022-08-30 Transaction information query method and device based on block chain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211043848.3A CN115115367B (en) 2022-08-30 2022-08-30 Transaction information query method and device based on block chain and electronic equipment

Publications (2)

Publication Number Publication Date
CN115115367A CN115115367A (en) 2022-09-27
CN115115367B true CN115115367B (en) 2023-03-31

Family

ID=83335560

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211043848.3A Active CN115115367B (en) 2022-08-30 2022-08-30 Transaction information query method and device based on block chain and electronic equipment

Country Status (1)

Country Link
CN (1) CN115115367B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580418A (en) * 2019-11-08 2019-12-17 支付宝(杭州)信息技术有限公司 Private data query method and device based on block chain account
CN111475850A (en) * 2019-11-08 2020-07-31 支付宝(杭州)信息技术有限公司 Private data query method and device based on intelligent contract
WO2021049702A1 (en) * 2019-09-11 2021-03-18 이민재 Blockchain-based contest network system and contest method
CN113570465A (en) * 2021-09-18 2021-10-29 杭州远境互联科技有限公司 Block chain signature processing method based on POS (Point of sale) consensus mechanism

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110766550B (en) * 2019-09-05 2021-06-22 创新先进技术有限公司 Asset query method and device based on block chain and electronic equipment
CN110569658B (en) * 2019-09-12 2024-06-14 腾讯科技(深圳)有限公司 User information processing method and device based on blockchain network, electronic equipment and storage medium
CN110727712B (en) * 2019-10-15 2021-06-04 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network, electronic equipment and storage medium
CN111475829A (en) * 2019-11-08 2020-07-31 支付宝(杭州)信息技术有限公司 Private data query method and device based on block chain account
CN113535732B (en) * 2021-07-23 2023-07-25 东北大学 Verifiable query optimization method for reputation-behavior correlation-oriented double-block chain
CN114154176A (en) * 2021-10-28 2022-03-08 海南火链科技有限公司 Information query method based on block chain
CN113722385B (en) * 2021-11-03 2022-02-08 腾讯科技(深圳)有限公司 Data query method, device, equipment and storage medium based on block chain network
CN114612241A (en) * 2022-03-14 2022-06-10 中国银行股份有限公司 Bank business operation time sharing and transaction time judging method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021049702A1 (en) * 2019-09-11 2021-03-18 이민재 Blockchain-based contest network system and contest method
CN110580418A (en) * 2019-11-08 2019-12-17 支付宝(杭州)信息技术有限公司 Private data query method and device based on block chain account
CN111475850A (en) * 2019-11-08 2020-07-31 支付宝(杭州)信息技术有限公司 Private data query method and device based on intelligent contract
CN113570465A (en) * 2021-09-18 2021-10-29 杭州远境互联科技有限公司 Block chain signature processing method based on POS (Point of sale) consensus mechanism

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"区块链技术应用于供应链金融的影响研究 ——"福金All-Link"***应用案例";张岗;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20210215;第I138-708页 *
"基于联盟区块链的公益善款溯源***研究";高玮军 等;《大数据》;20220804;第22页 *
基于区块链的去中心化物品共享交易服务***;范吉立等;《计算机应用》;20190131(第05期);第90-95页 *
基于区块链的数据管理方案;周艺华等;《信息安全研究》;20200105(第01期);第39-47页 *

Also Published As

Publication number Publication date
CN115115367A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US20220321359A1 (en) Methods and systems for ownership verification using blockchain
CN110493261B (en) Verification code obtaining method based on block chain, client, server and storage medium
EP3474209A1 (en) Storing blockchain private keys in a sim card
CN107612697B (en) Digital certificate application method and device
US8924714B2 (en) Authentication with an untrusted root
CN110543510B (en) Bill data processing method, device, storage medium and computer equipment
US20160048460A1 (en) Remote load and update card emulation support
CN104796257A (en) Flexible data authentication
CN111342963A (en) Data uplink method, data storage method and device
US11924270B2 (en) Method and system for transferring data
CN113572715A (en) Data transmission method and system based on block chain
CN110209691B (en) Data processing method and device
CN112862481B (en) Block chain digital asset key management method and system based on SIM card
CN111488372A (en) Data processing method, device and storage medium
US20210306135A1 (en) Electronic device within blockchain based pki domain, electronic device within certification authority based pki domain, and cryptographic communication system including these electronic devices
CN116074089A (en) Cloud token provisioning for multiple tokens
US9246677B2 (en) Method and system for secure data communication between a user device and a server
CN111311341A (en) Bill processing method, apparatus and medium
WO2024011863A1 (en) Communication method and apparatus, sim card, electronic device, and terminal device
CN115115367B (en) Transaction information query method and device based on block chain and electronic equipment
CN116015846A (en) Identity authentication method, identity authentication device, computer equipment and storage medium
CN112528305B (en) Access control method, device, electronic equipment and storage medium
CN115482132A (en) Data processing method and device for electronic contract based on block chain and server
WO2017118763A1 (en) System, method and apparatus for data transmission
CN112926972A (en) Information processing method based on block chain, block chain system and terminal

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