WO2021174903A1 - 资源转换数据处理方法、装置、计算机设备和存储介质 - Google Patents

资源转换数据处理方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2021174903A1
WO2021174903A1 PCT/CN2020/128063 CN2020128063W WO2021174903A1 WO 2021174903 A1 WO2021174903 A1 WO 2021174903A1 CN 2020128063 W CN2020128063 W CN 2020128063W WO 2021174903 A1 WO2021174903 A1 WO 2021174903A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
conversion
target
type
record
Prior art date
Application number
PCT/CN2020/128063
Other languages
English (en)
French (fr)
Inventor
李洁
包晋升
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2021174903A1 publication Critical patent/WO2021174903A1/zh
Priority to US17/678,490 priority Critical patent/US20220180436A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/381Currency conversion
    • 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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof

Definitions

  • This application relates to the field of Internet technology, and in particular to a method, device, computer equipment, and storage medium for processing resource conversion data.
  • the server of the Internet platform receives a resource conversion request sent by a user terminal, such as a request for currency exchange, it usually needs to interact with a resource conversion server such as a bank server according to the resource conversion request to complete the resource conversion process and perform resource conversion through the Internet.
  • a resource conversion server such as a bank server according to the resource conversion request to complete the resource conversion process and perform resource conversion through the Internet.
  • a method, apparatus, computer equipment, and storage medium for processing resource conversion data are provided.
  • a method for processing resource conversion data executed by a computer device, the method comprising: obtaining a first conversion record set and a second conversion record set, the first conversion record set includes at least one first resource conversion record, and the first conversion record set includes at least one first resource conversion record.
  • the second conversion record set includes at least one second resource conversion record, the original resource in the first resource conversion record is a first type resource, and the target resource in the second resource conversion record is the first type resource; obtaining In the first conversion record set, the number of original resources corresponding to the first resource conversion record is used as the first original quantity; obtain the target resource corresponding to the second resource conversion record in the second conversion record set As the first target quantity; obtain the first conversion quantity corresponding to the first type resource according to the difference between the first original quantity and the first target quantity; and, according to the first conversion quantity and The resources of the first type undergo resource conversion.
  • a resource conversion data processing device comprising: a record set obtaining module, configured to obtain a first conversion record set and a second conversion record set, the first conversion record set includes at least one first resource conversion record, and The second conversion record set includes at least one second resource conversion record, the original resource in the first resource conversion record is a first type resource, and the target resource in the second resource conversion record is the first type resource
  • the first original quantity acquisition module is used to obtain the quantity of the original resources corresponding to the first resource conversion record in the first conversion record set as the first original quantity
  • the first target quantity acquisition module is used to obtain In the second conversion record set, the number of target resources corresponding to the second resource conversion record is used as the first target quantity
  • the first conversion quantity obtaining module is configured to compare the first original quantity with the first target quantity. The difference of the target quantity obtains the first conversion quantity corresponding to the first type resource
  • the resource conversion module is configured to perform resource conversion according to the first conversion quantity and the first type resource.
  • a computer device includes a memory and a processor, the memory stores computer-readable instructions, and the processor implements the following steps when executing the computer-readable instructions: acquiring a first set of conversion records and a second set of conversion records, The first conversion record set includes at least one first resource conversion record, the second conversion record set includes at least one second resource conversion record, and the original resource in the first resource conversion record is a first type resource, so The target resource in the second resource conversion record is the first type resource; the number of original resources corresponding to the first resource conversion record in the first conversion record set is obtained as the first original quantity; In the second conversion record set, the number of target resources corresponding to the second resource conversion record is used as the first target number; according to the difference between the first original number and the first target number, the first The first conversion quantity corresponding to the type resource; the resource conversion is performed according to the first conversion quantity and the first type resource.
  • One or more non-volatile storage media storing computer-readable instructions, which when executed by one or more processors implement the following steps: acquiring a first set of conversion records and a second set of conversion records,
  • the first conversion record set includes at least one first resource conversion record
  • the second conversion record set includes at least one second resource conversion record
  • the original resource in the first resource conversion record is a first type resource
  • the target resource in the second resource conversion record is the first type resource
  • the number of original resources corresponding to the first resource conversion record in the first conversion record set is obtained as the first original quantity
  • the second conversion record set the number of target resources corresponding to the second resource conversion record is used as the first target number; according to the difference between the first original number and the first target number, the first The first conversion quantity corresponding to the type resource
  • the resource conversion is performed according to the first conversion quantity and the first type resource.
  • Figure 1 is an application environment diagram of resource conversion data processing methods in some embodiments
  • Figure 2 is a schematic flow diagram of a resource conversion data processing method in some embodiments
  • FIG. 3 is a schematic diagram of an implementation of a method for processing resource conversion data in some embodiments
  • FIG. 4 is a schematic flowchart of a method for processing resource conversion data in other embodiments
  • Figure 5 is a schematic diagram of determining resource conversion relationships in some embodiments.
  • FIG. 6A is a schematic diagram of currency exchange in some embodiments in some embodiments.
  • 6B is a schematic diagram of the interface of the terminal before and after currency conversion in some embodiments in some embodiments;
  • FIG. 7 is a schematic flowchart of a resource conversion data processing method in other embodiments.
  • FIG. 8 is a schematic diagram of the principles of resource conversion data processing methods in other embodiments.
  • Figure 9 is a structural block diagram of a resource conversion data processing device in some embodiments.
  • Figure 10 is a diagram of the internal structure of a computer device in some embodiments.
  • Electronic stored value wallet refers to a kind of Internet electronic account issued by payment institutions, such as third-party payment institutions, that can be recharged through gold channels for at least one of consumption, transfer or remittance An Internet payment tool for various application scenarios.
  • Electronic stored value wallet account (hereinafter referred to as wallet account):
  • the fund carrier of the electronic wallet which can record the account changes such as the income and expenditure of the electronic wallet in the form of balance.
  • Deposit Refers to the user transferring funds to the electronic wallet to form a wallet balance. For example, use a bank card to recharge a wallet account.
  • Multi-currency accounts can support different currencies. For example, in addition to RMB, accounts in other currencies such as US dollars or Hong Kong dollars can be set up to serve as currency carriers. Multi-currency accounts can be carried out electronically Currency exchange can also be called a virtual multi-currency account.
  • Currency exchange refers to the exchange behavior between different currencies in the electronic wallet. During the exchange, it can be exchanged according to the exchange rate provided by the electronic wallet platform at the time of the transaction.
  • User Refers to a user of a certain electronic wallet, such as an individual, who obtains the right to use the electronic wallet after passing the registration and authentication.
  • Platform Refers to the operator of the electronic wallet, such as a specific institution approved by the regulatory authority to operate.
  • the resource conversion data processing method provided in this application can be applied to the application environment shown in FIG. 1, including the terminal 102, the intermediate server 104, and the resource conversion server 106.
  • the intermediate server 104 may be a server of a third-party platform.
  • the intermediate server 104 may be, for example, a server corresponding to a target application, and the target application may be an application that provides a resource conversion function, such as an instant messaging application.
  • the resource conversion server 106 may be, for example, a server managed by a bank.
  • the terminal 102 may be a terminal held by the user. The user can send a currency exchange request to the intermediate server 104 through the terminal 102.
  • the intermediate server 104 responds to the request to change the amount of currency in the user's account, for example, converts the A resource of the first resource amount in the user's account into the first resource.
  • the B resource of the second resource quantity, and the resource conversion record is generated.
  • the intermediate server 104 may obtain a batch of resource conversion records every preset time period, execute the method provided in the embodiment of the present application, and obtain the first conversion quantity corresponding to the first type of resource, and the intermediate server 104 sends a resource conversion request to the resource conversion server 106.
  • a first conversion amount of resources of the first type is requested to be converted into other types of resources, or other types of resources are converted into a first conversion amount of resources of the first type.
  • the terminal 102 communicates with the intermediate server 104 through the network through the network.
  • the servers can also communicate through the network.
  • the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices.
  • the intermediate server 104 and the resource conversion server 106 can be independent servers or a server cluster composed of multiple servers. accomplish.
  • a method for processing resource conversion data is provided. Taking the method applied to the intermediate server 104 in FIG. 1 as an example for description, the method includes the following steps:
  • Step S202 Obtain a first conversion record set and a second conversion record set.
  • the first conversion record set includes at least one first resource conversion record
  • the second conversion record set includes at least one second resource conversion record.
  • the original resource of is the first type resource
  • the target resource in the second resource conversion record is the first type resource.
  • resources can be circulated on the Internet through electronic accounts.
  • the resource can be currency or gold, for example, one currency corresponds to one type of resource.
  • the amount of resources owned by a user can be expressed in an electronic form, for example, the amount of RMB held by the user can be displayed in an electronic wallet.
  • the type of resource is determined according to the specific situation. For example, for currency, it can be the U.S. dollar, renminbi, pound sterling, or Hong Kong dollar.
  • the first type of resource can be any type of resource, for example, it can be RMB.
  • Resource conversion refers to the conversion of one kind of resource into another kind of resource.
  • the resource conversion may be performed in the account of the same user. For example, user A converts the RMB in his account into U.S. dollars. Resource conversion can also be performed between accounts of different users. For example, if user A transfers 100 yuan to user B, but user B’s account is a U.S. dollar account, the intermediate server can transfer 100 yuan during the transfer process. Renminbi is converted to 15 U.S. dollars.
  • the original resource refers to the resource before conversion, and the target resource refers to the resource after conversion. For example, if RMB is converted to USD, RMB is the original resource and USD is the target resource. Converting U.S. dollars to renminbi, the U.S. dollar is the original resource and the renminbi is the target resource.
  • Resource conversion records are records of resource conversion behaviors.
  • the resource conversion record may include the type identifier of the original resource, the resource quantity of the original resource, the type identifier of the target resource, and the quantity of the target resource.
  • the type identifier of the original resource is a renminbi identifier, such as RMB, and the quantity of the original resource is 700.
  • the type identifier of the target resource is a U.S. dollar identifier, such as USD, and the number of the target resource is 100.
  • the first conversion record set may include one or more first resource conversion records, and the second conversion record set may also include one or more second resource conversion records. Multiple means at least two.
  • the original resource in the first resource conversion record and the target resource in the second resource conversion record are resources of the same type, for example, both may be RMB.
  • the target resource in the first resource conversion record and the original resource in the second resource conversion record may be the same or different.
  • the first resource conversion record is a resource conversion record for converting RMB into U.S. dollars
  • the second resource conversion record is a resource conversion record for converting U.S. dollars into RMB.
  • the first resource conversion record and the second resource conversion record may be obtained from the candidate conversion record set.
  • the resource conversion record of the candidate conversion record set may be randomly selected, or the resource conversion time may be obtained in the first
  • the resource conversion records in the resource conversion time range form a candidate resource conversion record set.
  • the original resource is the first type of resource
  • the target resource is the resource conversion record of the second type of resource, as the first resource conversion record.
  • From the candidate resource conversion record set obtain a resource conversion record in which the original resource is a resource of the second type, and the target resource is a resource of the first type, as the second resource conversion record. That is, the resource conversion direction of the first resource conversion record and the second resource conversion record are opposite.
  • the length of the first resource conversion time range can be set as required, for example, 1 hour.
  • one of the resource conversion records is used as the first resource conversion record
  • the other resource conversion record with the opposite conversion direction is used as the second resource conversion record.
  • the first resource conversion record is a resource conversion record for converting RMB into U.S. dollars
  • the second resource conversion record is a resource conversion record for converting U.S. dollars into RMB.
  • the resource conversion record is generated according to the resource conversion request corresponding to the user. For example, when a resource conversion request sent by a user's terminal is received, the resource conversion request can be responded to in real time, the resource conversion of the account corresponding to the user can be completed, and a resource conversion record can be generated.
  • the intermediate server can be the server corresponding to the instant messaging application. In the past hour, multiple users can send resource conversion requests to the intermediate server through the instant messaging application. The server responds to the resource conversion request and completes The resource conversion of the user's account and the generation of a resource conversion record.
  • Step S204 Obtain the number of original resources corresponding to the first resource conversion record in the first conversion record set as the first original number.
  • the number of original resources of the first resource conversion records in the first conversion record set may be counted to obtain the first original number.
  • Statistics refers to the calculation of sums. For example, suppose that there are two first resource conversion records in the first conversion record set: h1 and h2.
  • the first type resource is RMB
  • h1 is a record that converts 702 RMB to 100 USD
  • h2 is the record of converting 1404 RMB into 200 USD
  • Step S206 Obtain the number of target resources corresponding to the second resource conversion record in the second conversion record set as the first target number.
  • the number of target resources in the second resource conversion records in the second conversion record set may be counted to obtain the first target number.
  • the first type resource is RMB
  • k1 is a record that converts 100 USD to 698 RMB.
  • K2 is the record of converting 1,000 USD to 6,980 RMB.
  • Step S208 According to the difference between the first original quantity and the first target quantity, the first converted quantity corresponding to the first type resource is obtained.
  • the first conversion quantity may also be further calculated based on the difference value. For example, the absolute value of the difference value may be rounded to an integer as the first conversion quantity.
  • Step S210 Perform resource conversion according to the first conversion quantity and the first type of resource.
  • the intermediate server may send a resource conversion request to the resource conversion server to request resource conversion.
  • a resource conversion request is sent to the resource conversion server.
  • the resource that needs to be converted with the first type resource can be determined.
  • the target resource in the first resource conversion record may be used as the resource to be converted with the first type resource. It may also be that a resource of a preset type is used as a resource for conversion with a resource of the first type.
  • the target conversion mode corresponding to the first type resource may be determined according to the size relationship between the first original quantity and the first target quantity, and the first type resource of the first conversion quantity can be converted according to the target conversion mode.
  • the target conversion method can be transfer-in or transfer-out. If the target conversion method is transfer-in, convert other types of resources, such as second-type resources, into first-type resources. If the target conversion method is transfer-out, the first type of resource is exchanged for other types of resources, such as the second type of resources.
  • the target conversion mode when the first original quantity is greater than the first target quantity, the target conversion mode is transfer-out.
  • converting the first-type resource of the first conversion quantity includes: sending a target conversion request to the resource conversion server, The target conversion request is used to request to transfer out the first type resource of the first conversion quantity.
  • the target conversion method is transfer-in.
  • the first type resource conversion of the first conversion quantity includes: sending a target conversion request to the resource conversion server, and the target conversion request is used for Request to transfer the first type of resource of the first converted quantity.
  • the intermediate server does not need to interact with the resource conversion server for currency conversion.
  • the first target amount of RMB is 8027
  • the first original amount is 2106.
  • the third-party platform can open a resource account in the bank, and the intermediate server can send a currency exchange request to the bank's server to use the US dollar to convert 5,921 yuan into the bank.
  • Banking services can add 5,921 yuan to the resource account of the third-party platform. , Minus the U.S. dollar equivalent to 5921 yuan.
  • the target resource in the first resource conversion record is a second-type resource
  • the original resource in the second resource conversion record is a second-type resource.
  • Performing resource conversion according to the first conversion quantity and the first-type resource includes : Send a target conversion request to the resource conversion server, the target conversion request is used to request the conversion of the second type resource into the first type resource of the first conversion quantity, or the first conversion quantity of the first type resource to the type second resource .
  • the first resource conversion record and the second resource conversion record involve the conversion between the same two types of resources, but the conversion direction is opposite.
  • the first resource conversion record is a transfer record of converting renminbi to pound sterling
  • the second resource conversion record is a transfer record of converting pound sterling to renminbi.
  • the intermediate server can send a request to exchange RMB for US dollars to the bank server.
  • the total amount of RMB managed by the platform is correspondingly reduced, and the total amount of US dollars increases to match the user's currency demand. For example, when on February 1st, a user applied to exchange 7000 RMB for 1000 USD, on the same day, another user applied for 800 USD exchange for 5600 RMB.
  • the platform can display the redemption results in real time when facing users.
  • the overlapping amount of the two can be offset (hedging) with each other.
  • the exchange amount will also be reduced, thus reducing the currency exchange cost.
  • foreign exchange business includes two businesses: purchase of foreign exchange and foreign exchange settlement.
  • Foreign exchange purchase refers to the use of domestic currency to exchange foreign currencies, and the price of selling domestic currency is used for settlement.
  • the price of domestic currency is called the selling price (ask).
  • Foreign exchange settlement refers to the use of foreign currency to purchase domestic currency and use the price of buying domestic currency for settlement.
  • the price of domestic currency is called the bid price (bid).
  • the local currency refers to the legal currency of the geographic area where the user is located.
  • the geographic area can be a country or a region. For example, when the user's country is China, the local currency is RMB.
  • the selling price is higher than the buying price (ask is higher than bid), and the difference is the bank’s exchange fee and the bank’s income.
  • the selling price of RMB is 7.02 and the buying price of RMB is 6.98. That is, when the user exchanges RMB for the US dollar, 7.02 RMB can be exchanged for 1 US dollar, and when the user exchanges the US dollar for RMB, 1 The US dollar can be exchanged for 6.98 RMB.
  • resource conversion refers to the conversion of one kind of resource into another kind of resource
  • two kinds of resources are involved. Therefore, one of the resources can be used as the first type of resource, and the other can be used as the second type of resource.
  • the conversion of resources is based on the first type of resources.
  • the first type of resources can be specifically set as needed. For example, for the mutual conversion between the U.S. dollar and the renminbi, it can be preset to use the renminbi as the first type of resource and the U.S. dollar as the first type of resource.
  • Two types of resources It can also be determined according to the size of the original number of resources and the target number obtained by statistics. For example, in the past hour, the currency whose transfer-in quantity is greater than the transfer-out quantity can be used as the first type resource.
  • the original resource in the first resource conversion record is the first type resource
  • the target resource in the second resource conversion record is the first type resource, that is, the original resource in the first resource conversion record and the second resource
  • the target resources in the resource conversion records are of the same type, the number of original resources corresponding to the first resource conversion record is obtained as the first original quantity, and the number of target sources corresponding to the second resource conversion record is obtained as the first target quantity. Then, according to the first resource exchange quantity obtained by the difference between the first original quantity and the first target quantity, a unified resource conversion is performed on the resources of the first type.
  • the first resource exchange quantity obtained according to the difference between the first original quantity and the first target quantity is equivalent to offsetting the quantity of the same type of resources in different conversion directions, and is converted according to the first resource conversion record and the second resource conversion record respectively.
  • the final effect of the first type of resources is corresponding. Therefore, a unified resource conversion is performed according to the first conversion quantity and the first type of resources, which reduces the number of resource conversions and reduces the pressure of resource conversion.
  • the resource conversion data processing method provided in the embodiment of the present application can be applied to a currency exchange business scenario provided by a third-party platform.
  • Users can exchange currencies on third-party platforms.
  • the server corresponding to the third-party platform can respond to the user's corresponding currency exchange request in real time, so that the amount of each currency on the user's electronic wallet can be changed in real time.
  • the currency exchange directions of different users on the platform may be different, for example, there are currency exchange applications from different directions every day, such as RMB to U.S. dollar, U.S. dollar to RMB, or Yen to U.S. dollar, etc.
  • the intermediate server will be under heavy operating pressure. Therefore, it is possible to perform unified exchange in batches, for example, every preset time period, obtain the currency conversion records involving the same two currencies (the first type of resources and the second type of resources), and the exchange directions are opposite.
  • the original quantity and target quantity corresponding to any one of the two currencies (the first type of resource) can be counted, and the increment of the currency can be calculated based on the difference between the original quantity and the target quantity. If the increment is positive, that currency If the total amount of is increased, another resource will be used to exchange in that resource, if the increment is negative, the resource will be exchanged out.
  • FIG. 3 it is a schematic diagram of implementation of a method for processing resource conversion data by terminals, intermediate servers, and resource conversion servers corresponding to different wallet users in some embodiments.
  • Different wallet users can exchange currency through corresponding terminals.
  • one user can exchange currency A for currency B, and another user can exchange currency B for currency A.
  • Position refers to the difference between the amount of resources transferred in and out. If the amount transferred in (the first target quantity) is more than the amount transferred out (the first original quantity), it is called a "long position". The quantity of is greater than the quantity transferred in, which is called "short position".
  • the intermediate server can obtain the resource conversion record in the opposite direction of the resource conversion for hedging calculation, and obtain the position in either currency of the two currencies. If the currency is a long position, it means that the other currency is a short position, so the intermediate server can The resource exchange server interacts and uses the resources of the short position to exchange the resources of the long position to complete the currency exchange.
  • the resource conversion record is generated according to the user's resource conversion request.
  • the resource conversion data processing method may further include the following steps:
  • Step S402 Receive a first conversion request sent by a terminal corresponding to the target user, where the first conversion request is used to request conversion of the first type of resources of the first amount of resources into the second type of resources.
  • the first conversion request may carry the type identifier of the original resource and the type identifier of the target resource, the type identifier of the original resource is the resource identifier of the first type resource, and the type identifier of the target resource is the resource identifier of the second type resource.
  • the resource type identifier is used to identify the type of the resource, and the conversion request may carry the first resource quantity, for example, it may be 100.
  • Step S404 Obtain the current resource conversion relationship between the first type resource and the second type resource, and calculate the second resource quantity based on the current resource conversion relationship and the first resource quantity.
  • the current resource conversion relationship refers to the current resource conversion relationship, for example, the selling price of the first type resource relative to the second type resource.
  • the first resource quantity is the original resource quantity
  • the second resource quantity is the target resource quantity.
  • the first resource quantity can be extracted from the first conversion request, and the second resource quantity corresponding to the first resource quantity can be obtained according to the current resource conversion relationship between the first type resource and the second type resource. For example, suppose that the current resource conversion relationship is that the exchange rate between the first type of resource and the second type of resource is 1:2. Then if the first resource quantity is 10, the second resource quantity is 20.
  • the intermediate server may store the current resource conversion relationship between the first type resource and the second type resource.
  • the current resource conversion relationship includes a conversion relationship for converting a first type resource into a second type resource and a conversion relationship for converting a second type resource into a first type resource.
  • the first type of resource is RMB and the second type of resource is GBP
  • the current resource conversion relationship can include the price of RMB when converting RMB to GBP, or the price of RMB when converting GBP to RMB.
  • the selling price of renminbi is 7.02
  • the buying price of renminbi is 6.98. That is, when renminbi is exchanged for dollars, 7.02 renminbi can be exchanged for 1 dollar, and when renminbi is exchanged for renminbi, 1 dollar can be exchanged.
  • Exchange 6.98 RMB when renminbi is exchanged for dollars, 7.02 renminbi can be exchanged for 1 dollar, and when renminbi is exchanged for ren
  • the current resource conversion relationship stored by the intermediate server may be obtained according to the resource conversion relationship obtained from the resource conversion server.
  • the intermediate server may obtain the exchange rate between various resources sent by the resource conversion server in real time or every preset period of time.
  • the step of acquiring the current resource conversion relationship includes: receiving a first resource conversion relationship sent by the resource conversion server, where the first resource conversion relationship is a resource conversion relationship between a first type resource and a second type resource; The first resource conversion relationship determines the second resource conversion relationship, and the second resource conversion relationship is taken as the current resource conversion relationship between the first type resource and the second type resource within the target time range.
  • the first resource conversion relationship may include at least one of a conversion relationship that converts a first type resource into a second type resource and a conversion relationship that converts a second type resource into a first type resource.
  • the first resource conversion relationship may be actively pushed by the resource conversion server to the intermediate server, or may be sent by the intermediate server to the resource conversion server by request. For example, whenever the exchange rate changes, the server corresponding to the bank can send the updated exchange rate to the server (intermediate server) of the third-party platform.
  • the intermediate server may send a request to the bank server to obtain the resource conversion relationship regularly, for example, at 0 o'clock every day.
  • the intermediate server may use the first resource conversion relationship as the second resource conversion relationship. It is also possible to perform further calculations according to the first resource conversion relationship to obtain the second resource conversion relationship.
  • the specific calculation rules can be preset as needed. For example, the price of the resource can be multiplied by a preset value, subtracted from the preset value, or added to the preset value to obtain the target price.
  • FIG. 5 it is a schematic diagram of determining the resource conversion relationship in some embodiments.
  • the resource conversion server such as the server of a bank, can send the price (quotation) of the resource to the intermediate server, that is, send the first resource conversion relationship.
  • the intermediate server determines the price of the resource when the user exchanges the resource according to the quotation of the bank and the additional price of the platform, that is, the second resource conversion relationship.
  • the additional price of the platform is obtained according to the pricing rules pre-stored by the server.
  • the intermediate server can determine the amount of local currency that can be exchanged when a certain amount of other currencies are used to exchange the local currency according to the resource price when the user exchanges resources, and send it to the user's corresponding terminal .
  • the selling price of RMB is 7.02 and the buying price of RMB is 6.98.
  • the selling price plus 0.01, and the buying price minus 0.01 you can get the user-oriented quotation, the selling price of RMB is 7.03, and the buying price of RMB is 6.97.
  • the length of the target time range can be determined according to actual conditions or rules, for example, it can be 24 hours.
  • the current resource conversion relationship between the first type of resource and the second type of resource remains unchanged.
  • a lock-up agreement can be signed between a bank and a third-party platform to lock in the exchange rate price.
  • the lock-up agreement refers to a currency exchange agreement with a partner bank that agrees to execute at a fixed exchange rate within a certain time interval. Currency exchange.
  • the intermediate server can periodically pull and update the bank's exchange rate quotation through asynchronous tasks as the quotation within the target time range.
  • the intermediate server when the intermediate server receives the resource conversion request corresponding to the user and needs to determine the resource quantity conversion of the user's resource account according to the resource conversion relationship, it does not need to obtain the real-time exchange rate from the resource conversion server in real time, which reduces the pressure on the intermediate server.
  • the first resource conversion time corresponding to each resource conversion record is within the target time range, that is, the first resource conversion time corresponding to each resource conversion record is all within the target time range.
  • the intermediate server can send a resource conversion request to the resource conversion server within the target time range to reduce financial risks.
  • the exchange rate is updated once a day
  • Step S406 In the resource account corresponding to the target user, subtract the first type resource of the first resource quantity, increase the second type resource of the second resource quantity, and generate the first resource conversion record corresponding to the first conversion request.
  • the user's resource account needs to subtract the original resource of the first resource quantity and increase the target resource of the second resource quantity.
  • the original resource is a first type resource
  • the target resource is a second type resource
  • the number of original resources is the first resource number
  • the number of target resources is the second resource number.
  • the resource account corresponding to the target user may include a resource account corresponding to a first type of resource and a resource account corresponding to a second type of resource. Therefore, the resource account corresponding to the first type resource can be subtracted from the resource account of the first resource quantity, and the resource account corresponding to the second type resource can be added to the resource account of the second resource quantity.
  • the intermediate server may create an account corresponding to each currency type for the user.
  • the number of resources corresponding to each currency is displayed on the terminal to increase the flexibility of users in different regions for resource transfer and resource conversion.
  • FIG. 6A it is a schematic diagram of currency exchange in some embodiments. Assuming that user A is in China, the local currency is RMB, and the corresponding accounts include RMB accounts (local currency accounts) and U.S. dollar accounts (foreign currency accounts). Even if the user wants to increase the number of U.S. dollars in the U.S. dollar account, he does not need to actually use U.S. dollars to recharge.
  • the intermediate server can deduct the corresponding amount of foreign currency from the user's foreign currency account, and the account of the foreign currency store obtains the corresponding amount of foreign currency.
  • Fig. 6B is a schematic diagram of the interface of the terminal before and after currency conversion in some embodiments.
  • user A’s electronic wallet shows that user A has 300 RMB and 10 US dollars.
  • User A can operate the terminal, for example, click the "currency exchange" button, and after a series of operations, send a resource conversion request to convert 200 yuan into US dollars through the terminal to the intermediate server.
  • the intermediate server obtains that 200 RMB can be converted into 30 US dollars. Therefore, the intermediate server converts the 200 RMB in user A's RMB account to 30 US dollars in the USD account.
  • the second resource conversion record may be generated according to the second conversion request sent by the user.
  • the second conversion request is used to request the conversion of the second type of resource into the first type of resource; according to the second conversion request, the third resource quantity corresponding to the first type resource and the fourth resource quantity corresponding to the second type resource are obtained;
  • the resource account corresponding to the first user adds a third resource amount of the first type resource, subtracts the fourth resource amount of the second type resource from the resource account corresponding to the target user, and generates a second resource conversion record.
  • the resource conversion data processing method may further include the following steps:
  • Step S702 Receive a resource transfer request corresponding to the target user, where the resource transfer request carries the resource type identifier and the resource transfer quantity.
  • the resource transfer request corresponding to the target user is used to request the transfer of resources from the target user's account.
  • the resource transfer request corresponding to the target user may be sent by the resource receiving terminal.
  • the resource receiving terminal refers to the terminal corresponding to the account that needs to transfer resources from the user's resource account.
  • the resource receiving terminal may be a terminal corresponding to the merchant, such as a cash register.
  • the user can pay by electronic payment, such as payment by a payment code, and the source transfer terminal sends a resource transfer request to the intermediate server according to the payment code.
  • the resource transfer terminal can also obtain the payment amount entered by the merchant as the amount of resource transfer.
  • the resource transfer terminal presets a resource type identifier to identify the type of resource. For example, if the merchant is in the United States, the resource type identifier may be a U.S. dollar identifier, such as USD.
  • Step S704 In response to the resource transfer request, obtain a first resource account corresponding to the target user, where the first resource account is an account corresponding to the resource type identifier.
  • the first resource account is the account corresponding to the resource type identifier carried in the resource transfer request. For example, if the resource type identifier is USD, the first resource account is the U.S. dollar account of the target user.
  • Step S706 Transfer resources of the resource transfer amount from the first resource account.
  • the resource transfer request may also carry the account identifier of the receiving account corresponding to the resource transfer terminal. Therefore, the resources of the resource transfer amount in the first resource account may be transferred to the receiving account corresponding to the resource transfer terminal.
  • Steps S702 to S706 can be applied to overseas payment scenarios.
  • the user's local currency account is RMB
  • the local currency used in the geographic area is different from the user's local currency, and the geographic area .
  • the price of the store is priced in the local currency. If a single currency account is used and the currency is converted according to the exchange rate at the time of payment, the user can only passively accept the current exchange rate.
  • the current exchange rate is not good for users, but the interest rate last month is actually very advantageous, and users have no way to reserve specific currencies in advance according to their preferences.
  • real-time calculation is also prone to confusion and distrust, because the transaction occurs at a moment, and the currency involves conversion calculations, the user cannot determine the deducted amount of domestic currency in the first time, and whether it is equivalent to the price of the commodity priced in foreign currency. For example, if the price is 10 US dollars, but 71 RMB is charged from the user's RMB account, it is difficult for the user to determine the equivalent value of 71 RMB to 10 US dollars, which is prone to mistrust.
  • 10 USD is automatically deducted from the USD account, which can reduce the amount of calculation and make it easier for users to understand and accept.
  • steps S702 to S706 and steps S202 to S210 can be performed synchronously, or steps S702 to S706 are performed first, or steps S202 to S210 are performed first.
  • the resource conversion data processing method provided in the embodiment of the present application can be applied to a currency exchange business scenario provided by a third-party platform.
  • the server of the third-party platform can support users to have accounts corresponding to multiple currencies in the e-wallet to expand resource usage scenarios; users can flexibly determine the time of currency conversion based on the current exchange rate, and use currency conversion channels, Exchange between various currencies supported by the e-wallet through the terminal to improve the utilization rate of funds.
  • the core principle of the local currency can be adopted, with the local currency as the core, that is, as the intermediate currency.
  • the currency of payment can also be automatically determined by the intermediate server. For example, when the intermediate server receives a resource transfer request sent by the merchant's cash register, it can determine the corresponding resource account according to the resource type identifier.
  • the platform can sign a lock-up agreement with the partner bank, and the exchange rate will remain constant for a certain period of time. Therefore, the intermediate server receives the resources sent by the bank's corresponding resource conversion server The price can be locked, that is, within the target time range, such as one day, the same exchange rate is used to process the user’s currency conversion application. The intermediate server can real-time check the balance of the user’s currency account according to the current resource price. Make changes.
  • the intermediate server can complete the price lock period in batches, and the amount of resources between the resource conversion records in the opposite direction of the conversion is hedged (offset) to obtain the need to redeem Or send a currency conversion request to the server for the amount of the resource redeemed, so as to complete the processing of a batch of resource conversion records.
  • FIG. 8 is a schematic diagram of the principle of implementing the resource conversion data processing method provided by the embodiments of the present application.
  • the connection line marked S represents a real-time information link
  • the connection line marked Y represents an asynchronous information link, which is marked as
  • the connecting line of Z represents the flow of funds.
  • the intermediate server can periodically pull the bank's currency conversion quotation (original quotation) from the resource conversion server, such as a bank server, through an asynchronous task, such as the price of RMB to USD.
  • the task of pulling bank quotes at regular intervals can be performed through timed asynchronous tasks. While ensuring timeliness, it does not interfere with the real-time transaction link, and there is no need for the real-time transaction link to query the quotes from the resource conversion server one by one.
  • the transaction link refers to the link that processes the user's currency exchange request.
  • the pricing module of the intermediate server can form a user-oriented quotation according to a preset pricing rule, which serves as the currency exchange quotation for the day.
  • the user can initiate an exchange instruction (request for exchange currency) through a foreign currency account or a domestic currency account by operating the terminal, and the exchange module in the intermediate server receives the exchange instruction.
  • an exchange instruction request for exchange currency
  • the exchange module in the intermediate server receives the exchange instruction.
  • the exchange module responds to the currency exchange request sent by the user terminal in real time according to the currently formed user-oriented quotation, which can be embodied in that the balance of the user's account in different currencies will change. It can be understood that the second resource conversion record may also be generated according to the second conversion request of another user.
  • the first conversion record set includes at least one first resource conversion record
  • the second conversion record set includes at least one second resource conversion record
  • the first resource conversion record The original resource of is the first type resource
  • the target resource in the second resource conversion record is the first type resource.
  • the first converted quantity corresponding to the first type of resource is obtained;
  • an internal hedging mechanism may be set in the intermediate server, and resource conversion records of the opposite direction of resource conversion may be obtained, and the amount of resources may be hedged. It can be one or more batch hedging tasks in a price lock cycle. That is, hedge (offset) the resource quantity of the same resource in different conversion directions to obtain the final exchange quantity of the resource.
  • the resource conversion record of converting RMB into USD can be obtained as the first resource conversion record.
  • the fluctuation of the transaction is controlled through the regular price locking mechanism, and the scale of the transaction is controlled through the internal hedging mechanism. While real-time currency exchange services, the risk of loss in the face of foreign exchange fluctuations is controlled as much as possible, and the number of interactions with the resource exchange server can be reduced.
  • a computer program product or computer program includes computer instructions stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the steps in the foregoing method embodiments.
  • a device for processing resource conversion data may adopt software modules or hardware modules, or a combination of the two to form a part of computer equipment.
  • the device specifically includes: recording The collection obtaining module 902, the first original quantity obtaining module 904, the first target quantity obtaining module 906, the first converted quantity obtaining module 908, and the resource conversion module 910, wherein:
  • the record set obtaining module 902 is configured to obtain a first conversion record set and a second conversion record set.
  • the first conversion record set includes at least one first resource conversion record
  • the second conversion record set includes at least one second resource conversion record.
  • the original resource in the resource conversion record is the first type resource
  • the target resource in the second resource conversion record is the first type resource;
  • the first original quantity obtaining module 904 is configured to obtain the quantity of original resources corresponding to the first resource conversion record in the first conversion record set as the first original quantity.
  • the first target quantity obtaining module 906 is configured to obtain the quantity of the target resource corresponding to the second resource conversion record in the second conversion record set as the first target quantity.
  • the first converted quantity obtaining module 908 is configured to obtain the first converted quantity corresponding to the first type resource according to the difference between the first original quantity and the first target quantity.
  • the resource conversion module 910 is configured to perform resource conversion according to the first converted quantity and the first type of resources.
  • the resource conversion module 910 includes: a target conversion mode determining unit, configured to determine a target conversion mode corresponding to the first type of resource, the target conversion mode is determined according to the relationship between the first original quantity and the first target quantity; The conversion unit is configured to convert the first type resource of the first conversion quantity according to the target conversion mode.
  • the target conversion method when the first original quantity is greater than the first target quantity, the target conversion method is transfer-out, and the resource conversion unit is configured to: send a target conversion request to the resource conversion server, and the target conversion request is used to request transfer-out of the first conversion Number of resources of the first type.
  • the target conversion method is transfer-in, and the resource conversion unit is configured to send a target conversion request to the resource conversion server, and the target conversion request is used to request transfer to the first conversion. Number of resources of the first type.
  • the target resource in the first resource conversion record is a resource of the second type
  • the original resource in the second resource conversion record is a resource of the second type
  • the resource conversion module 910 is configured to: send the target conversion to the resource conversion server The request, the target conversion request is used to request the conversion of the second type of resources into the first type of resources of the first conversion quantity, or the conversion of the first type of resources of the first conversion quantity to the second type of resources.
  • the record set obtaining module 902 is configured to obtain, from the candidate resource conversion record set corresponding to the first resource conversion time range, the original resource is the first type of resource, and the target resource is the resource conversion record of the second type of resource. , As the first resource conversion record, constitute the first conversion record set; from the candidate resource conversion record set, the original resource is the second type resource, and the target resource is the resource conversion record of the first type resource, as the second resource conversion record , Forming the second set of conversion records.
  • the resource conversion data processing device further includes: a first conversion request receiving module, configured to receive a first conversion request sent by a terminal corresponding to the target user, and the first conversion request is used to request that the first resource quantity be replaced by the first conversion request.
  • One type of resource is converted into a second type of resource; the second resource quantity obtaining module is used to obtain the current resource conversion relationship between the first type resource and the second type resource, and calculate the first resource based on the current resource conversion relationship and the first resource quantity. 2.
  • the number of resources a generating module, used to subtract the first type of resources of the first resource quantity from the resource account corresponding to the target user, increase the second type of resources of the second quantity of resources, and generate the first resource conversion record.
  • the resource conversion data processing device further includes: a first resource conversion relationship receiving module, configured to receive a first resource conversion relationship sent by the resource conversion server, the first resource conversion relationship being a first type resource and a second type The resource conversion relationship between resources; the second resource conversion relationship determining module is used to determine the second resource conversion relationship according to the first resource conversion relationship, and take the second resource conversion relationship as the target time range, the first type resource and the second resource conversion relationship The current resource conversion relationship between type resources.
  • a first resource conversion relationship receiving module configured to receive a first resource conversion relationship sent by the resource conversion server, the first resource conversion relationship being a first type resource and a second type The resource conversion relationship between resources
  • the second resource conversion relationship determining module is used to determine the second resource conversion relationship according to the first resource conversion relationship, and take the second resource conversion relationship as the target time range, the first type resource and the second resource conversion relationship The current resource conversion relationship between type resources.
  • Each module in the above-mentioned resource conversion data processing device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 10.
  • the computer equipment includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer equipment is used to store resource conversion records.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instruction is executed by the processor to realize a resource conversion data processing method.
  • FIG. 10 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and a processor, where computer-readable instructions are stored in the memory, and the processor implements the steps in the foregoing method embodiments when executing the computer-readable instructions.
  • a computer-readable storage medium is provided, and computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the steps in the foregoing method embodiments are implemented.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical storage.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Technology Law (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种资源转换数据处理方法、装置、计算机设备和存储介质。所述方法包括:获取第一转换记录集合以及第二转换记录集合,第一资源转换记录中的原始资源为第一类型资源,第二资源转换记录中的目标资源为所述第一类型资源(S202);获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量(S204);获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量(S206);根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量(S208);根据所述第一转换数量以及所述第一类型资源进行资源转换(S210)。

Description

资源转换数据处理方法、装置、计算机设备和存储介质
本申请要求于2020年03月06日提交中国专利局,申请号为202010152445.7,申请名称为“资源转换数据处理方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网技术领域,特别是涉及一种资源转换数据处理方法、装置、计算机设备和存储介质。
背景技术
随着互联网技术的发展,出现了通过互联网进行资源转换的资源转换方式,例如,用户可以在互联网平台上进行货币兑换。
传统技术中,互联网平台的服务器接收到用户终端发送的资源转换请求例如请求兑换货币时,通常需要根据资源转换请求与资源转换服务器例如银行服务器进行交互,以完成资源转换过程,通过互联网进行资源转换。然而,传统技术中,经常出现资源转换需求大,造成服务器资源转换压力过大的问题。
发明内容
根据本申请提供的各种实施例,提供一种资源转换数据处理方法、装置、计算机设备和存储介质。
一种资源转换数据处理方法,由计算机设备执行,所述方法包括:获取第一转换记录集合以及第二转换记录集合,所述第一转换记录集合包括至少一个第一资源转换记录,所述第二转换记录集合包括至少一个第二资源转换记录,所述第一资源转换记录中的原始资源为第一类型资源,所述第二资源转换记录中的目标资源为所述第一类型资源;获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量;获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量;根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量;以及,根据所述第一转换数量以及所述第一类型资源进行资源转换。
一种资源转换数据处理装置,所述装置包括:记录集合获取模块,用于获取第一转换记 录集合以及第二转换记录集合,所述第一转换记录集合包括至少一个第一资源转换记录,所述第二转换记录集合包括至少一个第二资源转换记录,所述第一资源转换记录中的原始资源为第一类型资源,所述第二资源转换记录中的目标资源为所述第一类型资源;第一原始数量获取模块,用于获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量;第一目标数量获取模块,用于获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量;第一转换数量得到模块,用于根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量;资源转换模块,用于根据所述第一转换数量以及所述第一类型资源进行资源转换。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现以下步骤:获取第一转换记录集合以及第二转换记录集合,所述第一转换记录集合包括至少一个第一资源转换记录,所述第二转换记录集合包括至少一个第二资源转换记录,所述第一资源转换记录中的原始资源为第一类型资源,所述第二资源转换记录中的目标资源为所述第一类型资源;获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量;获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量;根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量;根据所述第一转换数量以及所述第一类型资源进行资源转换。
一个或多个存储有计算机可读指令的非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时实现以下步骤:获取第一转换记录集合以及第二转换记录集合,所述第一转换记录集合包括至少一个第一资源转换记录,所述第二转换记录集合包括至少一个第二资源转换记录,所述第一资源转换记录中的原始资源为第一类型资源,所述第二资源转换记录中的目标资源为所述第一类型资源;获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量;获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量;根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量;根据所述第一转换数量以及所述第一类型资源进行资源转换。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附 图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一些实施例中资源转换数据处理方法的应用环境图;
图2为一些实施例中资源转换数据处理方法的流程示意图;
图3为一些实施例中执行资源转换数据处理方法的实施示意图;
图4为另一些实施例中资源转换数据处理方法的流程示意图;
图5为一些实施例中资源转换关系的确定示意图;
图6A为一些实施例中为一些实施例中币种兑换的原理图;
图6B为一些实施例中为一些实施例中进行货币兑换前与完成货币兑换后终端的界面示意图;
图7为另一些实施例中资源转换数据处理方法的流程示意图;
图8为另一些实施例中资源转换数据处理方法的原理示意;
图9为一些实施例中资源转换数据处理装置的结构框图;以及
图10为一些实施例中计算机设备的内部结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
在对本发明实施例进行详细说明之前,对部分涉及到的概念进行如下解释说明:
电子储值钱包(简称电子钱包):是指支付机构例如第三方支付机构发行的一种以互联网电子账户为载体的,可以通过入金渠道进行充值的,用以消费、转账或者汇款中的至少一种应用场景的互联网支付工具。
电子储值钱包账户(下文简称钱包账户):电子钱包的资金载体,可以以余额的形式,记录电子钱包的收入以及支出等账户变动。
入金:指用户将资金转入电子钱包,形成钱包余额。例如使用银行卡对钱包账户进行充值。
多币种账户:指钱包账户可以支持不同币种,例如除人民币外,还可设立美元或者港币等其他币种的账户,用以作为货币的载体,多币种账户可以通过电子化的方式进行货币的兑换,也可以称为虚拟多币种账户。
货币兑换:指在电子钱包中,不同货币之间的兑换行为,在兑换时,可以依据交易时间 点电子钱包平台提供的兑换汇率进行兑换。
用户:指某一电子钱包的使用者,例如为个人,通过注册与认证后,获得电子钱包的使用权限。
平台:指电子钱包的运营方,例如为监管部门批准运营的特定机构。
本申请提供的资源转换数据处理方法,可以应用于如图1所示的应用环境中,包括终端102、中间服务器104以及资源转换服务器106。中间服务器104可以是第三方平台的服务器,中间服务器104例如可以是目标应用对应的服务器,目标应用可以是提供资源转换功能的应用,例如可以是即时通讯应用。资源转换服务器106例如可以是银行所管理的服务器。终端102可以是用户持有的终端。用户可以通过终端102向中间服务器104发送兑换货币的请求,中间服务器104响应于该请求,对用户的账户中的货币数量进行变更,例如将用户的账户中第一资源数量的A资源转换为第二资源数量的B资源,并生成资源转换记录。中间服务器104可以每隔预设时长获取一批资源转换记录,执行本申请实施例提供的方法,得到第一类型资源对应的第一转换数量,中间服务器104向资源转换服务器106发送资源转换请求,以请求将第一转换数量的第一类型资源转换为其他类型的资源,或者将其他类型的资源转换为第一转换数量的第一类型资源。
其中,终端102通过网络与中间服务器104通过网络进行通信。服务器之间也可以通过网络进行通信。终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,中间服务器104以及资源转换服务器106可以分别用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一些实施例中,如图2所示,提供了一种资源转换数据处理方法,以该方法应用于图1中的中间服务器104为例进行说明,包括以下步骤:
步骤S202,获取第一转换记录集合以及第二转换记录集合,第一转换记录集合包括至少一个第一资源转换记录,第二转换记录集合包括至少一个第二资源转换记录,第一资源转换记录中的原始资源为第一类型资源,第二资源转换记录中的目标资源为第一类型资源。
具体地,资源可以通过电子账户在互联网上进行流通。资源可以为货币或者黄金等,例如一种货币对应一类资源。用户拥有的资源的数量可以通过电子化的形式表示,例如可以在电子钱包中展示用户所持有的人民币的数量。资源的类型根据具体情况确定,例如,对于货币,可以为美元、人民币、英镑或者港币等类型。第一类型资源可以是任意一种类型的资源,例如可以是人民币。
资源转换是指将一种资源转换为另一种资源。资源转换可以是在相同的用户的账户中进行转换,例如,A用户将其账户中的人民币转换为美元。资源转换也可以是在不同的用户的 账户之间进行转换,例如,A用户向B用户转账100元人民币,但B用户的账户为美元账户,则中间服务器可以在转账的过程中,将100元人民币转换为15美元。原始资源是指转换前的资源,目标资源是指转换后的资源。例如,将人民币转换为美元,则人民币为原始资源,美元为目标资源。将美元转换为人民币,则美元为原始资源,人民币为目标资源。
资源转换记录是对资源转换行为的记载。资源转换记录中可以包括原始资源的类型标识、原始资源的资源数量、目标资源的类型标识以及目标资源的数量。例如,如果A用户用700元人民币兑换了100美元,则资源转换记录中,原始资源的类型标识为人民币的标识,例如RMB,原始资源的数量为700。目标资源的类型标识为美元的标识,例如USD,目标资源的数量为100。
第一转换记录集合中可以包括一个或多个第一资源转换记录,第二转换记录集合中也可以包括一个或多个第二资源转换记录。多个是指至少两个。第一资源转换记录中的原始资源与第二资源转换记录中的目标资源为相同类型的资源,例如可以均为人民币。第一资源转换记录中的目标资源与第二资源转换记录中的原始资源可以相同也可以不同。例如,第一资源转换记录是将人民币兑换为美元的资源转换记录,第二资源转换记录是将美元转换为人民币的资源转换记录。
在一些实施例中,第一资源转换记录以及第二资源转换记录可以是从候选转换记录集合中获取得到的,候选转换记录集合的资源转换记录可以随机选取,也可以获取资源转换时间在第一资源转换时间范围中的资源转换记录,组成候选资源转换记录集合,获取候选资源转换记录集合中,原始资源为第一类型资源,目标资源为第二类型资源的资源转换记录,作为第一资源转换记录。从候选资源转换记录集合中,获取原始资源为第二类型资源,目标资源为第一类型资源的资源转换记录,作为第二资源转换记录。即第一资源转换记录与第二资源转换记录的资源转换方向相反。
具体地,第一资源转换时间范围的长度可以根据需要设置,例如1小时。例如可以每隔预设时长,获取时间长度为预设时长的资源转换时间范围内产生的资源转换记录,组成候选资源转换记录集合,从候选资源转换记录集合中,获取原始资源与目标资源的类型互换的转换记录,将其中的一种资源转换记录作为第一资源转换记录,另一种转换方向相反的资源转换记录作为第二资源转换记录。例如,第一资源转换记录是将人民币兑换为美元的资源转换记录,第二资源转换记录是将美元转换为人民币的资源转换记录。
在一些实施例中,资源转换记录根据用户对应的资源转换请求生成。例如,当接收到用户的终端发送的资源转换请求时,可以实时响应该资源转换请求,完成该用户对应的账户的资源转换,并生成资源转换记录。举个实际的例子,中间服务器可以是即时通讯应用对应的 服务器,在过去的一小时内,可以有多个用户通过即时通讯应用分别向该中间服务器发送资源转换请求,服务器响应资源转换请求,完成对用户的账户的资源转换,并生成资源转换记录。
步骤S204,获取第一转换记录集合中,第一资源转换记录对应的原始资源的数量,作为第一原始数量。
具体地,可以对第一转换记录集合中,第一资源转换记录的原始资源的数量进行统计,得到第一原始数量。统计是指进行求和计算,例如,假设第一转换记录集合中,有两个第一资源转换记录:h1以及h2,第一类型资源为人民币,h1为将702人民币转换为100美元的记录。h2为将1404人民币转换为200美元的记录,则第一原始数量为702+1404=2106。
步骤S206,获取第二转换记录集合中,第二资源转换记录对应的目标资源的数量,作为第一目标数量。
具体地。可以对第二转换记录集合中,第二资源转换记录的目标资源的数量进行统计,得到第一目标数量。例如,第二转换记录集合中,有三个第二资源转换记录:k1、k2以及k3,第一类型资源为人民币,k1为将100美元转换为698人民币的记录。K2为将1000美元转换为6980人民币的记录。K3为将50美元转换为349人民币的记录。则第一目标数量为698+6980+349=8027。
步骤S208,根据第一原始数量与第一目标数量的差异,得到第一类型资源对应的第一转换数量。
具体地,第一转换数量可以为第一原始数量与第二目标数量的差值绝对值。例如,假设第一目标数量为8027,第一原始数量为2106,则第一转换数量为8027-2106=5921。当然第一转换数量也可以是根据差值进一步计算得到的,例如,可以对差值的绝对值四舍五入取整数,作为第一转换数量。
步骤S210,根据第一转换数量以及第一类型资源进行资源转换。
具体地,可以是利用第一转换数量的第一类型资源兑换其他类型的资源或者是利用其他类型的资源兑换第一转换数量的第一类型资源。中间服务器可以向资源转换服务器发送资源转换请求,请求进行资源转换。
在一些实施例中,向资源转换服务器发送资源转换请求,请求进行资源转换之前,可以确定需要与第一类型资源进行转换的资源。例如可以是将第一资源转换记录中的目标资源作为与第一类型资源进行转换的资源。也可以是将预设类型的资源作为与第一类型资源进行转换的资源。
在一些实施例中,可以根据第一原始数量与第一目标数量的大小关系确定第一类型资源 对应的目标转换方式,按照目标转换方式,转换第一转换数量的第一类型资源。目标转换方式可以为转入或者转出。如果目标转换方式为转入,将其他类型的资源例如第二类型资源兑换为第一类型资源。如果目标转换方式为转出,将第一类型资源兑换为其他类型的资源例如第二类型资源。
在一些实施例中,当第一原始数量大于第一目标数量,目标转换方式为转出,按照目标转换方式,转换第一转换数量的第一类型资源包括:向资源转换服务器发送目标转换请求,目标转换请求用于请求转出第一转换数量的第一类型资源。当第一原始数量小于第一目标数量,目标转换方式为转入,按照目标转换方式,转换第一转换数量的第一类型资源转换包括:向资源转换服务器发送目标转换请求,目标转换请求用于请求转入第一转换数量的第一类型资源。可以理解,当第一原始数量等于第一目标数量时,由于总体而言,平台所管理的第一类型资源的总量没有变化,则可以不进行转换,这样即使平台中有多个用户进行了货币兑换,中间服务器也无需与资源转换服务器进行交互,以进行货币兑换。
例如,假设人民币的第一目标数量为8027,第一原始数量为2106。则说明总体而言,用户用2106元人民币兑换了其他货币,又用其他货币兑换了8027元人民币,则综合来看,平台上所有用户的人民币总量是增加了8027-2106=5921元的,故需要兑入对应数量的人民币。第三方平台在银行可以开设有资源账户,中间服务器可以通过该账户向银行的服务器发送要利用美元兑入5921元人民币的货币兑换请求,银行服务可以在第三方平台的资源账户增加5921元的人民币,减去与5921元人民币等值的美元。
在一些实施例中,第一资源转换记录中的目标资源为第二类型资源,第二资源转换记录中的原始资源为第二类型资源,根据第一转换数量以及第一类型资源进行资源转换包括:向资源转换服务器发送目标转换请求,目标转换请求用于请求将第二类型资源转换为第一转换数量的第一类型资源,或者将第一转换数量的第一类型资源转换为类型第二资源。
具体的,第一资源转换记录与第二资源转换记录涉及相同的两种类型的资源之间的转换,但转换方向相反。例如,第一资源转换记录是将人民币兑换为英镑的转移记录,第二资源转换记录是将英镑兑换为人民币的转移记录。通过第一类型资源与第二类型资源之间的相互转换,能够使得中间服务器对应的运营方所管理的各种货币的数量的变化,与平台中用户各个币种的总量的变化匹配。
例如,假设在过去的一个小时内,有些用户用人民币兑换了美元,有些用户用美元兑换了人民币。则可以根据过去一个小时的资源转换记录,统计人民币增量或者美元增量的至少一个,如果人民币总量减少,美元总量增加,则中间服务器可以向银行服务器发送用人民币兑换美元的请求,这样,平台所管理的人民币总量相应减少,美元总量增加,与用户的货币 需求匹配。例如,当2月1日,有用户申请用7000人民币汇兑1000美金,同日,另一用户申请使用800美金汇兑5600人民币。则平台在面向用户时,可以实时展示兑换结果。但在后台处理时,可以将两者重合的金额部分进行互相抵消(对冲),在向银行请求兑换时,请求利用7000-5600=1400人民币,去兑换1000-800=200的美金,这样中间服务器与银行的服务器的交互次数减少,降低了中间服务器的资源兑换压力,同时由于货币兑换金额对冲后,兑换的金额也会减少,因此减少了货币兑换成本。
在一些实施例中,可以理解,资源转入和转出的价值可以是不同的。例如外汇业务包括购汇和结汇两种业务,购汇是指使用本币兑换外币,使用卖出本币的价格进行结算,本币的价格称为卖出价(ask)。结汇是指使用外币购买本币,使用买入本币的价格进行结算,本币的价格称为买入价(bid)。本币是指用户所在的地理区域的法定货币。地理区域可以是一个国家或者一个地区。例如,当用户所在的国家为中国,则本币是人民币。一般而言,对于外汇业务,卖出价高于买入价(ask高于bid),差额即为银行的兑换手续费,为银行的收益。例如,人民币与美元进行兑换时,人民币的卖出价格为7.02,人民币的买入价格是6.98,即当用户用人民币兑换美元时,7.02人民币可以兑换1美元,当用户用美元兑换人民币时,1美元可以兑换6.98人民币。
由于资源转换是指将一种资源转换为另一种资源,涉及两种资源。因此可以其中的一种资源作为第一类型资源,另外一种作为第二类型资源。以第一类型资源为基准进行资源的转换,第一类型资源具体可以根据需要进行设置,例如,对于美元与人民币之间的相互转换,可以预先设置将人民币作为第一类型资源,将美元作为第二类型资源。也可以是根据统计得到的资源的原始数量与目标数量的大小确定。例如可以将过去一个小时内,转入数量大于转出数量的币种作为第一类型资源。
举个实际的例子,按照1单位人民币换算,假设用户在平台的服务器中进行货币兑换时,美元购汇(卖出)价格是7.02,结汇(买入)价格是6.98。假设平台的服务器中有6笔用户人民币与美元转换的记录:a、b、c、d、e以及f,这6笔记录a、b、c、d、e以及f所表示的意义如表一所示,其中数字加上括号表示该币种的增量为负,例如(702.00)表示在该笔资源转换记录中,人民币的增量是-702.00元。如果将a、b、c、d这4笔记录作为一个批次的资源转换记录,进行统一的资源兑换,可以计算得到人民币的增量为-702+100-7020+698=-6924人民币。美元的增量为100-14.33+1000-100=985.67美元。故如果将增量为正的资源作为第一类型资源,则美元为第一类型资源,假设平台从银行中购买美元时,价格也是7.02,则使用985.67*7.02=6919.42人民币就可以兑换得到985.67美元。又例如,如将a与f这2笔记录作为一个批次的资源转换记录,进行统一的资源兑换,可以计算 得到人民币的增量为-702+702=0人民币。美元的增量为100-100.57=-0.57美元。如果将人民币作为第一类型资源,则由于增量为0,故中间服务器无需与银行的服务器进行资源兑换交互。如果将美元作为第一类型资源,则由于增量为负,故中间服务器可以将0.57美元兑换为人民币。
上述资源转换数据处理方法,第一资源转换记录中的原始资源为第一类型资源,第二资源转换记录中的目标资源为第一类型资源,即第一资源转换记录中的原始资源与第二资源转换记录中目标资源的类型相同,获取第一资源转换记录对应的原始资源的数量,作为第一原始数量,获取第二资源转换记录对应的目标源的数量,作为第一目标数量。再根据第一原始数量与第一目标数量差异得到的第一资源兑换数量对第一类型资源进行统一的资源转换。根据第一原始数量与第一目标数量的差异得到的第一资源兑换数量相当于对不同转换方向的同一类资源的数量进行了抵消,与分别根据第一资源转换记录以及第二资源转换记录转换第一类型资源的最终效果是对应的,因此根据第一转换数量以及第一类型资源进行统一的资源转换,减少了进行资源转换的次数,降低了资源转换压力。
表一、资源转换记录明细表
Figure PCTCN2020128063-appb-000001
本申请实施例提供的资源转换数据处理方法可以应用于第三方平台提供的货币兑换业务场景中。用户可以在第三方平台上进行货币的兑换。第三方平台对应的服务器可以实时的响应用户对应的货币兑换请求,使得用户电子钱包上各个币种的数量可以实时的变化。但由于平台上不同用户的货币兑换方向可能是不同的,例如每天有来自不同方向的货币兑换申请,如人民币换美元,美元换人民币或者日元换美元等等。如果每接收到一笔货币兑换申请,就与银行服务器交互一次,以根据该笔货币兑换申请购入或者卖出货币,则中间服务器的运行压力大。因此可以以分批次进行统一的兑换,例如每隔预设时长,获取涉及相同的两种货币(第一类型资源以及第二类型资源),兑换方向相反的货币转换记录。可以统计这两种货币中任意一种货币(第一类型资源)对应的原始数量以及目标数量,根据原始数量以及目标数 量差异计算该种货币的增量,如果增量为正数,即该货币的总量增加了,则用另一种资源换入该资源,如果增量为负数,则换出该资源。通过对面向用户的汇兑请求采用实时机制响应,对面向银行的汇兑处理采用批次汇总机制处理,即保证了用户兑换货币的及时性,也降低了与资源转换服务器频繁交互带来的工作量与资源兑换成本。
例如,如图3所示,为一些实施例中不同钱包用户对应的终端、中间服务器以及资源转换服务器执行资源转换数据处理方法的实施示意图。不同的钱包用户可以通过对应的终端进行货币兑换,例如一个用户将A货币兑换为B货币,另一个用户将B货币兑换为A货币。头寸是指资源转入与转出的数量的差值,如果转入的数量(第一目标数量)多于转出的数量(第一原始数量),就称为“多头寸”,如果转出的数量大于转入的数量,称为“缺头寸”。中间服务器可以获取资源转换方向相反的资源转换记录进行对冲计算,得到两种货币中任一种货币的头寸,如果该种货币为多头寸,说明另一种货币为缺头寸,因此中间服务器可以与资源兑换服务器交互,利用缺头寸的资源兑换多头寸的资源,完成货币兑换。
在一些实施例中,资源转换记录是根据用户的资源转换请求生成的,如图4所示资源转换数据处理方法还可以包括以下步骤:
步骤S402,接收目标用户对应的终端发送的第一转换请求,第一转换请求用于请求将第一资源数量的第一类型资源转换为第二类型资源。
具体地,第一转换请求中可以携带原始资源的类型标识以及目标资源的类型标识,原始资源的类型标识为第一类型资源的资源标识,目标资源的类型标识为第二类型资源的资源标识。资源的类型标识用于标识资源的类型,转换请求中可以携带第一资源数量,例如可以是100。
步骤S404,获取第一类型资源与第二类型资源之间的当前资源转换关系,根据当前资源转换关系以及第一资源数量计算得到第二资源数量。
具体地,当前资源转换关系是指当前的资源转换关系,例如相对于第二类型资源,第一类型资源的卖出价格。第一资源数量为原始资源的数量,第二资源数量为目标资源的数量。可以从第一转换请求中提取得到第一资源数量,根据第一类型资源与第二类型资源之间的当前资源转换关系,得到第一资源数量对应的第二资源数量。例如,假设当前资源转换关系为第一类型资源与第二类型资源的汇率为1:2。则如果第一资源数量为10,则第二资源数量为20。
在一些实施例中,中间服务器可以存储第一类型资源与第二类型资源之间的当前资源转换关系。当前资源转换关系包括将第一类型资源转换为第二类型资源的转换关系以及将第二类型资源转换为第一类型资源的转换关系。例如,当第一类型资源为人民币,第二类型资源 为英镑时,当前资源转换关系可以包括将人民币转换为英镑时,人民币的价格,也可以包括将英镑转换为人民币时,人民币的价格。例如,人民币与美元进行兑换时,人民币的卖出价格为7.02,人民币的买入价格是6.98,即当使用人民币兑换美元时,7.02人民币可以兑换1美元,当使用美元兑换人民币时,1美元可以兑换6.98人民币。
在一些实施例中,中间服务器存储的当前资源转换关系可以是根据从资源转换服务器获取的资源转换关系得到的。例如,中间服务器可以实时也可以是每隔预设时长获取资源转换服务器发送的各种资源之间的汇率。
在一些实施例中,当前资源转换关系的获取步骤包括:接收资源转换服务器发送的第一资源转换关系,第一资源转换关系为第一类型资源与第二类型资源之间的资源转换关系;根据第一资源转换关系确定第二资源转换关系,将第二资源转换关系作为目标时间范围内,第一类型资源与第二类型资源之间的当前资源转换关系。
具体地,第一资源转换关系可以包括将第一类型资源转换为第二类型资源的转换关系以及将第二类型资源转换为第一类型资源的转换关系的至少一个。第一资源转换关系可以是资源转换服务器主动推送给中间服务器的,也可以是中间服务器向资源转换服务器请求发送的。例如,每当汇率改变时,银行对应的服务器可以向第三方平台的服务器(中间服务器)发送更新后的汇率。或者是当银行与第三方平台签订协议,汇率每隔预设时长例如每天更新一次时,则中间服务器可以定时例如每天的0点向银行服务器发送获取资源转换关系的请求。
中间服务器可以将第一资源转换关系作为第二资源转换关系。也可以根据第一资源转换关系进行进一步计算,得到第二资源转换关系。具体的计算规则可以根据需要预先设置,例如,可以将资源的价格乘以预设数值、减去预设数值或者加上预设数值,得到目标价格。如图5所示,为一些实施例中资源转换关系的确定示意图。资源转换服务器例如银行的服务器可以向中间服务器发送资源的价格(报价),即发送第一资源转换关系。中间服务器根据银行的报价以及平台的附加价格确定用户兑换资源时资源的价格,即第二资源转换关系。其中平台的附加价格根据服务器预先存储的定价规则得到,中间服务器可以根据用户兑换资源时资源的价格,确定使用一定数量的其他货币兑换本币时能够兑换得到的本币的金额,发送给用户对应的终端。
举个实际的例子,对于人民币与美元之间的兑换,假设银行服务器发送的第一资源转换关系为人民币的卖出价格为7.02,人民币的买入价格是6.98。假设根据第三方平台的定价规则,卖出价格加上0.01,买入价格减去0.01,则可以得到面向用户报价时,人民币的卖出价格为7.03,人民币的买入价格是6.97。
目标时间范围的长度根据实际情况或者规则可以确定,例如,可以是24小时。在该目 标时间范围内,第一类型资源与第二类型资源之间的当前资源转换关系保持不变。举个实际的例子,银行和第三方平台之间可以签订锁价协议,以锁定汇率价格,锁价协议指与合作银行的一种货币兑换协议,约定在一定的时间区间内,以固定汇率执行货币兑换。通过该锁价协议,可以避免汇率的相对浮动过大。因此中间服务器可以通过异步任务,定时拉取与更新银行的汇率报价,作为目标时间范围内的报价。这样中间服务器在接收到用户对应的资源转换请求,需要根据资源转换关系确定用户资源账户的资源数量的变换时,无需实时从资源转换服务器获取实时的汇率,降低了中间服务器的压力。
在一些实施例中,中间服务器获取的候选资源转换记录集合中,各个资源转换记录所对应的第一资源转换时间在目标时间范围内,即各个资源转换记录所对应的第一资源转换时间都在同一锁价周期内。中间服务器可以在目标时间范围内向资源转换服务器发送资源转换请求,以降低财务风险。例如,如果汇率是每天更新一次,则可以每隔一小时获取过去一个小时用户对应的货币兑换记录,组成候选资源转换记录集合,并从中获取第一资源转换记录以及第二资源转换记录,执行步骤S204至S208,以向银行对应的资源转换服务器发送货币兑换请求,根据过去这一个小时产生的货币兑换记录与资源转换服务器进行交互,统一完成货币兑换。
步骤S406,在目标用户对应的资源账户中,减去第一资源数量的第一类型资源,增加第二资源数量的第二类型资源,并生成第一转换请求对应的第一资源转换记录。
具体地,得到第一资源数量以及第二资源数量之后,由于用户需要进行货币兑换,因此用户的资源账户中,需要减去第一资源数量的原始资源,增加第二资源数量的目标资源。第一资源转换记录中,原始资源为第一类型资源,目标资源为第二类型资源,原始资源的数量为第一资源数量,目标资源的数量为第二资源数量。
在一些实施例中,目标用户对应的资源账户可以有多个,例如目标用户对应的资源账户可以包括第一类型资源对应的资源账户以及第二类型资源对应的资源账户。因此可以从第一类型资源对应的资源账户中减去第一资源数量的资源,从第二类型资源对应的资源账户增加第二资源数量的资源。
在一些实施例中,中间服务器可以为用户创建每个币种分别对应的账户。根据各个币种账户的资源数量在终端上显示各个币种对应的资源数量,以增加不同地域的用户进行资源转移以及资源转换的灵活性。例如,如图6A所示,为一些实施例中货币兑换的原理图。假设A用户在中国,本币为人民币,对应的账户有人民币账户(本币账户)以及美元账户(外币账户),那么即使用户想要增加美元账户的美元数量,也不需要实际使用美元进行充值,而是可以先通过充值本币账户,再通过第三方平台的服务器提供的货币汇兑服务,将人民币转换 为美元。转换后,该用户的人民币账户减去相应的本币,美元账户增加等值的美元。当用户在采用外币支付的商铺,想购买通过外币标价的货物时,中间服务器可以从用户的外币账户中扣除对应数量的外币,外币商铺的账户获取对应数量的外币。
图6B为一些实施例中,进行货币兑换前与完成货币兑换后终端的界面示意图。如图6B左边的图所示,A用户的电子钱包中,显示A用户有300人民币以及10美元。A用户可以通过操作终端,例如点击“货币兑换”按键,并经过一系列操作,通过终端向中间服务器发送将200元人民币兑换为美元的资源转换请求。中间服务器根据当前人民币兑换美元的汇率,得到200元人民币可以兑换为30美元,因此中间服务器将A用户人民币账户中的200元人民币转为美元账户中的30美元,完成转换后,如图6B右边的图所示,A用户的账户中,人民币减去了200元,因此余额为300-200=100元,美元账户增加了30美元,因此余额有10+30=40美元,完成转换后,中间服务器生成资源转换记录。
可以理解,第二资源转换记录可以是根据用户发送的第二转换请求生成的。第二转换请求用于请求将第二类型资源转换为第一类型资源;根据第二转换请求,获取第一类型资源对应的第三资源数量以及第二类型资源对应的第四资源数量;可以从第一用户对应的资源账户中增加第三资源数量的第一类型资源,从目标用户对应的资源账户中减去第四资源数量的第二类型资源,并生成第二资源转换记录。
在一些实施例中,如图7所示,资源转换数据处理方法还可以包括以下步骤:
步骤S702,接收目标用户对应的资源转移请求,资源转移请求携带资源类型标识以及资源转移数量。
具体地,目标用户对应的资源转移请求用于请求从目标用户的账户中转移资源。目标用户对应的资源转移请求可以是资源接收终端发送的。资源接收终端是指需要从用户的资源账户转移资源的账户对应的终端。例如,资源接收终端可以是商家对应的终端,如收银机。当目标用户在商家的商铺中购买货物时,用户可以通过电子支付方式进行支付,例如通过付款码进行支付,源转移终端根据付款码向中间服务器发送资源转移请求。资源转移终端还可以获取商家输入的收款金额,作为资源转移数量,资源转移终端预先设置了资源类型标识,用于标识资源的种类。例如,假如商家在美国,则资源类型标识可以为美元的标识,例如USD。
步骤S704,响应于资源转移请求,获取目标用户对应的第一资源账户,第一资源账户为资源类型标识对应的账户。
具体地,第一资源账户是资源转移请求中携带的资源类型标识所对应的账户,例如,如果资源类型标识为USD,则第一资源账户为目标用户的美元账户。
步骤S706,从第一资源账户中转移资源转移数量的资源。
具体地,资源转移请求中还可以携带资源转移终端对应的接收账户的账户标识,因此,可以将第一资源账户中,资源转移数量的资源转移到资源转移终端对应的接收账户中。
本申请实施例中,通过资源转移请求中的资源类型标识,直接从目标用户对应的第一资源账户中进行资源转移,因此提高了资源转移的效率。步骤S702至S706的步骤可以应用于境外支付的场景,例如,当用户的本币账户为人民币时,如果用户到达另一个地理区域,该地理区域所采用的本币与用户的本币不同,而该地理区域中,商铺的价格是采用当地的币种进行标价的,如果采用单币种账户,按照付款时的汇率进行货币的转换,则用户只能被动接受当前的汇率。如当前的汇率对用户不利,但是上个月的利率其实很有优势,用户没有办法提前按其偏好提前储备特定货币。而且实时计算也容易带来困惑与不信任,因为交易发生在一瞬间,货币又涉及转换计算,用户无法第一时间确定扣除的本币金额,与采用外币标价的商品价格是不是等值的。例如,标价为10美元,但是从用户的人民币账户收取了71人民币,用户很难确定71人民币与10美元等值,容易产生不信任。而采用根据资源转移请求携带资源类型标识以及资源转移数量,自动从美元账户中扣取10美元,既可以减少计算量,又使得用户更容易理解与接受。
可以理解,步骤S702至S706与步骤S202至S210的执行顺序可以是同步进行,或者先执行步骤S702至S706,或者先执行步骤S202至S210。
本申请实施例提供的资源转换数据处理方法可以应用于第三方平台提供的货币兑换业务场景中。第三方平台的服务器可以支持用户在电子钱包中拥有多个币种分别对应的账户,以拓展资源使用场景;用户可以灵活的根据当前的汇率,确定货币兑换的时间,并利用货币兑换的通道,通过终端在电子钱包支持的各个币种之间进行汇兑,提高资金利用率。其中,在兑换时,可以采用本币核心原则,以本币作为核心,即作为中间货币。任何两个非本币间的汇率,可以参考各自对于本币的汇率。例如人民币:日元=1:15,美元:人民币=1:7,则美元:日元=1:105。用户在进行交易时,可以通过终端选择直接以本币支付标价货币(如以美元支持美元标价的商品),这样既给用户提供了主动选择币种和汇率的机会,也减轻了用户在实时交易中面临的使用本币支付,很难确认支付本币与标价货币是否等值所带来的困惑。此外,支付的币种还可以是由中间服务器自动确定的,例如,当中间服务器接收到商家的收银机发送的资源转移请求时,可以根据资源的类型标识确定对应的资源账户。
由于汇率可能是不断进行变化的,为了降低平台的财务风险,平台可与合作银行签订锁价协议,约定汇率在一定时间长度内保持恒定,因此中间服务器接收到银行对应的资源转换服务器发送的资源价格时,可以进行锁价处理,即在目标时间范围例如一天之内,采用相同的汇率处理用户的货币兑换申请,中间服务器可以根据当前的资源价格,实时的对用户的各 币种账户的余额进行变更。为了降低与资源转换服务器的交互次数,在每个锁价期结束前,中间服务器可以批量完成锁价期间,转换方向相反的资源转换记录之间的资源数量的对冲(抵消),得到需要兑入或者兑出的资源的数量,向服务器发送一次货币兑换请求,从而完成一个批次的资源转换记录的处理。
图8为实施本申请实施例提供的资源转换数据处理方法的原理示意图,图8中,标为S的连接线表示实时的信息链路,标为Y的连接线表示异步信息链路,标为Z的连接线表示资金流。以下结合图8,对本申请实施例提供的资源转换数据处理方法进行说明,包括以下步骤:
1、接收资源转换服务器发送的第一资源转换关系,第一资源转换关系为第一类型资源与第二类型资源之间的资源转换关系。
具体地,如图8所示,中间服务器可以通过异步任务,定时从资源转换服务器例如银行服务器拉取银行的货币兑换报价(原始报价),例如人民币兑换美元的价格。定时拉取银行报价的任务可以通过定时的异步任务去执行,在确保及时性的同时,可以不干扰实时交易链路,无需实时交易链路逐一从资源转换服务器查询报价。交易链路是指处理用户的货币兑换请求的链路。
2、根据第一资源转换关系确定第二资源转换关系,将第二资源转换关系作为目标时间范围内,第一类型资源与第二类型资源之间的当前资源转换关系。
具体地,拉取得到报价后,如图8所示,中间服务器的定价模块可以根据预先设置的定价规则形成面向用户的报价,作为当天的货币兑换报价。
3、接收目标用户对应的终端发送的第一转换请求,第一转换请求用于请求将第一类型资源转换为第二类型资源。
如图8所示,用户可以通过操作终端,通过外币账户或者本币账户发起汇兑指令(请求汇兑货币),中间服务器中的汇兑模块接收汇兑指令。
4、根据第一转换请求,获取第一类型资源对应的第一资源数量以及第二类型资源对应的第二资源数量。
5、在目标用户对应的资源账户中减去第一资源数量的第一类型资源,在目标用户对应的资源账户中增加第二资源数量的第二类型资源,并生成第一资源转换记录。
如图8所示,汇兑模块根据当前形成的面向用户的报价,实时响应用户终端发送货币兑换请求,具体体现可以为用户不同币种账户的余额将发生变更。可以理解,还可以根据另一用户的第二转换请求生成第二资源转换记录。
6、获取第一转换记录集合以及第二转换记录集合,第一转换记录集合包括至少一个第一 资源转换记录,第二转换记录集合中包括至少一个第二资源转换记录,第一资源转换记录中的原始资源为第一类型资源,第二资源转换记录中的目标资源为第一类型资源。
7、获取第一转换记录集合中,第一资源转换记录对应的原始资源的数量,作为第一原始数量。
8、获取第二转换记录集合中,第二资源转换记录对应的目标资源的数量,作为第一目标数量。
9、根据第一原始数量与第一目标数量的差异,得到第一类型资源对应的第一转换数量;
10、根据第一转换数量以及第一类型资源进行资源转换。
具体地,中间服务器中可以设有内部对冲机制,可以获取资源转换方向相反的资源转换记录,进行资源数量的对冲。可以是在一个锁价周期进行一次或者多次的批量对冲任务。即对同一资源在不同转换方向的资源数量进行对冲(抵消),得到该资源最终的兑换数量。例如可以获取人民币兑换美元的资源转换记录,作为第一资源转换记录。获取美元兑换人民币的资源转换记录,作为第二资源转换记录,获取第一资源转换记录中人民币作为原始资源的资源数量,作为第一原始数量,获取第二资源转换记录中人民币作为目标资源的资源数量,作为第一目标数量,将第一目标数量与第一原始数量对冲(抵消),即相减的差值的绝对值作为第一资源兑换数量,作为人民币的兑换数量。如第一原始数量大于第一目标数量,则可以兑出人民币。如第一原始数量小于第一目标数量,则可以兑入人民币。得到待兑换头寸后,可以将兑换请求发送给银行对应的服务器,完成实际的货币兑换。本申请实施例中,通过定期锁价机制控制了交易的波动,通过内部对冲机制控制了交易规模,两者并行,实现了对汇兑风险的优化,故在保证电子钱包的运营者能够为用户提供实时的货币兑换服务的同时,尽可能控制面对外汇波动的损失风险,且可以减少与资源兑换服务器的交互次数。
在一些实施例中,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各方法实施例中的步骤。
应该理解的是,虽然上述流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,上述流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
在一些实施例中,如图9所示,提供了一种资源转换数据处理装置,该装置可以采用软件模块或硬件模块,或者是二者的结合成为计算机设备的一部分,该装置具体包括:记录集合获取模块902、第一原始数量获取模块904、第一目标数量获取模块906、第一转换数量得到模块908和资源转换模块910,其中:
记录集合获取模块902,用于获取第一转换记录集合以及第二转换记录集合,第一转换记录集合包括至少一个第一资源转换记录,第二转换记录集合包括至少一个第二资源转换记录,第一资源转换记录中的原始资源为第一类型资源,第二资源转换记录中的目标资源为第一类型资源;
第一原始数量获取模块904,用于获取第一转换记录集合中,第一资源转换记录对应的原始资源的数量,作为第一原始数量。
第一目标数量获取模块906,用于获取第二转换记录集合中,第二资源转换记录对应的目标资源的数量,作为第一目标数量。
第一转换数量得到模块908,用于根据第一原始数量与第一目标数量的差异,得到第一类型资源对应的第一转换数量。
资源转换模块910,用于根据第一转换数量以及第一类型资源进行资源转换。
在一些实施例中,资源转换模块910包括:目标转换方式确定单元,用于确定第一类型资源对应的目标转换方式,目标转换方式根据第一原始数量与第一目标数量的大小关系确定;资源转换单元,用于按照目标转换方式,转换第一转换数量的第一类型资源。
在一些实施例中,当第一原始数量大于第一目标数量,目标转换方式为转出,资源转换单元用于:向资源转换服务器发送目标转换请求,目标转换请求用于请求转出第一转换数量的第一类型资源。
在一些实施例中,当第一原始数量小于第一目标数量,目标转换方式为转入,资源转换单元用于:向资源转换服务器发送目标转换请求,目标转换请求用于请求转入第一转换数量的第一类型资源。
在一些实施例中,第一资源转换记录中的目标资源为第二类型资源,第二资源转换记录中的原始资源为第二类型资源,资源转换模块910用于:向资源转换服务器发送目标转换请求,目标转换请求用于请求将第二类型资源转换为第一转换数量的第一类型资源,或者将第一转换数量的第一类型资源转换为第二类型资源。
在一些实施例中,记录集合获取模块902用于:从第一资源转换时间范围对应的候选资源转换记录集合中,获取原始资源为第一类型资源,目标资源为第二类型资源的资源转换记录,作为第一资源转换记录,组成第一转换记录集合;从候选资源转换记录集合中,获取原 始资源为第二类型资源,目标资源为第一类型资源的资源转换记录,作为第二资源转换记录,组成第二转换记录集合。
在一些实施例中,资源转换数据处理装置还包括:第一转换请求接收模块,用于接收目标用户对应的终端发送的第一转换请求,第一转换请求用于请求将第一资源数量的第一类型资源转换为第二类型资源;第二资源数量得到模块,用于获取第一类型资源与第二类型资源之间的当前资源转换关系,根据当前资源转换关系以及第一资源数量计算得到第二资源数量;生成模块,用于在目标用户对应的资源账户中减去第一资源数量的第一类型资源,增加第二资源数量的第二类型资源,并生成第一资源转换记录。
在一些实施例中,资源转换数据处理装置还包括:第一资源转换关系接收模块,用于接收资源转换服务器发送的第一资源转换关系,第一资源转换关系为第一类型资源与第二类型资源之间的资源转换关系;第二资源转换关系确定模块,用于根据第一资源转换关系确定第二资源转换关系,将第二资源转换关系作为目标时间范围内,第一类型资源与第二类型资源之间的当前资源转换关系。
关于资源转换数据处理装置的具体限定可以参见上文中对于资源转换数据处理方法的限定,在此不再赘述。上述资源转换数据处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一些实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图10所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储资源转换记录。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种资源转换数据处理方法。
本领域技术人员可以理解,图10中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一些实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,该处理器执行计算机可读指令时实现上述各方法实施例中的步骤。
在一些实施例中,提供了一种计算机可读存储介质,存储有计算机可读指令,该计算机 可读指令被处理器执行时实现上述各方法实施例中的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (15)

  1. 一种资源转换数据处理方法,由计算机设备执行,所述方法包括:
    获取第一转换记录集合以及第二转换记录集合,所述第一转换记录集合包括至少一个第一资源转换记录,所述第二转换记录集合包括至少一个第二资源转换记录,所述第一资源转换记录中的原始资源为第一类型资源,所述第二资源转换记录中的目标资源为所述第一类型资源;
    获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量;
    获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量;
    根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量;以及
    根据所述第一转换数量以及所述第一类型资源进行资源转换。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一转换数量以及所述第一类型资源进行资源转换包括:
    确定所述第一类型资源对应的目标转换方式,所述目标转换方式根据所述第一原始数量与所述第一目标数量的大小关系确定;以及
    按照所述目标转换方式,转换所述第一转换数量的所述第一类型资源。
  3. 根据权利要求2所述的方法,其特征在于,当所述第一原始数量大于所述第一目标数量,所述目标转换方式为转出,所述按照所述目标转换方式,转换所述第一转换数量的所述第一类型资源包括:
    向资源转换服务器发送目标转换请求,所述目标转换请求用于请求转出所述第一转换数量的所述第一类型资源。
  4. 根据权利要求2所述的方法,其特征在于,当所述第一原始数量小于所述第一目标数量,所述目标转换方式为转入,所述按照所述目标转换方式,转换所述第一转换数量的所述第一类型资源转换包括:
    向资源转换服务器发送目标转换请求,所述目标转换请求用于请求转入所述第一转换数量的所述第一类型资源。
  5. 根据权利要求1所述的方法,其特征在于,所述第一资源转换记录中的目标资源为第二类型资源,所述第二资源转换记录中的原始资源为所述第二类型资源,所述根据所述第一转换数量以及所述第一类型资源进行资源转换包括:
    向资源转换服务器发送目标转换请求,所述目标转换请求用于请求将所述第二类型资源转换为所述第一转换数量的所述第一类型资源,或者将所述第一转换数量的所述第一类型资源转换为所述第二类型资源。
  6. 根据权利要求5所述的方法,其特征在于,所述获取第一转换记录集合以及第二转换记录集合包括:
    从候选资源转换记录集合中,获取原始资源为第一类型资源,目标资源为第二类型资源的资源转换记录,作为第一资源转换记录,组成第一转换记录集合;以及
    从所述候选资源转换记录集合中,获取原始资源为所述第二类型资源,目标资源为所述第一类型资源的资源转换记录,作为第二资源转换记录,组成第二转换记录集合。
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收目标用户对应的终端发送的第一转换请求,所述第一转换请求用于请求将第一资源数量的所述第一类型资源转换为第二类型资源;
    获取所述第一类型资源与所述第二类型资源之间的当前资源转换关系,根据所述当前资源转换关系以及所述第一资源数量计算得到第二资源数量;以及
    在所述目标用户对应的资源账户中,减去所述第一资源数量的所述第一类型资源,增加所述第二资源数量的所述第二类型资源,并生成所述第一转换请求对应的第一资源转换记录。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    接收资源转换服务器发送的第一资源转换关系,所述第一资源转换关系为所述第一类型资源与所述第二类型资源之间的资源转换关系;以及
    根据所述第一资源转换关系确定第二资源转换关系,将所述第二资源转换关系作为目标时间范围内,所述第一类型资源与所述第二类型资源之间的当前资源转换关系。
  9. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收目标用户对应的资源转移请求,所述资源转移请求携带资源类型标识以及资源转移数量;
    响应于所述资源转移请求,获取所述目标用户对应的第一资源账户,所述第一资源账户为所述资源类型标识对应的账户;以及
    从所述第一资源账户中转移所述资源转移数量的资源。
  10. 一种资源转换数据处理装置,所述装置包括:
    记录集合获取模块,用于获取第一转换记录集合以及第二转换记录集合,所述第一转换记录集合包括至少一个第一资源转换记录,所述第二转换记录集合包括至少一个第二资源转换记录,所述第一资源转换记录中的原始资源为第一类型资源,所述第二资源转换记录中的 目标资源为所述第一类型资源;
    第一原始数量获取模块,用于获取所述第一转换记录集合中,所述第一资源转换记录对应的原始资源的数量,作为第一原始数量;
    第一目标数量获取模块,用于获取所述第二转换记录集合中,所述第二资源转换记录对应的目标资源的数量,作为第一目标数量;
    第一转换数量得到模块,用于根据所述第一原始数量与所述第一目标数量的差异,得到所述第一类型资源对应的第一转换数量;以及
    资源转换模块,用于根据所述第一转换数量以及所述第一类型资源进行资源转换。
  11. 根据权利要求10所述的装置,其特征在于,所述资源转换模块包括:
    目标转换方式确定单元,用于确定所述第一类型资源对应的目标转换方式,所述目标转换方式根据所述第一原始数量与所述第一目标数量的大小关系确定;
    资源转换单元,用于按照所述目标转换方式,转换所述第一转换数量的所述第一类型资源。
  12. 根据权利要求11所述的装置,其特征在于,当所述第一原始数量大于所述第一目标数量,所述目标转换方式为转出,所述资源转换单元用于:
    向资源转换服务器发送目标转换请求,所述目标转换请求用于请求转出所述第一转换数量的所述第一类型资源。
  13. 根据权利要求10所述的装置,其特征在于,所述第一资源转换记录中的目标资源为第二类型资源,所述第二资源转换记录中的原始资源为所述第二类型资源,所述资源转换模块用于:
    向资源转换服务器发送目标转换请求,所述目标转换请求用于请求将所述第二类型资源转换为所述第一转换数量的所述第一类型资源,或者将所述第一转换数量的所述第一类型资源转换为所述第二类型资源。
  14. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现权利要求1至9中任一项所述方法的步骤。
  15. 一种计算机可读存储介质,存储有计算机可读指令,其特征在于,所述计算机可读指令被处理器执行时实现权利要求1至9中任一项所述的方法的步骤。
PCT/CN2020/128063 2020-03-06 2020-11-11 资源转换数据处理方法、装置、计算机设备和存储介质 WO2021174903A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/678,490 US20220180436A1 (en) 2020-03-06 2022-02-23 Resource conversion data processing method and apparatus, computer device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010152445.7 2020-03-06
CN202010152445.7A CN113362060A (zh) 2020-03-06 2020-03-06 资源转换数据处理方法、装置、计算机设备和存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/678,490 Continuation US20220180436A1 (en) 2020-03-06 2022-02-23 Resource conversion data processing method and apparatus, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021174903A1 true WO2021174903A1 (zh) 2021-09-10

Family

ID=77524109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/128063 WO2021174903A1 (zh) 2020-03-06 2020-11-11 资源转换数据处理方法、装置、计算机设备和存储介质

Country Status (3)

Country Link
US (1) US20220180436A1 (zh)
CN (1) CN113362060A (zh)
WO (1) WO2021174903A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115293909A (zh) * 2022-09-30 2022-11-04 中国中金财富证券有限公司 一种持仓股票的多币实时价格应用方法及相关产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2849144A1 (en) * 2013-03-26 2015-03-18 Aft Co. Ltd. Foreign exchange transaction device, foreign exchange transaction system, transmission/reception method, and program
CN109285069A (zh) * 2017-07-19 2019-01-29 腾讯科技(深圳)有限公司 资源转移方法、装置及服务器
CN109802916A (zh) * 2017-11-16 2019-05-24 财付通支付科技有限公司 资源转移方法、系统、服务器和计算机可读存储介质
CN110473107A (zh) * 2019-08-26 2019-11-19 北京三快在线科技有限公司 交易数据处理方法、装置、设备及存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150127517A1 (en) * 2012-04-11 2015-05-07 Integral Development Corp. Methods and apparatus for facilitating fairnetting and distribution of currency trades
EP3146448A4 (en) * 2014-05-22 2017-12-13 The Bank Of New York Mellon Liquidity forecasting and management system and method
US11436550B2 (en) * 2016-12-01 2022-09-06 Trovata, Inc. Cash forecast system, apparatus, and method
US10810546B2 (en) * 2017-10-02 2020-10-20 R3 Ltd. Settling obligations via netting transactions
CN107833138A (zh) * 2017-11-06 2018-03-23 中国银行股份有限公司 一种基于净额轧差的结售汇交易的处理方法及装置
US11636403B2 (en) * 2019-06-27 2023-04-25 Visa International Service Association Computer-implemented method, system, and computer program product for automated forecasting

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2849144A1 (en) * 2013-03-26 2015-03-18 Aft Co. Ltd. Foreign exchange transaction device, foreign exchange transaction system, transmission/reception method, and program
CN109285069A (zh) * 2017-07-19 2019-01-29 腾讯科技(深圳)有限公司 资源转移方法、装置及服务器
CN109802916A (zh) * 2017-11-16 2019-05-24 财付通支付科技有限公司 资源转移方法、系统、服务器和计算机可读存储介质
CN110473107A (zh) * 2019-08-26 2019-11-19 北京三快在线科技有限公司 交易数据处理方法、装置、设备及存储介质

Also Published As

Publication number Publication date
US20220180436A1 (en) 2022-06-09
CN113362060A (zh) 2021-09-07

Similar Documents

Publication Publication Date Title
CN115578097A (zh) 一种基于区块链的数字资产交易方法和系统
KR101907848B1 (ko) 가상화폐를 이용한 이종화폐 송금 방법, 장치 및 프로그램
CN109903146B (zh) 一种会计并账方法及系统、计算设备及存储介质
US11587142B1 (en) Using data analysis to connect merchants
CN114096978A (zh) 数字资产管理系统和方法
US20150046238A1 (en) Pooling business credits to provide cross-redemption options of business-specific credits
JP2019139297A (ja) プログラム、情報処理装置、情報処理方法及び製造方法
KR20190049038A (ko) 가상 화폐를 이용한 투자 시스템 및 방법
WO2021174903A1 (zh) 资源转换数据处理方法、装置、计算机设备和存储介质
CN112258306A (zh) 账务信息核对的方法、装置、电子设备和存储介质
CN111340487A (zh) 一种资源结算的方法及装置
JP2020053082A (ja) トークン取引支援システム、トークン取引支援方法及びトークン取引支援プログラム
WO2022237606A1 (zh) 在支付时使用电子券的方法及装置
US20220277276A1 (en) Credit Card As a Foreign Exchange Market Card
US11790353B2 (en) System and method for online/offline payment with virtual currency for nodes included in mobile-based blockchain distributed network
US20230342773A1 (en) Methods, systems, and devices of managing digital assets, including digital asset deposits, digital asset term deposits, digital asset withdrawals, and early withdrawals of digital asset term deposits
CN113095814A (zh) 一种多渠道组合支付的方法及装置
GB2598888A (en) A computer implemented method and system for requesting consent from a consumer to complete an action
US11551175B1 (en) Facilitating shareholder voting and associated proxy rights
US20240202821A1 (en) Method of allowing selectable currency within an account
US11580478B1 (en) Facilitating shareholder voting and associated proxy rights
JP2020021120A (ja) トークン取引支援システム、トークン取引支援方法及びトークン取引支援プログラム
US20230196311A1 (en) Management system and management method
US20230267495A1 (en) Liquidity pools for tokenized rewards
CN118154336A (zh) 一种对账方法、系统及相关设备

Legal Events

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

Ref document number: 20923523

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 20923523

Country of ref document: EP

Kind code of ref document: A1