CN111242607B - Block chain-based point-to-point communication API service interface and application method thereof - Google Patents

Block chain-based point-to-point communication API service interface and application method thereof Download PDF

Info

Publication number
CN111242607B
CN111242607B CN202010008277.4A CN202010008277A CN111242607B CN 111242607 B CN111242607 B CN 111242607B CN 202010008277 A CN202010008277 A CN 202010008277A CN 111242607 B CN111242607 B CN 111242607B
Authority
CN
China
Prior art keywords
payee
server
payer
payment
dimensional code
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
CN202010008277.4A
Other languages
Chinese (zh)
Other versions
CN111242607A (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.)
Zhongshan Current Technology Co ltd
Original Assignee
Zhongshan Current Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongshan Current Technology Co ltd filed Critical Zhongshan Current Technology Co ltd
Priority to CN202010008277.4A priority Critical patent/CN111242607B/en
Publication of CN111242607A publication Critical patent/CN111242607A/en
Application granted granted Critical
Publication of CN111242607B publication Critical patent/CN111242607B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3274Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device
    • 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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3276Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being read by the M-device
    • 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
    • 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
    • H04L67/104Peer-to-peer [P2P] networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a block chain-based point-to-point communication API service interface and a using method thereof, wherein the interface is connected with a third party through an API interactive encryption protocol, and the using method comprises the following steps: (1) the payee scans the two-dimensional code of the payer; (2) The payee generates serialized character string information according to the received two-dimensional code information; (3) The payee returns the serialized string information to the payer server, and meanwhile, order information is generated on the payee server; (4) The payee server sends the order information to the payer to verify the signature, and then returns the signature completion information to the payee server; (5) The payee server receives the transaction, broadcasts the transaction, feeds back the result to the payer server, feeds back the result to the payer by the payer server, and simultaneously notifies the payee. The invention ensures the information security of the payee without putting the payee address or account number of the payee in a public state.

Description

Block chain-based point-to-point communication API service interface and application method thereof
Technical Field
The invention relates to the technical field of point-to-point terminal receiving and paying of a block chain electronic wallet, in particular to a block chain-based point-to-point communication API service interface and a using method thereof.
Background
In the electronic wallet decentralizing payment receiving and paying system in the prior art, a payer can successfully complete payment by acquiring a receiving address or account number of the payee through means such as code scanning and the like in a point-to-point transaction process, and the payment mode can enable the receiving address or account number of the payee to be in a public state, so that the receiving address or account number information of the payee is easily in an unsafe state and is subjected to invasion risks.
With the rise of the encrypted digital currency, the encrypted digital currency cannot be increased and tampered due to the use of cryptography, the whole circulation process can be monitored, and the method has the characteristic of higher transaction security, so that the method receives high attention from technicians in the field of network electronic payment blockchains, and how to ensure the security of the network electronic payment is always the research subject of blockchain technicians.
Disclosure of Invention
Aiming at the defects of the prior art, the technical problem solved by the invention is how to avoid the disclosure of the collection address or account number of the collection party and ensure the information security of the collection party.
In order to solve the technical problems, the technical scheme adopted by the invention is a block chain-based point-to-point communication API service interface, which comprises an acquisition functional module and a broadcasting functional module, wherein the acquisition functional module and the broadcasting functional module are in information connection through a communication protocol, and the technical scheme comprises the following steps: the acquisition function module has the function of PaymentRequest/API/showpos/getPaymentRequest, and the broadcasting function module has the function of broadcasting Tx/API/showpos/broadcastTx, and is in information connection with a third party through an API interactive encryption protocol, and the specific steps are as follows:
(1) The request parameter [ data ] is converted into a JSON character string and is subjected to Base64 encoding;
(2) Splicing the encrypted character string, the format data character string and the request time +6 to 8-bit random numbers;
(3) Acquiring a signature value, defaulting to an SHA256 algorithm mode, and transferring a final signature value to a lower case letter;
(4) And sending the final request parameters, and converting the final request parameters into a JSON character string format.
In order to solve the technical problems, another technical scheme adopted by the invention is a using method of the block chain-based point-to-point communication API service interface, which comprises the following specific steps:
(1) The payment party generates a payment two-dimensional code of the payment party, and the payee scans the two-dimensional code of the payment party to obtain a two-dimensional code value which is walletservubkey_timestamp;
the two-dimensional code value refers to a string combination of payer server API and payer public key plus time.
(2) According to the received two-dimensional code information, the payee generates a JSON serialization string of PosOutput;
(3) The payee returns the created PaymentRequest to the payer server, and corresponding order information is generated on the payee server;
(4) The payee server sends the order information to the payer to verify the complete signed transaction, if the transaction is large, the user needs to confirm the transaction manually to ensure the safety, and then the PaymentRequest assembled by tx completed by the signature is carried out
Returning to the payee server;
(5) The payee server broadcasts after receiving the transaction, and feeds back the result to the payer server through PaymentACK, and then the payer server feeds back the result to the payer, and the payee server simultaneously informs the waiting payee to prompt the payment result.
Compared with the prior art, the technical scheme of the invention does not need to enable the collection address or account number of the collection party to be in a public state, and ensures the information security of the collection party.
Drawings
FIG. 1 is a schematic diagram of an API service interface architecture of the present invention;
FIG. 2 is a flow chart of a method of use of the present invention;
FIG. 3 is a diagram showing the process of the acquisition function module acquiring PaymentRequest;
fig. 4 is a broadcast Tx procedure diagram of a broadcast function module.
Detailed Description
The following description of the embodiments of the invention is given by way of illustration and not limitation.
Fig. 1 shows a blockchain-based point-to-point communication API service interface 10, which includes an acquisition function module 101 and a broadcast function module 102, wherein the acquisition function module 101 and the broadcast function module 102 are connected by communication protocol;
the acquisition function module 101 has the function of acquiring PaymentRequest/api/showpos/getPaymentRequest,
examples: the PaymentRequest is obtained as shown in FIG. 3;
the broadcast function module 102 has the functions of broadcasting Tx/api/showpos/broadcastTx, for example: broadcast Tx as shown in fig. 4;
the invention is connected with a third party through an API interactive encryption protocol, and the specific steps are as follows:
(1) The request parameter [ data ] is converted into a JSON character string and is subjected to Base64 encoding; examples are datastr= toJson (object) - > base64 str=toBase64 Encode (jsonstr);
(2) Splicing the encrypted character string, the format data character string and the request time +6 to 8-bit random numbers; for example, sigstr=sig_str.application (dataStr) & application (time) & application (nonce);
(3) Acquiring a signature value, defaulting to an SHA256 algorithm mode, and transferring a final signature value to a lower case letter; examples:
sign=SHA256(sigStr)
on-line matching http:// tool. Oschina. Net/encrypttype=2
Reference value SHA256 ("123456") =8d969 eef ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92;
(4) And sending the final request parameters, and converting the final request parameters into a JSON character string format.
Show request example:
{"nonce":"1186471493442207744","time":1571711822268,"data":"eyJ3YWxsZX Rfa2V5Ijoid2FsbGV0XzEyIn0=","sign":"76337e0a0ceaa288455b4ad48453b2b20c10017ccc634bbb5dac73cdc2e1de23"}
response data example:
test/formal request embodiment:
test address: http://127.0.0.1
Request example:
response example:
fig. 2 shows a method for using a blockchain-based point-to-point communication API service interface, including the following specific steps:
(1) The payment party generates a payment two-dimensional code of the payment party, and the payee scans the two-dimensional code of the payment party to obtain a two-dimensional code value which is walletservubkey_timestamp;
the two-dimensional code value refers to a string combination of payer server API and payer public key plus time.
(2) According to the received two-dimensional code information, the payee generates a JSON serialization string of PosOutput;
(3) The payee returns the created PaymentRequest to the payer server, and corresponding order information is generated on the payee server;
(4) The payee server sends the order information to the payer to verify the complete signed transaction, if the transaction is large, the user needs to confirm the transaction manually to ensure the safety, and then the PaymentRequest assembled by tx completed by the signature is carried out
Returning to the payee server;
(5) The payee server broadcasts after receiving the transaction, and feeds back the result to the payer server through PaymentACK, and then the payer server feeds back the result to the payer, and the payee server simultaneously informs the waiting payee to prompt the payment result.
Compared with the prior art, the technical scheme of the invention does not need to enable the collection address or account number of the collection party to be in a public state, and ensures the information security of the collection party.
The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It will be apparent to those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.

Claims (1)

1. A method for using a block chain-based point-to-point communication API service interface is characterized by comprising the following steps: the system comprises an acquisition functional module and a broadcasting functional module, wherein the acquisition functional module and the broadcasting functional module are in information connection through a communication protocol, and the system comprises the following components: the acquisition function module has the function of PaymentRequest/API/showpos/getPaymentRequest, the broadcasting function module has the function of broadcasting Tx/API/showpos/broadcastTx, and is connected with a third party through an API interactive encryption protocol, the specific steps of information connection comprise,
(1) The request parameter [ data ] is converted into a JSON character string and is subjected to Base64 encoding;
(2) Splicing the encrypted character string, the format data character string and the request time +6 to 8-bit random numbers;
(3) Acquiring a signature value, defaulting to an SHA256 algorithm mode, and transferring a final signature value to a lower case letter;
(4) Transmitting the final request parameters and converting the final request parameters into a JSON character string format;
the method for using the block chain-based point-to-point communication API service interface comprises the following specific steps of,
(1) The payment method comprises the steps that a payment party generates a payment two-dimensional code of the payment party, a payment party scans the two-dimensional code of the payment party, a two-dimensional code value refers to a string combination of an API (application program interface) of a server of the payment party and a public key of the payment party, and the two-dimensional code value is walletserver walletpubkey _timestamp;
(2) According to the received two-dimensional code information, the payee generates a JSON serialization string of PosOutput;
(3) The payee returns the created PaymentRequest to the payer server, and corresponding order information is generated on the payee server;
(4) The payee server sends the order information to the payer to verify the transaction with complete signature, if the transaction is large, the user needs to manually confirm to ensure the safety, and then the PaymentRequest assembled by tx with completed signature is returned to the payee server;
(5) The payee server broadcasts after receiving the transaction, and feeds back the result to the payer server through PaymentACK, and then the payer server feeds back the result to the payer, and the payee server simultaneously informs the waiting payee to prompt the payment result.
CN202010008277.4A 2020-01-06 2020-01-06 Block chain-based point-to-point communication API service interface and application method thereof Active CN111242607B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010008277.4A CN111242607B (en) 2020-01-06 2020-01-06 Block chain-based point-to-point communication API service interface and application method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010008277.4A CN111242607B (en) 2020-01-06 2020-01-06 Block chain-based point-to-point communication API service interface and application method thereof

Publications (2)

Publication Number Publication Date
CN111242607A CN111242607A (en) 2020-06-05
CN111242607B true CN111242607B (en) 2023-09-29

Family

ID=70874238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010008277.4A Active CN111242607B (en) 2020-01-06 2020-01-06 Block chain-based point-to-point communication API service interface and application method thereof

Country Status (1)

Country Link
CN (1) CN111242607B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180113144A (en) * 2017-04-05 2018-10-15 삼성에스디에스 주식회사 Method for processing a payment based on blockchain and Apparatus thereof
CN108876353A (en) * 2018-05-24 2018-11-23 深圳前海益链网络科技有限公司 A kind of method of payment of the block chain number Token based on near-field communication
CN109345214A (en) * 2018-10-12 2019-02-15 深圳市区块跳动网络技术有限公司 A kind of method of payment, system and the associated component of digital cash Wallet System

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180113144A (en) * 2017-04-05 2018-10-15 삼성에스디에스 주식회사 Method for processing a payment based on blockchain and Apparatus thereof
CN108876353A (en) * 2018-05-24 2018-11-23 深圳前海益链网络科技有限公司 A kind of method of payment of the block chain number Token based on near-field communication
CN109345214A (en) * 2018-10-12 2019-02-15 深圳市区块跳动网络技术有限公司 A kind of method of payment, system and the associated component of digital cash Wallet System

Also Published As

Publication number Publication date
CN111242607A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN110601853B (en) Block chain private key generation method and equipment
CN107798531B (en) Electronic payment method and system
CN101038653B (en) Verification system
US20160255072A1 (en) Instruction information transmission and reception methods and devices thereof
CN110930147B (en) Offline payment method and device, electronic equipment and computer-readable storage medium
CN104361493A (en) Electronic payment method on basis of biological characteristics
CN110472426B (en) Method for scanning, encrypting and decrypting bid document instead of real object U shield
CN102387020A (en) Dynamic password generating device as well as dynamic password implementing method and system
CN105069921A (en) Data identification method, apparatus, and system for self-service delivery cabinet
CN104780044A (en) Dynamic token type smart watch based on mobile phone, Bluetooth and two-dimension code and implementation method
CN102891842A (en) Security authentication method and system
CN111935684A (en) Bluetooth payment system and method
CN104253689A (en) User identity module card generated dynamic password authentication method and system based on QR (quick response) code
CN109767208A (en) A kind of method of payment and payment mechanism
CN107491961B (en) NFC (near field communication) verification network payment method and device
CN110659899B (en) Offline payment method, device and equipment
TWI619042B (en) System and method for online transaction security, SIM card, mobile phone and online transaction system realized by the method
CN103824203A (en) Point payment system of mobile intelligent terminal
CN111091430A (en) Billing two-dimensional code processing method and system
CN111242607B (en) Block chain-based point-to-point communication API service interface and application method thereof
TWI490799B (en) Mobile communication device and two - dimensional bar code for financial certificate trading system and method
CN104850996A (en) External security equipment-based transaction method, system and server
CN104159224A (en) Mobile terminal digital certification system and method
CN109472612B (en) Safety payment method and device, wearable device and storage medium
CN107426149A (en) Software kit generation method and system

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
CB02 Change of applicant information

Address after: 528403 Card 1, 12th Floor, Lihe Commercial Center, No. 16-2 Zhongshan Third Road, East District, Zhongshan City, Guangdong Province

Applicant after: Zhongshan current technology Co.,Ltd.

Address before: No. 2, Xuzi Minsheng Lane, Sanxiang Township, Zhongshan City, Guangdong Province, 528463

Applicant before: Zhongshan current technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant