WO2016026381A1 - 一种数值信息转移方法及装置 - Google Patents

一种数值信息转移方法及装置 Download PDF

Info

Publication number
WO2016026381A1
WO2016026381A1 PCT/CN2015/085913 CN2015085913W WO2016026381A1 WO 2016026381 A1 WO2016026381 A1 WO 2016026381A1 CN 2015085913 W CN2015085913 W CN 2015085913W WO 2016026381 A1 WO2016026381 A1 WO 2016026381A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
unique identifier
value
consumption value
available
Prior art date
Application number
PCT/CN2015/085913
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 WO2016026381A1 publication Critical patent/WO2016026381A1/zh

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/02Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP]

Definitions

  • the present application relates to the field of information technology, and in particular, to a method and device for transferring numerical information.
  • Numerical information transfer is a common information processing technology, which can realize the transfer of numerical information between the transferee and the transferee, and the balance of the numerical information is guaranteed during the transfer process, that is, the transfer of the transferee
  • the numerical information and the numerical information transferred by the transferee satisfy the same value.
  • a third-party system is usually introduced as a transit party in the process of numerical information transfer.
  • the transfer party transfers certain numerical information to a third-party system, and the third-party system transfers the temporary account to the value information.
  • the third party system transfers the value information to the transfer party.
  • the third-party system may obtain the above-mentioned consumption value from the transferee. Therefore, in the above information transfer process, the third-party system calculates the consumption value and adds the consumption value to the original roll-out value to obtain the actual roll-out value, and the value information corresponding to the actual roll-out value is transferred from the transfer party to the first After the three-party system satisfies the confirmation transfer condition, the third-party system calculates the consumption value again, transfers the numerical information corresponding to the recalculated consumption value to the fixed account of the third-party system, and transfers the numerical information corresponding to the original transfer value. Go to the transfer party. The third-party system calculates the consumption value each time based on the current consumption value calculation strategy. Therefore, the consumption values calculated twice before and after may be inconsistent, which further leads to the imbalance of numerical information.
  • the third-party system will synchronously save the consumption value in the database when calculating the consumption value for the first time. After satisfying the confirmation transfer condition, the third-party system does not need to recalculate, but directly The consumption value is read from the database to ensure consistency of consumption values. However, this approach creates a strong dependency on the database. If the database is not available when reading the consumption value, it will affect the implementation of the entire transfer process.
  • the technical problem to be solved by the present application is to provide a method and device for transferring numerical information, so as to realize a process of transferring numerical information that is less dependent on a database, and even if the database is currently unavailable, the implementation of the transfer process is not affected.
  • the embodiment of the present application provides a numerical information transfer method, including:
  • the transferee transfers the numerical information corresponding to the actual transfer value to the temporary account of the third-party system; the actual roll-out value is the original roll-out value The sum of the consumption values;
  • the transfer confirmation request includes the unique identifier
  • the loop execution obtains the consumption value saved corresponding to the unique identifier from the available database until the consumption value is obtained;
  • the numerical information corresponding to the original roll-out value and the consumption value are respectively transferred from the temporary account of the third-party system to the transferee and the fixed account of the third-party system.
  • the method further includes: selecting the available database from a database connection pool, where the database connection pool includes at least one database;
  • the generating the unique identifier includes: generating a unique identifier including the identifier information of the available database;
  • the method further includes determining, before the obtaining the consumption value corresponding to the unique identifier from the available database, the available database based on the identification information included in the unique identifier.
  • each database in the database connection pool stores identifier information segments that are not mutually duplicated
  • Selecting the available database from the database connection pool and generating a unique identifier including the identification information of the available database including:
  • the one or more databases are used as the available database
  • a unique identifier including the unselected identification information is generated.
  • the one or more databases are used as the available database, including:
  • the one or more databases are used as the available databases.
  • it also includes:
  • the storing the unique identifier and the consumption value in an available database including:
  • the unique identifier is stored in the available database corresponding to the consumption value by sending a reliable message.
  • the numerical information is specifically value information.
  • the embodiment of the present application further provides a numerical information transfer apparatus, including:
  • a calculating unit configured to receive a roll-out request of the transfer party, and calculate a consumption value based on the transfer-out party information and the original roll-out value in the roll-out request;
  • a saving unit configured to generate a unique identifier, and save the unique identifier corresponding to the consumption value in an available database
  • the actual roll-out value is the sum of the original roll-out value and the consumption value
  • a receiving unit configured to receive a rollout confirmation request, where the rollout confirmation request includes the unique identifier
  • An obtaining unit configured to: after receiving the rollout confirmation request, the receiving unit obtains the consumption value saved corresponding to the unique identifier from the available database until the consumption value is obtained;
  • a transfer unit configured to: after the obtaining unit obtains the consumption value, the numerical information corresponding to the original roll-out value and the consumption value are respectively transferred from the temporary account of the third-party system to the transfer party and In the fixed account of the third party system.
  • it also includes:
  • a selecting unit configured to select the available database from a database connection pool, where the database connection pool includes at least one database
  • the saving unit is configured to generate a unique identifier, where the saving unit is configured to generate a unique identifier that includes the identifier information of the available database;
  • a determining unit configured to determine the available database based on the identification information included by the unique identifier before the obtaining unit acquires the consumption value corresponding to the unique identifier from the available database.
  • each database in the database connection pool stores identifier information segments that are not mutually duplicated
  • the selecting unit is configured to select the available database from the database connection pool, and the saving unit is configured to generate a unique identifier including the identifier information of the available database, including:
  • the selecting unit is configured to: if the identification information segment of one or more databases is successfully obtained from the database connection pool, use the one or more databases as the available database;
  • the saving unit is configured to obtain unselected identification information from the identifier information segment stored in the available database, and generate a unique identifier including the unselected identification information.
  • the selecting unit is configured to: if the identifier information segment of one or more databases is successfully obtained from the database connection pool, use the one or more databases as the available database, including:
  • the selecting unit is configured to successfully obtain one or more database identification information segments from the database connection pool if the preset query times and/or the preset query time are repeated, and the one or more databases are used as the Describe the available database.
  • it also includes:
  • the detecting unit is configured to detect in real time whether each database in the database connection pool is available, and dynamically delete the unavailable database.
  • the saving unit is configured to save the unique identifier and the consumption value in an available database, including:
  • the saving unit is configured to save the unique identifier and the consumption value in an available database by sending a reliable message.
  • the numerical information is specifically value information.
  • the present application after receiving the transfer request, the present application generates a unique identifier, and stores the unique identifier and the calculated consumption value in an available database and returns a unique identifier.
  • the availability of the database when the consumption value is stored is ensured, thereby increasing the probability that the available database is available when the consumption value is obtained.
  • the corresponding saved consumption value is obtained from the available database according to the unique identifier included in the transfer confirmation request. If the available database is currently unavailable, the above-mentioned acquisition consumption value is continuously executed. Steps, until the available database is available, the consumption value is obtained.
  • FIG. 1 is a schematic flowchart diagram of an embodiment of a method for transferring numerical information provided by the present application
  • FIG. 2 is a schematic flow chart of another embodiment of a method for transferring numerical information provided by the present application.
  • FIG. 3 is a schematic flowchart diagram of another embodiment of a method for transferring numerical information provided by the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of a numerical information transfer apparatus provided by the present application.
  • Numerical information transfer is a common information processing technology, which can realize the transfer of numerical information between the transferee and the transferee, and the balance of the numerical information is guaranteed during the transfer process, that is, the transfer of the transferee
  • the numerical information and the numerical information transferred by the transferee satisfy the same value.
  • the current online payment is actually a transfer of numerical information, and the payer transfers the value information of the funds to the payee.
  • a third-party system is usually introduced as a transit party in the process of transferring numerical information.
  • a third-party system such as Alipay is usually introduced.
  • the transferor transfers certain numerical information to a third-party system such as Alipay, and the third-party system such as Alipay transfers to the temporary account to store the numerical information.
  • the third-party system such as Alipay will then use the numerical information. Transfer to the transfer party.
  • the third-party system may obtain the above-mentioned consumption value from the transferee.
  • the payer’s banking system may charge Alipay a certain amount of funds as a fee when paying (for example, when the payer pays by credit card), so in the current information transfer process, the third party The system calculates the consumption value and adds the consumption value to the original roll-out value to obtain the actual roll-out value.
  • the value information corresponding to the actual roll-out value is transferred from the transfer party to the third-party system.
  • the third-party system calculates the consumption value again, transfers the numerical information corresponding to the recalculated consumption value to the fixed account of the third-party system, and transfers the numerical information corresponding to the original transferred value to the transferee.
  • the third-party system calculates the consumption value each time based on the current consumption value calculation strategy. Therefore, if the calculation strategy changes when the consumption value is calculated twice before, the calculated consumption value also changes, that is, The inconsistency between the consumption values calculated twice before and after, further leads to the imbalance of numerical information, that is, the numerical information transferred by the transferor and the sum of the numerical information to be transferred to the transferee and the third party system. , the case where the values are not equal, causing the transfer operation to fail.
  • the third-party system will synchronously save the consumption value in the database when calculating the consumption value for the first time. After satisfying the confirmation transfer condition, the third-party system does not need to recalculate, but directly The consumption value is read from the database to ensure consistency of consumption values. However, this approach creates a strong dependency on the database. If the database is not available when reading the consumption value, it will affect the implementation of the entire transfer process.
  • a numerical information transfer method and system are provided to implement a process of transferring numerical information that is less dependent on a database, and even if the database is currently unavailable, the implementation of the transfer process is not affected.
  • the present application provides an embodiment of a method for transferring numerical information.
  • the embodiment includes:
  • S101 Receive a transfer request of the transferee, and calculate a consumption value based on the transferee information and the original rollout value in the transfer request.
  • the transfer party When the transfer party needs to transfer certain numerical information to the transferee, it will send a transfer request to the third-party system through the client of the transfer-out party, such as a computer or a smart phone.
  • the execution entity of this embodiment may be an account management module of a third-party system, and therefore the account management module of the third-party system receives the roll-out request sent by the transfer party.
  • the user interface module is specifically responsible for the information exchange with the user, so the account management module receives the forwarding request forwarded by the user interface module.
  • the account management module and the user interface module of the third-party system may be disposed in a server of the third-party system.
  • the transfer request includes at least the transferee information and the original rollout value
  • the transferor information refers to the account information used by the transferor to save the numerical information thereof
  • the original transfer value indicates that the original transfer needs to be transferred out.
  • the numerical information corresponding to the value is transferred to the transferee.
  • the transferee information refers to the account information of the payer (such as a bank account, an Alipay account, etc.)
  • the original transfer value is the amount of the order that the payer needs to pay to the payee.
  • the consumption value is specifically the handling fee charged by the third party system to the payer.
  • step S102 Generate a unique identifier, and save the generated unique identifier in the available database corresponding to the consumption value calculated in step S101.
  • a unique identifier refers to a unique correspondence with a consumption value, that is, a unique identifier.
  • a unique identifier is generated, and the unique identifier is saved in the available database corresponding to the consumption value.
  • the available database refers to a database that is in an available state when the save process of step S102 is performed.
  • the available database may be one or more databases that are selected from multiple databases and are in an available state.
  • the unique identifier not only has a unique correspondence with the consumption value, but also uniquely identifies the available database saved by the consumption value. It can be seen that, in the embodiment of the present application, the consumption value is saved in the available database in the available state, so the probability that the available database is in the available state when the consumption value is obtained is also relatively large.
  • the specific identifier and the consumption value may be correspondingly saved in the available database by sending a reliable message.
  • reliable messages refer to a type of message that can reach the destination, that is, no loss occurs.
  • the reliable message may be an asynchronous reliable message.
  • the sender After the message is sent, the sender generally cannot obtain the message result immediately, but the asynchronous reliable message smoothly arrives at the sending destination and performs the corresponding message. After the operation (for example, the save operation of this step), the sender is notified by any means, so that the asynchronous reliable message can be guaranteed to be lost.
  • the consumption value is not saved synchronously in the embodiment of the present application, but another thread is enabled to save (the original thread continues the return operation in step S103), and the overall processing capability is improved while the thread is isolated.
  • the interaction between each other is not limited to:
  • the numerical information refers to data information capable of representing a numerical value.
  • common numerical information includes value information such as funds, resource size information, and the like.
  • the consumption value may be returned to the user interface module, so that the user interface module displays the consumption value, and when the transfer party confirms the consumption value, the numerical information corresponding to the actual transfer value is transferred to the first
  • the temporary account of the tripartite system is saved.
  • the actual roll-out value is the sum of the original roll-out value and the consumption value, the original roll-out value is used to transfer to the transfer party, and the consumption value is used to transfer to the third-party system.
  • the transfer confirmation module that returns the unique identifier to the third-party system may send the unique identifier to the account management module of the third-party system after the transfer confirmation module determines that the transfer confirmation condition is met. Transfer out the confirmation request.
  • the rollout confirmation module is located in a server of a third party system.
  • S104 Receive a transfer confirmation request; the transfer confirmation request includes the unique identifier.
  • a transfer confirmation request sent by the rollout confirmation module can be received.
  • the transfer confirmation module may be configured to passively send a transfer confirmation request according to the user's request.
  • the transfer confirmation module is specifically a user interface module; the transfer confirmation module may also be an active send transfer confirmation request, for example, when the confirmation module is transferred out.
  • the transfer confirmation request is actively sent to the account management module of the third-party system.
  • the rollout confirmation request includes the unique identifier returned in step S103.
  • S105 The loop execution acquires the consumption value saved corresponding to the unique identifier from the available database until the consumption value is obtained.
  • the consumption value corresponding to the unique identifier is obtained from the available database according to the unique identifier in the roll-out confirmation request, and if the available database is available at this time, that is, If it is said that the consumption value can be successfully obtained, step S106 is continued. And if the available database is in an unavailable state, the above obtaining step is looped, that is, until the available database is available, the corresponding saved consumption value is obtained.
  • the available database may be determined from multiple databases according to the unique identifier, and then the consumption value is obtained from the available database.
  • S106 The numerical information corresponding to the original roll-out value and the consumption value are respectively transferred from the temporary account of the third-party system to the transferee and the fixed account of the third-party system. Specifically, the value information corresponding to the original roll-out value is transferred from the temporary account of the third-party system to the transfer party, and the value information corresponding to the consumption value is transferred from the temporary account of the third-party system to the fixed account of the third-party system.
  • the transferee is determined according to the information of the transferee, and the step of obtaining the transferee information and the original rollout value in a plurality of manners is not limited in the embodiment of the present application.
  • the transfer party information is further included in the roll-out request.
  • the original roll-out value and/or the transferee information may also be saved in the available database corresponding to the unique identifier.
  • the rollout confirmation request further includes the original rollout value and/or the transferee information, so the original rollout value and/or the transferee information are obtained from the rollout confirmation request.
  • the unique identifier corresponding to the current transfer process is generated, and the unique identifier and the calculated consumption value are saved in the available state.
  • a unique identifier is returned in the database.
  • the executive body of the embodiment of the present application may be an account management module of a third-party system.
  • the third-party system may further include a user interface module and a roll-out confirmation module.
  • the unique identifier and the consumption value are saved in the available database.
  • the available database is specifically selected, at least one database may be maintained by the database connection pool, and the available database may be selected from the database connection pool. This will be described in detail below by way of an embodiment.
  • the present application provides another embodiment of a method for transferring numerical information.
  • the embodiment includes:
  • S201 Receive a transfer request of the transferee, and calculate a consumption value based on the transferee information and the original rollout value in the transfer request.
  • the database connection pool includes at least one database.
  • the database connection pool dynamically controls at least one database, and one or more databases in an available state are selected from the databases and used as available databases. It should be noted that, in other embodiments of the present application, the available database may be selected from multiple databases by other means than the database connection pool.
  • step S203 Generate a unique identifier including identification information of an available database, and generate a unique identifier Corresponding to the consumption value calculated in step S201 is stored in the available database.
  • the unique identifier uniquely corresponds to the consumption value
  • the selected available database can also be identified.
  • the specific identification manner may be that the unique identifier itself includes identification information of an available database. For example, a fixed data segment uniquely identified (for example, the last 8 digits of the unique identifier) is set as the identification information of the available database. The following describes a specific implementation of obtaining the identification information of the available database.
  • each of the databases in the database connection pool may separately store identification information segments that are not mutually duplicated.
  • the database may be connected to the database according to a random manner or according to a preset rule. Obtain the stored identification information segment in one or more databases. If the obtaining is successful, the database is in a usable state, so as the available database, the unidentified identification information is obtained from the obtained identification information segment, and a unique identifier including the unselected identification information is generated. If the acquisition fails, the database is in an unavailable state, and a similar selection process is performed on other databases in the same manner until the identification information is obtained and a unique identifier is generated.
  • an n-bit value can be split into m values as m identification information segments (m is the number of databases included in the database connection pool).
  • the 8-bit value is divided into 10 numerical segments as 10 identification information segments, for example, 0-9999999 is an identification information segment, 10000000-19999999 is an identification information segment, and so on.
  • one of the 10 pieces of database in the database connection pool stores one piece of identification information.
  • an identifier information segment 0-9999999 stored in the database is obtained, an unselected value is selected from the identification information segment as the identification information, for example, 2000000, and the final generation includes the unselected The unique identifier for the value 2000000. This ensures that the unique identifier generated is unique and identifies the available database.
  • the selected restriction condition may be further set, for example, if the preset query number and/or the preset query time are repeated, the identification information of one or more databases is successfully obtained from the database connection pool.
  • S205 Receive a transfer confirmation request; the transfer confirmation request includes the unique identifier.
  • the unique identifier includes identification information of an available database.
  • S206 Determine the available database based on the identification information included by the unique identifier.
  • an available database for saving the consumption value can be determined based on the identification information. For example, if each database in the database connection pool stores identifier information segments that are not mutually duplicated, and the identification information of the available database is selected from the identifier information segments stored in the available database, the uniqueness can be determined in this step.
  • the identification information segment to which the identification information included in the identifier belongs to determines which one or which databases in the connection pool database the available database is based on the identification information segments stored in the respective databases in the connection pool database.
  • the database in which the identifier information segment 0-9999999 is stored is an available database.
  • S207 The loop execution acquires the consumption value saved corresponding to the unique identifier from the available database until the consumption value is obtained.
  • S208 The value information corresponding to the original roll-out value and the consumption value are respectively transferred from the temporary account of the third-party system to the transferee and the fixed account of the third-party system.
  • the transferee is determined based on the information of the transferee.
  • the manner of selecting an available database from each database maintained in the database connection pool is mainly described, wherein the generation rule for the unique identifier depends on each database in the database connection pool, A database is available, which reduces the single point of dependence on the database when storing consumption values, and the unique identifier includes the identification information of the available database, so that it can determine which databases in the database connection pool are available databases with unique identifiers. .
  • the numerical information transfer method provided by the embodiment of the present application can be specifically applied to online payment. This application scenario is illustrated by a specific embodiment below.
  • the present application provides another embodiment of a method for transferring numerical information.
  • the embodiment is specifically applied to an online payment process. Therefore, the numerical information in this embodiment is specifically a fund.
  • This embodiment includes:
  • the charging module of the third-party system receives the payment request of the paying party.
  • the payment request includes the account information of the payer, the identification information of the payee, and the order amount.
  • the payment button is clicked, and the payer will send the payment request of the payer to the cashier module of the third-party system, and the cashier module of the third-party system forwards the payment request to A charging module for third-party systems.
  • the transfer party is specifically the payer, and the transfer party is specifically the payee, and the transfer party information is specifically the account information of the payer, and the original transfer value is specifically the order amount.
  • the account management module specifically includes a charging module and a payment module, wherein the charging module is used to manage the fixed account of the third-party system, and the payment module is used to manage the temporary account of the third-party system.
  • the charging module obtains the account information of the payee according to the identification information of the payee, and calculates the handling fee that the third-party system needs to charge the paying party according to the current fee collecting policy according to the account information of the paying party and the order amount. .
  • the identification information of the payee may be the account name of the payee, etc., and the account information (for example, the bank card account, the Alipay account, etc.) corresponding to the payee's identification information is obtained according to the pre-stored correspondence.
  • the payment request may also directly include the account information of the payee.
  • the charging module can determine whether it is necessary to pay a handling fee according to the account information of the paying party (for example, whether the bank card account belongs to a credit card), and if necessary, perform this step, otherwise the process can be ended.
  • the handling fee collection strategy may be determined according to the account information of the paying party, and the handling fee is calculated according to the charging fee collection strategy and the order amount.
  • the following example shows that if the account information of the payer is a bank card account, the card issuing bank can determine its card issuing bank, thereby determining that the issuing fee of the issuing bank is 1%, and 1% of the order amount is calculated.
  • the handling fee can be read from the cache.
  • the charging module obtains the identification information segment stored in the database from a database in the database connection pool, and uses the database as an available database.
  • the database connection pool includes at least one database, and each database stores identifier information segments that are not duplicated.
  • an n-bit value can be split into m values as m identification information segments (m is the number of databases included in the database connection pool), and each database supports one of the values as each The identification information segment of the database.
  • the database connection pool can also detect in real time whether each database in the database connection pool is available, and dynamically delete the unavailable database. Although the database connection pool can dynamically control each database, at some local time, the database may still be unavailable. Therefore, when obtaining the identification information segment stored in the database, if the query is continuously performed 3 times in a database, each query time is 30 seconds. If the identification information segment of the database is still not obtained, the database is considered to be current. Not available, a similar query process is performed on the remaining databases until a piece of identification information stored in the database is obtained.
  • the number of available databases is 1, and actually, the available databases may be multiple.
  • the charging module obtains the unselected identification information from the identification information segment stored in the available database, and generates a unique identifier including the identification information of the available database.
  • the unidentified identification information is obtained from the identification information segment, that is, the identification information that has been selected from the identification information segment is not repeatedly selected.
  • the unique identifier can specifically take the sequence value of the database.
  • the sequence is a sequence of numbers that the database system automatically increases according to certain rules.
  • the generated unique identifier may include other information in addition to the identification information of the available database.
  • the identification information in the unique identifier may also include at least one of the following information:
  • the generated unique identifier is stored in the available database corresponding to the calculated handling fee, the order amount, and the account information of the payee by sending an asynchronous reliable message.
  • step S304 After the step S304 is performed, the save operation of step S305 can be performed by turning on another thread, and the original thread continues to perform step S306.
  • the charging module returns a unique identifier, a handling fee, and an order amount to the cashier module, so that the paying party transfers the funds corresponding to the actual amount of the payable to the temporary account of the third-party system.
  • Actual The amount payable is the sum of the handling fee and the order amount.
  • the cashier module After the charging module returns the handling fee and the order amount to the cashier module, the cashier module displays to the payer. If the payer confirms that the amount is correct, the corresponding funds will be transferred to the temporary account of the third-party system for safekeeping. At this point, the order status is changed from the unpaid payment to the paid payment, and the payee will perform the delivery operation for the order paid by the payer.
  • the return of the unique identifier to the cashier module is taken as an example, that is, the cashier module transmits the payment confirmation request passively according to the confirmation of the payer, and in other embodiments, The unique identifier may be returned to the payment confirmation module, and the payment confirmation module actively sends a payment confirmation request after determining that a certain state of the order is received, for example, the payment is delivered for a certain period of time.
  • the charging module receives the payment confirmation request sent by the cashier module.
  • the unique identifier is included in the payment confirmation request.
  • the unique identifier includes identification information of an available database.
  • the cashier module sends a payment confirmation request to the charging module.
  • the payment confirmation request includes a unique identifier that the charging module returns to the cashier module.
  • the step is determined by the payment confirmation module to send a payment confirmation to the charging module after determining that a certain status is from the order, for example, the payment is delivered for a certain period of time. request.
  • the charging module determines the available database based on the identification information included in the unique identifier.
  • the charging module cyclically executes obtaining the handling fee, the order amount, and the account information of the payee corresponding to the unique identifier from the available database, until the foregoing content saved corresponding to the unique identifier is obtained.
  • the charging module transfers the funds corresponding to the order amount from the temporary account of the third-party system to the payee, and transfers the value corresponding to the handling fee to the fixed account of the third-party system.
  • the payee is confirmed according to the account information of the payee.
  • the present application also provides a specific embodiment of the numerical information transfer apparatus.
  • the embodiment includes a calculation unit 401, a saving unit 402, a returning unit 403, a receiving unit 404, an obtaining unit 405, and a transferring unit 406.
  • the calculating unit 401 is configured to receive a roll-out request of the transfer party, and calculate a consumption value based on the roll-out party information and the original roll-out value in the roll-out request.
  • the transfer party When the transfer party needs to transfer certain numerical information to the transferee, it will send a transfer request to the third-party system through the client of the transfer-out party, such as a computer or a smart phone.
  • the device in this embodiment may be an account management module of a third-party system, and the computing unit 401 in the account management module receives the roll-out request sent by the transfer party.
  • the user interface module is specifically responsible for information interaction with the user, and the account management module receives the forwarding request forwarded by the user interface module.
  • the account management module and the user interface module of the third-party system may be disposed in a server of the third-party system.
  • the transfer request includes at least the transferee information and the original rollout value
  • the transferor information refers to the account information used by the transferor to save the numerical information thereof
  • the original transfer value indicates that the original transfer needs to be transferred out.
  • the numerical information corresponding to the value is transferred to the transferee.
  • the transferee information refers to the account information of the payer
  • the original transfer value is the amount of the order that the payer needs to pay to the payee
  • the consumption value is specifically the third party system. The handling fee charged by the payer.
  • the saving unit 402 is configured to generate a unique identifier, and save the generated unique identifier in the available database corresponding to the consumption value calculated by the calculating unit 401.
  • a unique identifier refers to a unique correspondence with a consumption value, that is, a unique identifier.
  • a unique identifier is generated, and the unique identifier is saved in the available database corresponding to the consumption value.
  • the available database refers to a database in which the saving unit 402 is in an available state when performing the saving process.
  • the available database may be one or more databases that are selected from multiple databases and are in an available state.
  • the unique identifier not only has a unique correspondence with the consumption value, but also uniquely identifies the available database saved by the consumption value. It can be seen that, in the embodiment of the present application, the consumption value is saved in the available database in the available state, so the probability that the available database is in the available state when the consumption value is obtained is also relatively large.
  • the specific identifier and the consumption value may be correspondingly saved in the available database by sending a reliable message.
  • the reliable message may specifically be an asynchronous reliable message.
  • the returning unit 403 is configured to return the consumption value and the unique identifier after the saving unit 402 generates the unique identifier, so that the transferring party transfers the numerical information corresponding to the actual transferred value to the third-party system.
  • a temporary account; the actual roll-out value is the sum of the original roll-out value and the consumption value.
  • the numerical information refers to data information capable of representing a numerical value, for example, value information such as funds, or resource size information is common numerical information.
  • the returning unit 403 may return the consumption value to the user interface module, so that the user interface module displays the consumption value, and when the transfer party confirms the consumption value, the numerical information corresponding to the actual transferred value is transferred. Save to a temporary account of a third-party system.
  • the returning unit 403 may be a forwarding confirmation module that returns the unique identifier to the third-party system.
  • the forwarding confirmation module determines that the forwarding confirmation condition is met, it sends the information to the account management module of the third-party system. A uniquely identified rollout confirmation request.
  • the receiving unit 404 is configured to receive a rollout confirmation request, where the unique identifier is included in the rollout confirmation request.
  • the receiving unit 404 can receive the rollout confirmation request sent by the rollout confirmation module.
  • the transfer confirmation module may be configured to passively send a transfer confirmation request according to the user's request.
  • the transfer confirmation module is specifically a user interface module; the transfer confirmation module may also be an active send transfer confirmation request, for example, when the confirmation module is transferred out.
  • the transfer confirmation request is actively transmitted to the receiving unit 404.
  • the obtaining unit 405 is configured to receive, after receiving the rollout confirmation request, the receiving unit 404 to obtain the consumption value saved corresponding to the unique identifier from the available database until the consumption value is obtained.
  • the consumption value corresponding to the unique identifier is obtained from the available database according to the unique identifier in the roll-out confirmation request, and if the available database is available at this time, that is, Saying that the consumption value can be successfully obtained, the transfer unit 406 starts executing the corresponding function. And if the available database is in an unavailable state, the above obtaining step is looped, that is, until the available database is available, the corresponding saved consumption value is obtained.
  • the obtaining unit 405 may first determine an available database from the plurality of databases according to the unique identifier, and then obtain the consumption value from the available database.
  • the transferring unit 406 is configured to obtain, after the obtaining unit 405 obtains the consumption value, the value information corresponding to the original roll-out value and the consumption value from the temporary account of the third-party system to the transfer party and the In the fixed account of the third-party system.
  • the transfer party is determined according to the information of the transfer party, and the transfer unit 406 can obtain the information of the transfer party and the original transfer value in a plurality of manners, which is not limited in the embodiment of the present application.
  • the forwarding party information is further included in the forwarding request.
  • the original forwarding value and/or the forwarding party information may also be saved in the available database corresponding to the unique identifier.
  • the obtaining unit 405 also acquires the corresponding saved original rollout value and/or the transferee information when the consumption value is obtained from the available database.
  • the rollout confirmation request further includes the original rollout value and/or the transferee information, so the transfer unit 406 obtains the original rollout value and/or the transferee information from the rollout confirmation request.
  • the database connection pool includes at least one database; the apparatus of this embodiment further includes a selecting unit, configured to select the available database from the database connection pool; and the saving unit 402 is configured to generate the unique identifier, where the saving unit 402 is configured to: Generating a unique identifier including the identification information of the available database; the apparatus of this embodiment further includes: a determining unit, configured to: before the obtaining unit 405 obtains the consumption value corresponding to the unique identifier from an available database, based on the The identification information included in the unique identifier determines the available database.
  • the device of the embodiment of the present application may further include a detecting unit, configured to detect, in real time, whether each database in the database connection pool is available, and dynamically delete the unavailable database.
  • each of the databases in the database connection pool may further store identification information segments that are not mutually duplicated;
  • the selection unit is configured to select the available database from the database connection pool, and the saving unit 402 is configured to generate the A unique identifier of the identification information of the available database, including:
  • the selecting unit is configured to: if the identification information segment of one or more databases is successfully obtained from the database connection pool, use the one or more databases as the available database; the saving unit 402 And obtaining unselected identification information from the identifier information segment stored in the available database, and generating a unique identifier including the unselected identification information.
  • the selected restriction condition may be further set, and the selecting unit is configured to: if the identification information segment of one or more databases is successfully obtained from the database connection pool, the one or more databases are As the available database, including:
  • the selecting unit is configured to successfully obtain one or more database identification information segments from the database connection pool if the preset query number and/or the preset query time are repeated, and use the one or more databases as the available database.
  • the device in the embodiment of the present application may also correspond to the method embodiment shown in FIG. 2 or FIG. 3 .
  • the device in the embodiment of the present application may also correspond to the method embodiment shown in FIG. 2 or FIG. 3 .
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold as a standalone product Or when used, it can be stored in a computer readable storage medium.
  • the technical solution of the present application in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

一种数值信息转移方法及装置,所述方法包括:基于转出请求中的转出方信息和原始转出值计算消耗值(S101);生成唯一标识,将唯一标识与消耗值对应保存在可用数据库中(S102);返回消耗值与唯一标识,以使得转出方将实际转出值对应的数值信息转入至第三方系统的临时账户(S103);实际转出值为原始转出值与消耗值之和;接收转出确认请求;转出确认请求包括唯一标识(S104);循环执行从可用数据库中获取与唯一标识对应保存的消耗值,直至获取到消耗值(S105);将原始转出值和消耗值对应的数值信息分别从第三方系统的临时账户转到转入方和第三方系统的固定账户中(S106)。可见上述方法及装置减小了对数据库的依赖,即使数据库在获取消耗值时不可用,也不会影响转入过程的实现。

Description

一种数值信息转移方法及装置 技术领域
本申请涉及信息技术领域,尤其是涉及一种数值信息转移方法及装置。
背景技术
数值信息转移是一种常见的信息处理技术,其能够实现转出方与转入方之间的数值信息的转移,并且该转移过程中保证了数值信息的平衡性,即转出方转出的数值信息与转入方转入的数值信息满足数值相等。
目前,为了保证安全性,在数值信息转移过程中通常会引入第三方系统作为中转方,转出方将一定的数值信息转入到第三方系统,第三方系统转到临时账户代为保管该数值信息,当满足确认转入条件时,第三方系统再将该数值信息转入到转入方。
由于转出方在将数值信息转入到第三方系统时可能会造成第三方系统一定的消耗值,第三方系统会向转出方获取上述消耗值。因此目前在上述信息转移过程中,第三方系统会计算消耗值并将该消耗值与原始转出值相加得到实际转出值,由转出方转出实际转出值对应的数值信息到第三方系统,在满足确认转入条件后,第三方系统再次计算消耗值,将再次计算的消耗值对应的数值信息转入至第三方系统的固定账户内并将原始转出值对应的数值信息转出至转入方。其中,第三方系统在每次计算消耗值时根据的都是当前的消耗值计算策略,因此前后两次计算的消耗值有可能会不一致,进一步导致数值信息不平衡的情况出现。
目前为了解决上述消耗值不一致的问题,第三方系统在第一次计算出消耗值时会在数据库中同步保存该消耗值,在满足确认转入条件之后,第三方系统无需重新计算,而是直接从数据库中读取该消耗值,从而保证了消耗值的一致性。然而这种方式造成了对数据库的强依赖性,如果在读取消耗值时数据库不可用,则会影响整个转移过程的实现。
发明内容
本申请解决的技术问题在于提供一种数值信息转移方法及装置,以实现对数据库依赖性较小的完成数值信息的转移过程,即使数据库当前不可用,也不会影响转入过程的实现。
为此,本申请解决技术问题的技术方案是:
本申请实施例提供了一种数值信息转移方法,包括:
接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值;
生成唯一标识,将所述唯一标识与所述消耗值对应保存在可用数据库中;
返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和;
接收转出确认请求;所述转出确认请求中包括所述唯一标识;
循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值;
将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。
可选的,所述方法还包括:从数据库连接池中选取所述可用数据库,所述数据库连接池中包括至少一个数据库;
所述生成唯一标识包括:生成包括所述可用数据库的标识信息的唯一标识;
所述方法还包括:所述从所述可用数据库中获取与所述唯一标识对应的所述消耗值之前,基于所述唯一标识所包括的标识信息确定所述可用数据库。
可选的,所述数据库连接池的各个数据库中分别存储有互不重复的标识信息段;
所述从数据库连接池中选取所述可用数据库以及生成包括所述可用数据库的标识信息的唯一标识,包括:
若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库;
从所述可用数据库存储的标识信息段中获取未被选取的标识信息;
生成包括所述未被选取的标识信息的唯一标识。
可选的,所述若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库,包括:
若在重复预设查询次数和/或预设查询时间内,从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库。
可选的,还包括:
实时检测所述数据库连接池中的各个数据库是否可用,动态删除不可用的数据库。
可选的,所述将所述唯一标识与所述消耗值对应保存在可用数据库中,包括:
通过发送可靠消息,将所述唯一标识与所述消耗值对应保存在可用数据库中。
可选的,所述数值信息具体为价值信息。
本申请实施例还提供了一种数值信息转移装置,包括:
计算单元,用于接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值;
保存单元,用于生成唯一标识,将所述唯一标识与所述消耗值对应保存在可用数据库中;
返回单元,用于所述保存单元生成唯一标识后,返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和;
接收单元,用于接收转出确认请求;所述转出确认请求中包括所述唯一标识;
获取单元,用于所述接收单元接收到转出确认请求后,循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值;
转入单元,用于所述获取单元获取到所述消耗值后,将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。
可选的,还包括:
选取单元,用于从数据库连接池中选取所述可用数据库,所述数据库连接池中包括至少一个数据库;
所述保存单元用于生成唯一标识包括:所述保存单元用于生成包括所述可用数据库的标识信息的唯一标识;
还包括:
确定单元,用于在所述获取单元从所述可用数据库中获取与所述唯一标识对应的所述消耗值之前,基于所述唯一标识所包括的标识信息确定所述可用数据库。
可选的,所述数据库连接池的各个数据库中分别存储有互不重复的标识信息段;
所述选取单元用于从数据库连接池中选取所述可用数据库以及所述保存单元用于生成包括所述可用数据库的标识信息的唯一标识,包括:
选取单元用于若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库;
所述保存单元用于从所述可用数据库存储的标识信息段中获取未被选取的标识信息,生成包括所述未被选取的标识信息的唯一标识。
可选的,所述选取单元用于若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库,包括:
所述选取单元用于若在重复预设查询次数和/或预设查询时间内,从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库。
可选的,还包括:
检测单元,用于实时检测所述数据库连接池中的各个数据库是否可用,动态删除不可用的数据库。
可选的,所述保存单元用于将所述唯一标识与所述消耗值对应保存在可用数据库中,包括:
所述保存单元用于通过发送可靠消息,将所述唯一标识与所述消耗值对应保存在可用数据库中。
可选的,所述数值信息具体为价值信息。
通过上述技术方案可知,本申请当接收到转出请求后,会生成唯一标识,将唯一标识和计算出的消耗值对应保存在可用数据库中并返回唯一标识。其中通过将消耗值对应保存在可用数据库中,保证了存储消耗值时数据库的可用性,因此提高了在获取消耗值时该可用数据库处于可用状态的机率。当接收到转出确认请求后,会根据转出确认请求中包括的唯一标识,从可用数据库中获取对应保存的消耗值,如果可用数据库当前处于不可用状态,会一直循环执行上述获取消耗值的步骤,直至可用数据库处于可用状态时获取到消耗值,可见本申请中减小了对数据库的依赖,即使数据库在获取消耗值时不可用,也不会影响转入过程的实现。同时本申请中只需计算一次消耗值,保证了返回的消耗值以及最终转出的消耗值的一致性。
附图说明
图1为本申请提供的数值信息转移方法的一种实施例的流程示意图;
图2为本申请提供的数值信息转移方法的另一种实施例的流程示意图;
图3为本申请提供的数值信息转移方法的另一种实施例的流程示意图;
图4为本申请提供的数值信息转移装置的一种实施例的结构示意图。
具体实施方式
数值信息转移是一种常见的信息处理技术,其能够实现转出方与转入方之间的数值信息的转移,并且该转移过程中保证了数值信息的平衡性,即转出方转出的数值信息与转入方转入的数值信息满足数值相等。例如,目前的网上支付实际上就是一种数值信息的转移,由付款方将资金等价值信息转入至收款方。
目前,为了保证安全性,在数值信息转移过程中通常会引入第三方系统作为中转方,例如目前在网上支付时,通常引入支付宝等第三方系统, 转出方将一定的数值信息转入到支付宝等第三方系统,支付宝等第三方系统转到临时账户代为保管该数值信息,当满足确认转入条件时,支付宝等第三方系统再将该数值信息转入到转入方。
由于转出方在将数值信息转入到第三方系统时可能会造成第三方系统一定的消耗值,第三方系统会向转出方获取上述消耗值。例如目前在网上支付的过程中,付款方的银行系统在付款时,可能会向支付宝收取一定的资金作为手续费(比如付款方使用信用卡付款时),因此目前在上述信息转移过程中,第三方系统会计算消耗值并将该消耗值与原始转出值相加得到实际转出值,由转出方转出实际转出值对应的数值信息到第三方系统,在满足确认转入条件后,第三方系统再次计算消耗值,将再次计算的消耗值对应的数值信息转入至第三方系统的固定账户内并将原始转出值对应的数值信息转出至转入方。其中,第三方系统在每次计算消耗值时根据的都是当前的消耗值计算策略,因此如果前后两次计算消耗值时计算策略发生变化,那么计算出的消耗值也会发生变化,也就是前后两次计算出的消耗值出现不一致的情况,进一步导致数值信息不平衡的情况出现,也就是转出方转出的数值信息,与将要转入到转入方和第三方系统的数值信息总和,出现数值不相等的情况,从而导致转入操作失败。
目前为了解决上述消耗值不一致的问题,第三方系统在第一次计算出消耗值时会在数据库中同步保存该消耗值,在满足确认转入条件之后,第三方系统无需重新计算,而是直接从数据库中读取该消耗值,从而保证了消耗值的一致性。然而这种方式造成了对数据库的强依赖性,如果在读取消耗值时数据库不可用,则会影响整个转入过程的实现。
而在本申请实施例中,提供一种数值信息转移方法及系统,以实现对数据库依赖性较小的完成数值信息的转移过程,即使数据库当前不可用,也不会影响转入过程的实现。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
请参阅图1,本申请提供了数值信息转移方法的一种实施例,本实施例包括:
S101:接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值。
当转出方需要将一定的数值信息转移到转入方时,会通过转出方的客户端,如计算机、智能手机等,向第三方系统发送转出请求。本实施例的执行主体可以为第三方系统的账户管理模块,因此由第三方系统的账户管理模块接收转出方发送的转出请求。需要说明的是,一般情况下,第三方系统中由用户接口模块专门负责与用户之间的信息交互,因此账户管理模块接收经用户接口模块转发的转出请求。通常,第三方系统的账户管理模块、用户接口模块可以设置在第三方系统的服务器内。
其中,转出请求中至少包括转出方信息和原始转出值,转出方信息指的是转出方用于保存其数值信息的账户信息,而原始转出值则表示需要将原始转出值对应的数值信息转入至转入方。当本实施例具体应用于网上支付过程时,转出方信息指的是付款方的账户信息(比如银行账号、支付宝账户等),原始转出值为付款方需要向收款方支付的订单金额,消耗值具体为第三方系统向付款方收取的手续费。
S102:生成唯一标识,将生成的唯一标识与步骤S101计算出的消耗值对应保存在可用数据库中。
唯一标识指的是与消耗值具有一一对应关系,即具有唯一性的标识。在本申请实施例中,不再是仅仅将消耗值保存在数据库中,而是生成唯一标识,将唯一标识与消耗值对应保存在可用数据库中。可用数据库指的是在执行S102步骤的保存过程时,处于可用状态的数据库。其中可用数据库可以是从多个数据库中选取出的、一个或多个处于可用状态的数据库。唯一标识不仅与消耗值具有唯一对应关系,也能够唯一的标识出消耗值所保存的可用数据库。可见,本申请实施例中保证了将消耗值保存在处于可用状态的可用数据库,因此在获取消耗值时该可用数据库处于可用状态的机率也会比较大。
在本申请实施例中,为了确保在可用数据库中成功保存消耗值,具体可以是通过发送可靠消息,将唯一标识和消耗值对应保存在可用数据库中。其中,可靠消息指的是一定能够到达发送目的地,也就是不会发生丢失现象的一种消息类型。而且其中可靠消息具体可以为异步可靠消息,对于异步可靠消息来说,当该消息发送后,发送者一般不能立刻得到消息结果,而是在异步可靠消息顺利到达发送目的地并执行该消息的对应的操作后(例如本步骤的保存操作),通过任一种方式通知发送者,从而能够保证异步可靠消息不会发生丢失现象。采用这种异步可靠消息的方式,使得本申请实施例中不再同步保存消耗值,而是开启了另外一个线程实现保存(原线程继续步骤S103中的返回操作),提升整体处理能力同时隔离线程之间的相互影响。
S103:返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和。
本申请实施例中,数值信息指的是能够表示数值大小的数据信息,例如常见的数值信息包括资金等价值信息、或者资源大小信息等等。
本申请实施例中,可以是将消耗值返回至用户接口模块,从而使得用户接口模块显示消耗值,当转出方确认该消耗值后,会将实际转出值对应的数值信息转入至第三方系统的临时账户进行保存。其中,实际转出值为原始转出值与消耗值之和,原始转出值用于转入至转入方,而消耗值则用于转入第三方系统。
本申请实施例中,可以是将唯一标识返回至第三方系统的转出确认模块,当转出确认模块判断出满足转出确认条件后,会向第三方系统的账户管理模块发送包括唯一标识的转出确认请求。通常,所述转出确认模块设置在第三方系统的服务器内。
需要说明的是,在该步骤中并没有完成数值信息的转移,只是将数值信息转入到第三方系统的临时账户代为保管。
S104:接收转出确认请求;所述转出确认请求中包括所述唯一标识。
该步骤中可以接收转出确认模块发送的转出确认请求。其中转出确认模块可以是根据用户的请求被动发送转出确认请求,此时转出确认模块具体为用户接口模块;转出确认模块还可以是主动发送转出确认请求,例如当转出确认模块判断出满足转出确认条件时,比如在网上支付过程中,转出确认模块判断出距订单的某一状态已达到预设时间时,主动向第三方系统的账户管理模块发送转出确认请求。
其中,转出确认请求中包括步骤S103中返回的唯一标识。
S105:循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值。
在本申请实施例中当接收到转出确认请求后,会根据转出确认请求中的唯一标识,从可用数据库中获取唯一标识对应保存的消耗值,如果此时可用数据库处于可用状态,也就是说能够成功获取到消耗值,则继续执行步骤S106。而如果可用数据库处于不可用状态,则循环上述获取步骤,也就是说直至等待可用数据库处于可用状态时,获取对应保存的消耗值。
其中在获取消耗值之前,可以是先根据唯一标识从多个数据库中确定出可用数据库,之后再从可用数据库中获取消耗值。
S106:将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。具体将原始转出值对应的数值信息从第三方系统的临时账户转到转入方,将消耗值对应的数值信息从第三方系统的临时账户转到第三方系统的固定账户中。
其中,转入方根据转入方信息确定,而该步骤可以通过多种方式获取转入方信息和原始转出值,在本申请实施例中不加限定。例如,在转出请求中还包括转入方信息,在步骤S102中保存唯一标识和消耗值时,还可以在可用数据库与唯一标识对应保存原始转出值和/或转入方信息。步骤S105在从可用数据库中获取消耗值时,还获取到对应保存的原始转出值和/或转入方信息。又例如,转出确认请求中还包括原始转出值和/或转入方信息,因此从转出确认请求中获取原始转出值和/或转入方信息。
通过上述技术方案可知,本实施例中当接收到转出请求后,会生成与本次转移过程对应的唯一标识,将唯一标识和计算出的消耗值对应保存在可用 数据库中并返回唯一标识。其中通过将消耗值对应保存在可用数据库中,保证了存储消耗值时数据库的可用性,因此提高了在获取消耗值时该可用数据库处于可用状态的机率。当接收到转出确认请求后,会根据转出确认请求中包括的唯一标识,从可用数据库中获取对应保存的消耗值,如果可用数据库当前处于不可用状态,会一直循环执行上述获取消耗值的步骤直至可用数据库处于可用状态时获取到消耗值,可见本实施例中减小了对数据库的单点依赖,即使数据库在获取消耗值时不可用,也不会影响转入过程的实现,因此保证了转入过程的高可用性,本申请中可用性一般能够达到99.995%以上。同时本申请中只需计算一次消耗值,保证了返回的消耗值以及最终转出的消耗值的一致性。
本申请实施例的执行主体可以为第三方系统的账户管理模块。此时,第三方系统还可以包括用户接口模块和转出确认模块。
在本实施例的步骤S102中,将唯一标识和消耗值对应保存在可用数据库中,在具体选取可用数据库时,可以是由数据库连接池维护至少一个数据库,从数据库连接池中选取出可用数据库。下面通过一个实施例加以详细说明。
请参阅图2,本申请提供了数值信息转移方法的另一种实施例,本实施例包括:
S201:接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值。
在计算消耗值时,还可以基于当前的计算消耗值的计算策略。
S202:从数据库连接池中选取可用数据库。数据库连接池中包括至少一个数据库。
其中,数据库连接池动态管控至少一个数据库,从这些数据库中选取出一个或多个处于可用状态的数据库并作为可用数据库。需要说明的是,在本申请的其他实施例中,也可以是通过数据库连接池以外的其他方式从多个数据库中选取出可用数据库。
在本申请实施例中还可以实时检测数据库连接池中的各个数据库是否可用,动态删除不可用的数据库。
S203:生成包括可用数据库的标识信息的唯一标识,将生成的唯一标识 与步骤S201计算出的消耗值对应保存在可用数据库中。
在本申请实施例中,唯一标识即与消耗值唯一对应,同时也能够标识出选取的可用数据库。具体标识方式可以是唯一标识本身包括可用数据库的标识信息。比如将唯一标识的一个固定数据段(例如唯一标识的后8位)设置为可用数据库的标识信息。下面说明一个获取可用数据库的标识信息的具体实现方式。
在本申请实施例中,可以是在数据库连接池中的各个数据库中分别存储有互不重复的标识信息段,在选取可用数据库时,可以按照随机方式或者按照预设规则,从数据库连接池中的一个或多个数据库中获取其存储的标识信息段。若获取成功,则说明该数据库处于可用状态,因此直接作为可用数据库,从获取的标识信息段中获取未被选取过的标识信息,生成包括未被选取的标识信息的唯一标识。若获取失败,则说明该数据库处于不可用状态,按照相同方式对其他的数据库执行类似的选取过程,直至获取到标识信息并生成唯一标识。
为了保证标识信息段不重复,可以将一个n位的数值拆分成m份数值作为m个标识信息段(m为数据库连接池包括的数据库数量)。例如,将8位数值拆分成10个数值段作为10个标识信息段,比如0-9999999为一个标识信息段,10000000-19999999为一个标识信息段,以此类推。并由数据库连接池中的10个数据库分别存储其中一个标识信息段。在本步骤中,若获取到一个数据库存储的标识信息段0-9999999,则从该标识信息段中选取出一个未被选取过的数值作为标识信息,比如2000000,最终生成包括该未被选取过的数值2000000的唯一标识。从而保证了生成的唯一标识即具有唯一性,又能够标识出可用数据库。
在上述选取可用数据库的过程中,可以进一步设置选取的限制条件,例如若在重复预设查询次数和/或预设查询时间内,从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库。例如,设置预设查询次数为3,预设查询时间为30秒,也就是说在某一个数据库中连续查询3次,每一次查询时间为30秒,如果仍然未能获取到该数据库的标识信息段,则认为该数据库当前不可用,对剩余的数据库执 行类似查询过程。
S204:返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和。
S205:接收转出确认请求;所述转出确认请求中包括所述唯一标识。所述唯一标识中包括可用数据库的标识信息。
S206:基于所述唯一标识所包括的标识信息确定所述可用数据库。
由于步骤S203生成的唯一标识包括可用数据库的标识信息,因此根据该标识信息能够确定出用于保存消耗值的可用数据库。例如,若数据库连接池中的各个数据库分别存储有互不重复的标识信息段,并且可用数据库的标识信息是从该可用数据库所存储的标识信息段中选取的,则本步骤中可以判断出唯一标识所包括的标识信息属于哪一个或哪几个标识信息段,根据连接池数据库中的各个数据库存储的标识信息段,确定出可用数据库为连接池数据库中的哪一个或哪几个数据库。
例如,若唯一标识所包括的标识信息为2000000,可以判断出该标识信息属于标识信息段0-9999999,则可知该标识信息段0-9999999所存储于的数据库为可用数据库。
S207:循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值。
S208:将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。其中转入方根据转入方信息确定。
通过上述技术方案可知,在本实施例中主要说明了从数据库连接池中维护的各个数据库中选取可用数据库的方式,其中对于唯一标识的生成规则,依赖于数据库连接池中的各个数据库,只需一个数据库可用即可,减少了在存储消耗值时对数据库的单点依赖,同时唯一标识中包括了可用数据库的标识信息,从而能够确定数据库连接池中的哪些数据库为存储有唯一标识的可用数据库。
本申请实施例提供的数值信息转移方法可以具体应用于网上支付的过 程,下面通过一个具体的实施例说明这种应用场景。
请参阅图3,本申请提供了数值信息转移方法的另一种实施例,本实施例具体应用于网上支付过程,因此本实施例中数值信息具体为资金。本实施例包括:
S301:第三方系统的收费模块接收付款方的付款请求。付款请求中包括付款方的账户信息、收款方的标识信息、以及订单金额。
当用户需要在电子商务系统上购买商品时,会点击付款按钮,付款方此时会向第三方系统的收银台模块发送付款方的付款请求,第三方系统的收银台模块将该付款请求转发至第三方系统的收费模块。
由于本实施例具体应用于网上支付过程,因此转出方具体为付款方,转入方具体为收款方,转出方信息具体为付款方的账户信息,原始转出值具体为订单金额。并且账户管理模块具体包括收费模块和支付模块,其中收费模块用于管理第三方系统的固定账户,而支付模块用于管理第三方系统的临时账户。
S302:收费模块根据收款方的标识信息获取到收款方的账户信息,根据付款方的账户信息以及订单金额,按照当前的手续费收取策略计算出第三方系统需要向付款方收取的手续费。
收款方的标识信息可以为收款方的账户名称等,根据预先存储的对应关系获取到收款方的标识信息对应的收款方的账户信息(例如银行卡账号、支付宝账户等)。其中付款请求中也可以直接包括收款方的账户信息。
该步骤之前,收费模块可以根据付款方的账户信息判断是否需要支付手续费(例如银行卡账号是否属于信用卡),如果需要,再执行本步骤,否则可以结束流程。其中在计算手续费时,可以根据付款方的账户信息确定出手续费收取策略,再根据手续费收取策略和订单金额计算出手续费。下面举例说明,若付款方的账户信息为银行卡账号,根据该银行卡账号能够确定出其发卡行,从而确定出该发卡行的手续费收取策略为1%,将订单金额的1%作为计算出的手续费。手续费收取策略可以从缓存中读取。
S303:收费模块从数据库连接池中的一个数据库中获取到该数据库存储的标识信息段,将该数据库作为可用数据库。
其中,数据库连接池包括至少一个数据库,并且各个数据库分别存储有互不重复的标识信息段。为了保证标识信息段不重复,可以将一个n位的数值拆分成m份数值作为m个标识信息段(m为数据库连接池包括的数据库数量),由各个数据库分别支持其中一份数值作为各个数据库的标识信息段。
在本实施例中,数据库连接池还可以实时检测数据库连接池中的各个数据库是否可用,动态删除不可用的数据库。虽然数据库连接池能够动态管控各个数据库,但是在某一局部时间,数据库还是有可能不可用。因此本步骤在获取该数据库存储的标识信息段时,若在一个数据库中连续查询3次,每一个查询时间为30秒,如果仍然未能获取到该数据库的标识信息段,则认为该数据库当前不可用,对剩余的数据库进行类似查询过程,直至获取到一个数据库存储的标识信息段。
需要说明的是,在本实施例中以可用数据库的个数为1进行说明,实际上可用数据库也可以是多个。
S304:收费模块从可用数据库存储的标识信息段中获取未被选取的标识信息,生成包括可用数据库的标识信息的唯一标识。
获取到可用数据库存储的标识信息段后,从该标识信息段中获取未被选取的标识信息,也就是说曾经从该标识信息段中选取过的标识信息,不再重复选取。其中唯一标识可以具体采取数据库的sequence取值方式。其中sequence是数据库系统按照一定规则自动增加的数字序列。
生成的唯一标识中除了包括可用数据库的标识信息,还可以包括其他信息。例如,唯一标识中处理标识信息,还可以包括以下信息中的至少一种:
当前日期、数据版本、系统版本、业务号、业务扩展标识位、随机位、分库分表位、和分库分表预留位。
S305:通过发送异步可靠消息,将生成的唯一标识与计算出的手续费、订单金额、收款方的账户信息对应保存在可用数据库中。
在执行完步骤S304后,可以通过开启另外一个线程执行步骤S305的保存操作,而原线程继续执行步骤S306。
S306:收费模块向收银台模块返回唯一标识、手续费和订单金额,以使得付款方将实际应付额对应的资金转入至第三方系统的临时账户。其中实际 应付额为手续费与订单金额之和。
收费模块向收银台模块返回手续费和订单金额后,收银台模块向付款方显示。付款方如果确认该金额无误,则通过打款操作将对应的资金转入到第三方系统的临时账户代为保管。此时订单状态从未付款修改为已付款,收款方会针对付款方支付的订单进行发货等操作。
需要说明的是,在本实施例中以将唯一标识返回至收银台模块为例加以说明,也就是说由收银台模块根据付款方的确认而被动发送付款确认请求,而在其他实施例中,可以将唯一标识返回至支付确认模块,由支付确认模块在判断出距订单的某一状态,比如收款方发货达到一定时间后,主动发送付款确认请求。
S307:收费模块接收到收银台模块发送的付款确认请求。所述付款确认请求中包括所述唯一标识。所述唯一标识中包括可用数据库的标识信息。
当付款方接收到收款方发送的货物并进行确认支付操作时,收银台模块会向收费模块发送付款确认请求。其中付款确认请求中包括收费模块返回至收银台模块的唯一标识。
若步骤S306中收费模块将唯一标识返回至支付确认模块,则该步骤由支付确认模块在判断出距订单的某一状态,比如收款方发货达到一定时间后,主动向收费模块发送付款确认请求。
S308:收费模块基于唯一标识所包括的标识信息确定所述可用数据库。
S309:收费模块循环执行从可用数据库中获取与唯一标识对应保存的手续费、订单金额以及收款方的账户信息,直至获取到与唯一标识对应保存的上述内容。
S310:收费模块将订单金额对应的资金从第三方系统的临时账户转入至收款方,将手续费对应的数值转入至第三方系统的固定账户中。其中收款方根据收款方的账户信息确认。
如图4所示,对应上述方法实施例,本申请还提供了数值信息转移装置的具体实施例。
本实施例包括:计算单元401、保存单元402、返回单元403、接收单元404、获取单元405和转入单元406。
计算单元401用于接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值。
当转出方需要将一定的数值信息转移到转入方时,会通过转出方的客户端,如计算机、智能手机等,向第三方系统发送转出请求。本实施例的装置可以为第三方系统的账户管理模块,由账户管理模块中的计算单元401接收转出方发送的转出请求。需要说明的是,一般情况下,第三方系统中由用户接口模块专门负责与用户之间的信息交互,因定账户管理模块接收经用户接口模块转发的转出请求。通常,第三方系统的账户管理模块、用户接口模块可以设置在第三方系统的服务器内。
其中,转出请求中至少包括转出方信息和原始转出值,转出方信息指的是转出方用于保存其数值信息的账户信息,而原始转出值则表示需要将原始转出值对应的数值信息转入至转入方。当本实施例具体应用于网上支付过程时,转出方信息指的是付款方的账户信息,原始转出值为付款方需要向收款方支付的订单金额,消耗值具体为第三方系统向付款方收取的手续费。
保存单元402用于生成唯一标识,将生成的唯一标识与计算单元401计算出的消耗值对应保存在可用数据库中。
唯一标识指的是与消耗值具有一一对应关系,即具有唯一性的标识。在本申请实施例中,不再是仅仅将消耗值保存在数据库中,而是生成唯一标识,将唯一标识与消耗值对应保存在可用数据库中。可用数据库指的是保存单元402在执行保存的过程时,处于可用状态的数据库。其中可用数据库可以是从多个数据库中选取出的、一个或多个处于可用状态的数据库。唯一标识不仅与消耗值具有唯一对应关系,也能够唯一的标识出消耗值所保存的可用数据库。可见,本申请实施例中保证了将消耗值保存在处于可用状态的可用数据库,因此在获取消耗值时该可用数据库处于可用状态的机率也会比较大。
在本申请实施例中,为了确保在可用数据库中成功保存消耗值,具体可以是通过发送可靠消息,将唯一标识和消耗值对应保存在可用数据库中。而且其中可靠消息具体可以为异步可靠消息。
返回单元403用于在保存单元402生成所述唯一标识之后,返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和。
本申请实施例中,数值信息指的是能够表示数值大小的数据信息,例如资金等价值信息、或者资源大小信息都是常见的数值信息。
本申请实施例中,返回单元403可以是将消耗值返回至用户接口模块,从而使得用户接口模块显示消耗值,当转出方确认该消耗值后,会将实际转出值对应的数值信息转入至第三方系统的临时账户进行保存。
本申请实施例中,返回单元403可以是将唯一标识返回至第三方系统的转出确认模块,当转出确认模块判断出满足转出确认条件后,会向第三方系统的账户管理模块发送包括唯一标识的转出确认请求。
接收单元404用于接收转出确认请求;所述转出确认请求中包括所述唯一标识。
该步骤中接收单元404可以接收转出确认模块发送的转出确认请求。其中转出确认模块可以是根据用户的请求被动发送转出确认请求,此时转出确认模块具体为用户接口模块;转出确认模块还可以是主动发送转出确认请求,例如当转出确认模块判断出满足转出确认条件时,主动向接收单元404发送转出确认请求。
获取单元405用于接收单元404接收到转出确认请求后,循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值。
在本申请实施例中当接收到转出确认请求后,会根据转出确认请求中的唯一标识,从可用数据库中获取唯一标识对应保存的消耗值,如果此时可用数据库处于可用状态,也就是说能够成功获取到消耗值,则转入单元406开始执行对应的功能。而如果可用数据库处于不可用状态,则循环上述获取步骤,也就是说直至等待可用数据库处于可用状态时,获取对应保存的消耗值。
其中在获取消耗值之前,获取单元405可以是先根据唯一标识从多个数据库中确定出可用数据库,之后再从可用数据库中获取消耗值。
转入单元406用于获取单元405获取到所述消耗值后,将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。
其中,转入方根据转入方信息确定,而转入单元406可以通过多种方式获取转入方信息和原始转出值,在本申请实施例中不加限定。例如,在转出请求中还包括转入方信息,在保存单元402中保存唯一标识和消耗值时,还可以在可用数据库与唯一标识对应保存原始转出值和/或转入方信息。获取单元405在从可用数据库中获取消耗值时,还获取到对应保存的原始转出值和/或转入方信息。又例如,转出确认请求中还包括原始转出值和/或转入方信息,因此转入单元406从转出确认请求中获取原始转出值和/或转入方信息。
在本申请实施例中,具体选取可用数据库时,可以是由数据库连接池维护至少一个数据库,从数据库连接池中选取出可用数据库。具体地,数据库连接池中包括至少一个数据库;本实施例的装置还包括选取单元,用于从数据库连接池中选取所述可用数据库;保存单元402用于生成唯一标识包括:保存单元402用于生成包括所述可用数据库的标识信息的唯一标识;本实施例的装置还包括:确定单元,用于在获取单元405从可用数据库中获取与所述唯一标识对应的所述消耗值之前,基于所述唯一标识所包括的标识信息确定所述可用数据库。其中本申请实施例的装置还可以包括检测单元,检测单元用于实时检测所述数据库连接池中的各个数据库是否可用,动态删除不可用的数据库。
在本申请实施例中,还可以在数据库连接池的各个数据库中分别存储有互不重复的标识信息段;选取单元用于从数据库连接池中选取所述可用数据库以及保存单元402用于生成包括所述可用数据库的标识信息的唯一标识,包括:
选取单元用于若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库;所述保存单元402 用于从所述可用数据库存储的标识信息段中获取未被选取的标识信息,生成包括所述未被选取的标识信息的唯一标识。
在上述选取可用数据库的过程中,可以进一步设置选取的限制条件,所述选取单元用于若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库,包括:
选取单元用于若在重复预设查询次数和/或预设查询时间内,从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库。
本申请实施例的装置还可以对应于图2或者图3所示的方法实施例,具体内容参见方法实施例的相关内容,这里不再赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (14)

  1. 一种数值信息转移方法,其特征在于,包括:
    接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值;
    生成唯一标识,将所述唯一标识与所述消耗值对应保存在可用数据库中;
    返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和;
    接收转出确认请求;所述转出确认请求中包括所述唯一标识;
    循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值;
    将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。
  2. 根据权利要求1所述的方法,其特征在于,
    所述方法还包括:从数据库连接池中选取所述可用数据库,所述数据库连接池中包括至少一个数据库;
    所述生成唯一标识包括:生成包括所述可用数据库的标识信息的唯一标识;
    所述方法还包括:所述从所述可用数据库中获取与所述唯一标识对应的所述消耗值之前,基于所述唯一标识所包括的标识信息确定所述可用数据库。
  3. 根据权利要求2所述的方法,其特征在于,所述数据库连接池的各个数据库中分别存储有互不重复的标识信息段;
    所述从数据库连接池中选取所述可用数据库以及生成包括所述可用数据库的标识信息的唯一标识,包括:
    若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库;
    从所述可用数据库存储的标识信息段中获取未被选取的标识信息;
    生成包括所述未被选取的标识信息的唯一标识。
  4. 根据权利要求3所述的方法,其特征在于,所述若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库,包括:
    若在重复预设查询次数和/或预设查询时间内,从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库。
  5. 根据权利要求2所述的方法,其特征在于,还包括:
    实时检测所述数据库连接池中的各个数据库是否可用,动态删除不可用的数据库。
  6. 根据权利要求1所述的方法,其特征在于,所述将所述唯一标识与所述消耗值对应保存在可用数据库中,包括:
    通过发送可靠消息,将所述唯一标识与所述消耗值对应保存在可用数据库中。
  7. 根据权利要求1所述的方法,其特征在于,所述数值信息具体为价值信息。
  8. 一种数值信息转移装置,其特征在于,包括:
    计算单元,用于接收转出方的转出请求,基于所述转出请求中的转出方信息和原始转出值计算消耗值;
    保存单元,用于生成唯一标识,将所述唯一标识与所述消耗值对应保存在可用数据库中;
    返回单元,用于所述保存单元生成唯一标识后,返回所述消耗值与所述唯一标识,以使得所述转出方将实际转出值对应的数值信息转入至第三方系统的临时账户;所述实际转出值为所述原始转出值与所述消耗值之和;
    接收单元,用于接收转出确认请求;所述转出确认请求中包括所述唯一标识;
    获取单元,用于所述接收单元接收到转出确认请求后,循环执行从所述可用数据库中获取与所述唯一标识对应保存的所述消耗值,直至获取到所述消耗值;
    转入单元,用于所述获取单元获取到所述消耗值后,将所述原始转出值和所述消耗值对应的数值信息分别从所述第三方系统的临时账户转到转入方和所述第三方系统的固定账户中。
  9. 根据权利要求8所述的装置,其特征在于,还包括:
    选取单元,用于从数据库连接池中选取所述可用数据库,所述数据库连接池中包括至少一个数据库;
    所述保存单元用于生成唯一标识包括:所述保存单元用于生成包括所述可用数据库的标识信息的唯一标识;
    还包括:
    确定单元,用于在所述获取单元从所述可用数据库中获取与所述唯一标识对应的所述消耗值之前,基于所述唯一标识所包括的标识信息确定所述可用数据库。
  10. 根据权利要求9所述的装置,其特征在于,所述数据库连接池的各个数据库中分别存储有互不重复的标识信息段;
    所述选取单元用于从数据库连接池中选取所述可用数据库以及所述保存单元用于生成包括所述可用数据库的标识信息的唯一标识,包括:
    选取单元用于若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库;
    所述保存单元用于从所述可用数据库存储的标识信息段中获取未被选取的标识信息,生成包括所述未被选取的标识信息的唯一标识。
  11. 根据权利要求10所述的装置,其特征在于,所述选取单元用于若从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库,包括:
    所述选取单元用于若在重复预设查询次数和/或预设查询时间内,从数据库连接池中成功获取到一个或多个数据库的标识信息段,将所述一个或多个数据库作为所述可用数据库。
  12. 根据权利要求9所述的装置,其特征在于,还包括:
    检测单元,用于实时检测所述数据库连接池中的各个数据库是否可用, 动态删除不可用的数据库。
  13. 根据权利要求8所述的装置,其特征在于,所述保存单元用于将所述唯一标识与所述消耗值对应保存在可用数据库中,包括:
    所述保存单元用于通过发送可靠消息,将所述唯一标识与所述消耗值对应保存在可用数据库中。
  14. 根据权利要求8所述的装置,其特征在于,所述数值信息具体为价值信息。
PCT/CN2015/085913 2014-08-18 2015-08-03 一种数值信息转移方法及装置 WO2016026381A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410406291.4 2014-08-18
CN201410406291.4A CN105354190A (zh) 2014-08-18 2014-08-18 一种数值信息转移方法及装置

Publications (1)

Publication Number Publication Date
WO2016026381A1 true WO2016026381A1 (zh) 2016-02-25

Family

ID=55330163

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/085913 WO2016026381A1 (zh) 2014-08-18 2015-08-03 一种数值信息转移方法及装置

Country Status (3)

Country Link
CN (1) CN105354190A (zh)
HK (1) HK1218335A1 (zh)
WO (1) WO2016026381A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817398A (zh) * 2022-04-02 2022-07-29 中国民航信息网络股份有限公司 一种替代边检系统回复报文的方法和相关装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557975B (zh) * 2016-11-16 2020-08-04 中国银行股份有限公司 银行系统联机交易收费确定方法及系统
CN108415922B (zh) * 2017-09-30 2021-10-22 平安科技(深圳)有限公司 数据库修改方法及应用服务器
CN108305101B (zh) * 2018-01-30 2020-12-29 深圳壹账通智能科技有限公司 数值转移方法、装置、计算机设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101414370A (zh) * 2008-12-15 2009-04-22 阿里巴巴集团控股有限公司 利用虚拟卡提高支付安全的支付方法、系统及支付平台
CN101604427A (zh) * 2009-07-10 2009-12-16 阿里巴巴集团控股有限公司 数据处理方法及系统、交易处理系统、第三方支付系统
US20100153249A1 (en) * 2008-06-25 2010-06-17 Alibaba Group Holding Limited Making Payment Using Communication Client
CN103310333A (zh) * 2013-03-22 2013-09-18 涂志敏 一种线下终端刷卡实现资金划至第三方支付平台的方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140648A (zh) * 2007-09-10 2008-03-12 王忠杰 银行票据线上授权线下交易的方法
CN101241570A (zh) * 2008-02-15 2008-08-13 中国工商银行股份有限公司 一种银行汇款方法、银行支付信息处理装置及其系统
CN101655950A (zh) * 2009-06-30 2010-02-24 阿里巴巴集团控股有限公司 一种合并支付的实现方法、装置及系统
CN102760259B (zh) * 2011-04-27 2016-05-11 阿里巴巴集团控股有限公司 一种在线支付方法及设备
CN103765861B (zh) * 2011-06-27 2016-08-17 亚马逊技术股份有限公司 移动设备的支付选择和授权

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100153249A1 (en) * 2008-06-25 2010-06-17 Alibaba Group Holding Limited Making Payment Using Communication Client
CN101414370A (zh) * 2008-12-15 2009-04-22 阿里巴巴集团控股有限公司 利用虚拟卡提高支付安全的支付方法、系统及支付平台
CN101604427A (zh) * 2009-07-10 2009-12-16 阿里巴巴集团控股有限公司 数据处理方法及系统、交易处理系统、第三方支付系统
CN103310333A (zh) * 2013-03-22 2013-09-18 涂志敏 一种线下终端刷卡实现资金划至第三方支付平台的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114817398A (zh) * 2022-04-02 2022-07-29 中国民航信息网络股份有限公司 一种替代边检系统回复报文的方法和相关装置

Also Published As

Publication number Publication date
HK1218335A1 (zh) 2017-02-10
CN105354190A (zh) 2016-02-24

Similar Documents

Publication Publication Date Title
US10872342B2 (en) Method and apparatus for offline payment, service processing, and payment processing
US11455633B2 (en) Mobile device payments
US11182781B2 (en) Block chain encryption tags
US20210035102A1 (en) Remittance processing method and system, and computer-readable storage medium
US9836790B2 (en) Cryptocurrency transformation system
US10127552B2 (en) Cryptocurrency aggregation system
US11151535B1 (en) Utilizing APIs to facilitate open ticket synchronization
US20170221053A1 (en) Digital asset conversion
TWI610255B (zh) 線上支付方法及設備
US20150363769A1 (en) Cryptocurrency Real-Time Conversion System
US20150363783A1 (en) Cryptocurrency risk detection system
US20150365283A1 (en) Cryptocurrency offline vault storage system
US20150363778A1 (en) Cryptocurrency electronic payment system
US20150363772A1 (en) Cryptocurrency online vault storage system
US11087371B2 (en) Blockchain-based invoice creation method apparatus, and electronic device
WO2016026381A1 (zh) 一种数值信息转移方法及装置
US20170337548A1 (en) Card Processing Methods and Systems
JP2016095846A (ja) インスタントメッセージサービスを利用する支払処理方法および支払処理システム
KR102438846B1 (ko) Did 기반 사용자 스타일 정보의 nft 자산 거래 서비스 제공 방법, 장치 및 시스템
WO2020042794A1 (zh) 一种交易设备、方法、装置、服务器及存储介质
GB2569207A (en) Remittance processing method and system, and computer-readable storage medium
TW201640426A (zh) 數值處理方法及裝置
TW201624373A (zh) 資料業務處理方法及裝置
KR20160057025A (ko) 인스턴트 메시지 서비스를 이용하는 지불 처리 방법 및 지불 처리 시스템
US20230394467A1 (en) System and method for providing restricted token usage during an onboarding phase

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15834331

Country of ref document: EP

Kind code of ref document: A1