WO2020243961A1 - Aggregated payment method and system for digital currencies, and edge server - Google Patents

Aggregated payment method and system for digital currencies, and edge server Download PDF

Info

Publication number
WO2020243961A1
WO2020243961A1 PCT/CN2019/090392 CN2019090392W WO2020243961A1 WO 2020243961 A1 WO2020243961 A1 WO 2020243961A1 CN 2019090392 W CN2019090392 W CN 2019090392W WO 2020243961 A1 WO2020243961 A1 WO 2020243961A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
currency
digital
digital currency
network
Prior art date
Application number
PCT/CN2019/090392
Other languages
French (fr)
Chinese (zh)
Inventor
柳彤
Original Assignee
海付移通科技香港有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 海付移通科技香港有限公司 filed Critical 海付移通科技香港有限公司
Priority to CN201980010722.6A priority Critical patent/CN111937020A/en
Priority to PCT/CN2019/090392 priority patent/WO2020243961A1/en
Publication of WO2020243961A1 publication Critical patent/WO2020243961A1/en

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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • 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
    • 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/405Establishing or using transaction specific rules

Definitions

  • FIG. 5 is a schematic structural diagram of an electronic device equipped with a digital wallet provided by an embodiment of the present application
  • a random number (Nonce) is added to the blocks of some virtual cryptocurrency systems, and the random number needs to satisfy the condition that the hash value of a given block appears with a prescribed number of zeros. Due to the irreversible nature of the hash operation, it is only possible to traverse the random number that meets the conditions through repeated attempts.
  • Step (6) the digital currency wallet service queries whether transaction x is packaged according to the block information. If it has been packaged, the fund management system will completely wipe the frozen 10ETH of user B to 0, and update the withdrawal status to complete. Provide block transaction ID for users and operating back-end systems to query. Among them, the digital currency wallet service can provide a unified API for other modules of the trading platform, and at the same time structure different data into the database service, and finally complete transaction query and verification through traditional high-availability means.
  • the digital wallet includes at least two digital currencies, for example: digital currency 1, digital currency 2, ..., digital currency N, the digital currency 1 can be Bitcoin, and the digital currency 2 can be Ether Square, and so on, the digital wallet can be used for payment or collection of any kind of digital currency, for example: payment through Bitcoin, or collection of Bitcoin. It is understandable that the digital wallet can also be used to display the balance corresponding to each digital currency.
  • the conversion request message unpacking and grouping module 4511 is used to obtain the currency conversion request sent by the terminal.
  • the currency conversion request encapsulates the currency identifier of the digital currency to be converted, and according to the currency conversion request, assembles corresponding to the currency identifier Conversion message;
  • the lightning network access layer receives the transaction confirmation result sent by the digital currency lightning network, and the transaction confirmation result includes: transaction success or transaction failure, and the lightning network access layer according to the transaction confirmation result, Send a payment result to the digital wallet. If the transaction confirmation result is a transaction failure, the Lightning Network access layer sends a payment failure message to the digital wallet. If the transaction confirmation result is a successful transaction, the The lightning network access layer sends a transaction success message to the digital wallet.
  • the POS device scans the two-dimensional code generated by the digital wallet to obtain transaction information, such as the digital currency identifier of the transaction, the amount of digital currency for the transaction, and so on.
  • transaction information such as the digital currency identifier of the transaction, the amount of digital currency for the transaction, and so on.
  • the POS device scans the two-dimensional code generated by the digital wallet to obtain transaction information, such as the digital currency identifier of the transaction, the amount of digital currency for the transaction, and so on.
  • transaction information such as the digital currency identifier of the transaction, the amount of digital currency for the transaction, and so on.
  • the lightning network access layer which is used to interface with the digital currency lightning network.
  • the digital currency lightning network receives the transaction request sent by the lightning network access layer, analyzes the transaction request, verifies the transaction according to the transaction request, thereby confirms the transaction request, and sends the transaction request to the
  • the Lightning Network access layer sends the transaction confirmation result
  • the transaction confirmation result includes: the transaction is successful or the transaction fails
  • the verification of the transaction includes: verifying the identities of the sender and receiver of the transaction, the legality of the transaction, etc. Wait.
  • the The flag bit corresponding to the illegal transaction is reset to zero, so that the lightning network access layer assembles a payment result message corresponding to the transaction confirmation result message according to the flag bit of the transaction failure position, And send the payment result message to the digital wallet and the POS device, so that the digital wallet or the POS device obtains the flag of the position where the transaction fails, so that the sender and receiver of the transaction can confirm that the transaction failed position.
  • Step S128 The digital currency transaction network receives the transaction request sent by the digital currency lightning network, and returns a transaction confirmation to the digital currency lightning network;
  • the terminal includes an electronic device or a POS device configured with a digital wallet
  • the payment request is generated by the digital wallet triggering the electronic device to scan the identification code of the POS device
  • the digital wallet corresponds to an application
  • the application program scans the identification code generated by the POS device by triggering the camera of the electronic device to generate a payment request, or the POS device scans the identification code of the digital wallet for the payment request
  • the identification code includes a QR code, a barcode, a payment password, etc.
  • the digital wallet triggers the electronic device to scan the identification code of the POS device to generate a payment request in the main scan mode
  • the POS device scans The identification code of the digital wallet generates a payment request in a scanned mode.
  • Step S133 Send the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation result according to the transaction message;
  • the conversion message is sent to the currency conversion node corresponding to the currency identifier, so that the currency conversion node converts the digital currency to be converted into a target currency according to the conversion message, and converts the target
  • the currency is settled to an account corresponding to the terminal, wherein there are at least two types of the currency conversion nodes, and each type of the digital currency identifier corresponds to a type of the currency conversion node.
  • the currency conversion request encapsulates the currency identification and quantity of the digital currency to be converted, and the information of the payer and the payee, the digital wallet or POS device sends the currency conversion request to the lightning network access layer, and the lightning network
  • the access layer assembles the conversion message corresponding to the currency identifier according to the currency conversion request, and sends the conversion message to the currency conversion node corresponding to the currency identifier, so that the currency conversion node is
  • the conversion message converts the digital currency to be converted into a target currency, and settles the target currency to an account corresponding to the terminal.
  • the transaction message unit 142 is configured to assemble a transaction message corresponding to the digital currency identifier according to the payment request;
  • the transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network returns a transaction confirmation result according to the transaction message.
  • the memory 152 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as a digital currency aggregate payment in the embodiment of this application
  • the unit corresponding to the method (for example, each unit described in Figure 14).
  • the processor 151 executes various functional applications and data processing of the digital currency aggregate payment method by running the non-volatile software programs, instructions, and modules stored in the memory 152, that is, realizes the digital currency aggregate payment in the above method embodiments
  • Portable entertainment equipment This type of equipment can display and play video content, and generally also has mobile Internet features. Such devices include: video players, handheld game consoles, as well as smart toys and portable car navigation devices.

Abstract

An aggregated payment method and system for digital currencies, and an edge server, relating to the technical field of electronic transactions. The aggregated payment method for digital currencies comprises: acquiring a payment request sent by a terminal, the payment request being encapsulated with a digital currency identifier (S131); according to the payment request, assembling a transaction message corresponding to the digital currency identifier (S132); sending the transaction message to a transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation result according to the transaction message (S133); and according to the transaction confirmation result, sending a payment result to the terminal (S134). By means of the method, aggregated payment of a plurality of digital currencies is realized, thereby improving the usage experience of a user.

Description

一种数字货币的聚合支付方法、系统及边缘服务器Method, system and edge server for aggregate payment of digital currency 技术领域Technical field
本申请涉及电子交易技术领域,特别是涉及一种数字货币的聚合支付方法、系统及边缘服务器。This application relates to the technical field of electronic transactions, in particular to a digital currency aggregate payment method, system and edge server.
背景技术Background technique
数字货币(Digital Currency,DIGICCY),是电子货币形式的替代货币,数字金币和密码货币均属于数字货币,密码货币指不依托任何实物,使用密码算法的数字货币,密码技术是当今数字货币的支撑,数字货币从发行到流通均需要基于密码学原理来构建,并采用密码协议来实现应用过程中的各类安全需求,数字货币包括比特币、以太坊、瑞波币、比特币现金等。Digital Currency (DIGICCY) is an alternative currency in the form of electronic money. Both digital gold coins and cryptocurrencies belong to digital currencies. Cryptocurrencies refer to digital currencies that do not rely on any physical objects and use cryptographic algorithms. Cryptographic technology is the support of today's digital currencies. , Digital currencies need to be constructed based on cryptographic principles from issuance to circulation, and cryptographic protocols are used to achieve various security requirements in the application process. Digital currencies include Bitcoin, Ethereum, Ripple, and Bitcoin Cash.
目前,存在多种不同种类的数字货币,造成用户管理和使用的不便,并且,大多数数字货币的支付确认时间太长,影响用户的支付体验,因此如何同时对多种数字货币进行使用,并缩短数字货币的支付时间,成为亟待解决的技术问题。At present, there are many different types of digital currencies, which cause inconvenience to user management and use. Moreover, the payment confirmation time of most digital currencies is too long, which affects the user's payment experience. Therefore, how to use multiple digital currencies at the same time? Shortening the payment time of digital currency has become an urgent technical problem to be solved.
发明内容Summary of the invention
本申请实施例旨在提供一种数字货币的聚合支付方法、系统及边缘服务器,其解决了目前只能针对一种数字货币进行交易的技术问题,实现多种数字货币的聚合支付,提高用户的使用体验。The embodiments of this application aim to provide a digital currency aggregate payment method, system and edge server, which solves the current technical problem of only one digital currency transaction, realizes aggregate payment of multiple digital currencies, and improves users’ Use experience.
为解决上述技术问题,本申请实施例提供以下技术方案:To solve the above technical problems, the embodiments of the present application provide the following technical solutions:
第一方面,本申请实施例提供一种数字货币的聚合支付方法,包括:In the first aspect, an embodiment of the present application provides an aggregate payment method for digital currency, including:
获取终端发送的支付请求,所述支付请求封装有数字货币标识;Acquiring a payment request sent by the terminal, where the payment request is encapsulated with a digital currency identifier;
根据所述支付请求,组装与所述数字货币标识对应的交易报文;Assemble a transaction message corresponding to the digital currency identifier according to the payment request;
将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果;Sending the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation result according to the transaction message;
根据所述交易确认结果,向所述终端发送支付结果。According to the transaction confirmation result, the payment result is sent to the terminal.
第二方面,本申请实施例提供一种数字货币的聚合支付装置,包括:In the second aspect, an embodiment of the present application provides a digital currency aggregate payment device, including:
支付请求单元,用于获取终端发送的支付请求,所述支付请求封装有数字货币标识;The payment request unit is used to obtain a payment request sent by the terminal, and the payment request is encapsulated with a digital currency identifier;
交易报文单元,用于根据所述支付请求,组装与所述数字货币标识对应的交易报文;A transaction message unit, configured to assemble a transaction message corresponding to the digital currency identifier according to the payment request;
交易确认结果单元,用于将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果;A transaction confirmation result unit, configured to send the transaction message to a transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation result according to the transaction message;
支付结果单元,用于根据所述交易确认结果,向所述终端发送支付结果。The payment result unit is configured to send the payment result to the terminal according to the transaction confirmation result.
第三方面,本申请实施例提供一种边缘服务器,包括:In a third aspect, an embodiment of the present application provides an edge server, including:
至少一个处理器;以及,At least one processor; and,
与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的数字货币的聚合支付方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the aforementioned digital currency aggregate payment method.
第四方面,本申请实施例提供一种数字货币的聚合支付系统,包括:In a fourth aspect, an embodiment of the present application provides a digital currency aggregate payment system, including:
闪电网络接入层,用于获取终端发送的支付请求,所述支付请求封装有数字货币标识,根据所述支付请求,组装与所述数字货币标识对应的交易报文,并且,确定与所述数字货币标识对应的交易网络;The Lightning Network access layer is used to obtain the payment request sent by the terminal. The payment request is encapsulated with a digital currency identifier. According to the payment request, a transaction message corresponding to the digital currency identifier is assembled, and the The transaction network corresponding to the digital currency logo;
交易网络,用于根据所述交易报文,向所述闪电网络接入层返回交易确认结果,以使所述闪电网络接入层根据所述交易确认结果,向所述终端发送支付结果。The transaction network is configured to return a transaction confirmation result to the lightning network access layer according to the transaction message, so that the lightning network access layer sends the payment result to the terminal according to the transaction confirmation result.
本申请实施例的有益效果是:区别于现有技术的情况下,本申请实施例提供的一种数字 货币的聚合支付方法,包括:获取终端发送的支付请求,所述支付请求封装有数字货币标识;根据所述支付请求,组装与所述数字货币标识对应的交易报文;将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果;根据所述交易确认结果,向所述终端发送支付结果。通过上述方式,本申请实施例解决了目前只能针对一种数字货币进行交易的技术问题,实现多种数字货币的聚合支付,提高用户的使用体验。The beneficial effect of the embodiments of the present application is that, different from the prior art, the method for aggregate payment of digital currency provided by the embodiments of the present application includes: obtaining a payment request sent by a terminal, the payment request encapsulating the digital currency Identification; according to the payment request, assemble the transaction message corresponding to the digital currency identifier; send the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network can follow the transaction The message returns the transaction confirmation result; according to the transaction confirmation result, the payment result is sent to the terminal. In the above manner, the embodiment of the present application solves the current technical problem that transactions can only be performed on one digital currency, realizes the aggregate payment of multiple digital currencies, and improves the user experience.
附图说明Description of the drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplified by the pictures in the corresponding drawings. These exemplified descriptions do not constitute a limitation on the embodiments. Elements with the same reference numbers in the drawings are represented as similar elements. Unless otherwise stated, the figures in the attached drawings do not constitute a limitation of scale.
图1是本申请实施例提供的一种应用环境的示意图;FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
图2是本申请实施例提供的一种区块链系统的示意图;Figure 2 is a schematic diagram of a blockchain system provided by an embodiment of the present application;
图3是本申请实施例提供的第一种数字货币的聚合支付系统的结构示意图;FIG. 3 is a schematic structural diagram of the first digital currency aggregate payment system provided by an embodiment of the present application;
图4是本申请实施例提供的第二种数字货币的聚合支付系统的结构示意图;Figure 4 is a schematic structural diagram of a second digital currency aggregate payment system provided by an embodiment of the present application;
图5是本申请实施例提供的一种配置有数字钱包的电子设备的结构示意图;FIG. 5 is a schematic structural diagram of an electronic device equipped with a digital wallet provided by an embodiment of the present application;
图6是本申请实施例提供的一种数字钱包的示意图;Figure 6 is a schematic diagram of a digital wallet provided by an embodiment of the present application;
图7是本申请实施例提供的一种POS设备的结构示意图;FIG. 7 is a schematic structural diagram of a POS device provided by an embodiment of the present application;
图8是本申请实施例提供的一种闪电网络接入层的示意图;FIG. 8 is a schematic diagram of a lightning network access layer provided by an embodiment of the present application;
图9是本申请实施例提供的一种货币转换层的结构示意图;FIG. 9 is a schematic structural diagram of a currency conversion layer provided by an embodiment of the present application;
图10是本申请实施例提供的第一种数字货币的聚合支付的工作流程图;FIG. 10 is a working flowchart of the first aggregate payment of digital currency provided by an embodiment of the present application;
图11是本申请实施例提供的第二种数字货币的聚合支付的工作流程图;FIG. 11 is a work flow chart of a second type of digital currency aggregate payment provided by an embodiment of the present application;
图12是本申请实施例提供的第三种数字货币的聚合支付的工作流程图;FIG. 12 is a working flowchart of a third type of digital currency aggregate payment provided by an embodiment of the present application;
图13是本申请实施例提供的一种数字货币的聚合支付方法的流程示意图;FIG. 13 is a schematic flowchart of a digital currency aggregate payment method provided by an embodiment of the present application;
图14是本申请实施例提供的一种数字货币的聚合支付装置的结构示意图;14 is a schematic structural diagram of a digital currency aggregate payment device provided by an embodiment of the present application;
图15是本申请实施例提供的一种边缘服务器的结构示意图。FIG. 15 is a schematic structural diagram of an edge server provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
此外,下面所描述的本申请各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In addition, the technical features involved in the various embodiments of the application described below can be combined with each other as long as they do not conflict with each other.
数字货币,包括比特币、以太坊、瑞波币、比特币现金等,是数字资产的清算底层,数字资产的经济活动依赖数字货币。Digital currencies, including Bitcoin, Ethereum, Ripple, Bitcoin Cash, etc., are the bottom layer of the settlement of digital assets, and the economic activities of digital assets rely on digital currencies.
数字货币交易平台,也称为数字资产交易平台,主要为人们提供交易数字货币或数字资产撮合交易服务,通过数字货币交易平台提供买、买交易数字资产的过程,即从一种数字货币交换到另一种数字货币的过程,而数字货币之间的交易也催生了法定货币对数字货币的交易,这也是中心化交易平台的由来,目前流行的法定货币与数字货币的交易有美元、欧元、日元、澳元等。The digital currency trading platform, also known as the digital asset trading platform, mainly provides people with trading digital currency or digital asset matching transaction services. The digital currency trading platform provides the process of buying and trading digital assets, that is, from a digital currency exchange to Another kind of digital currency process, and the transaction between digital currency also gave birth to the transaction of legal currency to digital currency. This is also the origin of the centralized trading platform. The current popular legal currency and digital currency transactions include US dollars, euros, Japanese yen, Australian dollar, etc.
传统交易所依赖券商,属于金字塔型结构,用户聚集在券商处,资金托管在银行,证券登记结算在第三方机构,本质上交易场所只提供了撮合、监管辅助、信息辅助等功能,而由于数字货币的去中心化特性,数字货币交易平台属于扁平型结构,资产管理本身就内置在交易所内部,所以任何一个交易平台都不需要第三方机构登记结算数字货币,从而带来业务架 构上的易部署特性,用户流量和资金流量最终全部汇聚在数字货币交易所,结合技术架构来看,中心化的数字货币交易平台更接近互联网应用的技术架构,它本质上是金融交易系统与互联网网络服务相结合,其具有如下优势:能够支持海量高并发实时撮合交易、用户终端全平台支持,从桌面到移动端不一而足、数字资产的超高流动性、平台可以获取超高的利润、价值发现功能。Traditional exchanges rely on securities firms and belong to a pyramid structure. Users gather at securities firms, funds are custodial in banks, and securities registration and settlement are in third-party institutions. In essence, trading venues only provide functions such as matching, supervision assistance, and information assistance. The decentralized nature of currency, the digital currency trading platform is a flat structure, and the asset management itself is built into the exchange, so any trading platform does not require a third-party institution to register and settle the digital currency, which brings easy business architecture. Deployment characteristics, user flow and capital flow will eventually all converge on digital currency exchanges. Combined with the technical architecture, the centralized digital currency trading platform is closer to the technical architecture of Internet applications. It is essentially a financial transaction system that is similar to Internet network services. In combination, it has the following advantages: it can support massive high-concurrency real-time matching transactions, user terminal full-platform support, from desktop to mobile, ultra-high liquidity of digital assets, platform can obtain ultra-high profits, value discovery Features.
请参阅图1,图1是本申请实施例提供的一种应用环境的示意图;Please refer to FIG. 1, which is a schematic diagram of an application environment provided by an embodiment of the present application;
如图1所示,配置有数字钱包的电子设备和POS设备接入闪电网络接入层,所述闪电网络接入层连接数字货币的闪电网络,所述数字货币的闪电网络包括多个,分别为数字货币1的闪电网络、数字货币2的闪电网络,…,数字货币N的闪电网络,其中,每一种数字货币的闪电网络对应一种数字货币或数字货币标识,其中,每一种数字货币的闪电网络均接入数字货币的交易网络,所述数字货币的交易网络作为数字货币的交易平台,用于提供数字货币的交易服务,可以理解的是,为了消除第三方可信机构的影响,所述数字货币的交易网络为基于区块链技术的区块链系统,而区块链系统具有去中心化特点,其不同于传统中心化服务器,由于区块链系统没有中心化节点,其需要共识机制维持正常运作,例如,共识机制包括POW算法,基于POW算法,区块链系统能够实现区块的共识验证。As shown in FIG. 1, electronic devices and POS devices equipped with digital wallets are connected to the lightning network access layer. The lightning network access layer is connected to the lightning network of digital currency. The lightning network of digital currency includes multiple, respectively The lightning network of digital currency 1, the lightning network of digital currency 2,..., the lightning network of digital currency N, where each lightning network of digital currency corresponds to a digital currency or digital currency logo, where each type of digital The lightning network of currency is connected to the transaction network of digital currency. The transaction network of digital currency is used as a transaction platform of digital currency to provide transaction services of digital currency. Understandably, in order to eliminate the influence of third-party trusted institutions , The transaction network of the digital currency is a blockchain system based on blockchain technology, and the blockchain system has the characteristics of decentralization, which is different from the traditional centralized server, because the blockchain system does not have a centralized node. The consensus mechanism is required to maintain normal operation. For example, the consensus mechanism includes the POW algorithm. Based on the POW algorithm, the blockchain system can realize the consensus verification of the block.
POW算法是一种应对拒绝服务攻击和其他服务滥用的一种策略,一个工作量证明是指满足特定条件的一个数据计算,其产生正确结果比较困难,但是验证正确结果比较简单。正确结果的产生只能通过不断的枚举随机数来进行验证试错,从而最终找到正确答案。其中,该验证试错是采用哈希(hash)算法来实现。哈希算法是一种单向散列算法,计算出哈希值的过程比较简单,但是要根据固定哈希值逆向获取原始数据,则只能通过枚举试错来进行。The POW algorithm is a strategy to deal with denial of service attacks and other service abuses. A proof of work refers to a data calculation that meets specific conditions. It is difficult to produce correct results, but it is relatively simple to verify correct results. The correct result can only be verified by continuous enumeration of random numbers, so as to finally find the correct answer. Among them, the verification trial and error is implemented by using a hash algorithm. The hash algorithm is a one-way hash algorithm. The process of calculating the hash value is relatively simple, but to obtain the original data reversely based on the fixed hash value, it can only be done through trial and error enumeration.
在进行随机散列运算时,POW算法引入了对某一个特定值的扫描工作,比方说,在SHA-256下,随机散列值以一个或多个0开始,随着0的数量逐步增加,遍历出与此情况下的随机散列值对应的解所需要的工作量将呈指数增长,而对结果进行检验则仅需要一次随机散列运算。When performing random hash operations, the POW algorithm introduces scanning for a specific value. For example, under SHA-256, the random hash value starts with one or more zeros, and gradually increases as the number of zeros. The amount of work required to traverse the solution corresponding to the random hash value in this case will increase exponentially, while checking the result requires only one random hash operation.
一些虚拟加密货币系统的区块中增补了一个随机数(Nonce),该随机数需要满足使得给定区块的哈希值出现所需的规定数量个0的条件。由于哈希运算的不可逆特性,只能通过反复尝试以遍历出满足条件的随机数。A random number (Nonce) is added to the blocks of some virtual cryptocurrency systems, and the random number needs to satisfy the condition that the hash value of a given block appears with a prescribed number of zeros. Due to the irreversible nature of the hash operation, it is only possible to traverse the random number that meets the conditions through repeated attempts.
只要区块链节点遍历出满足条件的随机数,该区块链节点就完成了工作量的证明,从而获得了区块的打包记账权。As long as the block chain node traverses the random number that meets the conditions, the block chain node has completed the proof of the workload, thereby obtaining the block's packaging and accounting rights.
在区块链的世界中,世界各地的节点们共同参与了区块链网络的记账。例如比特币通过工作量证明机制,矿工对打包生成的区块求解哈希谜题,并将结果提交至网络,等待其他节点验证并确认区块。节点们通过公钥来表示他们的身份,而通过私钥行使自己转账的权利。In the blockchain world, nodes all over the world participate in the bookkeeping of the blockchain network. For example, Bitcoin uses a proof-of-work mechanism in which miners solve hash puzzles on packaged blocks and submit the results to the network, waiting for other nodes to verify and confirm the block. Nodes use public keys to express their identities, and use private keys to exercise their right to transfer money.
无论在比特币,还是以太坊,以及后来出现的各种各样的公链中,所有的交易数据都是以明文方式公开在区块链上的。虽然仅仅通过公钥无法判断一个人的身份,但是交易数据的公开,使得账户追踪具有了一定可行性,从而也无法保护账户的交易行为隐私。Regardless of Bitcoin, Ethereum, and various public chains that appeared later, all transaction data is publicly disclosed on the blockchain in plaintext. Although the identity of a person cannot be judged only by the public key, the disclosure of transaction data makes account tracking feasible, and thus cannot protect the privacy of account transaction behavior.
在ChainStack区块链的设计中,采用了独创的确定性POW的共识机制,在这个共识机制中,有矿工和验证者两种角色。矿工需要进行哈希计算求解数学难题,验证者们则通过实用拜占庭容错共识算法对矿工的区块进行验证,并最终提交至网络中。其他的节点们接受区块只需要对验证者的签名进行验证便可以接受一个区块,且这样的接受是确定性的,而不是像比特币这样概率性的确认。In the design of the ChainStack blockchain, an original deterministic POW consensus mechanism is adopted. In this consensus mechanism, there are two roles: miner and verifier. Miners need to perform hash calculations to solve mathematical problems, and verifiers use the practical Byzantine fault-tolerant consensus algorithm to verify the miners' blocks and finally submit them to the network. Other nodes accepting the block only need to verify the signature of the verifier to accept a block, and such acceptance is deterministic, rather than probabilistic confirmation like Bitcoin.
请参阅图2,图2是本申请实施例提供的一种区块链系统的架构示意图;如图2所示,该区块链系统20包括:普通节点21、矿工节点22及验证节点23三种区块链节点。其中,所述区块链系统中的全部区块链节点均具有普通节点的功能,即全部的区块链节点均可以成为交易的发送者,也可以成为交易的接收者。Please refer to Figure 2. Figure 2 is a schematic diagram of the architecture of a blockchain system provided by an embodiment of the present application; as shown in Figure 2, the blockchain system 20 includes: a normal node 21, a miner node 22, and a verification node 23 Kind of blockchain node. Wherein, all the blockchain nodes in the blockchain system have the function of ordinary nodes, that is, all the blockchain nodes can become the sender of the transaction, and can also become the receiver of the transaction.
普通节点21、矿工节点22及验证节点23中任意两个节点之间支持点对点通讯(Point to point communication,P2P),并且,普通节点21、矿工节点22及验证节点23皆可以作为 区块链系统中的区块链节点,各自在区块链系统中承担不同的责任,共同维护区块链系统的工作、稳定及安全。 Ordinary node 21, miner node 22, and verification node 23 support point-to-point communication (P2P) between any two nodes, and ordinary node 21, miner node 22, and verification node 23 can all be used as blockchain systems Each of the blockchain nodes in the blockchain system assumes different responsibilities and jointly maintains the work, stability and security of the blockchain system.
普通节点21持有流通的电子货币,在区块链系统中拥有投票选举的权利。普通节点21可以进行相关交易操作,但是没有区块的打包记账权。普通节点21只能从拥有打包记账权的相关节点处同步记录区块数据。所述普通节点21可以是交易的发送者,也可以是交易的接收者。 Ordinary nodes 21 hold circulating electronic money and have the right to vote in the blockchain system. The ordinary node 21 can perform related transaction operations, but does not have the right to package and book the block. Ordinary nodes 21 can only synchronously record block data from related nodes that have the right to package and keep accounts. The ordinary node 21 may be the sender of the transaction or the receiver of the transaction.
矿工节点22负责计算哈希难题,查找出区块。其中,该区块为基于满足预设条件的随机数生成的区块。在一些实施例中,区块由矿工节点22采用工作量证明算法(Proof of Work,POW)生成的,亦即,基于区块的随机数计算出的待验证哈希值是小于目标哈希值的。其中,所述矿工节点22由普通节点21开启挖矿模式转化而来。The miner node 22 is responsible for calculating the hash puzzle and finding the block. Among them, the block is a block generated based on a random number meeting preset conditions. In some embodiments, the block is generated by the miner node 22 using the Proof of Work (POW) algorithm, that is, the hash value to be verified calculated based on the random number of the block is less than the target hash value of. Wherein, the miner node 22 is converted from the normal node 21 starting the mining mode.
验证节点23用于共识验证区块,并将验证通过的区块记录到区块链上。其中,所述验证节点23由普通节点21提交注册申请,并经过投票当选之后产生。The verification node 23 is used for consensus verification blocks and records the verified blocks on the blockchain. Wherein, the verification node 23 is generated after a registration application submitted by a common node 21 and elected after voting.
可以理解的是,上述普通节点21、矿工节点22及验证节点23可以是一个物理服务器或者多个物理服务器虚拟而成的一个逻辑服务器。服务器也可以是多个可互联通信的服务器组成的服务器群,且各个功能模块可分别分布在服务器群中的各个服务器上。It is understandable that the aforementioned ordinary node 21, miner node 22, and verification node 23 may be a physical server or a logical server virtualized by multiple physical servers. The server may also be a server group composed of multiple servers that can communicate with each other, and each functional module may be distributed on each server in the server group.
在本申请实施例中,所述数字货币包括比特币、以太坊、瑞波币、比特币现金等,下面以数字货币为比特币为例,阐述数字货币的交易过程:In the embodiments of this application, the digital currency includes Bitcoin, Ethereum, Ripple, Bitcoin Cash, etc. The following takes the digital currency as Bitcoin as an example to illustrate the transaction process of digital currency:
比特币使用的底层网络协议是TCP/IP协议,比特币的P2P网络基于TCP构建,主网默认通信端口为8333,其中,P2P网络拓扑结构有很多种,例如:中心化拓扑、半中心化拓扑、全分布式拓扑结构,其中,比特币全节点组成的网络是一种全分布式的拓扑结构,节点与节点之间的传输过程更接近“泛洪算法”,即交易从某个节点产生,接着广播到临近节点,临近节点一传十十传百,直至传播到全网。The underlying network protocol used by Bitcoin is TCP/IP. Bitcoin's P2P network is constructed based on TCP. The default communication port of the main network is 8333. Among them, there are many P2P network topologies, such as centralized topology and semi-centralized topology. , Fully distributed topology, in which the network composed of all Bitcoin nodes is a fully distributed topology. The transmission process between nodes is closer to the "flooding algorithm", that is, transactions are generated from a certain node. Then broadcast to the neighboring nodes, and the neighboring nodes will be transmitted ten to ten, until the whole network is spread.
节点发现是任何区块链节点接入区块链P2P网络的第一步,节点发现可分为初始节点发现和启动后节点发现,初始节点发现指的是节点第一次运行,没有节点数据,而启动后节点发现表示正在运行的钱包已经能跟随网络动态维护可用节点。Node discovery is the first step for any blockchain node to access the blockchain P2P network. Node discovery can be divided into initial node discovery and post-startup node discovery. Initial node discovery refers to the first operation of the node without node data. After startup, the node discovery indicates that the running wallet has been able to follow the network to dynamically maintain available nodes.
具体的,比特币(Bitcoin,BTC)与以太坊(Ethereum,ETH)数字货币的交易过程如下:Specifically, the transaction process of Bitcoin (BTC) and Ethereum (ETH) digital currencies is as follows:
用户A拿0.01BTC换取用户B的10个ETH的过程:The process in which user A exchanges 0.01 BTC for 10 ETH of user B:
步骤(1)、用户A挂10ETH买单,出价0.01BTC,经过Web业务系统进入撮合系统订单薄ETH-BTC买单队列,等待撮合成交,同时资金管理系统冻结0.01BTC。Step (1), User A places a 10ETH buy order, bids 0.01BTC, enters the matching system order book ETH-BTC buy order queue through the Web business system, and waits for matching to be completed, and the fund management system freezes 0.01BTC.
步骤(2)、用户B挂10ETH卖单,出价0.01BTC,经过Web业务系统进入撮合系统订单薄ETH-BTC卖单队列,与步骤(1)中A的订单撮合匹配成功,生成Trade,同时资金管理系统结算对应资产,B的资产变化为增加0.01BTC并减少10ETH,A增加10ETH并减少0.01BTC。Step (2), User B places a 10ETH sell order, bids 0.01BTC, enters the order book ETH-BTC sell order queue of the matching system through the Web business system, and successfully matches the order of A in step (1), generates Trade, and the fund management system Settlement of the corresponding assets, B’s asset change is increased by 0.01 BTC and decreased by 10 ETH, and A increased by 10 ETH and decreased by 0.01 BTC.
步骤(3)、成交Trade以及资产变化通过资金管理系统写RDB数据库,形成成交记录,同时更新行情,数据库记录可供用户和运营后台管理系统查询,其中,步骤(3)并非登记到区块链上。Step (3). Transaction Trade and asset changes are written to the RDB database through the fund management system to form transaction records and update market conditions at the same time. The database records can be inquired by users and the operation back-end management system. Step (3) is not registered to the blockchain on.
步骤(4)、用户B经过Web业务系统发起提币请求,请求提取10ETH进入自己的数字货币钱包,这个请求进入资金管理系统,交易所运营人员可通过运营后台观察到这笔请求,运营人员审核用户B的信息,比如实名认证是否正常等。Step (4). User B initiates a coin withdrawal request via the Web business system, requesting to withdraw 10 ETH into his digital currency wallet. This request enters the fund management system. The exchange operator can observe the request through the operation background, and the operator will review it. User B's information, such as whether the real-name authentication is normal.
步骤(5)、提币请求进入运营系统后,如果通过审核,则资金管理系统会冻结用户B的10ETH,同时将提币请求发起给数字货币钱包服务系统,也就是WalletGroup,子系统发起区块链上的交易x(Transaction),等待交易被打包,并根据更新提币审核状态,供用户查看。Step (5). After the withdrawal request enters the operating system, if it passes the review, the fund management system will freeze the 10ETH of user B, and at the same time initiate the withdrawal request to the digital currency wallet service system, namely WalletGroup, and the subsystem initiates the block Transaction x (Transaction) on the chain, waiting for the transaction to be packaged, and according to the updated currency review status, for users to view.
步骤(6)、数字货币钱包服务根据区块信息查询交易x是否被打包,如果已经打包,则资金管理系统将完全把用户B被冻结的10ETH直接抹成0,更新提币状态最终为完成,提供区块交易ID以供用户和运营后台系统进行查询。其中,数字货币钱包服务可以为交易平台其他模块提供接口统一的API,同时将不同的数据结构化到数据库服务中,最后可以通过传统 高可用手段完成交易查询和验证。Step (6), the digital currency wallet service queries whether transaction x is packaged according to the block information. If it has been packaged, the fund management system will completely wipe the frozen 10ETH of user B to 0, and update the withdrawal status to complete. Provide block transaction ID for users and operating back-end systems to query. Among them, the digital currency wallet service can provide a unified API for other modules of the trading platform, and at the same time structure different data into the database service, and finally complete transaction query and verification through traditional high-availability means.
请参阅图3,图3是本申请实施例提供的第一种数字货币的聚合支付系统的结构示意图;Please refer to FIG. 3, which is a schematic structural diagram of the first digital currency aggregate payment system provided by an embodiment of the present application;
如图3所示,该数字货币的聚合支付系统,包括:终端31、边缘服务器32以及交易网络33,其中,所述终端31包括配置有数字钱包的电子设备311以及POS设备312,所述配置有数字钱包的电子设备311用于向所述边缘服务器32发送支付请求,并接收所述边缘服务器32发送的支付结果,具体的,所述支付请求由所述数字钱包触发所述电子设备扫描所述POS设备的标识码而产生,所述所述POS设备的标识码包括二维码、条形码、支付口令等,或者,所述POS设备312用于向所述边缘服务器32发送支付请求,并接收所述边缘服务器32发送的支付结果,具体的,所述支付请求由所述POS设备扫描所述数字钱包的标识码而产生,所述数字钱包的标识码包括二维码、条形码、支付口令等。As shown in Figure 3, the digital currency aggregate payment system includes: a terminal 31, an edge server 32, and a transaction network 33. The terminal 31 includes an electronic device 311 equipped with a digital wallet and a POS device 312. The configuration The electronic device 311 with a digital wallet is used to send a payment request to the edge server 32 and receive the payment result sent by the edge server 32. Specifically, the digital wallet triggers the electronic device to scan the payment request by the digital wallet. The identification code of the POS device is generated, and the identification code of the POS device includes a QR code, a barcode, a payment password, etc., or the POS device 312 is used to send a payment request to the edge server 32 and receive The payment result sent by the edge server 32, specifically, the payment request is generated by the POS device scanning the identification code of the digital wallet, the identification code of the digital wallet includes a QR code, a barcode, a payment password, etc. .
其中,所述边缘服务器32接收到所述配置有数字钱包的电子设备311或POS设备312发送的支付请求后,将根据所述支付请求,生成交易报文,并将所述交易报文发送到交易网络33,其中,所述交易网络为数字货币的交易网络33,所述交易网络33根据所述交易报文,对所述交易报文进行确认后,将向所述边缘服务器32发送交易确认结果,所述边缘服务器32接收到所述交易确认结果后,将向所述配置有数字钱包的电子设备311或POS设备312发送支付结果,以确认该交易。Wherein, after the edge server 32 receives the payment request sent by the electronic device 311 or POS device 312 equipped with a digital wallet, it will generate a transaction message according to the payment request, and send the transaction message to The transaction network 33, wherein the transaction network is a digital currency transaction network 33, the transaction network 33 will send a transaction confirmation to the edge server 32 after confirming the transaction message according to the transaction message As a result, after the edge server 32 receives the transaction confirmation result, it will send the payment result to the electronic device 311 or POS device 312 equipped with a digital wallet to confirm the transaction.
请再参阅图4,图4是本申请实施例提供的第二种数字货币的聚合支付系统的结构示意图;Please refer to FIG. 4 again, which is a schematic structural diagram of a second digital currency aggregate payment system provided by an embodiment of the present application;
如图4所示,该数字货币的聚合支付系统40,包括:终端41、闪电网络接入层42、数字货币的闪电网络43、数字货币的交易网络44以及货币转换层45。As shown in FIG. 4, the digital currency aggregate payment system 40 includes: a terminal 41, a lightning network access layer 42, a digital currency lightning network 43, a digital currency transaction network 44, and a currency conversion layer 45.
其中,所述终端41,包括:数字钱包411和/或POS设备412,其中,所述数字钱包对应配置有数字钱包的电子设备,即所述终端41包括配置有数字钱包的电子设备和/或POS设备。The terminal 41 includes a digital wallet 411 and/or a POS device 412, wherein the digital wallet corresponds to an electronic device configured with a digital wallet, that is, the terminal 41 includes an electronic device configured with a digital wallet and/or POS equipment.
具体的,请再参阅图5,图5是本申请实施例提供的一种配置有数字钱包的电子设备的结构示意图;Specifically, please refer to FIG. 5 again, which is a schematic structural diagram of an electronic device equipped with a digital wallet provided by an embodiment of the present application;
如图5所示,该配置有数字钱包的电子设备411,包括:至少两种数字货币的私钥存储和管理模块4111、私钥云备份模块4112、二维码模块4113以及网络模块4114。As shown in FIG. 5, the electronic device 411 equipped with a digital wallet includes: a private key storage and management module 4111 of at least two digital currencies, a private key cloud backup module 4112, a two-dimensional code module 4113, and a network module 4114.
具体的,所述至少两种数字货币的私钥存储和管理模块4111,用于保存或更新每一种数字货币对应的私钥,所述配置有数字钱包的电子设备411的数字钱包的私钥通过与用户名具备相关性的对称密钥加密保存到云端,其中,对称加密算法为高级加密标准算法(Advanced Encryption Standard,AES)。Specifically, the private key storage and management module 4111 of the at least two digital currencies is used to save or update the private key corresponding to each digital currency, and the private key of the digital wallet of the electronic device 411 equipped with the digital wallet It is encrypted and saved to the cloud by a symmetric key that is related to the user name, where the symmetric encryption algorithm is Advanced Encryption Standard (AES).
具体的,所述私钥云备份模块4112,用于将所述对称密钥保存到云端,通过云服务器对所述私钥加密后的对称密钥进行保存。Specifically, the private key cloud backup module 4112 is configured to save the symmetric key to the cloud, and save the symmetric key encrypted by the private key through a cloud server.
具体的,所述二维码模块4113,用于生成二维码,或者,用于识别二维码,例如:扫描其他设备生成的二维码或识别图片中的二维码,获取所述二维码对应的信息。Specifically, the two-dimensional code module 4113 is used to generate a two-dimensional code, or to identify a two-dimensional code, for example, scan a two-dimensional code generated by another device or identify a two-dimensional code in a picture to obtain the two Information corresponding to the dimension code.
具体的,所述网络模块4114,用于进行联网,并向其他设备发送信息或接收其他设备发送的信息,所述网络模块4114包括:2G模块、3G模块、4G模块、5G模块、蓝牙模块等。Specifically, the network module 4114 is used for networking and sending information to other devices or receiving information sent by other devices. The network module 4114 includes: 2G module, 3G module, 4G module, 5G module, Bluetooth module, etc. .
可以理解的是,所述配置有数字钱包的电子设备411还包括摄像头、触摸屏、用户界面等,本领域技术人员可以知悉,在此不再赘述。It can be understood that the electronic device 411 equipped with a digital wallet further includes a camera, a touch screen, a user interface, etc., as those skilled in the art can know, the details are not repeated here.
请再参阅图6,图6是本申请实施例提供的一种数字钱包的示意图;Please refer to FIG. 6 again, which is a schematic diagram of a digital wallet provided by an embodiment of the present application;
如图6所示,该数字钱包包括至少两种数字货币,例如:数字货币1,数字货币2,…,数字货币N,所述数字货币1可以为比特币,所述数字货币2可以为以太坊,以及等等,所述数字钱包可以用于对任意一种数字货币进行付款或收款,例如:通过比特币进行付款,或者,对比特币进行收款。可以理解的是,所述数字钱包还可以用于显示每一种数字货币对应的余额。As shown in Figure 6, the digital wallet includes at least two digital currencies, for example: digital currency 1, digital currency 2, ..., digital currency N, the digital currency 1 can be Bitcoin, and the digital currency 2 can be Ether Square, and so on, the digital wallet can be used for payment or collection of any kind of digital currency, for example: payment through Bitcoin, or collection of Bitcoin. It is understandable that the digital wallet can also be used to display the balance corresponding to each digital currency.
请参阅图7,图7是本申请实施例提供的一种POS设备的结构示意图;Please refer to FIG. 7, which is a schematic structural diagram of a POS device according to an embodiment of the present application;
如图7所示,该POS设备412,包括:至少两种数字货币的私钥存储和管理模块4121、私钥云备份模块4122、二维码模块4123以及网络模块4124。As shown in FIG. 7, the POS device 412 includes: a private key storage and management module 4121 of at least two digital currencies, a private key cloud backup module 4122, a two-dimensional code module 4123, and a network module 4124.
具体的,所述至少两种数字货币的私钥存储和管理模块4121,用于保存或更新每一种数字货币对应的私钥,所述POS设备412的私钥通过与用户名具备相关性的对称密钥加密保存到云端,其中,对称加密算法为高级加密标准算法(Advanced Encryption Standard,AES)。Specifically, the private key storage and management module 4121 of the at least two digital currencies is used to store or update the private key corresponding to each digital currency. The private key of the POS device 412 is related to the user name. The symmetric key encryption is stored in the cloud, where the symmetric encryption algorithm is Advanced Encryption Standard (AES).
具体的,所述私钥云备份模块4122,用于将所述对称密钥保存到云端,通过云服务器对所述私钥加密后的对称密钥进行保存。Specifically, the private key cloud backup module 4122 is configured to save the symmetric key to the cloud, and save the symmetric key encrypted by the private key through a cloud server.
具体的,所述二维码模块4123,用于生成二维码,具体的,根据用户指定的付款账户以及签名信息,生成二维码,或者,用于识别二维码,例如:扫描其他设备生成的二维码,获取所述二维码对应的信息。Specifically, the two-dimensional code module 4123 is used to generate a two-dimensional code, specifically, to generate a two-dimensional code according to the payment account and signature information specified by the user, or to identify the two-dimensional code, for example, scanning other devices The generated two-dimensional code obtains the information corresponding to the two-dimensional code.
具体的,所述网络模块4124,用于进行联网,并向其他设备发送信息或接收其他设备发送的信息,所述网络模块4124包括:2G模块、3G模块、4G模块、5G模块、蓝牙模块等。Specifically, the network module 4124 is used for networking and sending information to other devices or receiving information sent by other devices. The network module 4124 includes: 2G module, 3G module, 4G module, 5G module, Bluetooth module, etc. .
可以理解的是,所述配置有数字钱包的电子设备411和所述POS设备412实际上都是P2P网络上的一个节点,两者的功能一致,因此POS设备也具备数字钱包的功能。It is understandable that the electronic device 411 equipped with a digital wallet and the POS device 412 are actually a node on the P2P network, and their functions are the same. Therefore, the POS device also has the function of a digital wallet.
其中,所述闪电网络接入层42,用于对接多种数字货币的闪电网络,聚合支持多种数字支付,通过闪电网络服务,建立多种数字货币的实时交易记账服务,实现数字货币的即时支付功能。Among them, the lightning network access layer 42 is used to dock the lightning network of multiple digital currencies, aggregate and support multiple digital payments, and establish real-time transaction accounting services for multiple digital currencies through the lightning network service to realize digital currency Instant payment function.
具体的,所述闪电网络接入层42用于接收所述配置有数字钱包的电子设备和/或所述POS设备发送的支付请求,所述支付请求封装有数字货币标识,并根据所述支付请求,组装与所述数字货币标识对应的交易报文,将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果,所述闪电网络接入层42接收到所述交易确认结果后,将生成支付结果,并向所述数字钱包的电子设备和/或所述POS设备发送支付结果。Specifically, the lightning network access layer 42 is configured to receive a payment request sent by the electronic device configured with a digital wallet and/or the POS device, the payment request is encapsulated with a digital currency identifier, and the payment request is Request, assemble a transaction message corresponding to the digital currency identifier, and send the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation according to the transaction message As a result, after the lightning network access layer 42 receives the transaction confirmation result, it will generate a payment result and send the payment result to the electronic device of the digital wallet and/or the POS device.
具体的,请参阅图8,图8是本申请实施例提供的一种闪电网络接入层的示意图;Specifically, please refer to FIG. 8, which is a schematic diagram of a lightning network access layer provided by an embodiment of the present application;
如图8所示,该闪电网络接入层42包括:交易报文拆包组包模块421以及交易报文路由模块422。As shown in FIG. 8, the lightning network access layer 42 includes: a transaction message unpacking and grouping module 421 and a transaction message routing module 422.
具体的,所述交易报文拆包组包模块421,用于接收数字钱包和POS设备发送的交易请求报文,并解析所述交易请求报文,确定所述交易请求报文对应的数字货币标识,从而确定与所述数字货币标识对应的数字货币闪电网络,根据所述数字货币标识,组装生成与所述数字货币标识对应的交易报文。Specifically, the transaction message unpacking and grouping module 421 is configured to receive transaction request messages sent by digital wallets and POS devices, and analyze the transaction request messages to determine the digital currency corresponding to the transaction request message ID, thereby determining the digital currency lightning network corresponding to the digital currency ID, and assemble and generate a transaction message corresponding to the digital currency ID according to the digital currency ID.
交易报文路由模块422,用于将所述交易报文拆包组包模块421组装生成与所述数字货币标识对应的交易报文路由到与所述数字货币标识对应的数字货币闪电网络,并接收所述数字货币闪电网络发送的交易确认信息,根据所述交易确认信息,向所述数字钱包或POS设备发送支付结果信息,例如:所述交易请求报文对应的数字货币标识为比特币,则所述交易报文路由模块422将所述交易报文拆包组包模块421组装生成的交易报文发送到所述比特币对应的闪电网络,并接收所述比特币的闪电网络发送的交易确认信息,根据所述比特币的闪电网络发送的交易确认信息,向所述数字钱包或POS设备发送支付结果信息。The transaction message routing module 422 is configured to assemble the transaction message unpacking and grouping module 421 to generate the transaction message corresponding to the digital currency identifier and route it to the digital currency lightning network corresponding to the digital currency identifier, and Receiving transaction confirmation information sent by the digital currency lightning network, and sending payment result information to the digital wallet or POS device according to the transaction confirmation information, for example: the digital currency identifier corresponding to the transaction request message is bitcoin, Then the transaction message routing module 422 sends the transaction message generated by the transaction message unpacking and grouping module 421 to the Lightning Network corresponding to the Bitcoin, and receives the transaction sent by the Bitcoin Lightning Network The confirmation information is to send payment result information to the digital wallet or POS device according to the transaction confirmation information sent by the Bitcoin Lightning Network.
其中,所述数字货币的交易网络44,用于对数字货币交易进行确认,通过接收数字货币闪电网络发送的交易请求,对所述交易请求进行确认,在对所述交易请求进行确认后,向所述数字货币闪电网络发送交易确认信息,以使所述数字货币闪电网络根据所述交易确认信息,向所述闪电网络接入层发送交易确认信息。可以理解的是,所述数字货币交易网络向所述数字货币闪电网络发送的交易确认信息为非实时的,例如:比特币网络每隔10分钟更新一次区块。Wherein, the digital currency transaction network 44 is used to confirm digital currency transactions, confirm the transaction request by receiving the transaction request sent by the digital currency lightning network, and after confirming the transaction request, The digital currency lightning network sends transaction confirmation information, so that the digital currency lightning network sends transaction confirmation information to the lightning network access layer according to the transaction confirmation information. It is understandable that the transaction confirmation information sent by the digital currency transaction network to the digital currency lightning network is non-real-time. For example, the Bitcoin network updates the block every 10 minutes.
具体的,所述数字货币的交易网络44对所述数字货币交易的确认过程包括:Specifically, the confirmation process of the digital currency transaction by the digital currency transaction network 44 includes:
步骤(1)、根据所述交易请求,确定交易的付款方的地址和收款方的地址和由付款方私 钥生成的签名,并确定交易对应的数字货币及其数量;Step (1), according to the transaction request, determine the address of the payer and receiver of the transaction, and the signature generated by the payer's private key, and determine the digital currency and quantity corresponding to the transaction;
步骤(2)、将交易分组到一个区块中,并将该区块添加到分类账中;Step (2), group the transactions into a block, and add the block to the ledger;
步骤(3)、矿工节点计算哈希难题,查找出区块;Step (3), the miner node calculates the hash problem and finds the block;
步骤(4)、验证节点共识验证区块,并将验证通过的区块记录到区块链上,交易完成。Step (4), the verification node verifies the block by consensus, and records the verified block on the blockchain, and the transaction is completed.
其中,所述货币转换层,用于根据终端发送的货币转换请求,将所述货币转换请求中待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的商户账户,所述目标货币为法定货币的一种,例如:美元、欧元等。Wherein, the currency conversion layer is configured to convert the digital currency to be converted in the currency conversion request into a target currency according to a currency conversion request sent by the terminal, and settle the target currency to a merchant account corresponding to the terminal , The target currency is a kind of legal tender, for example: U.S. dollar, euro, etc.
请再参阅图9,图9是本申请实施例提供的一种货币转换层的结构示意图;Please refer to FIG. 9 again, which is a schematic structural diagram of a currency conversion layer provided by an embodiment of the present application;
如图9所示,该货币转换层45包括:法定货币转换服务节点451和货币转换节点452,所述法定货币转换服务节点451,用于获取终端发送的货币转换请求,根据所述货币转换请求,组装转换报文;所述货币转换节点452,用于根据所述转换报文,将所述货币转换请求对应的待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户。As shown in FIG. 9, the currency conversion layer 45 includes: a legal currency conversion service node 451 and a currency conversion node 452. The legal currency conversion service node 451 is used to obtain a currency conversion request sent by a terminal, and according to the currency conversion request , Assemble a conversion message; the currency conversion node 452 is configured to convert the digital currency to be converted corresponding to the currency conversion request into a target currency according to the conversion message, and settle the target currency with the The account corresponding to the terminal.
具体的,所述法定货币转换服务节点451,用于提供法定货币转换服务,所述法定货币转换服务节点451包括:Specifically, the legal currency conversion service node 451 is configured to provide legal currency conversion services, and the legal currency conversion service node 451 includes:
转换请求报文拆包组包模块4511,用于获取终端发送的货币转换请求,所述货币转换请求封装有待转换数字货币的货币标识,并且根据所述货币转换请求,组装与所述货币标识对应的转换报文;The conversion request message unpacking and grouping module 4511 is used to obtain the currency conversion request sent by the terminal. The currency conversion request encapsulates the currency identifier of the digital currency to be converted, and according to the currency conversion request, assembles corresponding to the currency identifier Conversion message;
具体的,所述终端包括配置有数字钱包的电子设备和POS设备,所述配置有数字钱包的电子设备和POS设备向所述转换请求报文拆包组包模块4511发送货币转换请求,所述货币转换请求包括数字货币标识及其对应的数量,所述转换请求报文拆包组包模块4511接收到所述货币转换请求后,解析所述货币转换请求,获取数字货币标识,并根据所述数字货币标识,重新组包,组装生成转换报文。Specifically, the terminal includes an electronic device configured with a digital wallet and a POS device. The electronic device configured with a digital wallet and the POS device send a currency conversion request to the conversion request message unpacking and packaging module 4511, and the The currency conversion request includes a digital currency identifier and its corresponding quantity. After the conversion request message unpacking and grouping module 4511 receives the currency conversion request, it parses the currency conversion request, obtains the digital currency identifier, and according to the Digital currency identification, re-packaging, assembly to generate conversion messages.
转换请求报文路由模块4512,用于将所述转换报文发送至与所述货币标识对应的货币转换节点。The conversion request message routing module 4512 is configured to send the conversion message to the currency conversion node corresponding to the currency identifier.
具体的,所述转换请求报文路由模块4512根据所述货币转换请求对应的数字货币标识,将所述转换报文发送到所述数字货币标识对应的货币转换节点,可以理解的是,每一数字货币对应一个货币转换节点,例如:比特币对应比特币转换节点,以太坊对应以太坊转换节点,以及等等。Specifically, the conversion request message routing module 4512 sends the conversion message to the currency conversion node corresponding to the digital currency identifier according to the digital currency identifier corresponding to the currency conversion request. It can be understood that each Digital currency corresponds to a currency conversion node, for example: Bitcoin corresponds to Bitcoin conversion node, Ethereum corresponds to Ethereum conversion node, and so on.
其中,所述货币转换节点452包括至少两个法定货币转换机构,每一个法定货币转换机构对应一种法定货币,例如:比特币对应比特币的法定货币转换机构,比特币现金对应比特币现金的法定货币转换机构,以太坊对应以太坊的法定货币转换机构,所述货币转换节点452用于接收所述法定货币转换服务节点451发送的转换报文,并根据所述转换报文,向所述法定货币转换服务节点451返回受理通知,并将所述货币转换请求对应的法定货币转入指定账户。Wherein, the currency conversion node 452 includes at least two legal currency conversion institutions, and each legal currency conversion institution corresponds to a legal currency, for example: Bitcoin corresponds to a legal currency conversion institution of Bitcoin, and Bitcoin cash corresponds to a Bitcoin cash A legal currency conversion agency. Ethereum corresponds to the legal currency conversion agency of Ethereum. The currency conversion node 452 is used to receive the conversion message sent by the legal currency conversion service node 451, and send the conversion message to the The legal currency conversion service node 451 returns the acceptance notice, and transfers the legal currency corresponding to the currency conversion request to the designated account.
具体的,所述货币转换节点452,用于接收所述法定货币转换服务节点451发送的转换报文,并根据所述转换报文,将所述货币转换请求对应的待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户。其中,所述目标货币为法定货币,所述目标货币包括:美元、欧元、日元、澳元中的一种或多种。例如:所述货币转换请求中的待转换数字货币为比特币,目标货币为日元,则货币转换节点452中的比特币法定货币转换机构根据所述待转换数字货币与所述目标货币的比率,结合所述货币转换请求对应的待转换数字货币的数量,将所述待转换数字货币转换为对应的目标货币,即将所述比特币转换为日元,同时,所述货币转换节点452将所述目标货币结算至与所述终端对应的账户,其中,所述终端对应的账户保存在所述货币转换请求对应的货币转换请求报文中。Specifically, the currency conversion node 452 is configured to receive the conversion message sent by the legal currency conversion service node 451, and according to the conversion message, convert the digital currency to be converted corresponding to the currency conversion request into a target Currency, and settle the target currency to an account corresponding to the terminal. Wherein, the target currency is legal tender, and the target currency includes one or more of U.S. dollar, euro, Japanese yen, and Australian dollar. For example, if the digital currency to be converted in the currency conversion request is Bitcoin and the target currency is Japanese Yen, the Bitcoin legal currency conversion agency in the currency conversion node 452 will determine the ratio of the digital currency to be converted to the target currency. In combination with the number of digital currencies to be converted corresponding to the currency conversion request, the digital currencies to be converted are converted into the corresponding target currency, that is, the bitcoins are converted into Japanese yen. At the same time, the currency conversion node 452 converts all The target currency is settled to an account corresponding to the terminal, wherein the account corresponding to the terminal is stored in a currency conversion request message corresponding to the currency conversion request.
在本申请实施例中,通过提供一种数字货币的聚合支付系统,所述系统包括:闪电网络接入层,用于获取终端发送的支付请求,所述支付请求封装有数字货币标识,根据所述支付 请求,组装与所述数字货币标识对应的交易报文,并且,确定与所述数字货币标识对应的交易网络;交易网络,用于根据所述交易报文,向所述闪电网络接入层返回交易确认结果,以使所述闪电网络接入层根据所述交易确认结果,向所述终端发送支付结果。通过上述方式,本申请实施例解决了目前只能针对一种数字货币进行交易的技术问题,实现多种数字货币的聚合支付,提高用户的使用体验。In the embodiment of the present application, an aggregate payment system for digital currency is provided. The system includes: a lightning network access layer for obtaining a payment request sent by a terminal. The payment request is encapsulated with a digital currency identifier. In the payment request, a transaction message corresponding to the digital currency identifier is assembled, and a transaction network corresponding to the digital currency identifier is determined; the transaction network is used to access the lightning network according to the transaction message The layer returns the transaction confirmation result, so that the lightning network access layer sends the payment result to the terminal according to the transaction confirmation result. In the above manner, the embodiment of the present application solves the current technical problem that transactions can only be performed on one digital currency, realizes the aggregate payment of multiple digital currencies, and improves the user experience.
请参阅图10,图10是本申请实施例提供的第一种数字货币的聚合支付的工作流程图;Please refer to FIG. 10, which is a work flow chart of the first aggregate payment of digital currency provided by an embodiment of the present application;
如图10所示,该聚合支付方法,包括:As shown in Figure 10, the aggregate payment method includes:
步骤S101:终端向网络接入层发送支付请求;Step S101: The terminal sends a payment request to the network access layer;
具体的,所述终端包括配置有数字钱包的电子设备或者POS设备,所述网络接入层由至少一个边缘服务器组成,用于向交易网络转发支付请求,所述配置有数字钱包的电子设备通过扫描POS设备的标识码,或者,所述POS设备通过扫描配置有数字钱包的电子设备的标识码,从而生成支付请求,所述配置有数字钱包的电子设备或者POS设备向所述网络接入层发送所述支付请求。Specifically, the terminal includes an electronic device configured with a digital wallet or a POS device, the network access layer is composed of at least one edge server for forwarding payment requests to the transaction network, and the electronic device configured with a digital wallet passes Scan the identification code of the POS device, or the POS device generates a payment request by scanning the identification code of an electronic device configured with a digital wallet, and the electronic device or POS device configured with a digital wallet sends a payment request to the network access layer Send the payment request.
步骤S102:网络接入层向交易网络发送交易报文;Step S102: The network access layer sends a transaction message to the transaction network;
具体的,所述交易网络包括至少两个数字货币闪电网络和数字货币交易网络,所述网络接入层接收到终端发送的支付请求后,根据所述支付请求中包含的数字货币标识,组装与所述数字货币标识对应的交易报文,并将所述交易报文发送到所述交易网络中的数字货币闪电网络,其中,每一种数字货币闪电网络对应一种数字货币标识,当所述网络接入层获取到支付请求后,根据所述支付请求中包含的数字货币标识,组装对应的交易报文,并将所述交易报文路由到与所述数字货币标识对应的数字货币闪电网络。Specifically, the transaction network includes at least two digital currency lightning networks and a digital currency transaction network. After receiving the payment request sent by the terminal, the network access layer assembles and assembles the digital currency identifier according to the digital currency identifier contained in the payment request. The digital currency identifies the corresponding transaction message, and sends the transaction message to the digital currency lightning network in the transaction network, wherein each digital currency lightning network corresponds to a digital currency identifier, when the After obtaining the payment request, the network access layer assembles the corresponding transaction message according to the digital currency identifier contained in the payment request, and routes the transaction message to the digital currency lightning network corresponding to the digital currency identifier .
步骤S103:交易网络向网络接入层返回交易确认结果;Step S103: the transaction network returns the transaction confirmation result to the network access layer;
具体的,所述交易网络中的数字货币闪电网络接收到交易报文后,根据所述交易报文,对交易进行验证,若验证成功,则向所述网络接入层返回交易确认结果,其中,所述对交易进行验证,包括:验证交易的发送方和接收方的身份、交易的合法性,以及等等。Specifically, after receiving the transaction message, the digital currency lightning network in the transaction network verifies the transaction according to the transaction message, and if the verification is successful, returns the transaction confirmation result to the network access layer, where , The verification of the transaction includes: verifying the identities of the sender and receiver of the transaction, the legality of the transaction, and so on.
步骤S104:网络接入层向所述终端返回支付结果;Step S104: the network access layer returns the payment result to the terminal;
具体的,所述网络接入层接收到交易网络发送的交易确认结果之后,将向所述配置有数字钱包的电子设备或者POS设备返回支付结果,以使所述配置有数字钱包的电子设备或者POS设备显示所述支付结果,供交易的发送方和接收方确认该交易是否成功完成。Specifically, after the network access layer receives the transaction confirmation result sent by the transaction network, it will return the payment result to the electronic device or POS device equipped with a digital wallet, so that the electronic device equipped with a digital wallet or The POS device displays the payment result for the sender and receiver of the transaction to confirm whether the transaction is successfully completed.
请参阅图11,图11是本申请实施例提供的第二种数字货币的聚合支付的工作流程图;其中,该数字货币的聚合支付的工作流程对应主扫模式,即通过数字钱包扫描POS设备生成的二维码。Please refer to Figure 11. Figure 11 is a workflow chart of the second type of digital currency aggregate payment provided by an embodiment of the application; wherein the workflow of the digital currency aggregate payment corresponds to the main scan mode, that is, scanning the POS device through a digital wallet The generated QR code.
如图11所示,该聚合支付方法,包括:As shown in Figure 11, the aggregate payment method includes:
步骤S111:数字钱包对所述POS设备生成的二维码进行扫描;Step S111: the digital wallet scans the QR code generated by the POS device;
具体的,所述数字钱包代表配置有数字钱包的电子设备,例如:智能手机、笔记本电脑等电子设备,所述POS设备包括POS机,所述POS设备可以生成二维码,所述数字钱包对所述POS设备生成的二维码进行扫描,获取交易信息。Specifically, the digital wallet represents an electronic device equipped with a digital wallet, such as a smart phone, a notebook computer, and other electronic devices. The POS device includes a POS machine. The POS device can generate a QR code. Scan the QR code generated by the POS device to obtain transaction information.
步骤S112:数字钱包向闪电网络接入层发送支付请求;Step S112: The digital wallet sends a payment request to the lightning network access layer;
具体的,所述数字钱包扫描所述POS设备生成的二维码后,获取交易信息,例如:交易的数字货币标识、交易的数字货币数量,以及等等。通过获取交易信息,根据所述交易信息,生成支付请求,并向所述闪电网络接入层发送支付请求,所述闪电网络接入层用于对接数字货币闪电网络。Specifically, after the digital wallet scans the two-dimensional code generated by the POS device, the transaction information is obtained, such as the digital currency identifier of the transaction, the amount of digital currency for the transaction, and so on. By acquiring transaction information, generating a payment request based on the transaction information, and sending the payment request to the lightning network access layer, which is used to interface with the digital currency lightning network.
步骤S113:闪电网络接入层接收所述数字钱包发送的支付请求,并生成交易请求,将所述交易请求发送到对应的数字货币闪电网络;Step S113: The lightning network access layer receives the payment request sent by the digital wallet, generates a transaction request, and sends the transaction request to the corresponding digital currency lightning network;
具体的,所述闪电网络接入层接收所述数字钱包发送的支付请求之后,根据所述支付请求包含的数字货币标识,组装与所述数字货币标识对应的交易报文,从而生成交易请求,将 所述交易请求发送到与所述数字货币标识对应的数字货币闪电网络,其中,每一种数字货币标识对应一种数字货币闪电网络。Specifically, after receiving the payment request sent by the digital wallet, the lightning network access layer assembles a transaction message corresponding to the digital currency identifier according to the digital currency identifier included in the payment request, thereby generating a transaction request, The transaction request is sent to the digital currency lightning network corresponding to the digital currency identifier, wherein each digital currency identifier corresponds to a digital currency lightning network.
步骤S114:数字货币闪电网络接收所述闪电网络接入层发送的交易请求,并对所述交易请求进行确认,向所述闪电网络接入层发送交易确认结果;Step S114: The digital currency lightning network receives the transaction request sent by the lightning network access layer, confirms the transaction request, and sends the transaction confirmation result to the lightning network access layer;
具体的,所述数字货币闪电网络接收所述闪电网络接入层发送的交易请求,并解析所述交易请求,根据所述交易请求,对交易进行验证,从而确认所述交易请求,向所述闪电网络接入层发送交易确认结果,所述交易确认结果包括:交易成功或交易失败,所述对交易进行验证,包括:验证交易的发送方和接收方的身份、交易的合法性,以及等等。Specifically, the digital currency lightning network receives the transaction request sent by the lightning network access layer, analyzes the transaction request, verifies the transaction according to the transaction request, thereby confirms the transaction request, and sends the transaction request to the The Lightning Network access layer sends the transaction confirmation result, the transaction confirmation result includes: the transaction is successful or the transaction fails, and the verification of the transaction includes: verifying the identities of the sender and receiver of the transaction, the legality of the transaction, etc. Wait.
步骤S115:闪电网络接入层接收交易确认结果,并根据所述交易确认结果,向所述数字钱包发送支付结果;Step S115: The lightning network access layer receives the transaction confirmation result, and sends the payment result to the digital wallet according to the transaction confirmation result;
具体的,所述闪电网络接入层接收所述数字货币闪电网络发送的交易确认结果,所述交易确认结果包括:交易成功或交易失败,所述闪电网络接入层根据所述交易确认结果,向所述数字钱包发送支付结果,若所述交易确认结果为交易失败,则所述闪电网络接入层向所述数字钱包发送支付失败消息,若所述交易确认结果为交易成功,则所述闪电网络接入层向所述数字钱包发送交易成功消息。Specifically, the lightning network access layer receives the transaction confirmation result sent by the digital currency lightning network, and the transaction confirmation result includes: transaction success or transaction failure, and the lightning network access layer according to the transaction confirmation result, Send a payment result to the digital wallet. If the transaction confirmation result is a transaction failure, the Lightning Network access layer sends a payment failure message to the digital wallet. If the transaction confirmation result is a successful transaction, the The lightning network access layer sends a transaction success message to the digital wallet.
在本申请实施例中,所述方法还包括:In the embodiment of the present application, the method further includes:
若所述交易确认结果为交易失败,则所述数字货币闪电网络根据交易请求,向所述闪电网络接入层发送的交易确认结果中还包含交易失败位置的标志位,例如:所述交易失败位置包括:交易不合法、交易的发送方数字货币余额不足等,所述交易确认结果的报文中包含所述交易失败位置的标志位,若所述交易失败的原因为交易不合法,则将所述交易不合法对应的标志位进行置零处理,以使所述闪电网络接入层根据所述交易失败位置的标志位,组装与所述交易确认结果的报文对应的支付结果报文,并向所述数字钱包和所述POS设备发送所述支付结果报文,以使所述数字钱包或所述POS设备获取该交易失败位置的标志位,方便交易的发送方和接收方确认交易失败位置。If the transaction confirmation result is a transaction failure, the transaction confirmation result sent by the digital currency lightning network to the lightning network access layer according to the transaction request also includes a flag bit of the transaction failure position, for example: the transaction failed The location includes: the transaction is illegal, the sender's digital currency balance is insufficient, etc. The message of the transaction confirmation result contains the flag bit of the transaction failure position. If the reason for the transaction failure is that the transaction is illegal, the The flag bit corresponding to the illegal transaction is reset to zero, so that the lightning network access layer assembles a payment result message corresponding to the transaction confirmation result message according to the flag bit of the transaction failure position, And send the payment result message to the digital wallet and the POS device, so that the digital wallet or the POS device obtains the flag of the position where the transaction fails, so that the sender and receiver of the transaction can confirm that the transaction failed position.
步骤S116:闪电网络接入层接收交易确认结果,并根据所述交易确认结果,向所述POS设备发送支付结果;Step S116: The lightning network access layer receives the transaction confirmation result, and sends the payment result to the POS device according to the transaction confirmation result;
具体的,所述闪电网络接入层向所述POS设备发送交易确认结果,与上述的所述闪电网络接入层向数字钱包发送交易确认结果过程相同,在此不再赘述。Specifically, the lightning network access layer sending the transaction confirmation result to the POS device is the same as the above-mentioned lightning network access layer sending the transaction confirmation result to the digital wallet, and will not be repeated here.
步骤S117:数字货币闪电网络向数字货币交易网络发送交易请求;Step S117: The digital currency lightning network sends a transaction request to the digital currency transaction network;
具体的,当所述数字货币闪电网络接收到交易请求后,将实时对所述交易请求进行确认,并向所述闪电网络接入层发送交易确认结果,由于数字货币闪电网络并不是数字货币交易的真实交易体现,数字货币的真实交易体现在数字货币的交易网络的交易,因此,所述数字货币闪电网络接收到交易请求后,将所述交易请求转发到所述数字货币交易网络,由所述数字货币交易网络对交易进行确认,具体的,所述数字货币交易网络为区块链交易网络。Specifically, when the digital currency lightning network receives the transaction request, it will confirm the transaction request in real time and send the transaction confirmation result to the lightning network access layer, because the digital currency lightning network is not a digital currency transaction The real transaction of digital currency is embodied in the transaction of the digital currency transaction network. Therefore, after the digital currency lightning network receives the transaction request, it forwards the transaction request to the digital currency transaction network, and the The digital currency transaction network confirms the transaction. Specifically, the digital currency transaction network is a blockchain transaction network.
步骤S118:数字货币交易网络接收数字货币闪电网络发送的交易请求,并向所述数字货币闪电网络返回交易确认;Step S118: The digital currency transaction network receives the transaction request sent by the digital currency lightning network, and returns a transaction confirmation to the digital currency lightning network;
具体的,所述数字货币交易网络为区块链交易网络,所述数字货币交易网络对所述交易的确认与区块链对交易的确认过程类型,在此不再赘述,所述数字货币交易网络确认所述交易后,将向所述数字货币闪电网络发送交易确认信息,所述交易确认信息包括:交易失败或交易成功。Specifically, the digital currency transaction network is a blockchain transaction network. The digital currency transaction network confirms the transaction and the blockchain confirms the transaction type, which will not be repeated here. The digital currency transaction After the network confirms the transaction, it will send transaction confirmation information to the digital currency lightning network, and the transaction confirmation information includes: transaction failure or transaction success.
请参阅图12,图12是本申请实施例提供的第三种数字货币的聚合支付的工作流程图;其中,该聚合支付的工作流程对应被扫模式,即通过POS设备扫描数字钱包生成的二维码;Please refer to Figure 12, which is a workflow chart of the third type of digital currency aggregate payment provided by an embodiment of the present application; wherein, the workflow of the aggregate payment corresponds to the scanned mode, that is, the two generated by scanning the digital wallet through the POS device Dimension code
如图12所示,该聚合支付方法,包括:As shown in Figure 12, the aggregate payment method includes:
步骤S121:POS设备对数字钱包生成的二维码进行扫描;Step S121: The POS device scans the QR code generated by the digital wallet;
具体的,所述数字钱包代表配置有数字钱包的电子设备,例如:智能手机、笔记本电脑 等电子设备,所述POS设备包括POS机,所述POS设备可以生成二维码,所述数字钱包也可以生成二维码,所述POS设备对所述数字钱包生成的二维码进行扫描,获取交易信息。Specifically, the digital wallet represents an electronic device equipped with a digital wallet, such as a smart phone, a notebook computer, and other electronic devices. The POS device includes a POS machine, the POS device can generate a QR code, and the digital wallet also A two-dimensional code can be generated, and the POS device scans the two-dimensional code generated by the digital wallet to obtain transaction information.
步骤S122:POS设备向闪电网络接入层发送支付请求;Step S122: The POS device sends a payment request to the lightning network access layer;
具体的,所述POS设备扫描所述数字钱包生成的二维码后,获取交易信息,例如:交易的数字货币标识、交易的数字货币数量,以及等等。通过获取交易信息,根据所述交易信息,生成支付请求,并向所述闪电网络接入层发送支付请求,所述闪电网络接入层用于对接数字货币闪电网络。Specifically, the POS device scans the two-dimensional code generated by the digital wallet to obtain transaction information, such as the digital currency identifier of the transaction, the amount of digital currency for the transaction, and so on. By acquiring transaction information, generating a payment request based on the transaction information, and sending the payment request to the lightning network access layer, which is used to interface with the digital currency lightning network.
步骤S123:闪电网络接入层接收所述数字钱包发送的支付请求,并生成交易请求,将所述交易请求发送到对应的数字货币闪电网络;Step S123: The lightning network access layer receives the payment request sent by the digital wallet, generates a transaction request, and sends the transaction request to the corresponding digital currency lightning network;
具体的,所述闪电网络接入层接收所述POS设备发送的支付请求之后,根据所述支付请求包含的数字货币标识,组装与所述数字货币标识对应的交易报文,从而生成交易请求,将所述交易请求发送到与所述数字货币标识对应的数字货币闪电网络,其中,每一种数字货币标识对应一种数字货币闪电网络。Specifically, after receiving the payment request sent by the POS device, the lightning network access layer assembles a transaction message corresponding to the digital currency identifier according to the digital currency identifier included in the payment request, thereby generating a transaction request, The transaction request is sent to the digital currency lightning network corresponding to the digital currency identifier, wherein each digital currency identifier corresponds to a digital currency lightning network.
步骤S124:数字货币闪电网络接收所述闪电网络接入层发送的交易请求,并对所述交易请求进行确认,向所述闪电网络接入层发送交易确认结果;Step S124: The digital currency lightning network receives the transaction request sent by the lightning network access layer, confirms the transaction request, and sends the transaction confirmation result to the lightning network access layer;
具体的,所述数字货币闪电网络接收所述闪电网络接入层发送的交易请求,并解析所述交易请求,根据所述交易请求,对交易进行验证,从而确认所述交易请求,向所述闪电网络接入层发送交易确认结果,所述交易确认结果包括:交易成功或交易失败,所述对交易进行验证,包括:验证交易的发送方和接收方的身份、交易的合法性,以及等等。Specifically, the digital currency lightning network receives the transaction request sent by the lightning network access layer, analyzes the transaction request, verifies the transaction according to the transaction request, thereby confirms the transaction request, and sends the transaction request to the The Lightning Network access layer sends the transaction confirmation result, the transaction confirmation result includes: the transaction is successful or the transaction fails, and the verification of the transaction includes: verifying the identities of the sender and receiver of the transaction, the legality of the transaction, etc. Wait.
步骤S125:闪电网络接入层接收交易确认结果,并根据所述交易确认结果,向所述数字钱包发送支付结果;Step S125: The lightning network access layer receives the transaction confirmation result, and sends the payment result to the digital wallet according to the transaction confirmation result;
具体的,所述闪电网络接入层接收所述数字货币闪电网络发送的交易确认结果,所述交易确认结果包括:交易成功或交易失败,所述闪电网络接入层根据所述交易确认结果,向所述数字钱包发送支付结果,若所述交易确认结果为交易失败,则所述闪电网络接入层向所述数字钱包发送支付失败消息,若所述交易确认结果为交易成功,则所述闪电网络接入层向所述数字钱包发送交易成功消息。Specifically, the lightning network access layer receives the transaction confirmation result sent by the digital currency lightning network, and the transaction confirmation result includes: transaction success or transaction failure, and the lightning network access layer according to the transaction confirmation result, Send a payment result to the digital wallet. If the transaction confirmation result is a transaction failure, the Lightning Network access layer sends a payment failure message to the digital wallet. If the transaction confirmation result is a successful transaction, the The lightning network access layer sends a transaction success message to the digital wallet.
在本申请实施例中,所述方法还包括:In the embodiment of the present application, the method further includes:
若所述交易确认结果为交易失败,则所述数字货币闪电网络根据交易请求,向所述闪电网络接入层发送的交易确认结果中还包含交易失败位置的标志位,例如:所述交易失败位置包括:交易不合法、交易的发送方数字货币余额不足等,所述交易确认结果的报文中包含所述交易失败位置的标志位,若所述交易失败的原因为交易不合法,则将所述交易不合法对应的标志位进行置零处理,以使所述闪电网络接入层根据所述交易失败位置的标志位,组装与所述交易确认结果的报文对应的支付结果报文,并向所述数字钱包和所述POS设备发送所述支付结果报文,以使所述数字钱包或所述POS设备获取该交易失败位置的标志位,方便交易的发送方和接收方确认交易失败位置。If the transaction confirmation result is a transaction failure, the transaction confirmation result sent by the digital currency lightning network to the lightning network access layer according to the transaction request also includes a flag bit of the transaction failure position, for example: the transaction failed The location includes: the transaction is illegal, the sender's digital currency balance is insufficient, etc. The message of the transaction confirmation result contains the flag bit of the transaction failure position. If the reason for the transaction failure is that the transaction is illegal, the The flag bit corresponding to the illegal transaction is reset to zero, so that the lightning network access layer assembles a payment result message corresponding to the transaction confirmation result message according to the flag bit of the transaction failure position, And send the payment result message to the digital wallet and the POS device, so that the digital wallet or the POS device obtains the flag of the position where the transaction fails, so that the sender and receiver of the transaction can confirm that the transaction failed position.
步骤S126:闪电网络接入层接收交易确认结果,并根据所述交易确认结果,向所述数字钱包发送支付结果;Step S126: The lightning network access layer receives the transaction confirmation result, and sends the payment result to the digital wallet according to the transaction confirmation result;
具体的,所述闪电网络接入层向所述数字钱包发送交易确认结果,与上述的所述闪电网络接入层向POS设备发送交易确认结果过程相同,在此不再赘述。Specifically, the lightning network access layer sending the transaction confirmation result to the digital wallet is the same as the above-mentioned lightning network access layer sending the transaction confirmation result to the POS device, and will not be repeated here.
步骤S127:数字货币闪电网络向数字货币交易网络发送交易请求;Step S127: The digital currency lightning network sends a transaction request to the digital currency transaction network;
具体的,当所述数字货币闪电网络接收到交易请求后,将实时对所述交易请求进行确认,并向所述闪电网络接入层发送交易确认结果,由于数字货币闪电网络并不是数字货币交易的真实交易体现,数字货币的真实交易体现在数字货币的交易网络的交易,因此,所述数字货币闪电网络接收到交易请求后,将所述交易请求转发到所述数字货币交易网络,由所述数字货币交易网络对交易进行确认,具体的,所述数字货币交易网络为区块链交易网络。Specifically, when the digital currency lightning network receives the transaction request, it will confirm the transaction request in real time and send the transaction confirmation result to the lightning network access layer, because the digital currency lightning network is not a digital currency transaction The real transaction of digital currency is embodied in the transaction of the digital currency transaction network. Therefore, after the digital currency lightning network receives the transaction request, it forwards the transaction request to the digital currency transaction network, and the The digital currency transaction network confirms the transaction. Specifically, the digital currency transaction network is a blockchain transaction network.
步骤S128:数字货币交易网络接收数字货币闪电网络发送的交易请求,并向所述数字货币闪电网络返回交易确认;Step S128: The digital currency transaction network receives the transaction request sent by the digital currency lightning network, and returns a transaction confirmation to the digital currency lightning network;
具体的,所述数字货币交易网络为区块链交易网络,所述数字货币交易网络对所述交易的确认与区块链对交易的确认过程类型,在此不再赘述,所述数字货币交易网络确认所述交易后,将向所述数字货币闪电网络发送交易确认信息,所述交易确认信息包括:交易失败或交易成功。Specifically, the digital currency transaction network is a blockchain transaction network. The digital currency transaction network confirms the transaction and the blockchain confirms the transaction type, which will not be repeated here. The digital currency transaction After the network confirms the transaction, it will send transaction confirmation information to the digital currency lightning network, and the transaction confirmation information includes: transaction failure or transaction success.
请参阅图13,图13是本申请实施例提供的一种数字货币的聚合支付方法的流程示意图;Please refer to FIG. 13, which is a schematic flowchart of a digital currency aggregate payment method according to an embodiment of the present application;
如图13所示,该数字货币的聚合支付方法,包括:As shown in Figure 13, the aggregate payment method of the digital currency includes:
步骤S131:获取终端发送的支付请求,所述支付请求封装有数字货币标识;Step S131: Obtain a payment request sent by the terminal, where the payment request is encapsulated with a digital currency identifier;
具体的,所述终端包括配置有数字钱包的电子设备或者POS设备,所述支付请求由所述数字钱包触发所述电子设备扫描所述POS设备的标识码而产生,所述数字钱包对应一应用程序,所述应用程序通过触发所述电子设备的摄像头对所述POS设备生成的标识码进行扫描,从而生成支付请求,或者,所述支付请求由所述POS设备扫描所述数字钱包的标识码而产生,所述标识码包括二维码、条形码、支付口令等,其中,所述数字钱包触发所述电子设备扫描所述POS设备的标识码生成支付请求为主扫模式,所述POS设备扫描所述数字钱包的标识码生成支付请求为被扫模式。Specifically, the terminal includes an electronic device or a POS device configured with a digital wallet, the payment request is generated by the digital wallet triggering the electronic device to scan the identification code of the POS device, and the digital wallet corresponds to an application The application program scans the identification code generated by the POS device by triggering the camera of the electronic device to generate a payment request, or the POS device scans the identification code of the digital wallet for the payment request And generated, the identification code includes a QR code, a barcode, a payment password, etc., wherein the digital wallet triggers the electronic device to scan the identification code of the POS device to generate a payment request in the main scan mode, and the POS device scans The identification code of the digital wallet generates a payment request in a scanned mode.
其中,所述数字钱包,用于支付至少一种数字货币,所述数字货币包括比特币、比特币现金、以太坊、瑞波币等数字货币,所述POS设备用于收取所述数字钱包支付的至少一种数字货币。Wherein, the digital wallet is used to pay for at least one digital currency, and the digital currency includes digital currencies such as Bitcoin, Bitcoin Cash, Ethereum, and Ripple, and the POS device is used to receive payment from the digital wallet. At least one digital currency.
其中,所述配置有数字钱包的电子设备或者POS设备将所述支付请求发送到闪电网络接入层,所述闪电网络接入层获取所述配置有数字钱包的电子设备或者POS设备发送的支付请求,所述支付请求封装有数字货币标识、交易的发送方以及接收方等信息、交易信息、POS设备信息、商户信息、收款账户信息以及POS设备的签名信息等信息。Wherein, the electronic device or POS device equipped with a digital wallet sends the payment request to the lightning network access layer, and the lightning network access layer obtains the payment sent by the electronic device or POS device equipped with the digital wallet Request, the payment request is encapsulated with digital currency identification, transaction sender and receiver information, transaction information, POS device information, merchant information, payment account information, and POS device signature information.
在本申请实施例中,通过提供数字钱包,统一管理用户的不同数字货币,通过提供POS设备,通过主扫或被扫二维码,对不同数字货币进行统一收款,从而适用于多种数字货币的聚合支付和收款,并且,还通过闪电网络技术实现快速实时的收付款确认,有利于提高用户的使用体验。In the embodiment of this application, by providing a digital wallet, the user’s different digital currencies are managed uniformly, and by providing a POS device, the different digital currencies can be collected uniformly through the main scan or scanned two-dimensional code, which is suitable for multiple digital currencies. The aggregate payment and collection of currency, and the rapid and real-time confirmation of receipt and payment through Lightning Network technology, is conducive to improving the user experience.
步骤S132:根据所述支付请求,组装与所述数字货币标识对应的交易报文;Step S132: According to the payment request, assemble a transaction message corresponding to the digital currency identifier;
具体的,所述支付请求对应支付请求报文,所述支付请求报文中包含数字货币标识,所述闪电网络接入层根据所述支付请求报文中的数字货币标识,组装与所述数字货币标识对应的交易报文。Specifically, the payment request corresponds to a payment request message, the payment request message includes a digital currency identifier, and the lightning network access layer assembles the digital currency identifier according to the digital currency identifier in the payment request message. The transaction message corresponding to the currency identifier.
步骤S133:将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果;Step S133: Send the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation result according to the transaction message;
具体的,所述交易网络包括至少两种数字货币闪电网络,每一种所述数字货币标识皆对应一种所述数字货币闪电网络,所述将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果,包括:Specifically, the transaction network includes at least two digital currency lightning networks, each of the digital currency identifiers corresponds to a kind of the digital currency lightning network, and the transaction message is sent to the digital currency lightning network. Identifies the corresponding transaction network so that the transaction network returns the transaction confirmation result according to the transaction message, including:
将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络,以使所述数字货币闪电网络根据所述交易报文,返回交易确认结果。The transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network returns a transaction confirmation result according to the transaction message.
具体的,所述闪电网络接入层接收到所述支付请求报文后,根据所述支付请求包含的数字货币标识,组装与所述数字货币标识对应的交易报文,从而生成交易请求,将所述交易请求发送到与所述数字货币标识对应的数字货币闪电网络,其中,每一种数字货币标识对应一种数字货币闪电网络。Specifically, after receiving the payment request message, the lightning network access layer assembles a transaction message corresponding to the digital currency identifier according to the digital currency identifier contained in the payment request, thereby generating a transaction request, The transaction request is sent to the digital currency lightning network corresponding to the digital currency identifier, wherein each digital currency identifier corresponds to a digital currency lightning network.
具体的,所述数字货币闪电网络接收所述闪电网络接入层发送的交易报文,并解析所述交易报文,根据所述交易报文,对交易进行验证,从而确认所述交易请求,向所述闪电网络接入层发送交易确认结果,所述交易确认结果包括:交易成功或交易失败,所述对交易进行 验证,包括:验证交易的发送方和接收方的身份、交易的合法性,以及等等。Specifically, the digital currency lightning network receives the transaction message sent by the lightning network access layer, analyzes the transaction message, and verifies the transaction according to the transaction message, thereby confirming the transaction request, The transaction confirmation result is sent to the lightning network access layer, the transaction confirmation result includes: transaction success or transaction failure, and the verification of the transaction includes: verifying the identity of the sender and receiver of the transaction, and the legality of the transaction , And so on.
具体的,所述交易网络还包括数字货币交易网络,所述将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述数字货币闪电网络根据所述交易报文,返回交易确认结果,包括:Specifically, the transaction network further includes a digital currency transaction network, and the transaction message is sent to the transaction network corresponding to the digital currency identifier, so that the digital currency lightning network can, according to the transaction message, Return the transaction confirmation result, including:
将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络,以使所述数字货币闪电网络根据所述交易报文,向所述数字货币交易网络发送交易请求,所述数字货币交易网络根据所述交易请求,返回交易确认结果。The transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network sends a transaction request to the digital currency transaction network according to the transaction message. The currency transaction network returns the transaction confirmation result according to the transaction request.
在本申请实施例中,所述数字货币交易网络为区块链交易网络。In the embodiment of the present application, the digital currency transaction network is a blockchain transaction network.
步骤S134:根据所述交易确认结果,向所述终端发送支付结果。Step S134: Send the payment result to the terminal according to the transaction confirmation result.
具体的,所述闪电网络接入层根据所述数字货币闪电网络发送的交易确认结果,向所述配置有数字钱包的电子设备和POS设备发送支付结果,所述支付结果包括支付成功或支付失败。Specifically, the lightning network access layer sends a payment result to the electronic device and POS device equipped with a digital wallet according to the transaction confirmation result sent by the digital currency lightning network, and the payment result includes payment success or payment failure .
在本申请实施例中,所述方法还包括:获取终端发送的货币转换请求,所述货币转换请求封装有待转换数字货币的货币标识;In the embodiment of the present application, the method further includes: obtaining a currency conversion request sent by the terminal, the currency conversion request encapsulating a currency identifier of the digital currency to be converted;
根据所述货币转换请求,组装与所述货币标识对应的转换报文;Assemble a conversion message corresponding to the currency identifier according to the currency conversion request;
将所述转换报文发送至与所述货币标识对应的货币转换节点,以使所述货币转换节点根据所述转换报文,将所述待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户,其中,所述货币转换节点的种类为至少两个,每一种所述数字货币标识皆对应一种所述货币转换节点。The conversion message is sent to the currency conversion node corresponding to the currency identifier, so that the currency conversion node converts the digital currency to be converted into a target currency according to the conversion message, and converts the target The currency is settled to an account corresponding to the terminal, wherein there are at least two types of the currency conversion nodes, and each type of the digital currency identifier corresponds to a type of the currency conversion node.
具体的,所述货币转换请求封装有待转换数字货币的货币标识、数量以及付款方、收款方的信息,所述数字钱包或POS设备向闪电网络接入层发送货币转换请求,所述闪电网络接入层根据所述货币转换请求,组装与所述货币标识对应的转换报文,并将所述转换报文发送至与所述货币标识对应的货币转换节点,以使所述货币转换节点根据所述转换报文,将所述待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户。Specifically, the currency conversion request encapsulates the currency identification and quantity of the digital currency to be converted, and the information of the payer and the payee, the digital wallet or POS device sends the currency conversion request to the lightning network access layer, and the lightning network The access layer assembles the conversion message corresponding to the currency identifier according to the currency conversion request, and sends the conversion message to the currency conversion node corresponding to the currency identifier, so that the currency conversion node is The conversion message converts the digital currency to be converted into a target currency, and settles the target currency to an account corresponding to the terminal.
在本申请实施例中,所述数字钱包或POS设备还可以直接向法定货币转换服务节点发送货币转换请求,以使所述法定货币转换服务节点根据所述货币转换请求,向所述货币标识对应的法定货币转换机构转发所述货币转换请求,以使所述法定货币转换机构向所述法定货币转换服务节点返回受理通知,再由所述法定货币转换服务节点向所述数字钱包或POS设备返回受理通知,所述法定货币转换机构在约定时间内将所述货币转换请求对应的法定货币转入指定的商户账户,可以理解的是,所述货币转换请求中包含指定的商户账户的信息以及约定时间。In the embodiment of this application, the digital wallet or POS device can also directly send a currency conversion request to the legal currency conversion service node, so that the legal currency conversion service node corresponds to the currency identifier according to the currency conversion request. The legal currency conversion agency forwards the currency conversion request, so that the legal currency conversion agency returns an acceptance notice to the legal currency conversion service node, and the legal currency conversion service node returns to the digital wallet or POS device Accepting the notice, the legal currency conversion agency transfers the legal currency corresponding to the currency conversion request to the designated merchant account within the agreed time. It is understandable that the currency conversion request contains the information of the designated merchant account and the agreement time.
在本申请实施例中,通过提供一种数字货币的聚合支付方法,所述方法包括:接收终端发送的支付请求,根据所述支付请求,生成交易请求,向所述数字货币的闪电网络发送所述交易请求,以使所述数字货币的闪电网络将所述交易请求发送到数字货币的交易网络,接收所述数字货币的闪电网络返回的交易确认信息,根据所述交易确认信息,向所述数字钱包以及所述POS设备发送支付结果。通过上述方式,本申请实施例解决了目前只能针对一种数字货币进行交易的技术问题,实现多种数字货币的聚合支付,并且,能够提交数字货币交易的实时性,从而提高用户的使用体验。In this embodiment of the application, a digital currency aggregate payment method is provided. The method includes: receiving a payment request sent by a terminal, generating a transaction request according to the payment request, and sending the payment to the lightning network of the digital currency. The transaction request, so that the lightning network of the digital currency sends the transaction request to the transaction network of the digital currency, receives the transaction confirmation information returned by the lightning network of the digital currency, and sends the transaction confirmation information to the The digital wallet and the POS device send the payment result. Through the above method, the embodiment of the application solves the current technical problem that only one type of digital currency can be traded, realizes the aggregate payment of multiple digital currencies, and can submit real-time digital currency transactions, thereby improving the user experience .
请参阅图14,图14为本申请实施例提供的一种数字货币的聚合支付装置的结构示意图,该数字货币的聚合支付装置可以应用于边缘服务器,如图14所示,该数字货币的聚合支付装置140包括:Please refer to FIG. 14. FIG. 14 is a schematic structural diagram of a digital currency aggregation payment device provided by an embodiment of the application. The digital currency aggregation payment device can be applied to an edge server. As shown in FIG. 14, the digital currency aggregation The payment device 140 includes:
支付请求单元141,用于用于获取终端发送的支付请求,所述支付请求封装有数字货币标识;The payment request unit 141 is configured to obtain a payment request sent by the terminal, and the payment request is encapsulated with a digital currency identifier;
交易报文单元142,用于根据所述支付请求,组装与所述数字货币标识对应的交易报文;The transaction message unit 142 is configured to assemble a transaction message corresponding to the digital currency identifier according to the payment request;
交易确认结果单元143,用于将所述交易报文发送至与所述数字货币标识对应的交易网 络,以使所述交易网络根据所述交易报文,返回交易确认结果;The transaction confirmation result unit 143 is configured to send the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network returns the transaction confirmation result according to the transaction message;
支付结果单元144,用于根据所述交易确认结果,向所述终端发送支付结果。The payment result unit 144 is configured to send a payment result to the terminal according to the transaction confirmation result.
货币转换单元145,用于获取终端发送的货币转换请求,所述货币转换请求封装有待转换数字货币的货币标识;The currency conversion unit 145 is configured to obtain a currency conversion request sent by the terminal, and the currency conversion request encapsulates the currency identifier of the digital currency to be converted;
根据所述货币转换请求,组装与所述货币标识对应的转换报文;Assemble a conversion message corresponding to the currency identifier according to the currency conversion request;
将所述转换报文发送至与所述货币标识对应的货币转换节点,以使所述货币转换节点根据所述转换报文,将所述待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的商户账户。The conversion message is sent to the currency conversion node corresponding to the currency identifier, so that the currency conversion node converts the digital currency to be converted into a target currency according to the conversion message, and converts the target The currency is settled to the merchant account corresponding to the terminal.
在本申请实施例中,所述交易网络包括至少两种数字货币闪电网络,每一种所述数字货币标识皆对应一种所述数字货币闪电网络。In the embodiment of the present application, the transaction network includes at least two digital currency lightning networks, and each of the digital currency identifiers corresponds to one kind of the digital currency lightning network.
在本申请实施例中,所述交易确认结果单元143,具体用于:In the embodiment of the present application, the transaction confirmation result unit 143 is specifically configured to:
将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络,以使所述数字货币闪电网络根据所述交易报文,返回交易确认结果。The transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network returns a transaction confirmation result according to the transaction message.
在本申请实施例中,所述交易网络还包括数字货币交易网络,所述交易确认结果单元143,具体用于:In the embodiment of the present application, the transaction network also includes a digital currency transaction network, and the transaction confirmation result unit 143 is specifically configured to:
将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络,以使所述数字货币闪电网络根据所述交易报文,向所述数字货币交易网络发送交易请求,所述数字货币交易网络根据所述交易请求,返回交易确认结果。The transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network sends a transaction request to the digital currency transaction network according to the transaction message. The currency transaction network returns the transaction confirmation result according to the transaction request.
在本申请实施例中,所述数字货币交易网络为区块链交易网络。In the embodiment of the present application, the digital currency transaction network is a blockchain transaction network.
在本申请实施例中,所述货币转换节点的种类为至少两个,每一种所述数字货币标识皆对应一种所述货币转换节点。In the embodiment of the present application, there are at least two types of the currency conversion nodes, and each type of the digital currency identifier corresponds to a type of the currency conversion node.
在本申请实施例中,所述终端包括配置有数字钱包的电子设备或者POS设备。In the embodiment of the present application, the terminal includes an electronic device or a POS device configured with a digital wallet.
在本申请实施例中,所述支付请求由所述数字钱包触发所述电子设备扫描所述POS设备的标识码而产生,或者,所述支付请求由所述POS设备扫描所述数字钱包的标识码而产生。In the embodiment of the present application, the payment request is generated by the digital wallet triggering the electronic device to scan the identification code of the POS device, or the payment request is generated by the POS device scanning the identification code of the digital wallet Code.
由于装置实施例和方法实施例是基于同一构思,在内容不互相冲突的前提下,装置实施例的内容可以引用方法实施例的,在此不赘述。Since the device embodiment and the method embodiment are based on the same concept, the content of the device embodiment can be quoted from the method embodiment on the premise that the content does not conflict with each other, which will not be repeated here.
在本申请实施例中,通过提供一种数字货币的聚合支付装置,包括:支付请求单元,用于获取终端发送的支付请求,所述支付请求封装有数字货币标识;交易报文单元,用于根据所述支付请求,组装与所述数字货币标识对应的交易报文;交易确认结果单元,用于将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果;支付结果单元,用于根据所述交易确认结果,向所述终端发送支付结果。通过上述方式,本申请实施例解决了目前只能针对一种数字货币进行交易的技术问题,实现多种数字货币的聚合支付,提高用户的使用体验。In the embodiment of the present application, a digital currency aggregate payment device is provided, including: a payment request unit for obtaining a payment request sent by a terminal, the payment request is encapsulated with a digital currency identifier; a transaction message unit for According to the payment request, a transaction message corresponding to the digital currency identifier is assembled; a transaction confirmation result unit is used to send the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction The network returns the transaction confirmation result according to the transaction message; the payment result unit is used to send the payment result to the terminal according to the transaction confirmation result. In the above manner, the embodiment of the present application solves the current technical problem that transactions can only be performed on one digital currency, realizes the aggregate payment of multiple digital currencies, and improves the user experience.
请参阅图15,图15是本申请实施例提供一种边缘服务器的结构示意图。其中,该边缘服务器可以是塔式服务器、机架式服务器等电子设备。Please refer to FIG. 15. FIG. 15 is a schematic structural diagram of an edge server provided by an embodiment of the present application. Wherein, the edge server may be an electronic device such as a tower server or a rack server.
如图15所示,该电子设备150包括一个或多个处理器151以及存储器152。其中,图15中以一个处理器151为例。As shown in FIG. 15, the electronic device 150 includes one or more processors 151 and a memory 152. Among them, one processor 151 is taken as an example in FIG. 15.
处理器151和存储器152可以通过总线或者其他方式连接,图15中以通过总线连接为例。The processor 151 and the memory 152 may be connected through a bus or in other ways. In FIG. 15, the connection through a bus is taken as an example.
存储器152作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的一种数字货币的聚合支付方法对应的单元(例如,图14所述的各个单元)。处理器151通过运行存储在存储器152中的非易失性软件程序、指令以及模块,从而执行数字货币的聚合支付方法的各种功能应用以及数据处理,即实现上述方法实施例数字货币的聚合支付方法以及上述装置实施例的各个模块和单元的功能。The memory 152, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as a digital currency aggregate payment in the embodiment of this application The unit corresponding to the method (for example, each unit described in Figure 14). The processor 151 executes various functional applications and data processing of the digital currency aggregate payment method by running the non-volatile software programs, instructions, and modules stored in the memory 152, that is, realizes the digital currency aggregate payment in the above method embodiments The method and the functions of the modules and units of the above-mentioned device embodiments.
存储器152可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个 磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器152可选包括相对于处理器151远程设置的存储器,这些远程存储器可以通过网络连接至处理器151。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 152 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the storage 152 may optionally include storage remotely provided with respect to the processor 151, and these remote storages may be connected to the processor 151 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
所述模块存储在所述存储器152中,当被所述一个或者多个处理器151执行时,执行上述任意方法实施例中的数字货币的聚合支付方法,例如,执行以上描述的图13所示的各个步骤;也可实现图14所述的各个模块或单元的功能。The module is stored in the memory 152, and when executed by the one or more processors 151, executes the digital currency aggregation payment method in any of the above method embodiments, for example, executes the method shown in FIG. 13 described above Each step; can also achieve the function of each module or unit described in Figure 14.
本申请实施例的边缘服务器以多种形式存在,在执行以上描述的图13所示的各个步骤;也可实现图14所述的各个单元的功能时,包括但不限于:The edge server of the embodiment of the present application exists in various forms, and when it executes the steps shown in FIG. 13 described above; it can also realize the functions of the units described in FIG. 14, including but not limited to:
(1)塔式服务器(1) Tower server
一般的塔式服务器机箱和我们常用的PC机箱差不多,而大型的塔式机箱就要粗大很多,总的来说外形尺寸没有固定标准。The general tower server case is similar to our commonly used PC case, while the large tower case is much larger. Generally speaking, there is no fixed standard for the external dimensions.
(2)机架式服务器(2) Rack server
机架式服务器是由于满足企业的密集部署,形成的以19英寸机架作为标准宽度的服务器类型,高度则从1U到数U。将服务器放置到机架上,并不仅仅有利于日常的维护及管理,也可能避免意想不到的故障。首先,放置服务器不占用过多空间。机架服务器整齐地排放在机架中,不会浪费空间。其次,连接线等也能够整齐地收放到机架里。电源线和LAN线等全都能在机柜中布好线,可以减少堆积在地面上的连接线,从而防止脚踢掉电线等事故的发生。规定的尺寸是服务器的宽(48.26cm=19英寸)与高(4.445cm的倍数)。由于宽为19英寸,所以有时也将满足这一规定的机架称为“19英寸机架”。Rack-mounted servers are a type of server with a 19-inch rack as the standard width due to the intensive deployment of enterprises, and the height ranges from 1U to several U. Placing the server on the rack is not only conducive to daily maintenance and management, but may also avoid unexpected failures. First, placing the server does not take up too much space. Rack servers are neatly arranged in the racks without wasting space. Secondly, the connecting wires can also be neatly stored in the rack. Power cables and LAN cables can all be routed in the cabinet, which can reduce the accumulation of connecting cables on the ground and prevent accidents such as kicking off the cables. The prescribed size is the width (48.26cm=19 inches) and height (multiples of 4.445cm) of the server. Since the width is 19 inches, the racks that meet this requirement are sometimes called "19-inch racks."
(3)刀片式服务器(3) Blade server
刀片服务器是一种HAHD(High Availability High Density,高可用高密度)的低成本服务器平台,是专门为特殊应用行业和高密度计算机环境设计的,其中每一块“刀片”实际上就是一块系统母板,类似于一个个独立的服务器。在这种模式下,每一个母板运行自己的系统,服务于指定的不同用户群,相互之间没有关联。不过可以使用系统软件将这些母板集合成一个服务器集群。在集群模式下,所有的母板可以连接起来提供高速的网络环境,可以共享资源,为相同的用户群服务。The blade server is a low-cost server platform of HAHD (High Availability High Density). It is specially designed for special application industries and high-density computer environments. Each "blade" is actually a system motherboard , Similar to independent servers. In this mode, each motherboard runs its own system, serving different user groups specified, and is not related to each other. However, system software can be used to assemble these motherboards into a server cluster. In the cluster mode, all motherboards can be connected to provide a high-speed network environment, can share resources, and serve the same user group.
(4)云服务器(4) Cloud server
云服务器(Elastic Compute Service,ECS)是一种简单高效、安全可靠、处理能力可弹性伸缩的计算服务。其管理方式比物理服务器更简单高效,用户无需提前购买硬件,即可迅速创建或释放任意多台云服务器。云服务器的分布式存储用于将大量服务器整合为一台超级计算机,提供大量的数据存储和处理服务。分布式文件系统、分布式数据库允许访问共同存储资源,实现应用数据文件的IO共享。虚拟机可以突破单个物理机的限制,动态的资源调整与分配消除服务器及存储设备的单点故障,实现高可用性。Cloud Server (Elastic Compute Service, ECS) is a simple, efficient, safe and reliable computing service with elastically scalable processing capabilities. Its management method is simpler and more efficient than physical servers. Users can quickly create or release any number of cloud servers without purchasing hardware in advance. The distributed storage of cloud servers is used to integrate a large number of servers into a supercomputer, providing a large amount of data storage and processing services. Distributed file system and distributed database allow access to common storage resources and realize IO sharing of application data files. Virtual machines can break through the limitations of a single physical machine, dynamically adjust and allocate resources to eliminate single points of failure of servers and storage devices, and achieve high availability.
本申请实施例的数字钱包或配置有数字钱包的电子设备以多种形式存在,上述数字钱包或配置有数字钱包的电子设备包括但不限于:The digital wallets or electronic devices equipped with digital wallets in the embodiments of the present application exist in various forms. The aforementioned digital wallets or electronic devices equipped with digital wallets include but are not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类电子设备包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication equipment: This type of equipment is characterized by mobile communication functions, and its main goal is to provide voice and data communications. Such electronic devices include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.
(2)移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类电子设备包括:PDA、MID和UMPC设备等,例如iPad。(2) Mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has calculation and processing functions, and generally also has mobile Internet features. Such electronic devices include: PDA, MID and UMPC devices, such as iPad.
(3)便携式娱乐设备:这类设备可以显示和播放视频内容,一般也具备移动上网特性。该类设备包括:视频播放器,掌上游戏机,以及智能玩具和便携式车载导航设备。(3) Portable entertainment equipment: This type of equipment can display and play video content, and generally also has mobile Internet features. Such devices include: video players, handheld game consoles, as well as smart toys and portable car navigation devices.
(4)其他具有视频播放功能和上网功能的电子设备。(4) Other electronic equipment with video playback function and Internet access function.
本申请实施例中的POS设备以多种形式存在,包括但不限于:The POS devices in the embodiments of this application exist in various forms, including but not limited to:
(1)手持POS机:体积较小,移动方便,能以单键快速操作,不必死记及键入多位货号, 手持POS机的优点是:随身携带方便、体积小、成本低,缺点是:需外置设备、数据传输慢、到账时间慢、刷卡限额低,比如拉卡拉刷卡器。(1) Handheld POS machine: It is small in size, easy to move, and can be quickly operated with a single key. There is no need to memorize and type in multi-digit article numbers. The advantages of hand-held POS machines are: convenient to carry, small size, and low cost. External equipment, slow data transmission, slow arrival time, and low credit card limit, such as Lakala card reader.
(2)台式POS机:体积较手持POS机大,功能比手持POS机齐全。(2) Desktop POS machine: The volume is larger than the handheld POS machine, and the functions are more complete than the handheld POS machine.
(3)移动手机POS机:按操作方式分类分为手机外置设备刷卡机和手机专用pos机,移动手机POS机的优点是:不需外置设备、方便、随身携带、能够跨行转账、到账时间快、刷卡限额大、安全性能高,缺点是:无打印账单功能、成本高,比如微银通pos手。(3) Mobile phone POS machines: According to the operation mode, they are classified into mobile phone external device credit card machines and mobile phone dedicated POS machines. The advantages of mobile phone POS machines are: no external equipment is required, convenient, portable, capable of cross-bank transfer, and The billing time is fast, the credit card limit is large, and the security performance is high. The disadvantages are: no bill printing function, high cost, such as WeChat POS.
本申请实施例还提供了一种非易失性计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图15中的一个处理器151,可使得上述一个或多个处理器可执行上述任意方法实施例中的数字货币的聚合支付方法,例如,执行上述任意方法实施例中的数字货币的聚合支付方法,例如,执行以上描述的图13所示的各个步骤;也可实现图14所述的各个单元的功能。An embodiment of the present application also provides a non-volatile computer storage medium, the computer storage medium stores computer-executable instructions, the computer-executable instructions are executed by one or more processors, such as a process in FIG. 15 The device 151 can make the aforementioned one or more processors execute the digital currency aggregate payment method in any of the foregoing method embodiments, for example, execute the digital currency aggregate payment method in any of the foregoing method embodiments, for example, perform the above description The steps shown in Figure 13; the functions of the units described in Figure 14 can also be implemented.
以上所描述的装置或设备实施例仅仅是示意性的,其中所述作为分离部件说明的单元模块可以是或者也可以不是物理上分开的,作为模块单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络模块单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device or device embodiments described above are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as modular units may or may not be physical units , Which can be located in one place, or can be distributed to multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用直至得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that each implementation manner can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution essentially or the part that contributes to the related technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk , CD-ROM, etc., including several instructions until a computer device (which can be a personal computer, server, or network device, etc.) executes the methods described in each embodiment or some parts of the embodiment.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; under the idea of this application, the above embodiments or the technical features in different embodiments can also be combined. The steps can be implemented in any order, and there are many other variations in different aspects of the application as described above. For the sake of brevity, they are not provided in the details; although the application has been described in detail with reference to the foregoing embodiments, it is common in the art The technical personnel should understand that: they can still modify the technical solutions described in the foregoing embodiments, or equivalently replace some of the technical features; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the implementations of this application Examples of the scope of technical solutions.

Claims (22)

  1. 一种数字货币的聚合支付方法,其特征在于,包括:An aggregate payment method for digital currency, characterized in that it includes:
    获取终端发送的支付请求,所述支付请求封装有数字货币标识;Acquiring a payment request sent by the terminal, where the payment request is encapsulated with a digital currency identifier;
    根据所述支付请求,组装与所述数字货币标识对应的交易报文;Assemble a transaction message corresponding to the digital currency identifier according to the payment request;
    将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果;Sending the transaction message to the transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation result according to the transaction message;
    根据所述交易确认结果,向所述终端发送支付结果。According to the transaction confirmation result, the payment result is sent to the terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述交易网络包括至少两种数字货币闪电网络,每一种所述数字货币标识皆对应一种所述数字货币闪电网络。The method according to claim 1, wherein the transaction network includes at least two digital currency lightning networks, and each of the digital currency identifiers corresponds to one kind of the digital currency lightning network.
  3. 根据权利要求2所述的方法,其特征在于,所述将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述交易网络根据所述交易报文,返回交易确认结果,包括:The method according to claim 2, wherein the transaction message is sent to a transaction network corresponding to the digital currency identifier, so that the transaction network returns a transaction confirmation according to the transaction message The results include:
    将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络,以使所述数字货币闪电网络根据所述交易报文,返回交易确认结果。The transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network returns a transaction confirmation result according to the transaction message.
  4. 根据权利要求3所述的方法,其特征在于,所述交易网络还包括数字货币交易网络,所述将所述交易报文发送至与所述数字货币标识对应的交易网络,以使所述数字货币闪电网络根据所述交易报文,返回交易确认结果,包括:The method according to claim 3, wherein the transaction network further comprises a digital currency transaction network, and the transaction message is sent to the transaction network corresponding to the digital currency identifier, so that the digital currency The Monetary Lightning Network returns the transaction confirmation result according to the transaction message, including:
    将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络,以使所述数字货币闪电网络根据所述交易报文,向所述数字货币交易网络发送交易请求,所述数字货币交易网络根据所述交易请求,返回交易确认结果。The transaction message is sent to the digital currency lightning network corresponding to the digital currency identifier, so that the digital currency lightning network sends a transaction request to the digital currency transaction network according to the transaction message. The currency transaction network returns the transaction confirmation result according to the transaction request.
  5. 根据权利要求4所述的方法,其特征在于,所述数字货币交易网络为区块链交易网络。The method according to claim 4, wherein the digital currency transaction network is a blockchain transaction network.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    获取终端发送的货币转换请求,所述货币转换请求封装有待转换数字货币的货币标识;Acquiring a currency conversion request sent by the terminal, the currency conversion request encapsulating the currency identifier of the digital currency to be converted;
    根据所述货币转换请求,组装与所述货币标识对应的转换报文;Assemble a conversion message corresponding to the currency identifier according to the currency conversion request;
    将所述转换报文发送至与所述货币标识对应的货币转换节点,以使所述货币转换节点根据所述转换报文,将所述待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户。The conversion message is sent to a currency conversion node corresponding to the currency identifier, so that the currency conversion node converts the digital currency to be converted into a target currency according to the conversion message, and converts the target The currency is settled to the account corresponding to the terminal.
  7. 根据权利要求6所述的方法,其特征在于,所述货币转换节点的种类为至少两个,每一种所述数字货币标识皆对应一种所述货币转换节点。The method according to claim 6, wherein there are at least two types of the currency conversion nodes, and each of the digital currency identifiers corresponds to a type of the currency conversion node.
  8. 根据权利要求1至7任一项所述的方法,其特征在于,所述终端包括配置有数字钱包的电子设备或者POS设备。The method according to any one of claims 1 to 7, wherein the terminal comprises an electronic device or a POS device equipped with a digital wallet.
  9. 根据权利要求8所述的方法,其特征在于,The method according to claim 8, wherein:
    所述支付请求由所述数字钱包触发所述电子设备扫描所述POS设备的标识码而产生;The payment request is generated by the digital wallet triggering the electronic device to scan the identification code of the POS device;
    或者,or,
    所述支付请求由所述POS设备扫描所述数字钱包的标识码而产生。The payment request is generated by the POS device scanning the identification code of the digital wallet.
  10. 一种边缘服务器,其特征在于,包括:An edge server, characterized in that it includes:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至9任一项所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute any one of claims 1 to 9 method.
  11. 一种数字货币的聚合支付系统,其特征在于,包括:A digital currency aggregate payment system, characterized in that it includes:
    闪电网络接入层,用于获取终端发送的支付请求,所述支付请求封装有数字货币标识,根据所述支付请求,组装与所述数字货币标识对应的交易报文,并且,确定与所述数字货币标识对应的交易网络;The Lightning Network access layer is used to obtain the payment request sent by the terminal. The payment request is encapsulated with a digital currency identifier. According to the payment request, a transaction message corresponding to the digital currency identifier is assembled, and the The transaction network corresponding to the digital currency logo;
    交易网络,用于根据所述交易报文,向所述闪电网络接入层返回交易确认结果,以使所述闪电网络接入层根据所述交易确认结果,向所述终端发送支付结果。The transaction network is configured to return a transaction confirmation result to the lightning network access layer according to the transaction message, so that the lightning network access layer sends the payment result to the terminal according to the transaction confirmation result.
  12. 根据权利要求11所述的系统,其特征在于,所述交易网络包括至少两种数字货币闪电网络,每一种所述数字货币标识皆对应一种所述数字货币闪电网络。The system according to claim 11, wherein the transaction network includes at least two digital currency lightning networks, and each of the digital currency identifiers corresponds to one kind of the digital currency lightning network.
  13. 根据权利要求12所述的系统,其特征在于,所述闪电网络接入层确定与所述数字货币标识对应的交易网络,包括:The system according to claim 12, wherein the lightning network access layer determining the transaction network corresponding to the digital currency identifier comprises:
    所述闪电网络接入层确定与所述数字货币标识对应的数字货币闪电网络;The lightning network access layer determines the digital currency lightning network corresponding to the digital currency identifier;
    则所述交易网络用于根据所述交易报文,向所述闪电网络接入层返回交易确认结果,包括:The transaction network is used to return the transaction confirmation result to the lightning network access layer according to the transaction message, including:
    所述数字货币闪电网络根据所述交易报文,向所述闪电网络接入层返回交易确认结果。The digital currency lightning network returns a transaction confirmation result to the lightning network access layer according to the transaction message.
  14. 根据权利要求13所述的系统,其特征在于,所述闪电网络接入层包括:The system according to claim 13, wherein the lightning network access layer comprises:
    交易报文拆包组包模块,用于确定与所述数字货币标识对应的数字货币闪电网络;和The transaction message unpacking and grouping module is used to determine the digital currency lightning network corresponding to the digital currency identifier; and
    交易报文路由模块,用于将所述交易报文发送至与所述数字货币标识对应的数字货币闪电网络。The transaction message routing module is used to send the transaction message to the digital currency lightning network corresponding to the digital currency identifier.
  15. 根据权利要求13所述的系统,其特征在于,所述交易网络还包括数字货币交易网络;The system according to claim 13, wherein the transaction network further comprises a digital currency transaction network;
    所述数字货币闪电网络根据所述交易报文,向所述闪电网络接入层返回交易确认结果,包括:The digital currency lightning network returning the transaction confirmation result to the lightning network access layer according to the transaction message includes:
    所述数字货币闪电网络根据所述交易报文,向所述数字货币交易网络发送交易请求,所述数字货币交易网络根据所述交易请求,返回交易确认结果。The digital currency lightning network sends a transaction request to the digital currency transaction network according to the transaction message, and the digital currency transaction network returns a transaction confirmation result according to the transaction request.
  16. 根据权利要求15所述的系统,其特征在于,所述数字货币交易网络为区块链交易网络。The system according to claim 15, wherein the digital currency transaction network is a blockchain transaction network.
  17. 根据权利要求11所述的系统,其特征在于,所述系统还包括货币转换层,所述货币转换层用于根据终端发送的货币转换请求,将所述货币转换请求中待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户。The system according to claim 11, wherein the system further comprises a currency conversion layer, the currency conversion layer being used to convert the digital currency to be converted in the currency conversion request into a currency conversion request sent by the terminal. Target currency, and settle the target currency to an account corresponding to the terminal.
  18. 根据权利要求17所述的系统,其特征在于,所述货币转换层包括:The system according to claim 17, wherein the currency conversion layer comprises:
    法定货币转换服务节点,用于获取终端发送的货币转换请求,根据所述货币转换请求,组装转换报文;The legal currency conversion service node is used to obtain the currency conversion request sent by the terminal, and assemble the conversion message according to the currency conversion request;
    货币转换节点,用于根据所述转换报文,将所述货币转换请求对应的待转换数字货币转换成目标货币,并将所述目标货币结算至与所述终端对应的账户。The currency conversion node is configured to convert the digital currency to be converted corresponding to the currency conversion request into a target currency according to the conversion message, and settle the target currency to an account corresponding to the terminal.
  19. 根据权利要求18所述的系统,其特征在于,所述法定货币转换服务节点,包括:The system according to claim 18, wherein the legal currency conversion service node comprises:
    转换请求报文拆包组包模块,用于获取终端发送的货币转换请求,所述货币转换请求封装有待转换数字货币的货币标识,并且根据所述货币转换请求,组装与所述货币标识对应的转换报文;The conversion request message unpacking and grouping module is used to obtain the currency conversion request sent by the terminal. The currency conversion request encapsulates the currency identifier of the digital currency to be converted, and according to the currency conversion request, assembles the currency identifier corresponding to the currency conversion request. Conversion message;
    转换请求报文路由模块,用于将所述转换报文发送至与所述货币标识对应的 货币转换节点。The conversion request message routing module is used to send the conversion message to the currency conversion node corresponding to the currency identifier.
  20. 根据权利要求18所述的系统,其特征在于,所述货币转换节点包括至少两个法定货币转换机构,每一个法定货币转换机构对应一种法定货币。The system according to claim 18, wherein the currency conversion node includes at least two legal currency conversion institutions, and each legal currency conversion institution corresponds to a legal currency.
  21. 根据权利要求11至20任一项所述的系统,其特征在于,所述终端包括配置有数字钱包的电子设备或者POS设备。The system according to any one of claims 11 to 20, wherein the terminal comprises an electronic device or a POS device equipped with a digital wallet.
  22. 根据权利要求21所述的系统,其特征在于,所述支付请求由所述数字钱包触发所述电子设备扫描所述POS设备的标识码而产生,或者,所述支付请求由所述POS设备扫描所述数字钱包的标识码而产生。The system according to claim 21, wherein the payment request is generated by the digital wallet triggering the electronic device to scan the identification code of the POS device, or the payment request is scanned by the POS device The identification code of the digital wallet is generated.
PCT/CN2019/090392 2019-06-06 2019-06-06 Aggregated payment method and system for digital currencies, and edge server WO2020243961A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980010722.6A CN111937020A (en) 2019-06-06 2019-06-06 Aggregation payment method and system for digital currency and edge server
PCT/CN2019/090392 WO2020243961A1 (en) 2019-06-06 2019-06-06 Aggregated payment method and system for digital currencies, and edge server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/090392 WO2020243961A1 (en) 2019-06-06 2019-06-06 Aggregated payment method and system for digital currencies, and edge server

Publications (1)

Publication Number Publication Date
WO2020243961A1 true WO2020243961A1 (en) 2020-12-10

Family

ID=73282940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/090392 WO2020243961A1 (en) 2019-06-06 2019-06-06 Aggregated payment method and system for digital currencies, and edge server

Country Status (2)

Country Link
CN (1) CN111937020A (en)
WO (1) WO2020243961A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4123544A1 (en) * 2021-07-22 2023-01-25 Deutsche Telekom AG Method and system for operating a mobile point-of-sales application
US20230206329A1 (en) * 2021-11-23 2023-06-29 Strong Force TX Portfolio 2018, LLC Transaction platforms where systems include sets of other systems

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653619A (en) * 2020-12-07 2021-04-13 布比(北京)网络技术有限公司 Multi-path route determining method and system for lightning network
CN112734415B (en) * 2020-12-31 2024-01-12 深圳市证通电子股份有限公司 Digital money collection method, terminal, device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170228704A1 (en) * 2002-10-01 2017-08-10 World Award Academy Digital currency (virtual payment cards) issued by central bank for mobile and wearable devices
CN107230049A (en) * 2016-03-25 2017-10-03 中国人民银行印制科学技术研究所 The method and system of digital cash is provided
CN107330692A (en) * 2017-06-26 2017-11-07 中国人民银行数字货币研究所 The circulation method and device of digital cash
CN109523377A (en) * 2018-10-18 2019-03-26 上海达家迎信息科技有限公司 A kind of method of commerce of digital cash, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140058944A1 (en) * 2011-07-18 2014-02-27 Rabih S. Ballout Kit, system and associated method and service for providing a platform to prevent fraudulant financial transactions
CN104794806B (en) * 2015-05-05 2017-08-29 谷江涛 A kind of currency conversion device
CN106651331B (en) * 2016-12-22 2019-11-29 飞天诚信科技股份有限公司 A kind of electronic trade method and system based on digital cash
CN108537546A (en) * 2018-04-11 2018-09-14 北京奇虎科技有限公司 Node identities method for tracing, device and computing device based on number of addresses

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170228704A1 (en) * 2002-10-01 2017-08-10 World Award Academy Digital currency (virtual payment cards) issued by central bank for mobile and wearable devices
CN107230049A (en) * 2016-03-25 2017-10-03 中国人民银行印制科学技术研究所 The method and system of digital cash is provided
CN107330692A (en) * 2017-06-26 2017-11-07 中国人民银行数字货币研究所 The circulation method and device of digital cash
CN109523377A (en) * 2018-10-18 2019-03-26 上海达家迎信息科技有限公司 A kind of method of commerce of digital cash, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4123544A1 (en) * 2021-07-22 2023-01-25 Deutsche Telekom AG Method and system for operating a mobile point-of-sales application
US20230206329A1 (en) * 2021-11-23 2023-06-29 Strong Force TX Portfolio 2018, LLC Transaction platforms where systems include sets of other systems
US20230206261A1 (en) * 2021-11-23 2023-06-29 Strong Force TX Portfolio 2018, LLC Transaction platforms where systems include sets of other systems

Also Published As

Publication number Publication date
CN111937020A (en) 2020-11-13

Similar Documents

Publication Publication Date Title
US20220239470A1 (en) Cross-blockchain data processing method and apparatus, device, and computer storage medium
US10977632B2 (en) Electronic bill management method, apparatus, and storage medium
US11669811B2 (en) Blockchain-based digital token utilization
US20230351367A1 (en) Systems and methods of blockchain transaction recordation
WO2020243961A1 (en) Aggregated payment method and system for digital currencies, and edge server
US20220058623A1 (en) Stable Cryptocurrency Coinage
US11316690B2 (en) Blockchain token-based cloud orchestration architecture for discrete virtual network instances
US10592985B2 (en) Systems and methods for a commodity contracts market using a secure distributed transaction ledger
US20220129887A1 (en) Computer-implemented systems and methods for implementing transfers over a blockchain network
US20200020032A1 (en) System and method for cryptocurrency trading
WO2019179829A1 (en) System and method for secure transaction verification in a distributed ledger system
AU2017216289A1 (en) Systems and methods for storing and sharing transactional data using distributed computer systems
JP2019523495A (en) Digital goods management in a distributed transaction consensus network
CN108009810A (en) A kind of Trusted Digital transaction in assets method
US20210173677A1 (en) Graphical User Interface and Operator Console Management System for Distributed Terminal Network
US11316933B2 (en) Service meshes and smart contracts for zero-trust systems
US20210389854A1 (en) Biometric Authentication, Decentralized Learning Framework, and Adaptive Security Protocols in Distributed Terminal Network
CN111507839A (en) Data processing method and device based on block chain, storage medium and equipment
WO2020046786A1 (en) System and method for securing crypto-asset transactions
CN110941840B (en) Data processing method, system and terminal
CN117616410A (en) Multiparty computing in a computer slicing environment
KR20200114324A (en) Block chain based money transfer processing system using cryptocurrency
US20210312026A1 (en) Graphical User Interface and Operator Console Management System for Distributed Terminal Network
Li et al. Secure electronic ticketing system based on consortium blockchain
CN110689412A (en) Method, device, server and storage medium for game virtual article transaction based on block chain

Legal Events

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

Ref document number: 19932068

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19932068

Country of ref document: EP

Kind code of ref document: A1

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 19932068

Country of ref document: EP

Kind code of ref document: A1