WO2022110404A1 - Resource transfer method and apparatus, and device and storage medium - Google Patents

Resource transfer method and apparatus, and device and storage medium Download PDF

Info

Publication number
WO2022110404A1
WO2022110404A1 PCT/CN2020/138076 CN2020138076W WO2022110404A1 WO 2022110404 A1 WO2022110404 A1 WO 2022110404A1 CN 2020138076 W CN2020138076 W CN 2020138076W WO 2022110404 A1 WO2022110404 A1 WO 2022110404A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
account
blockchain
transfer
management server
Prior art date
Application number
PCT/CN2020/138076
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 杭州趣链科技有限公司
Publication of WO2022110404A1 publication Critical patent/WO2022110404A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

A resource transfer method and apparatus, and a device and a storage medium, which belong to the technical field of blockchains. The method is applied to a blockchain system, and comprises: registering a corresponding first blockchain account for a first resource account, and registering a corresponding second blockchain account for a second resource account (501), wherein the first resource account and the second resource account are obtained by registering with different resource management servers; receiving a resource transfer request (502), wherein the resource transfer request carries a first resource quantity of the first resource account that needs to be transferred to the second resource account; and determining a first token quantity corresponding to the first resource quantity, and transferring, to the balance of the second blockchain account, the first token quantity of tokens in the balance of the first blockchain account (503). By means of the method, the flow processing speed can be accelerated, the resource transfer efficiency is improved, and an exchange loss can also be avoided.

Description

资源转移方法、装置、设备和存储介质Resource transfer method, apparatus, device and storage medium
本申请要求于2020年11月24日提交的申请号为202011330849.7、发明名称为“资源转移方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011330849.7 and the invention title "Resource Transfer Method, Apparatus, Equipment and Storage Medium" filed on November 24, 2020, the entire contents of which are incorporated in this application by reference .
技术领域technical field
本申请涉及区块链技术领域,特别涉及一种资源转移方法、装置、设备和存储介质。The present application relates to the field of blockchain technology, and in particular, to a resource transfer method, apparatus, device and storage medium.
背景技术Background technique
伴随着全球经济交往的日益密切,跨境贸易日益增多,在线跨境支付需求也随之增加。With the increasingly close global economic exchanges, cross-border trade is increasing, and the demand for online cross-border payment is also increasing.
目前,多个不同国家的银行共同组建一个基于区块链的跨境支付系统,并约定以任意一个国家的货币作为中介币。在进行跨境支付时,某个银行调用区块链智能合约以利用所在国家的货币购买中介币,通过该跨境支付系统向收款方所在银行支付中介币。收款方所在银行接收到中介币后,调用区块链智能合约卖出中介币,以获得所在国家的货币,将获得的货币添加到收款方账户中。At present, banks in many different countries have jointly established a blockchain-based cross-border payment system, and agreed to use the currency of any country as the intermediary currency. When making a cross-border payment, a bank invokes a blockchain smart contract to purchase an intermediary currency with the currency of the country where it is located, and pays the intermediary currency to the payee's bank through the cross-border payment system. After the payee's bank receives the intermediary currency, it calls the blockchain smart contract to sell the intermediary currency to obtain the currency of the country where it is located, and adds the obtained currency to the payee's account.
然而,上述跨境支付过程中,需要在不同国家的货币与中介币之间进行多次汇兑,容易造成汇兑损失。However, in the above-mentioned cross-border payment process, multiple exchanges between the currencies of different countries and the intermediary currency are required, which is likely to cause exchange losses.
技术问题technical problem
本申请提供了一种资源转移方法、装置、设备和存储介质,可以避免汇兑损失。The present application provides a resource transfer method, device, device and storage medium, which can avoid exchange losses.
技术解决方案technical solutions
第一方面,提供了一种资源转移方法,应用于区块链系统,所述方法包括:为第一资源账户注册对应的第一区块链账户,以及为第二资源账户注册对应的第二区块链账户,所述第一资源账户和所述第二资源账户是在不同的资源管理服务器注册得到的。接收资源转移请求,所述资源转移请求携带所述第一资源账户需要向所述第二资源账户转移的第一资源数量。确定所述第一资源数量对应的第一代币个数。将所述第一区块链账户的余额中所述第一代币个数的代币转移至所述第二区块链账户的余额中。In a first aspect, a resource transfer method is provided, which is applied to a blockchain system. The method includes: registering a corresponding first blockchain account for a first resource account, and registering a corresponding second resource account for a second resource account. For the blockchain account, the first resource account and the second resource account are obtained by registering with different resource management servers. A resource transfer request is received, where the resource transfer request carries the first resource quantity that the first resource account needs to transfer to the second resource account. Determine the number of first tokens corresponding to the number of first resources. Transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account.
第二方面,提供了一种资源转移装置,应用于区块链系统,所述装置包括:In a second aspect, a resource transfer device is provided, applied to a blockchain system, the device includes:
注册模块,用于为第一资源账户注册对应的第一区块链账户,以及为第二资源账户注册对应的第二区块链账户,所述第一资源账户和所述第二资源账户是在不同的资源管理服务器注册得到的。接收模块,用于接收资源转移请求,所述资源转移请求携带所述第一资源账户需要向所述第二资源账户转移的第一资源数量。确定模块,用于确定所述第一资源数量对应的第一代币个数。转移模块,用于将所述第一区块链账户的余额中所述第一代币个数的代币转移至所述第二区块链账户的余额中。A registration module for registering a corresponding first blockchain account for a first resource account and a corresponding second blockchain account for a second resource account, wherein the first resource account and the second resource account are Registered with different resource management servers. A receiving module, configured to receive a resource transfer request, where the resource transfer request carries the first resource quantity to be transferred from the first resource account to the second resource account. A determination module, configured to determine the number of first tokens corresponding to the number of first resources. A transfer module, configured to transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account.
第三方面,提供了一种计算机设备,所述计算机设备包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述的资源转移方法。In a third aspect, there is provided a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being executed by the processor When the above-mentioned resource transfer method is implemented.
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述的资源转移方法。In a fourth aspect, a computer-readable storage medium is provided, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned resource transfer method is implemented.
第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述的资源转移方法的步骤。In a fifth aspect, there is provided a computer program product containing instructions that, when executed on a computer, cause the computer to perform the steps of the above-mentioned resource transfer method.
有益效果beneficial effect
在本申请中,区块链系统在接收到第一资源账户向第二资源账户的资源转移请求时,是将第一资源账户对应的第一区块链账户中的代币转移到第二资源账户对应的第二区块链账户中。如此,将不同资源管理服务器中的资源账户之间的资源转移转换为了区块链系统中的不同区块链账户之间的代币转移。一方面,可以加快流程处理速度,提高资源转移效率,同时可以避免相关技术中的汇兑损失问题。另一方面,区块链的不可篡改性,可以降低资源转移风险,一旦出现问题,可以精确追踪溯源,定位问题发生的具体流程点和责任人,安全可靠。In this application, when the blockchain system receives a resource transfer request from the first resource account to the second resource account, it transfers the tokens in the first blockchain account corresponding to the first resource account to the second resource in the second blockchain account corresponding to the account. In this way, the resource transfer between resource accounts in different resource management servers is converted into the token transfer between different blockchain accounts in the blockchain system. On the one hand, it can speed up process processing, improve resource transfer efficiency, and at the same time avoid exchange losses in related technologies. On the other hand, the immutability of the blockchain can reduce the risk of resource transfer. Once a problem occurs, it can accurately trace the source and locate the specific process point and responsible person of the problem, which is safe and reliable.
附图说明Description of drawings
图1是本申请实施例提供的一种区块链系统的结构示意图;1 is a schematic structural diagram of a blockchain system provided by an embodiment of the present application;
图2是本申请实施例提供的一种区块链的示意图;FIG. 2 is a schematic diagram of a blockchain provided by an embodiment of the present application;
图3是本申请实施例提供的一种资源转移系统的示意图;3 is a schematic diagram of a resource transfer system provided by an embodiment of the present application;
图4是本申请实施例提供的一种资源转移方法的流程图;4 is a flowchart of a resource transfer method provided by an embodiment of the present application;
图5是本申请实施例提供的另一种资源转移方法的流程图;5 is a flowchart of another resource transfer method provided by an embodiment of the present application;
图6是本申请实施例提供的一种资源转移装置的结构示意图;6 is a schematic structural diagram of a resource transfer apparatus provided by an embodiment of the present application;
图7是本申请实施例提供的一种计算机设备的结构示意图。FIG. 7 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
在对本申请实施例进行解释说明之前,先对区块链的相关内容予以说明。Before explaining the embodiments of the present application, the relevant content of the blockchain will be explained first.
图1是本申请实施例提供的一种区块链系统的结构示意图。FIG. 1 is a schematic structural diagram of a blockchain system provided by an embodiment of the present application.
参见图1,区块链系统100是指用于进行节点与节点之间数据共享的系统,区块链系统100中可以包括多个节点101,多个节点101可以是指区块链系统100中各个客户端。每个节点101在进行正常工作可以接收到输入信息,并基于接收到的输入信息维护区块链系统100内的共享数据。为了保证区块链系统100内的信息互通,区块链系统100中的每个节点101之间可以存在信息连接,节点101之间可以通过该信息连接进行信息传输。比如,当区块链系统100中的任意节点101接收到输入信息时,区块链系统100中的其他节点101便根据共识算法获取该输入信息,将该输入信息作为共享数据中的数据进行存储,使得区块链系统100中全部节点101上存储的数据一致。Referring to FIG. 1 , the blockchain system 100 refers to a system for sharing data between nodes. The blockchain system 100 may include multiple nodes 101 , and multiple nodes 101 may refer to the system in the blockchain system 100 . each client. Each node 101 can receive input information during normal work, and maintain shared data within the blockchain system 100 based on the received input information. In order to ensure the information exchange in the blockchain system 100, an information connection may exist between each node 101 in the blockchain system 100, and information transmission may be performed between the nodes 101 through the information connection. For example, when any node 101 in the blockchain system 100 receives input information, other nodes 101 in the blockchain system 100 obtain the input information according to the consensus algorithm, and store the input information as data in the shared data , so that the data stored on all nodes 101 in the blockchain system 100 are consistent.
区块链系统100中的每个节点101均存储一条相同的区块链。参见图2,区块链由多个区块组成,创始块中包括区块头和区块主体,区块头中存储有输入信息特征值、版本号、时间戳和难度值,区块主体中存储有输入信息;创始块的下一区块以创始块为父区块,下一区块中同样包括区块头和区块主体,区块头中存储有当前区块的输入信息特征值、父区块的区块头特征值、版本号、时间戳和难度值,并以此类推,使得区块链中每个区块中存储的区块数据均与父区块中存储的区块数据存在关联,保证了区块中输入信息的安全性。Each node 101 in the blockchain system 100 stores an identical blockchain. Referring to Figure 2, the blockchain consists of multiple blocks. The founding block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp and difficulty value. The block body stores Input information; the next block of the genesis block takes the genesis block as the parent block, the next block also includes the block header and the block body, and the block header stores the input information characteristic value of the current block, the parent block's The block header feature value, version number, timestamp, and difficulty value, and so on, make the block data stored in each block in the blockchain associated with the block data stored in the parent block, ensuring that Security of the information entered in the block.
区块链系统100具有分布式数据存储、点对点传输、共识机制、加密算法等计算机技术。区块链系统100是一个分布式的共享账本和数据库,具有去中心化、不可篡改、全程留痕、可以追溯、集体维护、公开透明等特点。这些特点保证了区块链的共享开放、真实完整和安全可靠。The blockchain system 100 has computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. The blockchain system 100 is a distributed shared ledger and database, which has the characteristics of decentralization, non-tampering, full traces, traceability, collective maintenance, openness and transparency, etc. These features ensure the shared openness, authenticity, integrity, security and reliability of the blockchain.
下面对本申请实施例涉及的系统架构予以说明。The system architecture involved in the embodiments of the present application will be described below.
图3是本申请实施例提供的一种资源转移系统的示意图。参见图3,该资源转移系统包括:多个资源管理服务器301和区块链系统302。FIG. 3 is a schematic diagram of a resource transfer system provided by an embodiment of the present application. Referring to FIG. 3 , the resource transfer system includes: a plurality of resource management servers 301 and a blockchain system 302 .
区块链系统302可以是上文图1-图2实施例所述的区块链系统100。多个资源管理服务器301中的每个资源管理服务器301与区块链系统302可以通过有线网络或无线网络进行通信。也即,多个资源管理服务器301中的每个资源管理服务器301可以接入区块链系统302。多个资源管理服务器301中的每个资源管理服务器301用于进行资源管理。该资源可以是具有流通价值的资源,比如,该资源可以是货币,在此情况下,多个资源管理服务器301可以是各个金融机构(如银行)的服务器。The blockchain system 302 may be the blockchain system 100 described in the embodiments of FIGS. 1-2 above. Each resource management server 301 of the plurality of resource management servers 301 and the blockchain system 302 may communicate through a wired network or a wireless network. That is, each resource management server 301 of the plurality of resource management servers 301 can access the blockchain system 302 . Each resource management server 301 of the plurality of resource management servers 301 is used for resource management. The resource may be a resource with circulating value, for example, the resource may be currency, in this case, the plurality of resource management servers 301 may be servers of various financial institutions (eg, banks).
一种可能的场景中,多个资源管理服务器301中的任意两个资源管理服务器301所处的地区不同,不同地区使用的资源不同。比如,多个资源管理服务器301中的任意两个资源管理服务器301所处的组织或国家不同,不同组织或国家的货币不同。这种情况下,多个资源管理服务器301中的任意两个资源管理服务器301之间的资源转移属于跨境支付。In a possible scenario, any two resource management servers 301 in the multiple resource management servers 301 are located in different regions, and resources used in different regions are different. For example, any two resource management servers 301 in the multiple resource management servers 301 are located in different organizations or countries, and different organizations or countries have different currencies. In this case, the resource transfer between any two resource management servers 301 in the plurality of resource management servers 301 is a cross-border payment.
对于多个资源管理服务器301中的任意一个资源管理服务器301来说,用户可以在这个资源管理服务器301中注册资源账户,用户可以向该资源账户存入资源,或从该资源账户取出资源。比如,用户可以在银行的服务器中注册银行账户,用户可以向该银行账户存入货币,或从该银行账户取出货币。每个资源管理服务器301可以在区块链系统302为其资源账户注册对应的区块链账户。For any one resource management server 301 of the plurality of resource management servers 301, a user can register a resource account in the resource management server 301, and the user can deposit resources into the resource account or withdraw resources from the resource account. For example, a user may register a bank account in a server of a bank, and the user may deposit money into or withdraw money from the bank account. Each resource management server 301 may register a corresponding blockchain account for its resource account in the blockchain system 302 .
多个资源管理服务器301包括目标资源管理服务器3011和除目标资源管理服务器3011之外的其他资源管理服务器3012,其他资源管理服务器3012的数量可以大于或等于2。目标资源管理服务器3011可以是代币发行方的资源管理服务器。其他资源管理服务器3012可以是非代币发行方的资源管理服务器。本申请实施例中,可以在具有代币发行资格的地区部署目标资源管理服务器3011,在其他地区部署其他资源管理服务器3012,不同的地区可以部署不同的资源管理服务器3012。The plurality of resource management servers 301 include a target resource management server 3011 and other resource management servers 3012 except the target resource management server 3011 , and the number of other resource management servers 3012 may be greater than or equal to two. The target resource management server 3011 may be the token issuer's resource management server. Other resource management servers 3012 may be non-token issuer resource management servers. In this embodiment of the present application, the target resource management server 3011 may be deployed in a region qualified for token issuance, other resource management servers 3012 may be deployed in other regions, and different resource management servers 3012 may be deployed in different regions.
目标资源管理服务器3011可以在其他资源管理服务器3012中的每个资源管理服务器3012中均注册资源账户,该资源账户可以称为目标账户,也可称为清结算账户。也就是说,目标资源管理服务器3011具有多个目标账户。目标资源管理服务器3011可以在区块链系统302注册区块链账户,该区块链账户可以称为目标区块链账户。The target resource management server 3011 may register a resource account in each of the other resource management servers 3012, and the resource account may be called a target account or a settlement account. That is, the target resource management server 3011 has a plurality of target accounts. The target resource management server 3011 may register a blockchain account in the blockchain system 302, and the blockchain account may be referred to as a target blockchain account.
区块链账户是存在于区块链系统302配置的区块链上的账户。也即,区块链账户的账户数据存储于区块链系统302配置的区块链。区块链账户的账户数据可以包括账户地址、余额、状态变量等,区块链账户的余额表示该区块链账户拥有的代币(token)个数。A blockchain account is an account that exists on the blockchain configured by the blockchain system 302 . That is, the account data of the blockchain account is stored in the blockchain configured by the blockchain system 302 . The account data of the blockchain account can include account address, balance, state variables, etc. The balance of the blockchain account represents the number of tokens owned by the blockchain account.
其他资源管理服务器3012中包括第一资源管理服务器和第二资源管理服务器。第一资源管理服务器、第二资源管理服务器、目标资源管理服务器3011和区块链系统302可以执行下文图4实施例所述的资源转移方法,来实现不同资源管理服务器中的资源账户之间的资源转移。The other resource management servers 3012 include a first resource management server and a second resource management server. The first resource management server, the second resource management server, the target resource management server 3011 and the blockchain system 302 can execute the resource transfer method described in the embodiment of FIG. 4 below to realize the transfer between resource accounts in different resource management servers. resource transfer.
下面对本申请实施例提供的资源转移方法进行详细地解释说明。The resource transfer method provided by the embodiment of the present application will be explained in detail below.
图4是本申请实施例提供的一种资源转移方法的流程图。参见图4,包括以下步骤。FIG. 4 is a flowchart of a resource transfer method provided by an embodiment of the present application. Referring to Figure 4, the following steps are included.
资源管理服务器可以在区块链系统为资源账户注册对应的区块链账户。下面以第一资源管理服务器和第二资源管理服务器为例,来对区块链账户注册过程进行说明,该过程可以包括如下步骤401-步骤404。其中,步骤401和步骤402是第一资源管理服务器在区块链系统为第一资源账户注册对应的区块链账户,步骤403和步骤404是第二资源管理服务器在区块链系统为第二资源账户注册对应的区块链账户。The resource management server can register the corresponding blockchain account for the resource account in the blockchain system. The following takes the first resource management server and the second resource management server as examples to describe the blockchain account registration process, which may include the following steps 401-404. Among them, steps 401 and 402 are that the first resource management server registers the corresponding blockchain account for the first resource account in the blockchain system, and steps 403 and 404 are that the second resource management server is the second resource management server in the blockchain system. The resource account registers the corresponding blockchain account.
步骤401:第一资源管理服务器向区块链系统发送区块链账户注册请求,该区块链账户注册请求携带第一资源账户标识。Step 401: The first resource management server sends a blockchain account registration request to the blockchain system, where the blockchain account registration request carries the first resource account identifier.
该区块链账户注册请求用于请求注册第一资源账户对应的区块链账户。第一资源账户标识用于标识第一资源账户,如第一资源账户标识可以是第一资源账户的编号等。第一资源账户是用户在第一资源管理服务器中注册的资源账户。比如,当第一资源管理服务器是银行的服务器时,第一资源账户可以是用户在银行的服务器中注册的银行账户,第一资源账户标识可以是该银行账户的账号。The blockchain account registration request is used to request to register the blockchain account corresponding to the first resource account. The first resource account identifier is used to identify the first resource account, for example, the first resource account identifier may be the serial number of the first resource account or the like. The first resource account is a resource account registered by the user in the first resource management server. For example, when the first resource management server is a server of a bank, the first resource account may be a bank account registered by the user in the server of the bank, and the first resource account identifier may be the account number of the bank account.
用户可以通过第一资源管理客户端向第一资源管理服务器发起区块链账户注册申请,该区块链账户注册申请中包括第一资源账户标识和用户信息。第一资源管理服务器接收到该区块链账户注册申请后,可以向区块链系统发送该区块链账户注册请求。可选地,第一资源管理服务器接收到该区块链账户注册申请后,可以先对该区块链账户注册申请进行审核,在审核通过后再向区块链系统发送该区块链账户注册请求。The user may initiate a blockchain account registration application to the first resource management server through the first resource management client, where the blockchain account registration application includes the first resource account identifier and user information. After receiving the blockchain account registration application, the first resource management server may send the blockchain account registration request to the blockchain system. Optionally, after receiving the blockchain account registration application, the first resource management server may review the blockchain account registration application first, and then send the blockchain account registration application to the blockchain system after the review is passed. ask.
第一资源管理服务器对该区块链账户注册申请的审核可以是自动进行的,比如第一资源管理服务器可以按照预设的注册条件对该区块链账户注册申请进行审核,该注册条件可以根据具体的业务需求进行预先设置。若该区块链账户注册申请满足该注册条件,则第一资源管理服务器确定该区块链账户注册申请审核通过;若该区块链账户注册申请不满足该注册条件,则第一资源管理服务器确定该区块链账户注册申请审核未通过。The first resource management server may review the blockchain account registration application automatically. For example, the first resource management server may review the blockchain account registration application according to preset registration conditions. Specific business needs are preset. If the blockchain account registration application satisfies the registration conditions, the first resource management server determines that the blockchain account registration application is approved; if the blockchain account registration application does not meet the registration conditions, the first resource management server It is determined that the application for registration of the blockchain account has not been approved.
或者,第一资源管理服务器对该区块链账户注册申请的审核可以是手动进行的,比如可以由第一资源管理服务器的工作人员来对该区块链账户注册申请进行审核。该工作人员确定该区块链账户注册申请不存在问题时,可以触发审核通过指令,第一资源管理服务器检测到该审核通过指令后,确定该区块链账户注册申请审核通过;该工作人员确定该区块链账户注册申请存在问题时,可以触发审核未通过指令,第一资源管理服务器检测到该审核未通过指令后,确定该区块链账户注册申请审核未通过。Alternatively, the first resource management server may review the blockchain account registration application manually, for example, the first resource management server may review the blockchain account registration application. When the staff member determines that there is no problem with the blockchain account registration application, he can trigger an approval instruction. After detecting the approval instruction, the first resource management server determines that the blockchain account registration application is approved; the staff member determines When there is a problem with the blockchain account registration application, a review failure instruction may be triggered, and the first resource management server determines that the blockchain account registration application review fails after detecting the review failure command.
步骤402:区块链系统为第一资源账户注册对应的第一区块链账户。Step 402: The blockchain system registers the corresponding first blockchain account for the first resource account.
具体地,区块链系统接收到第一资源管理服务器发送的区块链账户注册请求后,可以生成第一区块链账户,第一区块链账户的账户数据包括账户地址和余额;将该区块链账户注册请求携带的第一资源账户标识与第一区块链账户的账户地址对应存储。第一资源账户标识与第一区块链账户的账户地址对应存储后,第一资源账户就与第一区块链账户绑定了。Specifically, after receiving the blockchain account registration request sent by the first resource management server, the blockchain system can generate a first blockchain account, and the account data of the first blockchain account includes the account address and balance; The first resource account identifier carried in the blockchain account registration request is stored corresponding to the account address of the first blockchain account. After the first resource account identifier is stored corresponding to the account address of the first blockchain account, the first resource account is bound to the first blockchain account.
其中,区块链系统生成第一区块链账户的操作与相关技术中区块链系统生成某个区块链账户的操作类似,本申请实施例对此不进行详细阐述。The operation of generating the first blockchain account by the blockchain system is similar to the operation of generating a certain blockchain account by the blockchain system in the related art, which is not described in detail in this embodiment of the present application.
步骤403:第二资源管理服务器向区块链系统发送区块链账户注册请求,该区块链账户注册请求携带第二资源账户标识。Step 403: The second resource management server sends a blockchain account registration request to the blockchain system, where the blockchain account registration request carries the second resource account identifier.
该区块链账户注册请求用于请求注册第二资源账户对应的区块链账户。第二资源管理服务器与第一资源管理服务器是不同的资源管理服务器。可选地,第一资源管理服务器和第二资源管理服务器所处的地区不同。比如,第一资源管理服务器和第二资源管理服务器可以部署在不同的组织或国家,此时第一资源管理服务器中的资源账户和第二资源管理服务器中的资源账户之间进行的资源转移是跨境支付。The blockchain account registration request is used to request to register the blockchain account corresponding to the second resource account. The second resource management server and the first resource management server are different resource management servers. Optionally, the regions where the first resource management server and the second resource management server are located are different. For example, the first resource management server and the second resource management server may be deployed in different organizations or countries. In this case, the resource transfer between the resource account in the first resource management server and the resource account in the second resource management server is Cross-border payments.
第二资源账户标识用于标识第二资源账户,如第二资源账户标识可以是第二资源账户的编号等。第二资源账户是用户在第二资源管理服务器中注册的资源账户。比如,当第二资源管理服务器是银行的服务器时,第二资源账户可以是用户在银行的服务器中注册的银行账户,第二资源账户标识可以是该银行账户的账号。The second resource account identifier is used to identify the second resource account, for example, the second resource account identifier may be the serial number of the second resource account or the like. The second resource account is a resource account registered by the user in the second resource management server. For example, when the second resource management server is a server of a bank, the second resource account may be a bank account registered by the user in the server of the bank, and the second resource account identifier may be the account number of the bank account.
第二资源管理服务器向区块链系统发送区块链账户注册请求的操作上述步骤401中第一资源管理服务器向区块链系统发送区块链账户注册请求的操作类似,本申请实施例对此不再赘述。The operation of the second resource management server sending the blockchain account registration request to the blockchain system is similar to the operation of the first resource management server sending the blockchain account registration request to the blockchain system in the above step 401. No longer.
步骤404:区块链系统为第二资源账户注册对应的第二区块链账户。Step 404: The blockchain system registers the corresponding second blockchain account for the second resource account.
步骤404的操作与上述步骤402中区块链系统为第一资源账户注册对应的第一区块链账户的操作类似,本申请实施例对此不进行详细阐述。The operation of step 404 is similar to the operation of the blockchain system to register the first blockchain account corresponding to the first resource account in the foregoing step 402, which is not described in detail in this embodiment of the present application.
进一步地,区块链系统为资源管理服务器中的资源账户注册了对应的区块链账户后,区块链系统还可以根据资源账户与其对应的目标账户之间的资源转移情况,设置该资源账户对应的区块链账户的余额。该资源账户为第一资源账户或第二资源账户。Further, after the blockchain system registers the corresponding blockchain account for the resource account in the resource management server, the blockchain system can also set the resource account according to the resource transfer situation between the resource account and its corresponding target account. The balance of the corresponding blockchain account. The resource account is the first resource account or the second resource account.
该资源账户与其对应的目标账户是在同一资源管理服务器注册得到的。该资源账户是用户在一个资源管理服务器注册得到的,该资源账户对应的目标账户是目标资源管理服务器在这个资源管理服务器注册得到的。一个资源管理服务器中的所有资源账户均对应这个资源管理服务器中的一个目标账户,也即,某个资源账户对应的目标账户是这个资源账户所属的资源管理服务器中的目标账户。属于同一资源管理服务器的资源账户和目标账户之间可以直接进行资源转移。比如属于同一银行的服务器的多个银行账户之间可以直接进行转账。The resource account and its corresponding target account are registered in the same resource management server. The resource account is obtained by the user registered with a resource management server, and the target account corresponding to the resource account is obtained by the target resource management server registered with the resource management server. All resource accounts in a resource management server correspond to a target account in the resource management server, that is, the target account corresponding to a resource account is the target account in the resource management server to which the resource account belongs. Resource transfer can be performed directly between resource accounts and target accounts belonging to the same resource management server. For example, transfers can be made directly between multiple bank accounts belonging to a server of the same bank.
一种可能的情况中,区块链系统根据资源账户与对应的目标账户之间的资源转移情况,设置该资源账户对应的区块链账户的余额的操作,可以是该资源账户所属的用户通过该资源账户为该区块链账户充值的操作。为该区块链账户充值即是在该区块链账户中储存代币。In a possible situation, the blockchain system may set the balance of the blockchain account corresponding to the resource account according to the resource transfer situation between the resource account and the corresponding target account. The operation of recharging the resource account for the blockchain account. Funding the blockchain account is storing tokens in the blockchain account.
下面以第一资源账户所属的用户通过第一资源账户为其对应的区块链账户充值为例来进行说明,具体过程可以包括如下步骤405-步骤407。第二资源账户所属的用户通过第二资源账户为其对应的区块链账户充值的过程类似,本申请实施例对此不再赘述。The following will take the user to which the first resource account belongs to recharge its corresponding blockchain account through the first resource account as an example for description, and the specific process may include the following steps 405-407. The process of recharging the corresponding blockchain account of the user to which the second resource account belongs through the second resource account is similar, which is not repeated in this embodiment of the present application.
步骤405:第一资源管理服务器向区块链系统发送代币储存请求。Step 405: The first resource management server sends a token storage request to the blockchain system.
该代币储存请求携带第一资源账户所要储存的第二资源数量。具体地,该代币储存请求可以包括第一资源账户标识和第二资源数量。The token storage request carries the quantity of the second resource to be stored by the first resource account. Specifically, the token storage request may include a first resource account identifier and a second resource quantity.
用户可以通过第一资源管理客户端向第一资源管理服务器发起代币储存申请,该代币储存申请中包括第一资源账户标识、用户信息、所要储存的第二资源数量。第一资源管理服务器接收到该代币储存申请后,可以向区块链系统发送该代币储存请求。可选地,第一资源管理服务器接收到该代币储存申请后,可以先对该代币储存申请进行审核,在审核通过后再向区块链系统发送该代币储存请求。The user can initiate a token storage application to the first resource management server through the first resource management client, and the token storage application includes the first resource account identifier, user information, and the quantity of the second resource to be stored. After receiving the token storage application, the first resource management server can send the token storage request to the blockchain system. Optionally, after receiving the token storage application, the first resource management server may review the token storage application first, and then send the token storage request to the blockchain system after the verification is passed.
第一资源管理服务器对该代币储存申请的审核可以是自动进行的,比如第一资源管理服务器可以按照预设的储存条件对该代币储存申请进行审核,该储存条件可以根据具体的业务需求进行预先设置。若该代币储存申请满足该储存条件,则第一资源管理服务器确定该代币储存申请审核通过;若该代币储存申请不满足该储存条件,则第一资源管理服务器确定该代币储存申请审核未通过。The first resource management server may review the token storage application automatically. For example, the first resource management server may review the token storage application according to preset storage conditions, and the storage conditions may be based on specific business needs. Make a preset. If the token storage application satisfies the storage condition, the first resource management server determines that the token storage application is approved; if the token storage application does not meet the storage condition, the first resource management server determines the token storage application Review failed.
或者,第一资源管理服务器对该代币储存申请的审核可以是手动进行的,比如可以由第一资源管理服务器的工作人员来对该代币储存申请进行审核。该工作人员确定该代币储存申请不存在问题时,可以触发审核通过指令,第一资源管理服务器检测到该审核通过指令后,确定该代币储存申请审核通过;该工作人员确定该代币储存申请存在问题时,可以触发审核未通过指令,第一资源管理服务器检测到该审核未通过指令后,确定该代币储存申请审核未通过。Alternatively, the first resource management server may review the token storage application manually, for example, the token storage application may be reviewed by the staff of the first resource management server. When the staff member determines that there is no problem with the token storage application, he can trigger the approval instruction. After detecting the approval instruction, the first resource management server determines that the token storage application is approved; the staff member confirms that the token storage application is approved. When there is a problem with the application, a review failure instruction can be triggered. After detecting the review failure instruction, the first resource management server determines that the token storage application has failed the review.
步骤406:区块链系统接收到第一资源管理服务器发送的代币储存请求后,将第一资源账户中第二资源数量的资源转移至第一资源账户对应的目标账户中。Step 406: After receiving the token storage request sent by the first resource management server, the blockchain system transfers the resources of the second resource quantity in the first resource account to the target account corresponding to the first resource account.
这种情况下,是将第一资源账户中的资源转移到与第一资源账户同属一个资源管理服务器中的目标账户中。In this case, the resources in the first resource account are transferred to the target account in the same resource management server as the first resource account.
具体地,区块链系统接收到第一资源管理服务器发送的代币储存请求后,根据该代币储存请求携带的第一资源账户标识、第二资源数量和第一资源管理服务器对应的目标账户标识,调用第一资源管理服务器提供的资源转移接口,以将第一资源账户中第二资源数量的资源转移至第一资源管理服务器中的目标账户中,也就转移到了第一资源账户对应的目标账户中。Specifically, after the blockchain system receives the token storage request sent by the first resource management server, the first resource account identifier, the second resource quantity and the target account corresponding to the first resource management server carried in the token storage request Identifies, and calls the resource transfer interface provided by the first resource management server to transfer the resources of the second resource quantity in the first resource account to the target account in the first resource management server, which is also transferred to the corresponding first resource account. in the target account.
每个资源管理服务器中均注册有一个目标账户。区块链系统可以预先存储每个资源管理服务器对应的目标账户标识。对于某个资源管理服务器来说,这个资源管理服务器对应的目标账户标识用于标识这个资源管理服务器中的目标账户,如该目标账户标识可以是该目标账户的编号等。这个资源管理服务器中的目标账户也就是这个资源管理服务器中的资源账户对应的目标账户。A target account is registered in each resource management server. The blockchain system can pre-store the target account identifier corresponding to each resource management server. For a certain resource management server, the target account identifier corresponding to the resource management server is used to identify the target account in the resource management server. For example, the target account identifier may be the serial number of the target account. The target account in the resource management server is the target account corresponding to the resource account in the resource management server.
步骤407:区块链系统确定第二资源数量对应的第二代币个数,将目标区块链账户的余额中第二代币个数的代币转移至第一区块链账户的余额中。Step 407: The blockchain system determines the number of second tokens corresponding to the number of second resources, and transfers the tokens of the second number of tokens in the balance of the target blockchain account to the balance of the first blockchain account .
这种情况下,是将目标区块链账户中的代币转移到了第一区块链账户中。In this case, the tokens in the target blockchain account are transferred to the first blockchain account.
资源数量与代币个数之间可以具有一定的转化率,比如可以设置为1:1的转化率,在此情况下,资源数量与代币个数是相同的。当然,也可以设置为其他转化率,具体可以根据业务需求进行设置,本申请实施例对此不作限定。There can be a certain conversion rate between the number of resources and the number of tokens. For example, the conversion rate can be set to 1:1. In this case, the number of resources and the number of tokens are the same. Of course, other conversion rates may also be set, which may be specifically set according to business requirements, which are not limited in this embodiment of the present application.
其中,区块链系统接收到第一资源管理服务器发送的代币储存请求后,可以确定与该代币储存请求携带的第一资源账户标识对应的账户地址,将获取到的账户地址所属的区块链账户作为第一资源账户对应的第一区块链账户。Wherein, after receiving the token storage request sent by the first resource management server, the blockchain system can determine the account address corresponding to the first resource account identifier carried in the token storage request, and will determine the area to which the acquired account address belongs. The blockchain account is used as the first blockchain account corresponding to the first resource account.
其中,区块链系统将目标区块链账户的余额中第二代币个数的代币转移至第一区块链账户的余额中的操作,是在目标区块链账户的余额中减少第二代币个数的代币,在第一区块链账户的余额中增加第二代币个数的代币。Among them, the operation of the blockchain system to transfer the tokens of the second number of tokens in the balance of the target blockchain account to the balance of the first blockchain account is to reduce the number of tokens in the balance of the target blockchain account Tokens with the second number of tokens are added to the balance of the first blockchain account with the second number of tokens.
目标区块链账户是目标资源管理服务器在区块链系统中注册的。目标资源管理服务器作为代币发行方的资源管理服务器,可以在目标区块链账户中预先储存大量代币,以供不同资源管理服务器的资源账户之间进行资源转移时使用。The target blockchain account is registered in the blockchain system by the target resource management server. As the resource management server of the token issuer, the target resource management server can pre-store a large number of tokens in the target blockchain account for use in resource transfer between resource accounts of different resource management servers.
本申请实施例中,区块链系统可以先将第一资源账户中的资源转移到与第一资源账户同属一个资源管理服务器中的目标账户中,再将目标区块链账户中的代币转移到第一资源账户对应的第一区块链账户中。如此,就达到了使用第一资源账户中的资源,向第一资源账户对应的第一区块链账户中储存代币的效果,即实现了对第一区块链账户的充值。In the embodiment of this application, the blockchain system may first transfer the resources in the first resource account to the target account in the same resource management server as the first resource account, and then transfer the tokens in the target blockchain account into the first blockchain account corresponding to the first resource account. In this way, the effect of using the resources in the first resource account to store tokens in the first blockchain account corresponding to the first resource account is achieved, that is, the recharging of the first blockchain account is realized.
进一步地,资源账户所属的用户通过该资源账户为该资源账户对应的区块链账户充值后,就可以使用该区块链账户中的余额来进行资源转移操作。Further, after the user who belongs to the resource account recharges the blockchain account corresponding to the resource account through the resource account, he can use the balance in the blockchain account to perform the resource transfer operation.
下面以第一资源账户向第二资源账户转移资源为例来进行说明,具体过程可以包括如下步骤408-步骤409。第二资源账户向第一资源账户转移资源的过程类似,本申请实施例对此不再赘述。The following description will be given by taking the transfer of resources from the first resource account to the second resource account as an example, and the specific process may include the following steps 408-409. The process of transferring resources from the second resource account to the first resource account is similar, which is not repeated in this embodiment of the present application.
步骤408:第一资源管理服务器向区块链系统发送资源转移请求。Step 408: The first resource management server sends a resource transfer request to the blockchain system.
该资源转移请求用于请求进行资源转移。该资源转移请求携带第一资源账户需要向第二资源账户转移的第一资源数量。具体地,该资源转移请求可以携带付款方的资源账户标识(即第一资源账户标识)、收款方的资源账户标识(即第二资源账户标识)和所要转移的第一资源数量。The resource transfer request is used to request resource transfer. The resource transfer request carries the first resource quantity to be transferred from the first resource account to the second resource account. Specifically, the resource transfer request may carry the resource account identifier of the payer (that is, the first resource account identifier), the resource account identifier of the payee (that is, the second resource account identifier), and the quantity of the first resource to be transferred.
用户可以通过第一资源管理客户端向第一资源管理服务器发起资源转移申请,该资源转移申请中包括第一资源账户标识、第二资源账户标识、用户信息、所要转移的第一资源数量。第一资源管理服务器接收到该资源转移申请后,可以向区块链系统发送该资源转移请求。可选地,第一资源管理服务器接收到该资源转移申请后,可以先对该资源转移申请进行审核,在审核通过后再向区块链系统发送该资源转移请求。The user can initiate a resource transfer application to the first resource management server through the first resource management client, where the resource transfer application includes the first resource account identifier, the second resource account identifier, user information, and the quantity of the first resource to be transferred. After receiving the resource transfer application, the first resource management server may send the resource transfer request to the blockchain system. Optionally, after receiving the resource transfer application, the first resource management server may review the resource transfer application first, and then send the resource transfer request to the blockchain system after the review is passed.
第一资源管理服务器对该资源转移申请的审核可以是自动进行的,比如第一资源管理服务器可以按照预设的转移条件对该资源转移申请进行审核,该转移条件可以根据具体的业务需求进行预先设置。若该资源转移申请满足该转移条件,则第一资源管理服务器确定该资源转移申请审核通过;若该资源转移申请不满足该转移条件,则第一资源管理服务器确定该资源转移申请审核未通过。The first resource management server may review the resource transfer application automatically. For example, the first resource management server may review the resource transfer application according to preset transfer conditions, and the transfer conditions may be pre-determined according to specific business requirements. set up. If the resource transfer application satisfies the transfer condition, the first resource management server determines that the resource transfer application is approved; if the resource transfer application does not meet the transfer condition, the first resource management server determines that the resource transfer application is not approved.
或者,第一资源管理服务器对该资源转移申请的审核可以是手动进行的,比如可以由第一资源管理服务器的工作人员来对该资源转移申请进行审核。该工作人员确定该资源转移申请不存在问题时,可以触发审核通过指令,第一资源管理服务器检测到该审核通过指令后,确定该资源转移申请审核通过;该工作人员确定该资源转移申请存在问题时,可以触发审核未通过指令,第一资源管理服务器检测到该审核未通过指令后,确定该资源转移申请审核未通过。Alternatively, the first resource management server may review the resource transfer application manually, for example, the resource transfer application may be reviewed by the staff of the first resource management server. When the staff member determines that there is no problem with the resource transfer application, he can trigger an approval instruction. After detecting the approval instruction, the first resource management server determines that the resource transfer application is approved; the staff member determines that there is a problem with the resource transfer application. When the verification fails, the first resource management server determines that the resource transfer application fails to pass the verification after detecting the verification failure instruction.
步骤409:区块链系统接收到第一资源管理服务器发送的资源转移请求后,确定第一资源数量对应的第一代币个数,将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中。Step 409: After receiving the resource transfer request sent by the first resource management server, the blockchain system determines the number of first tokens corresponding to the first resource quantity, and calculates the first token in the balance of the first blockchain account. A number of tokens are transferred to the balance of the second blockchain account.
其中,区块链系统接收到第一资源管理服务器发送的资源转移请求后,可以确定与该资源转移请求携带的第一资源账户标识对应的账户地址,将获取到的账户地址所属的区块链账户作为第一资源账户对应的第一区块链账户。以及,区块链系统可以确定与该资源转移请求携带的第二资源账户标识对应的账户地址,将获取到的账户地址所属的区块链账户作为第二资源账户对应的第二区块链账户。Wherein, after receiving the resource transfer request sent by the first resource management server, the blockchain system can determine the account address corresponding to the first resource account identifier carried in the resource transfer request, and record the blockchain to which the acquired account address belongs. The account is used as the first blockchain account corresponding to the first resource account. And, the blockchain system can determine the account address corresponding to the second resource account identifier carried in the resource transfer request, and use the blockchain account to which the acquired account address belongs as the second blockchain account corresponding to the second resource account .
其中,区块链系统将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中的操作,是在第一区块链账户的余额中减少第一代币个数的代币,在第二区块链账户的余额中增加第一代币个数的代币。Among them, the operation of the blockchain system to transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account is in the balance of the first blockchain account Decrease the number of tokens of the first token and increase the number of tokens of the first token in the balance of the second blockchain account.
进一步地,区块链系统接收到第一资源管理服务器发送的资源转移请求后,在确定第一资源数量对应的第一代币个数,将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中之前,还可以先对该资源转移请求进行审核;在对该资源转移请求审核通过后,再确定第一资源数量对应的第一代币个数,将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中;在对该资源转移请求审核未通过后,结束操作。Further, after the blockchain system receives the resource transfer request sent by the first resource management server, after determining the number of first tokens corresponding to the first resource quantity, the first token is stored in the balance of the first blockchain account. Before the number of tokens is transferred to the balance of the second blockchain account, the resource transfer request can also be reviewed; after the resource transfer request is reviewed and approved, the first generation corresponding to the first resource number can be determined. The number of coins in the first blockchain account is transferred to the balance of the second blockchain account; after the resource transfer request fails to pass the review, the operation is ended.
示例地,区块链系统对该资源转移请求进行审核时,可以先设置该资源转移请求的状态为待审核,并将该资源转移请求存储至数据库。然后,区块链系统可以将该资源转移请求存储至区块链系统配置的区块链,在获得上链交易执行结果后,将该资源转移请求发送给运营服务器,由运营服务器对该资源转移请求进行审核。运营服务器对该资源转移请求审核通过后,可以将该资源转移请求的状态修改为已审核,再将该资源转移请求发送给区块链系统。区块链系统接收到该资源转移请求后,可以将数据库中存储的该资源转移请求的状态修改为已审核。For example, when the blockchain system audits the resource transfer request, the state of the resource transfer request may be set as pending, and the resource transfer request may be stored in the database. Then, the blockchain system can store the resource transfer request to the blockchain configured by the blockchain system, and after obtaining the execution result of the on-chain transaction, send the resource transfer request to the operation server, and the operation server will transfer the resource Request for review. After the operation server approves the resource transfer request, it can change the status of the resource transfer request to reviewed, and then send the resource transfer request to the blockchain system. After receiving the resource transfer request, the blockchain system can change the status of the resource transfer request stored in the database to reviewed.
其中,区块链系统将该资源转移请求发送给运营服务器时,可以通过MQ(Message Queuing,消息队列)消息中间件将该资源转移请求发送给运营服务器。当然,区块链系统也可以通过其他方式将该资源转移请求发送给运营服务器,本申请实施例对此不作限定。Among them, when the blockchain system sends the resource transfer request to the operation server, it can pass the MQ (Message Queuing, message queue) message middleware sends the resource transfer request to the operation server. Of course, the blockchain system can also send the resource transfer request to the operation server in other ways, which is not limited in this embodiment of the present application.
运营服务器可以是第三方监管机构的服务器,可以负责不同资源管理服务器中的资源账户之间的资源转移的审核工作,以确定不同资源管理服务器中的资源账户之间的资源转移是正常且安全的。The operation server can be a server of a third-party regulatory agency, and can be responsible for the audit of resource transfers between resource accounts in different resource management servers, so as to determine that the resource transfers between resource accounts in different resource management servers are normal and safe. .
其中,运营服务器对该资源转移请求进行审核时,可以由运营服务器的工作人员对该资源转移请求进行初次审核,在初次审核通过后,运营服务器可以将该资源转移请求发送给第二资源管理服务器,由第二资源管理服务器对该资源转移请求进行二次审核,在二次审核通过后,运营服务器可以确定该资源转移请求审核通过。Wherein, when the operation server examines the resource transfer request, the staff of the operation server may conduct an initial review of the resource transfer request, and after the initial review is passed, the operation server may send the resource transfer request to the second resource management server , the second resource management server conducts a second review of the resource transfer request, and after the second review is passed, the operation server may determine that the resource transfer request is approved.
示例地,区块链系统将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中时,可以先确定该资源转移请求之前是否已处理过,若确定该资源转移请求未处理过,则可以将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中。之后,若成功将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中,则区块链系统可以将该资源转移请求的状态修改为处理完成。For example, when the blockchain system transfers the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account, it can first determine whether the resource transfer request has been processed before. However, if it is determined that the resource transfer request has not been processed, the tokens of the first number of tokens in the balance of the first blockchain account can be transferred to the balance of the second blockchain account. Afterwards, if the tokens of the first number of tokens in the balance of the first blockchain account are successfully transferred to the balance of the second blockchain account, the blockchain system can modify the status of the resource transfer request to Processing is complete.
若未成功将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中,则区块链系统可以确定交易失败原因(比如交易超时),根据交易失败原因重新尝试将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中。If the first number of tokens in the balance of the first blockchain account is not successfully transferred to the balance of the second blockchain account, the blockchain system can determine the reason for the transaction failure (such as transaction timeout), Retry to transfer the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account according to the reason for the transaction failure.
本申请实施例中,区块链系统在接收到第一资源账户向第二资源账户的资源转移请求时,是将第一资源账户对应的第一区块链账户中的代币转移到第二资源账户对应的第二区块链账户中。如此,将不同资源管理服务器中的资源账户之间的资源转移转换为了区块链系统中的不同区块链账户之间的代币转移。一方面,可以加快流程处理速度,提高资源转移效率,同时可以避免相关技术中的汇兑损失问题。另一方面,区块链的不可篡改性,可以降低资源转移风险,一旦出现问题,可以精确追踪溯源,定位问题发生的具体流程点和责任人,安全可靠。In the embodiment of this application, when the blockchain system receives a resource transfer request from the first resource account to the second resource account, it transfers the tokens in the first blockchain account corresponding to the first resource account to the second resource account. In the second blockchain account corresponding to the resource account. In this way, the resource transfer between resource accounts in different resource management servers is converted into the token transfer between different blockchain accounts in the blockchain system. On the one hand, it can speed up process processing, improve resource transfer efficiency, and at the same time avoid exchange losses in related technologies. On the other hand, the immutability of the blockchain can reduce the risk of resource transfer. Once a problem occurs, it can accurately trace the source and locate the specific process point and responsible person of the problem, which is safe and reliable.
一种可能的情况中,区块链系统根据资源账户与对应的目标账户之间的资源转移情况,设置该资源账户对应的区块链账户的余额的操作,可以是该资源账户所属的用户从该区块链账户向该资源账户提现的操作。向该资源账户提现即是向该资源账户中转移资源。In a possible situation, the blockchain system may set the balance of the blockchain account corresponding to the resource account according to the resource transfer situation between the resource account and the corresponding target account. The operation of withdrawing from the blockchain account to the resource account. Withdrawing to the resource account is to transfer resources to the resource account.
下面以第二资源账户所属的用户从第二资源账户对应的区块链账户向第二资源账户提现为例来进行说明,具体过程可以包括如下步骤410-步骤412。第一资源账户所属的用户从第一资源账户对应的区块链账户向第一资源账户提现的过程类似,本申请实施例对此不再赘述。The following is an example of a user who belongs to the second resource account withdrawing money from the blockchain account corresponding to the second resource account to the second resource account. The specific process may include the following steps 410-412. The process of withdrawing money from the blockchain account corresponding to the first resource account to the first resource account by the user to which the first resource account belongs is similar, which is not repeated in this embodiment of the present application.
步骤410:第二资源管理服务器向区块链系统发送资源提取请求。Step 410: The second resource management server sends a resource extraction request to the blockchain system.
该资源提取请求携带第二资源账户所要提取的第三资源数量。具体地,该资源提取请求可以包括第二资源账户标识和第三资源数量。The resource extraction request carries the quantity of the third resource to be extracted by the second resource account. Specifically, the resource extraction request may include a second resource account identifier and a third resource quantity.
用户可以通过第二资源管理客户端向第二资源管理服务器发起资源提取申请,该资源提取申请中包括第二资源账户标识、用户信息、所要提取的第三资源数量。第二资源管理服务器接收到该资源提取申请后,可以向区块链系统发送该资源提取请求。可选地,第二资源管理服务器接收到该资源提取申请后,可以先对该资源提取申请进行审核,在审核通过后再向区块链系统发送该资源提取请求。第二资源管理服务器对该资源提取申请进行审核的操作与上述步骤408中第一资源管理服务器对资源转移申请进行审核的操作类似,本申请实施例对此不再赘述。The user can initiate a resource extraction application to the second resource management server through the second resource management client, where the resource extraction application includes the second resource account identifier, user information, and the quantity of the third resource to be extracted. After receiving the resource extraction application, the second resource management server may send the resource extraction request to the blockchain system. Optionally, after receiving the resource extraction application, the second resource management server may review the resource extraction application first, and then send the resource extraction request to the blockchain system after the review is passed. The operation of the second resource management server to review the resource extraction application is similar to the operation of the first resource management server to review the resource transfer application in the foregoing step 408 , which is not repeated in this embodiment of the present application.
步骤411:区块链系统接收到第二资源管理服务器发送的资源提取请求后,确定第三资源数量对应的第三代币个数,将第二区块链账户的余额中第三代币个数的代币转移至目标区块链账户的余额中。Step 411: After receiving the resource extraction request sent by the second resource management server, the blockchain system determines the number of third tokens corresponding to the number of third resources, and calculates the number of third tokens in the balance of the second blockchain account. A number of tokens are transferred to the balance of the target blockchain account.
这种情况下,是将第二区块链账户中的代币转移到了目标区块链账户中。In this case, the tokens in the second blockchain account are transferred to the target blockchain account.
其中,区块链系统接收到第二资源管理服务器发送的资源提取请求后,可以确定与该资源提取请求携带的第二资源账户标识对应的账户地址,将获取到的账户地址所属的区块链账户作为第二资源账户对应的第二区块链账户。Wherein, after receiving the resource extraction request sent by the second resource management server, the blockchain system can determine the account address corresponding to the second resource account identifier carried in the resource extraction request, and record the blockchain to which the acquired account address belongs. The account is used as the second blockchain account corresponding to the second resource account.
其中,区块链系统将第二区块链账户的余额中第三代币个数的代币转移至目标区块链账户的余额中的操作,是在第三区块链账户的余额中减少第三代币个数的代币,在目标区块链账户的余额中增加第二代币个数的代币。Among them, the operation of the blockchain system to transfer the tokens of the third number of tokens in the balance of the second blockchain account to the balance of the target blockchain account is to reduce the amount of tokens in the balance of the third blockchain account Tokens with the third number of tokens are added to the balance of the target blockchain account by the number of tokens with the second number of tokens.
步骤412:区块链系统将第二资源账户对应的目标账户中第三资源数量的资源转移至第二资源账户中。Step 412: The blockchain system transfers the resources of the third resource quantity in the target account corresponding to the second resource account to the second resource account.
这种情况下,是将与第二资源账户同属一个资源管理服务器中的目标账户中的资源转移到第二资源账户中。In this case, the resources in the target account in the same resource management server as the second resource account are transferred to the second resource account.
具体地,区块链系统根据第二资源管理服务器对应的目标账户标识、该资源提取请求携带的第二资源账户标识和第三资源数量,调用第二资源管理服务器提供的资源转移接口,以将第二资源管理服务器中的目标账户,即将第二资源账户对应的目标账户中第三资源数量的资源转移至第二资源账户中。Specifically, the blockchain system calls the resource transfer interface provided by the second resource management server according to the target account identifier corresponding to the second resource management server, the second resource account identifier and the third resource quantity carried in the resource extraction request to transfer the The target account in the second resource management server is to transfer the resources of the third resource quantity in the target account corresponding to the second resource account to the second resource account.
本申请实施例中,区块链系统可以先将第二区块链账户中的代币转移至目标区块链账户,再将与第二资源账户同属一个资源管理服务器中的目标账户中的资源转移到第二资源账户。如此,就达到了将第二资源账户对应的第二区块链账户中的代币,提取为第二资源账户中的资源的效果,即实现了向第二资源账户的提现。In the embodiment of this application, the blockchain system can first transfer the tokens in the second blockchain account to the target blockchain account, and then transfer the resources in the target account in the same resource management server as the second resource account Transfer to the second resource account. In this way, the effect of extracting the tokens in the second blockchain account corresponding to the second resource account as resources in the second resource account is achieved, that is, the withdrawal to the second resource account is realized.
进一步地,由于目标账户是目标资源管理服务器在其他各个资源管理服务器中注册的资源账户,即目标资源管理服务器是目标账户所属的资源管理服务器,所以本申请实施例中还可以将有关目标账户的资源转移记录通知到目标资源管理服务器,以方便目标资源管理服务器后续进行对账。具体地,可以包括如下步骤413-步骤414。Further, since the target account is the resource account registered by the target resource management server in other resource management servers, that is, the target resource management server is the resource management server to which the target account belongs, so in the embodiment of the present application, the relevant target account can also be The resource transfer record is notified to the target resource management server to facilitate subsequent account reconciliation by the target resource management server. Specifically, the following steps 413-414 may be included.
步骤413:区块链系统根据资源账户与对应的目标账户之间的资源转移情况,生成目标账户资源转移记录。Step 413: The blockchain system generates a resource transfer record of the target account according to the resource transfer situation between the resource account and the corresponding target account.
目标账户资源转移记录用于记录目标账户中的资源转出情况以及资源转入情况。比如,目标账户资源转移记录可以记录上述将第一资源账户中的资源转移到目标账户的情况,或者,目标账户资源转移记录可以记录上述将目标账户中的资源转移到第二资源账户的情况。目标账户每发生一次资源转移(包括资源转出或资源转入),区块链系统就可以根据目标账户本次的资源转移情况生成一个目标账户资源转移记录。The resource transfer record of the target account is used to record the resource transfer out and resource transfer in the target account. For example, the target account resource transfer record may record the above-mentioned situation of transferring resources in the first resource account to the target account, or the target account resource transfer record may record the above-mentioned situation of transferring resources in the target account to the second resource account. Every time a resource transfer occurs in the target account (including resource transfer or resource transfer), the blockchain system can generate a target account resource transfer record according to the current resource transfer situation of the target account.
步骤414:区块链系统将目标账户资源转移记录发送给目标资源管理服务器。Step 414: The blockchain system sends the target account resource transfer record to the target resource management server.
具体地,区块链系统可以将目标账户资源转移记录发送给目标资源管理服务中的记账账户(包括但不限于IB(interbank)账户等)。此记账账户中包括目标资源管理服务器对应的所有目标账户的所有资源转移记录,如此,目标资源管理服务器根据此记账账户中包括的所有资源转移记录就可以获知其在。Specifically, the blockchain system can send the target account resource transfer record to the billing account (including but not limited to IB (interbank) account, etc.) in the target resource management service. The accounting account includes all resource transfer records of all target accounts corresponding to the target resource management server, so that the target resource management server can know its existence according to all the resource transfer records included in the accounting account.
在本申请实施例中,区块链系统在接收到第一资源账户向第二资源账户的资源转移请求时,是将第一资源账户对应的第一区块链账户中的代币转移到第二资源账户对应的第二区块链账户中。如此,将不同资源管理服务器中的资源账户之间的资源转移转换为了区块链系统中的不同区块链账户之间的代币转移。一方面,可以加快流程处理速度,提高资源转移效率,同时可以避免相关技术中的汇兑损失问题。另一方面,区块链的不可篡改性,可以降低资源转移风险,一旦出现问题,可以精确追踪溯源,定位问题发生的具体流程点和责任人,安全可靠。In the embodiment of the present application, when the blockchain system receives a resource transfer request from the first resource account to the second resource account, it transfers the tokens in the first blockchain account corresponding to the first resource account to the second resource account. In the second blockchain account corresponding to the second resource account. In this way, the resource transfer between resource accounts in different resource management servers is converted into the token transfer between different blockchain accounts in the blockchain system. On the one hand, it can speed up the processing speed of the process, improve the efficiency of resource transfer, and at the same time avoid the problem of exchange loss in related technologies. On the other hand, the immutability of the blockchain can reduce the risk of resource transfer. Once a problem occurs, it can accurately trace the source and locate the specific process point and responsible person of the problem, which is safe and reliable.
图5是本申请实施例提供的一种资源转移方法的流程图。该方法应用于区块链系统中,该区块链系统可以是上文图1-图2实施例所述的区块链系统100。参见图5,该方法可以包括如下步骤:FIG. 5 is a flowchart of a resource transfer method provided by an embodiment of the present application. The method is applied to a blockchain system, and the blockchain system may be the blockchain system 100 described in the embodiments of FIG. 1 to FIG. 2 above. Referring to Figure 5, the method may include the following steps:
步骤501:为第一资源账户注册对应的第一区块链账户,以及为第二资源账户注册对应的第二区块链账户。第一资源账户和第二资源账户是在不同的资源管理服务器注册得到的。步骤501的相关内容已在上述步骤401-步骤404进行详细地解释说明,本申请实施例对此不再赘述。Step 501: Register a corresponding first blockchain account for the first resource account, and register a corresponding second blockchain account for the second resource account. The first resource account and the second resource account are obtained by registering with different resource management servers. The relevant content of step 501 has been explained in detail in the above-mentioned steps 401 to 404, which is not repeated in this embodiment of the present application.
步骤502:接收资源转移请求。该资源转移请求携带第一资源账户需要向第二资源账户转移的第一资源数量。步骤502的相关内容已在上述步骤408进行详细地解释说明,本申请实施例对此不再赘述。Step 502: Receive a resource transfer request. The resource transfer request carries the first resource quantity to be transferred from the first resource account to the second resource account. The relevant content of step 502 has been explained in detail in the above-mentioned step 408 , which is not repeated in this embodiment of the present application.
步骤503:确定第一资源数量对应的第一代币个数,将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中。步骤503的相关内容已在上述步骤409进行详细地解释说明,本申请实施例对此不再赘述。Step 503: Determine the number of first tokens corresponding to the first resource quantity, and transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account. The relevant content of step 503 has been explained in detail in the above-mentioned step 409, and is not repeated in this embodiment of the present application.
在本申请实施例中,区块链系统在接收到第一资源账户向第二资源账户的资源转移请求时,是将第一资源账户对应的第一区块链账户中的代币转移到第二资源账户对应的第二区块链账户中。如此,将不同资源管理服务器中的资源账户之间的资源转移转换为了区块链系统中的不同区块链账户之间的代币转移。一方面,可以加快流程处理速度,提高资源转移效率,同时可以避免相关技术中的汇兑损失问题。另一方面,区块链的不可篡改性,可以降低资源转移风险,一旦出现问题,可以精确追踪溯源,定位问题发生的具体流程点和责任人,安全可靠。In the embodiment of this application, when the blockchain system receives a resource transfer request from the first resource account to the second resource account, it transfers the tokens in the first blockchain account corresponding to the first resource account to the second resource account. In the second blockchain account corresponding to the second resource account. In this way, the resource transfer between resource accounts in different resource management servers is converted into the token transfer between different blockchain accounts in the blockchain system. On the one hand, it can speed up process processing, improve resource transfer efficiency, and at the same time avoid exchange losses in related technologies. On the other hand, the immutability of the blockchain can reduce the risk of resource transfer. Once a problem occurs, it can accurately trace the source and locate the specific process point and responsible person of the problem, which is safe and reliable.
图6是本申请实施例提供的一种资源转移装置的结构示意图,该装置可以应用于区块链系统,该区块链系统可以为上文图1-图2实施例所述的区块链系统100。参见图6,该装置包括:注册模块601、接收模块602、确定模块603和转移模块604。FIG. 6 is a schematic structural diagram of a resource transfer device provided by an embodiment of the present application. The device can be applied to a blockchain system, and the blockchain system can be the blockchain described in the embodiments of FIG. 1 to FIG. 2 above. system 100. Referring to FIG. 6 , the apparatus includes: a registration module 601 , a reception module 602 , a determination module 603 and a transfer module 604 .
注册模块601,用于为第一资源账户注册对应的第一区块链账户,以及为第二资源账户注册对应的第二区块链账户,第一资源账户和第二资源账户是在不同的资源管理服务器注册得到的;接收模块602,用于接收资源转移请求,资源转移请求携带第一资源账户需要向第二资源账户转移的第一资源数量;确定模块603,用于确定第一资源数量对应的第一代币个数;转移模块604,用于将第一区块链账户的余额中第一代币个数的代币转移至第二区块链账户的余额中。A registration module 601 is used to register a corresponding first blockchain account for a first resource account, and a corresponding second blockchain account for a second resource account. The first resource account and the second resource account are in different The resource management server is registered and obtained; the receiving module 602 is used for receiving the resource transfer request, the resource transfer request carries the first resource quantity that needs to be transferred from the first resource account to the second resource account; the determining module 603 is used for determining the first resource quantity The corresponding number of first tokens; the transfer module 604 is used to transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account.
可选地,该装置还包括设置模块,设置模块用于:根据资源账户与对应的目标账户之间的资源转移情况,设置资源账户对应的区块链账户的余额,资源账户为第一资源账户或第二资源账户,资源账户与对应的目标账户是在同一资源管理服务器注册得到的。可选地,设置模块用于:接收代币储存请求,代币储存请求携带第一资源账户所要储存的第二资源数量;将第一资源账户中第二资源数量的资源转移至第一资源账户对应的目标账户中;确定第二资源数量对应的第二代币个数;将目标区块链账户的余额中第二代币个数的代币转移至第一区块链账户的余额中。可选地,设置模块用于:接收资源提取请求,资源提取请求携带第二资源账户所要提取的第三资源数量;确定第三资源数量对应的第三代币个数;将第二区块链账户的余额中第三代币个数的代币转移至目标区块链账户的余额中;将第二资源账户对应的目标账户中第三资源数量的资源转移至第二资源账户中。可选地,该装置还包括:生成模块,用于根据资源账户与对应的目标账户之间的资源转移情况,生成目标账户资源转移记录;发送模块,用于将目标账户资源转移记录发送给目标资源管理服务器,目标资源管理服务器是目标账户所属的资源管理服务器,且目标资源管理服务器是在区块链系统注册目标区块链账户的资源管理服务器。可选地,注册模块601用于:接收区块链账户注册请求,区块链账户注册请求携带第一资源账户标识;生成第一区块链账户,第一区块链账户的账户数据包括账户地址和余额;将第一资源账户标识与第一区块链账户的账户地址对应存储。可选地,注册有第一资源账户的资源管理服务器和注册有第二资源账户的资源管理服务器所处的地区不同。Optionally, the device further includes a setting module, and the setting module is used for: setting the balance of the blockchain account corresponding to the resource account according to the resource transfer situation between the resource account and the corresponding target account, and the resource account is the first resource account. Or the second resource account, where the resource account and the corresponding target account are registered in the same resource management server. Optionally, the setting module is used to: receive a token storage request, and the token storage request carries the second resource quantity to be stored by the first resource account; transfer the resources of the second resource quantity in the first resource account to the first resource account In the corresponding target account; determine the number of second tokens corresponding to the number of second resources; transfer the tokens of the second number of tokens in the balance of the target blockchain account to the balance of the first blockchain account. Optionally, the setting module is used for: receiving a resource extraction request, the resource extraction request carrying the third resource quantity to be extracted by the second resource account; determining the number of third tokens corresponding to the third resource quantity; The tokens of the third number of tokens in the balance of the account are transferred to the balance of the target blockchain account; the resources of the third number of resources in the target account corresponding to the second resource account are transferred to the second resource account. Optionally, the device further includes: a generating module for generating a target account resource transfer record according to the resource transfer situation between the resource account and the corresponding target account; a sending module for sending the target account resource transfer record to the target Resource management server, the target resource management server is the resource management server to which the target account belongs, and the target resource management server is the resource management server that registers the target blockchain account in the blockchain system. Optionally, the registration module 601 is configured to: receive a blockchain account registration request, where the blockchain account registration request carries a first resource account identifier; generate a first blockchain account, where the account data of the first blockchain account includes the account address and balance; store the first resource account identifier corresponding to the account address of the first blockchain account. Optionally, the resource management server registered with the first resource account and the resource management server registered with the second resource account are located in different regions.
在本申请实施例中,区块链系统在接收到第一资源账户向第二资源账户的资源转移请求时,是将第一资源账户对应的第一区块链账户中的代币转移到第二资源账户对应的第二区块链账户中。如此,将不同资源管理服务器中的资源账户之间的资源转移转换为了区块链系统中的不同区块链账户之间的代币转移。一方面,可以加快流程处理速度,提高资源转移效率,同时可以避免相关技术中的汇兑损失问题。另一方面,区块链的不可篡改性,可以降低资源转移风险,一旦出现问题,可以精确追踪溯源,定位问题发生的具体流程点和责任人,安全可靠。In the embodiment of this application, when the blockchain system receives a resource transfer request from the first resource account to the second resource account, it transfers the tokens in the first blockchain account corresponding to the first resource account to the second resource account. In the second blockchain account corresponding to the second resource account. In this way, the resource transfer between resource accounts in different resource management servers is converted into the token transfer between different blockchain accounts in the blockchain system. On the one hand, it can speed up process processing, improve resource transfer efficiency, and at the same time avoid exchange losses in related technologies. On the other hand, the immutability of the blockchain can reduce the risk of resource transfer. Once a problem occurs, it can accurately trace the source and locate the specific process point and responsible person of the problem, which is safe and reliable.
需要说明的是:上述实施例提供的资源转移装置在资源转移时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that the resource transfer apparatus provided in the above-mentioned embodiments only uses the division of the above-mentioned functional modules as an example to illustrate the resource transfer. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
上述实施例提供的资源转移装置与资源转移方法实施例属于同一构思,上述实施例中单元、模块的具体工作过程及带来的技术效果,可参见方法实施例部分,此处不再赘述。The resource transfer apparatus and the resource transfer method embodiments provided by the above embodiments belong to the same concept, and the specific working processes of the units and modules in the above embodiments and the technical effects brought by them can be found in the method embodiments section, which will not be repeated here.
图7为本申请实施例提供的一种计算机设备的结构示意图。如图7所示,计算机设备7包括:处理器70、存储器71以及存储在存储器71中并可在处理器70上运行的计算机程序72,处理器70执行计算机程序72时实现上述图5实施例中的资源转移方法中的步骤。FIG. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in FIG. 7 , the computer device 7 includes: a processor 70 , a memory 71 , and a computer program 72 stored in the memory 71 and running on the processor 70 . When the processor 70 executes the computer program 72 , the above-mentioned embodiment in FIG. 5 is implemented Steps in the resource transfer method in .
计算机设备7可以是通用计算机设备或专用计算机设备。在具体实现中,计算机设备7可以是由多台服务器组成的服务器集群。本领域技术人员可以理解,图7仅仅是计算机设备7的举例,并不构成对计算机设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,比如还可以包括输入输出设备、网络接入设备等。The computer device 7 may be a general purpose computer device or a special purpose computer device. In a specific implementation, the computer device 7 may be a server cluster composed of multiple servers. Those skilled in the art can understand that FIG. 7 is only an example of the computer device 7, and does not constitute a limitation to the computer device 7, and may include more or less components than the one shown, or combine some components, or different components , for example, it may also include input and output devices, network access devices, and so on.
处理器70可以是中央处理单元(Central Processing Unit,CPU),处理器70还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者也可以是任何常规的处理器。The processor 70 may be a central processing unit (Central Processing Unit, CPU), the processor 70 can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or it may be any conventional processor.
存储器71在一些实施例中可以是计算机设备7的内部存储单元,比如计算机设备7的硬盘或内存。存储器71在另一些实施例中也可以是计算机设备7的外部存储设备,比如计算机设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器71还可以既包括计算机设备7的内部存储单元也包括外部存储设备。存储器71用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,比如计算机程序的程序代码等。存储器71还可以用于暂时地存储已经输出或者将要输出的数据。The memory 71 may in some embodiments be an internal storage unit of the computer device 7 , such as a hard disk or memory of the computer device 7 . In other embodiments, the memory 71 may also be an external storage device of the computer device 7 , such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the computer device 7 . card, Flash Card, etc. Further, the memory 71 may also include both an internal storage unit of the computer device 7 and an external storage device. The memory 71 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as program codes of computer programs, and the like. The memory 71 can also be used to temporarily store data that has been output or is to be output.
本申请实施例还提供了一种计算机设备,该计算机设备包括:至少一个处理器、存储器以及存储在该存储器中并可在该至少一个处理器上运行的计算机程序,该处理器执行该计算机程序时实现上述任意各个方法实施例中的步骤。Embodiments of the present application also provide a computer device, the computer device comprising: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor executing the computer program The steps in any of the foregoing method embodiments are implemented at the same time.
本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
本申请实施例提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product, which, when running on a computer, causes the computer to execute the steps in the above-mentioned respective method embodiments.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述方法实施例中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,该计算机程序包括计算机程序代码,该计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。该计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/终端设备的任何实体或装置、记录介质、计算机存储器、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随机存取存储器)、CD-ROM(Compact Disc Read-Only Memory,只读光盘)、磁带、软盘和光数据存储设备等。本申请提到的计算机可读存储介质可以为非易失性存储介质,换句话说,可以是非瞬时性存储介质。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above method embodiments can be implemented by a computer program that instructs relevant hardware. The computer program can be stored in a computer-readable storage medium, and the computer program can be When executed by the processor, the steps of the foregoing method embodiments may be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the photographing device/terminal device, recording medium, computer memory, ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory) , random access memory), CD-ROM (Compact Disc Read-Only Memory, CD-ROM), magnetic tapes, floppy disks, and optical data storage devices, etc. The computer-readable storage medium mentioned in this application may be a non-volatile storage medium, in other words, may be a non-transitory storage medium.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it is still possible to implement the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.

Claims (10)

  1. 一种资源转移方法,其特征在于,应用于区块链系统,所述方法包括:A resource transfer method, characterized in that, applied to a blockchain system, the method comprising:
    为第一资源账户注册对应的第一区块链账户,以及为第二资源账户注册对应的第二区块链账户,所述第一资源账户和所述第二资源账户是在不同的资源管理服务器注册得到的;Register the corresponding first blockchain account for the first resource account, and register the corresponding second blockchain account for the second resource account, the first resource account and the second resource account are in different resource management registered by the server;
    接收资源转移请求,所述资源转移请求携带所述第一资源账户需要向所述第二资源账户转移的第一资源数量;receiving a resource transfer request, where the resource transfer request carries the first resource quantity that the first resource account needs to transfer to the second resource account;
    确定所述第一资源数量对应的第一代币个数;determining the number of first tokens corresponding to the number of first resources;
    将所述第一区块链账户的余额中所述第一代币个数的代币转移至所述第二区块链账户的余额中。Transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account.
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, wherein the method further comprises:
    根据资源账户与对应的目标账户之间的资源转移情况,设置所述资源账户对应的区块链账户的余额,所述资源账户为所述第一资源账户或所述第二资源账户,所述资源账户与对应的目标账户是在同一资源管理服务器注册得到的。According to the resource transfer situation between the resource account and the corresponding target account, the balance of the blockchain account corresponding to the resource account is set, and the resource account is the first resource account or the second resource account. The resource account and the corresponding target account are registered in the same resource management server.
  3. 如权利要求2所述的方法,其特征在于,所述根据资源账户与对应的目标账户之间的资源转移情况,设置所述资源账户对应的区块链账户的余额,包括:The method according to claim 2, wherein, according to the resource transfer situation between the resource account and the corresponding target account, the setting of the balance of the blockchain account corresponding to the resource account comprises:
    接收代币储存请求,所述代币储存请求携带所述第一资源账户所要储存的第二资源数量;将所述第一资源账户中所述第二资源数量的资源转移至所述第一资源账户对应的目标账户中;确定所述第二资源数量对应的第二代币个数;将目标区块链账户的余额中所述第二代币个数的代币转移至所述第一区块链账户的余额中。Receive a token storage request, the token storage request carrying the second resource quantity to be stored by the first resource account; transfer the resource of the second resource quantity in the first resource account to the first resource In the target account corresponding to the account; determine the number of second tokens corresponding to the second resource quantity; transfer the tokens of the second token number in the balance of the target blockchain account to the first area in the balance of the blockchain account.
  4. 如权利要求2所述的方法,其特征在于,所述根据资源账户与对应的目标账户之间的资源转移情况,设置所述资源账户对应的区块链账户的余额,包括:The method according to claim 2, wherein, according to the resource transfer situation between the resource account and the corresponding target account, the setting of the balance of the blockchain account corresponding to the resource account comprises:
    接收资源提取请求,所述资源提取请求携带所述第二资源账户所要提取的第三资源数量;确定所述第三资源数量对应的第三代币个数;将所述第二区块链账户的余额中所述第三代币个数的代币转移至目标区块链账户的余额中;将所述第二资源账户对应的目标账户中所述第三资源数量的资源转移至所述第二资源账户中。Receive a resource extraction request, where the resource extraction request carries the third resource quantity to be extracted by the second resource account; determine the number of third tokens corresponding to the third resource quantity; Tokens of the third number of tokens in the balance of Two resource accounts.
  5. 如权利要求3或4所述的方法,其特征在于,所述方法还包括:The method of claim 3 or 4, wherein the method further comprises:
    根据所述资源账户与对应的目标账户之间的资源转移情况,生成目标账户资源转移记录;将所述目标账户资源转移记录发送给目标资源管理服务器,所述目标资源管理服务器是所述目标账户所属的资源管理服务器,且所述目标资源管理服务器是在所述区块链系统注册所述目标区块链账户的资源管理服务器。Generate a target account resource transfer record according to the resource transfer situation between the resource account and the corresponding target account; send the target account resource transfer record to a target resource management server, where the target resource management server is the target account The resource management server to which it belongs, and the target resource management server is the resource management server that registers the target blockchain account in the blockchain system.
  6. 如权利要求1-5任一所述的方法,其特征在于,所述为第一资源账户注册对应的第一区块链账户,包括:The method according to any one of claims 1-5, wherein the registering the corresponding first blockchain account for the first resource account comprises:
    接收区块链账户注册请求,所述区块链账户注册请求携带第一资源账户标识;生成所述第一区块链账户,所述第一区块链账户的账户数据包括账户地址和余额;将所述第一资源账户标识与所述第一区块链账户的账户地址对应存储。Receive a blockchain account registration request, where the blockchain account registration request carries a first resource account identifier; generate the first blockchain account, where the account data of the first blockchain account includes account address and balance; The first resource account identifier is stored corresponding to the account address of the first blockchain account.
  7. 如权利要求1-5任一所述的方法,其特征在于,注册有所述第一资源账户的资源管理服务器和注册有所述第二资源账户的资源管理服务器所处的地区不同。The method according to any one of claims 1-5, wherein the resource management server registered with the first resource account and the resource management server registered with the second resource account are located in different regions.
  8. 一种资源转移装置,其特征在于,应用于区块链系统,所述装置包括:A resource transfer device, characterized in that it is applied to a blockchain system, the device comprising:
    注册模块,用于为第一资源账户注册对应的第一区块链账户,以及为第二资源账户注册对应的第二区块链账户,所述第一资源账户和所述第二资源账户是在不同的资源管理服务器注册得到的;A registration module for registering a corresponding first blockchain account for a first resource account and a corresponding second blockchain account for a second resource account, wherein the first resource account and the second resource account are Registered in different resource management servers;
    接收模块,用于接收资源转移请求,所述资源转移请求携带所述第一资源账户需要向所述第二资源账户转移的第一资源数量;a receiving module, configured to receive a resource transfer request, where the resource transfer request carries the first resource quantity that the first resource account needs to transfer to the second resource account;
    确定模块,用于确定所述第一资源数量对应的第一代币个数;a determining module, configured to determine the number of first tokens corresponding to the number of first resources;
    转移模块,用于将所述第一区块链账户的余额中所述第一代币个数的代币转移至所述第二区块链账户的余额中。A transfer module, configured to transfer the tokens of the first number of tokens in the balance of the first blockchain account to the balance of the second blockchain account.
  9. 一种计算机设备,其特征在于,所述计算机设备包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至7任一项所述的方法。A computer device, characterized in that the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being implemented when executed by the processor A method as claimed in any one of claims 1 to 7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法。A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
PCT/CN2020/138076 2020-11-24 2020-12-21 Resource transfer method and apparatus, and device and storage medium WO2022110404A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011330849.7 2020-11-24
CN202011330849.7A CN112446787A (en) 2020-11-24 2020-11-24 Resource transfer method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022110404A1 true WO2022110404A1 (en) 2022-06-02

Family

ID=74737607

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/138076 WO2022110404A1 (en) 2020-11-24 2020-12-21 Resource transfer method and apparatus, and device and storage medium

Country Status (2)

Country Link
CN (1) CN112446787A (en)
WO (1) WO2022110404A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11843546B1 (en) * 2023-01-17 2023-12-12 Capital One Services, Llc Determining resource usage metrics for cloud computing systems

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392584A (en) * 2017-07-24 2017-11-24 中国银行股份有限公司 Cross-border payment system and the cross-border method of payment based on block chain payment system
US20190180274A1 (en) * 2017-12-11 2019-06-13 Global Mobile Finance, Inc. Methodology and system for a blockchain-based mobile money gateway
CN111340468A (en) * 2020-02-26 2020-06-26 腾讯科技(深圳)有限公司 Resource data processing method and device, computer equipment and storage medium
CN111861440A (en) * 2020-08-06 2020-10-30 中国银行股份有限公司 Bank transfer method and system based on block chain network
CN111899008A (en) * 2020-09-17 2020-11-06 支付宝(杭州)信息技术有限公司 Resource transfer method, device, equipment and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111815309B (en) * 2020-08-28 2020-12-11 支付宝(杭州)信息技术有限公司 Block chain-based cross-currency settlement method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392584A (en) * 2017-07-24 2017-11-24 中国银行股份有限公司 Cross-border payment system and the cross-border method of payment based on block chain payment system
US20190180274A1 (en) * 2017-12-11 2019-06-13 Global Mobile Finance, Inc. Methodology and system for a blockchain-based mobile money gateway
CN111340468A (en) * 2020-02-26 2020-06-26 腾讯科技(深圳)有限公司 Resource data processing method and device, computer equipment and storage medium
CN111861440A (en) * 2020-08-06 2020-10-30 中国银行股份有限公司 Bank transfer method and system based on block chain network
CN111899008A (en) * 2020-09-17 2020-11-06 支付宝(杭州)信息技术有限公司 Resource transfer method, device, equipment and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11843546B1 (en) * 2023-01-17 2023-12-12 Capital One Services, Llc Determining resource usage metrics for cloud computing systems

Also Published As

Publication number Publication date
CN112446787A (en) 2021-03-05

Similar Documents

Publication Publication Date Title
US20230129822A1 (en) Resource transfer system
CN108364229B (en) Capital transfer method and device and electronic equipment
CN108256999B (en) Capital transfer method and device and electronic equipment
US20190026821A1 (en) Intermediate blockchain system for managing transactions
US11455642B1 (en) Distributed ledger based interchange
CN110582790A (en) system and method for restricted transaction processing
WO2020042774A1 (en) Blockchain-based remittance method and apparatus
US11443307B2 (en) Cross-border resource transfer authenticity verification method, device and electronic equipment
CN110020936B (en) Asset management method and device based on block chain and electronic equipment
CN109285069B (en) Resource transfer method, device and server
US10984417B2 (en) Blockchain-based data synchronization system, method, apparatus, and electronic device
US20220036351A1 (en) Method and apparatus for resource exchange
US10789628B2 (en) Blockchain-based bill number allocation method, apparatus and electronic device
WO2022110404A1 (en) Resource transfer method and apparatus, and device and storage medium
KR20150110422A (en) System and method for electronic money transfer of fractional amounts
WO2021121030A1 (en) Resource transfer method, settlement terminal, and server node
WO2022047582A1 (en) Blockchain-based technologies for secure offline transaction processing
CN113724082B (en) Accounting processing method, device, equipment and storage medium
US20200314112A1 (en) Method, apparatus and computer program for verifying the integrity of electronic messages
CN117635324A (en) Data processing method, device, equipment and medium based on block chain network
CN113282664A (en) Data synchronization method, system and storage medium based on block chain
CN114219478A (en) Bank card binding method and device, electronic equipment and storage medium
KR20240005642A (en) System for providing financial services and simple payment server therefor
KR20230133156A (en) Financial system and financial service method thereof
KR20230143517A (en) Financial system and financial service method thereof

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: 20963292

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: 20963292

Country of ref document: EP

Kind code of ref document: A1