WO2019000968A1 - Transaction tail difference processing method, apparatus and computer readable storage medium - Google Patents

Transaction tail difference processing method, apparatus and computer readable storage medium Download PDF

Info

Publication number
WO2019000968A1
WO2019000968A1 PCT/CN2018/076213 CN2018076213W WO2019000968A1 WO 2019000968 A1 WO2019000968 A1 WO 2019000968A1 CN 2018076213 W CN2018076213 W CN 2018076213W WO 2019000968 A1 WO2019000968 A1 WO 2019000968A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
amount
account
traded
total
Prior art date
Application number
PCT/CN2018/076213
Other languages
French (fr)
Chinese (zh)
Inventor
胡凯豪
罗佳
方晓
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019000968A1 publication Critical patent/WO2019000968A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a transaction tail difference processing method and apparatus, and a computer readable storage medium.
  • the trading functions of the banking, wealth management, insurance and other industries are mainly implemented by the account management system.
  • the account management system may involve transaction processing of dozens or even dozens of different businesses in the transaction process.
  • each purchase or sale of each account involving the operation of the account funds may introduce errors, thereby making the account The corresponding customer's assets are inaccurate, resulting in damage to the customer's assets.
  • the main object of the present invention is to provide a transaction tail difference processing method and apparatus, and a computer readable storage medium, which are intended to solve the technical problem that the customer's assets are damaged due to errors introduced by the operation involving the account funds in the account management system. .
  • the present invention provides a transaction tail difference processing method, and the transaction tail difference processing method includes the following steps:
  • the present invention also provides a transaction tail difference processing apparatus, the transaction tail difference processing apparatus comprising: a memory, a processor, and a transaction stored on the memory and operable on the processor A tail difference handler that implements the steps of any of the methods described above when executed by the processor.
  • the present invention also provides a computer readable storage medium having a transaction tail difference processing program stored thereon, and the transaction tail difference processing program is implemented by a processor to implement the foregoing A step of the transaction tail processing method described.
  • the invention obtains the first total amount of the first business scenario and the target total amount when the transaction of the first business scenario is completed, and then calculates the first difference between the first total amount and the target total amount, and then obtains the first The ratio of assets corresponding to each account in the business scenario, and finally calculating the first amount corresponding to each account based on the asset occupancy ratio and the first difference, and updating the account balance of each account based on the first amount, according to the first service
  • the first total amount of the scenario and the total amount of the target, the tail difference processing is performed on each account in the first business scenario, and the error introduced by the operation involving the account funds is minimized under the limited accuracy of the account management system. To improve the accuracy of user assets and to ensure that user assets do not get into the error of the operation of the account funds and suffer.
  • FIG. 1 is a schematic structural diagram of a terminal to which a transaction tail difference processing device belongs in a hardware operating environment according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a first embodiment of a method for processing a transaction tail difference according to the present invention
  • FIG. 3 is a schematic flowchart of a step of calculating a first amount corresponding to each account based on the asset occupancy ratio and the first difference in the second embodiment of the transaction tail difference processing method of the present invention
  • FIG. 4 is a schematic flowchart of a step of acquiring an asset occupation ratio corresponding to each account in the first service scenario in the third embodiment of the transaction tail difference processing method of the present invention
  • FIG. 5 is a schematic flowchart of the steps of obtaining the first total amount of the first service scenario in the fourth embodiment of the method for processing a transaction tail difference according to the fourth embodiment of the present invention
  • FIG. 6 is a method for processing a transaction tail difference according to a fifth embodiment of the present invention, in which a first amount corresponding to each account is calculated based on the asset occupancy ratio and the first difference, and each of the accounts is updated based on the first amount.
  • FIG. 7 is a schematic flowchart of a sixth embodiment of a method for processing a transaction tail difference according to the present invention.
  • FIG. 9 is a schematic flowchart of a process of calculating a remaining amount based on the input amount, the unit price of the second service scenario, and the total share in the eighth embodiment of the transaction tail difference processing method of the present invention.
  • FIG. 1 is a schematic structural diagram of a terminal to which a transaction tail difference processing device belongs in a hardware operating environment according to an embodiment of the present invention.
  • the terminal in the embodiment of the present invention may be a PC, or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving Picture). Experts Group Audio Layer III, Motion Picture Expert Compress Standard Audio Level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 4) Players, portable computers and other portable terminal devices with display functions.
  • MP3 Motion Picture Expert Compress Standard Audio Level 3
  • MP4 Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 4
  • Players Portable computers and other portable terminal devices with display functions.
  • the terminal may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the terminal may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • sensors such as light sensors, motion sensors, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor may turn off the display and/or when the mobile terminal moves to the ear. Backlighting.
  • the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.
  • terminal structure shown in FIG. 1 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • an operating system may be included in the memory 1005 as a computer storage medium.
  • a network communication module may be included in the memory 1005 as a computer storage medium.
  • a user interface module may be included in the memory 1005 as a computer storage medium.
  • a transaction tail difference processing program may be included in the memory 1005 as a computer storage medium.
  • the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server;
  • the user interface 1003 is mainly used to connect the client (user end), and perform data communication with the client; and the processor
  • the 1001 can be used to invoke the transaction tail difference processing program stored in the memory 1005, and execute the transaction tail difference processing method provided by the embodiment of the present application.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of a method for processing a transaction tail difference according to the present invention.
  • the transaction tail difference processing method includes:
  • Step S10 Acquire a first total amount of the first service scenario and a target total amount when the transaction of the first service scenario is completed;
  • each purchase or sale of each account involving the operation of the account funds may introduce errors, thereby causing the business.
  • the actual transaction amount of the scenario is inconsistent with the theoretical amount, and the error between the actual transaction amount and the theoretical amount is the transaction tail difference.
  • the first business scenario includes one of a payment scenario, a fixed payment, an instalment fixed payment, a one-time payment, a redemption, a share redemption, an installment payment, an irregular payment, an account adjustment, a resignation, and an out-of-plan transfer. Multiple.
  • the business scenarios involved are different due to different transaction types.
  • the first total amount is the sum of the transaction amounts of the respective accounts corresponding to the first service scenario, and can be obtained by calculating the total share corresponding to the first service scenario and the unit price, and the total target amount is the corresponding corresponding to the first service scenario.
  • the total amount may be stored in a preset database in association with the identification information corresponding to the service scenario, and the total amount may be found in the preset database according to the identification information of the first service scenario. For example, when the first business scenario is a payment, a fixed payment, a fixed-rate payment, a one-time payment, an instalment payment, or an irregular payment, the first total amount is a share corresponding to each account payment and the first business scenario.
  • the product of the unit price, the total amount of the target is the total amount of the first business scenario, and when the first business scenario is a redemption of the amount, redemption, etc., the first total amount is the redemption share of each account and the first
  • the product of the unit price of a business scenario, the total amount of the target is the total amount that should be redeemed for the first business scenario.
  • the transaction completion of the first service scenario refers to: when the unit price of the first service scenario is updated, the transaction processing is performed according to the current transaction request of the first service scenario, but the corresponding user account is not updated according to the post-transaction data, and the current The transaction request includes an unprocessed transaction request prior to the unit price update of the first business scenario.
  • Step S20 calculating a first difference between the first total amount and the target total amount
  • the first difference is an absolute value of a difference between the first total amount and the target total amount.
  • Step S30 Obtain an asset occupation ratio corresponding to each account in the first service scenario
  • the asset occupancy ratio refers to the proportion of the assets of the first business scenario occupied by each account in the total assets of the first business scenario.
  • the total share of the first service scenario and the share occupied by each account in the first service scenario may be obtained, where the asset occupancy ratio may be divided by the share of the first service scenario occupied by each account.
  • the total share of the first service scenario is obtained.
  • the total share of each service scenario is associated with the share occupied by each account in the service scenario, and is stored in a preset database, directly according to the first service scenario.
  • the identification information is found in the preset database to obtain the total share and the share occupied by each account, and the share of each account obtained by dividing the obtained share by the total share is obtained by the account share ratio corresponding to each account; or, Obtaining a total amount of the first service scenario and an amount occupied by each account in the first service scenario, where the asset occupancy ratio is divided by the amount of the first service scenario occupied by each account by the first service scenario
  • the total amount is obtained, preferably, the total amount of each business scenario can be accounted for by each account in the business scenario.
  • the amount association is stored in the preset database, and the total amount and the amount occupied by each account are directly found in the preset database according to the identification information of the first business scenario, and the amount occupied by each account is divided. In the total amount, the ratio of assets corresponding to each account is obtained.
  • the asset occupancy ratio corresponding to each account in the first service scenario is obtained, so as to allocate the first difference according to the asset occupancy ratio.
  • Step S40 Calculate a first amount corresponding to each account based on the asset occupancy ratio and the first difference, and update an account balance of each of the accounts based on the first amount.
  • the first amount corresponding to each account is calculated based on the asset occupancy ratio and the first difference, and the account balance of each account is updated based on the first amount, which specifically includes: occupying an asset share ratio of each account.
  • the product of the first difference is used as the to-be-compensated tail difference corresponding to each account, and the current amount of each account after the transaction is obtained, and the sum of the current amount corresponding to each account and the to-be-compensated difference is used as the amount of the account, wherein the first The amount refers to the amount of each account after the tail difference.
  • the first amount refers to the payment of each account in the first business scenario.
  • the amount after the tail difference when the first business scenario is a business scenario such as amount redemption and share redemption, the first amount refers to the amount after each account in the first business scenario should be supplemented with the redemption tail difference.
  • the scheme of the embodiment is improved, and each account in the first service scenario is subjected to a tail difference processing according to the first total amount of the first service scenario and the target total amount, and further, when the accuracy of the account management system is limited, Minimize the error introduced by the operation involving the account funds, and ensure the accuracy of the information disclosure report corresponding to the first business scenario while ensuring the accuracy of the user assets, thereby avoiding the current tail difference in the transaction process.
  • the information disclosure report is inaccurate, it is necessary to manually check the business and IT and explain the reasons for the situation to the regulatory level, thereby improving the efficiency of transaction processing.
  • the transaction tail difference processing method proposed in this embodiment obtains the first total amount of the first service scenario and the target total amount when the transaction of the first service scenario is completed, and then calculates the relationship between the first total amount and the target total amount. a first difference, and then obtaining an asset share ratio corresponding to each account in the first service scenario, and finally calculating a first amount corresponding to each account based on the asset occupancy ratio and the first difference, and updating each of the accounts based on the first amount
  • the balance of the account can be processed according to the first total amount of the first business scenario and the total amount of the target, and the tail difference processing is performed on each account in the first business scenario, thereby reducing the accuracy of the account management system as much as possible. Errors introduced by operations involving account funds, increased accuracy of user assets, and impaired operations that ensure that user assets do not fall into the operation of account funds.
  • step S40 includes:
  • Step S41 calculating, according to the asset occupancy ratio and the first difference, a to-be-compensated tail difference corresponding to each account;
  • the to-be-compensated tail difference corresponding to each account is calculated according to the asset occupancy ratio and the first difference, and specifically, the to-be-compensated tail difference is the asset occupation ratio* The first difference.
  • Step S42 Calculate the current amount of each account based on the share and unit price corresponding to each account in the first service scenario
  • the share corresponding to each account in the first service scenario and the unit price corresponding to the first service scenario are obtained, and the current amount of each account is calculated according to the share and unit price corresponding to each account.
  • each account corresponds to The product of the share and the unit price is the current amount of each account.
  • Step S43 calculating a first amount corresponding to each of the accounts based on the to-be-compensated tail difference and the current amount.
  • the first amount corresponding to each account is calculated based on the to-be-completed difference and the current amount. Specifically, the first amount is a corresponding account. The sum of the pending tail difference and the current amount of the account.
  • the transaction tail difference processing method proposed in this embodiment calculates the to-be-compensated tail difference corresponding to each account based on the asset occupancy ratio and the first difference, and then calculates each account based on the share and unit price of each account in the first service scenario.
  • the current amount, and then the first amount corresponding to each account is calculated based on the to-be-completed difference and the current amount, and the first amount is accurately calculated according to the asset occupancy ratio and the first difference corresponding to each account, and then the first business scenario is further
  • Each account in the account is subjected to tail difference processing.
  • the accuracy of the account management system is limited, the error introduced by the operation involving the account funds is minimized, and the accuracy of the user assets is further improved.
  • step S30 includes:
  • Step S31 determining whether the first difference is greater than a preset difference
  • the preset difference can be reasonably set according to actual needs.
  • the preset difference can be set to 0.01 yuan.
  • step S32 when the first difference is greater than the preset difference, the asset occupation ratio corresponding to each account in the first service scenario is obtained.
  • the tail difference generated in the current transaction process needs to be processed. Therefore, the asset occupation ratio corresponding to each account in the first service scenario is obtained, so as to facilitate The asset possesses the tail difference processing for each account.
  • the asset occupancy ratio refers to the proportion of the assets of the first business scenario occupied by each account in the total assets of the first business scenario. Specifically, the asset possession ratio can be occupied by each account.
  • the share of a service scenario is obtained by dividing the total share of the first service scenario, or by the amount of the first service scenario occupied by each account divided by the total amount of the first service scenario.
  • the transaction tail difference processing method in this embodiment determines whether the first difference is greater than the preset difference, and then obtains the asset possession corresponding to each account in the first service scenario when the first difference is greater than the preset difference. Compared, the tail difference generated by the transaction is processed when the first difference is greater than the preset difference, and the tail difference processing is avoided when the tail difference is too small or does not exist, thereby affecting the efficiency of the transaction.
  • step S10 includes:
  • Step S11 Obtain a total share and a unit price corresponding to the current first service scenario
  • the total share and the unit price corresponding to the current first service scenario are obtained.
  • the unit price of the first service scenario is updated, the transaction processing is performed according to the current transaction request of the first service scenario, and the total share corresponding to the first service scenario after the transaction processing is obtained.
  • the unit price of the first service scenario refers to the updated unit price.
  • Step S12 calculating the first total amount based on the total share and the unit price.
  • calculating the first total amount based on the total share and the unit price specifically means: the product of the total share and the unit price as the first total amount.
  • the transaction tail difference processing method proposed in this embodiment obtains the total share and the unit price corresponding to the current first service scenario, and then calculates the first total amount based on the total share and the unit price, thereby realizing the accurate total share and unit price according to the first service scenario.
  • the first total amount is obtained, and the first total amount can be accurately obtained, thereby improving the accuracy of the first difference in the process of the tail difference processing, and further improving the accuracy of the user assets after the difference processing.
  • the transaction tail difference processing method further includes:
  • Step S50 Acquire a second amount corresponding to the first transaction request when receiving the first transaction request corresponding to the first service scenario;
  • the second amount refers to the account balance after the account corresponding to the first transaction request is updated.
  • Step S60 Perform a transaction operation on the account corresponding to the first transaction request based on the second amount.
  • the transaction tail difference processing method of the present embodiment when receiving the first transaction request corresponding to the first service scenario, acquiring the second amount corresponding to the first transaction request, and then corresponding to the first transaction request based on the second amount
  • the account performs a transaction operation, so that the first business scenario is subsequently traded according to the account balance of each account after the update, thereby avoiding recurrence of errors and improving the accuracy and efficiency of the transaction.
  • the transaction tail difference processing method further includes:
  • Step S70 Perform a pre-transaction operation on the account to be traded corresponding to the second transaction request when the unit price corresponding to the second service scenario is updated and the second transaction request currently exists, to determine the account to be traded after the pre-transaction Whether the remaining amount is less than the preset amount;
  • the second business scenario includes one or more of a business scenario such as amount redemption, share redemption, resignation, and planned outbound.
  • the second transaction request includes a transaction request that is not processed in the second service scenario before the unit price update, and a transaction request that receives the second service scenario after the unit price update of the second service scenario, specifically, the second transaction request includes user input Trading share or transaction amount.
  • the preset amount refers to the minimum amount that cannot be correspondingly traded to the account when the preset amount is less than the preset amount.
  • the preset amount can be reasonably set according to the actual situation. For example, the preset amount can be set to 0.01 yuan.
  • the pre-transaction operation is performed on the account to be traded corresponding to the second transaction request, and the account to be traded after the pre-transaction is obtained.
  • the remaining amount determine whether the remaining amount is less than the preset amount.
  • the preset amount is 0.01 yuan
  • the second transaction request is a redemption request
  • the remaining amount of the to-be-traded account after the pre-transaction is less than the preset amount, that is, less than 0.01 yuan, and the remaining amount is too small.
  • Step S80 When the remaining amount is less than the preset amount, the total share of the second service scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
  • the remaining amount is less than the preset amount
  • the total share of the second business scenario corresponding to the account to be traded is used as the transaction share, and the total share of the account to be traded before the transaction is all transactions, so that the transaction is to be traded after the transaction.
  • the remaining amount of the account is cleared to ensure that the user corresponding to the account to be traded can redeem the assets.
  • the step S80 may be replaced by performing a transaction operation by using the total amount of the second service scenario corresponding to the to-be-traded account as the transaction share when the remaining amount is less than the preset amount.
  • the transaction tail difference processing method proposed in this embodiment performs a pre-transaction operation on the to-be-traded account corresponding to the second transaction request to determine the pre-transaction by updating the unit price corresponding to the second service scenario and currently having the second transaction request. Whether the remaining amount of the post-trade account is less than the preset amount, and then when the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as the transaction share, and the remaining amount is less than the preset amount.
  • step S70 includes:
  • Step S71 acquiring an input amount corresponding to the second transaction request and a total share of the second service scenario corresponding to the to-be-traded account;
  • the input amount corresponding to the second transaction request and the total share of the second service scenario corresponding to the account to be traded are acquired, and the total The share refers to the share of the second business scenario held by the account to be traded.
  • the identifier corresponding to the second service scenario is stored in the database in association with the account information of all the accounts in the second service scenario, where the account information includes the account name and the second service scenario held by the account.
  • the information such as the share when the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, the identifier corresponding to the second service scenario and the account to be traded corresponding to the second transaction request may be found in the database.
  • the share of the second service scenario held by the transaction account is the total share of the second service scenario corresponding to the account to be traded.
  • Step S72 calculating the remaining amount based on the input amount, the unit price of the second service scenario, and the total share;
  • the remaining amount after the pre-transaction is calculated according to the current unit price, the input amount, and the total share of the second business scenario.
  • the remaining amount unit price * total share - input amount.
  • Step S73 determining whether the remaining amount is less than a preset amount.
  • the preset amount refers to a minimum amount that cannot be corresponding to the transaction when the preset amount is less than the preset amount, and the preset amount may be reasonably set according to actual conditions, for example, the preset amount may be set to 0.01 yuan.
  • the remaining amount when the remaining amount is calculated, it is determined whether the remaining amount is less than a preset amount, so as to select a transaction mode corresponding to the second transaction request.
  • the transaction tail difference processing method proposed in this embodiment obtains the input amount corresponding to the second transaction request and the total share of the second service scenario corresponding to the account to be traded, and then calculates the unit price based on the input amount, the second business scenario, and the total share. The remaining amount is then determined whether the remaining amount is less than the preset amount, and the remaining amount of the account to be traded is calculated according to the input amount, the unit price, and the total share, thereby being able to accurately determine whether the total share of the account to be traded needs to be determined according to the remaining amount.
  • All transactions are carried out to ensure that there are no remaining assets in the account to be traded after the transaction, which can avoid the occurrence of damage to the user assets caused by the remaining assets that cannot be traded again after the transaction, which further improves the accuracy of the transaction. Sex and efficiency.
  • step S72 includes:
  • Step S721 Calculate, according to the unit price of the second service scenario and the total share, a second total amount corresponding to the account to be traded;
  • Step S722 calculating a second difference between the second total amount and the input amount, and using the second difference as the remaining amount.
  • the transaction tail difference processing method proposed in this embodiment calculates a second total amount corresponding to the transaction account based on the unit price and the total share of the second service scenario, and then calculates a second difference between the second total amount and the input amount. And the second difference is used as the remaining amount, and the remaining amount is accurately calculated according to the second total amount and the input amount, so that it is possible to accurately determine whether the total share of the account to be traded needs to be all transactions according to the remaining amount, so as to ensure After the transaction, there is no remaining assets in the to-be-traded account, which further improves the accuracy and efficiency of the transaction.
  • the present invention also provides a computer readable storage medium.
  • a computer readable storage medium stores a transaction tail difference processing program, and when the transaction tail difference processing program is executed by the processor, the transaction tail is implemented. The steps of the difference processing method.
  • portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Abstract

Disclosed in the present invention is a transaction tail difference processing method, which comprises the following steps: when a transaction of a first business scenario is completed, acquiring a first total amount and target total amount of the first business scenario; calculating a first difference value between the first total amount and the target total amount; acquiring an asset occupancy ratio corresponding to each account in the first business scenario; on the basis of the asset occupancy ratio and the first difference value, calculating a first amount corresponding to each account, and on the basis of the first amount, updating an account balance of each account. Further disclosed in the present invention are a transaction tail difference processing apparatus and a computer readable storage medium. The present invention may, according to the first total amount and target amount of the first business scenario, perform tail difference processing for each account in the first business scenario, and thus, insofar as the accuracy of an account management system is limited, the present invention reduces as much as possible errors that are introduced by operations related to account funds, thereby increasing the accuracy of account assets.

Description

交易尾差处理方法、装置及计算机可读存储介质  Transaction tail difference processing method, device and computer readable storage medium
本申请要求于2017年06月26日提交中国专利局、申请号为201710497672.1、发明名称为“交易尾差处理方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of the Chinese Patent Application filed on June 26, 2017, the Chinese Patent Office, the application number is 201710497672.1, and the invention name is "transaction margin processing method, device and computer readable storage medium", the entire contents of which are The citation is incorporated in the application.
技术领域Technical field
本发明涉及数据处理技术领域,尤其涉及一种交易尾差处理方法、装置及计算机可读存储介质。The present invention relates to the field of data processing technologies, and in particular, to a transaction tail difference processing method and apparatus, and a computer readable storage medium.
背景技术Background technique
目前,银行、理财、保险等行业的交易功能主要采用账管系统进行实现。随着银行、理财、保险等行业的业务种类不断增加,该账管系统在交易过程中可能会涉及十几种、甚至几十种不同业务的交易处理。At present, the trading functions of the banking, wealth management, insurance and other industries are mainly implemented by the account management system. As the types of business in the banking, wealth management, insurance and other industries continue to increase, the account management system may involve transaction processing of dozens or even dozens of different businesses in the transaction process.
在通过账管系统进行交易处理的过程中,由于当前账管系统的精确度有限,每个账户的每一次买入或卖出等涉及到账户资金的操作都有可能引入误差,进而使得该账户对应的客户的资产不准确,导致客户的资产受损。In the process of transaction processing through the account management system, due to the limited accuracy of the current accounting system, each purchase or sale of each account involving the operation of the account funds may introduce errors, thereby making the account The corresponding customer's assets are inaccurate, resulting in damage to the customer's assets.
上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solutions of the present invention, and does not constitute an admission that the above is prior art.
发明内容Summary of the invention
本发明的主要目的在于提供一种交易尾差处理方法、装置及计算机可读存储介质,旨在解决账管系统中因涉及到账户资金的操作引入的误差而导致客户的资产受损的技术问题。The main object of the present invention is to provide a transaction tail difference processing method and apparatus, and a computer readable storage medium, which are intended to solve the technical problem that the customer's assets are damaged due to errors introduced by the operation involving the account funds in the account management system. .
为实现上述目的,本发明提供一种交易尾差处理方法,所述交易尾差处理方法包括以下步骤:To achieve the above object, the present invention provides a transaction tail difference processing method, and the transaction tail difference processing method includes the following steps:
在第一业务场景的交易完成时,获取所述第一业务场景的第一总金额以及目标总金额;Obtaining, when the transaction of the first service scenario is completed, the first total amount of the first service scenario and the total amount of the target;
计算所述第一总金额与所述目标总金额之间的第一差值;Calculating a first difference between the first total amount and the target total amount;
获取所述第一业务场景中的各个账户对应的资产占有比;Obtaining an asset occupation ratio corresponding to each account in the first service scenario;
基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额,并基于所述第一金额更新各个所述账户的账户余额。Calculating a first amount corresponding to each account based on the asset occupancy ratio and the first difference, and updating an account balance of each of the accounts based on the first amount.
此外,为实现上述目的,本发明还提供一种交易尾差处理装置,所述交易尾差处理装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的交易尾差处理程序,所述交易尾差处理程序被所述处理器执行时实现上述任一项所述的方法的步骤。Moreover, in order to achieve the above object, the present invention also provides a transaction tail difference processing apparatus, the transaction tail difference processing apparatus comprising: a memory, a processor, and a transaction stored on the memory and operable on the processor A tail difference handler that implements the steps of any of the methods described above when executed by the processor.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有交易尾差处理程序,所述交易尾差处理程序被处理器执行时实现上述任一项所述的交易尾差处理方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer readable storage medium having a transaction tail difference processing program stored thereon, and the transaction tail difference processing program is implemented by a processor to implement the foregoing A step of the transaction tail processing method described.
本发明通过在第一业务场景的交易完成时,获取第一业务场景的第一总金额以及目标总金额,接着计算第一总金额与目标总金额之间的第一差值,而后获取第一业务场景中的各个账户对应的资产占有比,最后基于资产占有比以及第一差值计算各个账户对应的第一金额,并基于第一金额更新各个所述账户的账户余额,能够根据第一业务场景的第一总金额及目标总金额,对该第一业务场景中的各个账户进行尾差处理,进而在账管系统的精确度有限情况下,尽可能减少涉及到账户资金的操作引入的误差,提高用户资产的准确性,以及确保用户资产不会吟到账户资金的操作的误差而受损。The invention obtains the first total amount of the first business scenario and the target total amount when the transaction of the first business scenario is completed, and then calculates the first difference between the first total amount and the target total amount, and then obtains the first The ratio of assets corresponding to each account in the business scenario, and finally calculating the first amount corresponding to each account based on the asset occupancy ratio and the first difference, and updating the account balance of each account based on the first amount, according to the first service The first total amount of the scenario and the total amount of the target, the tail difference processing is performed on each account in the first business scenario, and the error introduced by the operation involving the account funds is minimized under the limited accuracy of the account management system. To improve the accuracy of user assets and to ensure that user assets do not get into the error of the operation of the account funds and suffer.
附图说明DRAWINGS
图1是本发明实施例方案涉及的硬件运行环境中交易尾差处理装置所属终端的结构示意图;1 is a schematic structural diagram of a terminal to which a transaction tail difference processing device belongs in a hardware operating environment according to an embodiment of the present invention;
图2为本发明交易尾差处理方法第一实施例的流程示意图;2 is a schematic flow chart of a first embodiment of a method for processing a transaction tail difference according to the present invention;
图3为本发明交易尾差处理方法第二实施例中基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额的步骤的细化流程示意图;3 is a schematic flowchart of a step of calculating a first amount corresponding to each account based on the asset occupancy ratio and the first difference in the second embodiment of the transaction tail difference processing method of the present invention;
图4为本发明交易尾差处理方法第三实施例中获取所述第一业务场景中的各个账户对应的资产占有比的步骤的细化流程示意图;4 is a schematic flowchart of a step of acquiring an asset occupation ratio corresponding to each account in the first service scenario in the third embodiment of the transaction tail difference processing method of the present invention;
图5为本发明交易尾差处理方法第四实施例中获取所述第一业务场景的第一总金额的步骤的细化流程示意图;FIG. 5 is a schematic flowchart of the steps of obtaining the first total amount of the first service scenario in the fourth embodiment of the method for processing a transaction tail difference according to the fourth embodiment of the present invention;
图6为本发明交易尾差处理方法第五实施例中基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额,并基于所述第一金额更新各个所述账户的账户余额的步骤的细化流程示意图;6 is a method for processing a transaction tail difference according to a fifth embodiment of the present invention, in which a first amount corresponding to each account is calculated based on the asset occupancy ratio and the first difference, and each of the accounts is updated based on the first amount. A detailed process diagram of the steps of the account balance;
图7为本发明交易尾差处理方法第六实施例的流程示意图;7 is a schematic flowchart of a sixth embodiment of a method for processing a transaction tail difference according to the present invention;
图8为本发明交易尾差处理方法第七实施例中对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额的步骤的细化流程示意图;8 is a pre-transaction operation of the to-be-traded account corresponding to the second transaction request in the seventh embodiment of the transaction tail difference processing method of the present invention, to determine whether the remaining amount of the to-be-traded account after the pre-transaction is less than a preset amount Schematic diagram of the refinement of the steps;
图9为本发明交易尾差处理方法第八实施例中基于所述输入金额、所述第二业务场景的单价以及所述总份额计算剩余金额的步骤的细化流程示意图。FIG. 9 is a schematic flowchart of a process of calculating a remaining amount based on the input amount, the unit price of the second service scenario, and the total share in the eighth embodiment of the transaction tail difference processing method of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境中交易尾差处理装置所属终端的结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic structural diagram of a terminal to which a transaction tail difference processing device belongs in a hardware operating environment according to an embodiment of the present invention.
本发明实施例终端可以是PC,也可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、便携计算机等具有显示功能的可移动式终端设备。The terminal in the embodiment of the present invention may be a PC, or may be a smart phone, a tablet computer, an e-book reader, and an MP3 (Moving Picture). Experts Group Audio Layer III, Motion Picture Expert Compress Standard Audio Level 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video experts compress standard audio layers 4) Players, portable computers and other portable terminal devices with display functions.
如图1所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the terminal may include a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection communication between these components. The user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage. The memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
可选地,终端还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏的亮度,接近传感器可在移动终端移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Optionally, the terminal may further include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more. Among them, sensors such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display according to the brightness of the ambient light, and the proximity sensor may turn off the display and/or when the mobile terminal moves to the ear. Backlighting. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.
本领域技术人员可以理解,图1中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the terminal structure shown in FIG. 1 does not constitute a limitation to the terminal, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及交易尾差处理程序。As shown in FIG. 1, an operating system, a network communication module, a user interface module, and a transaction tail difference processing program may be included in the memory 1005 as a computer storage medium.
在图1所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的交易尾差处理程序,并执行本申请实施例提供的交易尾差处理方法。In the terminal shown in FIG. 1, the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect the client (user end), and perform data communication with the client; and the processor The 1001 can be used to invoke the transaction tail difference processing program stored in the memory 1005, and execute the transaction tail difference processing method provided by the embodiment of the present application.
本发明进一步提供一种交易尾差处理方法。参照图2,图2为本发明交易尾差处理方法第一实施例的流程示意图。The invention further provides a transaction tail difference processing method. Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of a first embodiment of a method for processing a transaction tail difference according to the present invention.
在本实施例中,该交易尾差处理方法包括:In this embodiment, the transaction tail difference processing method includes:
步骤S10,在第一业务场景的交易完成时,获取所述第一业务场景的第一总金额以及目标总金额;Step S10: Acquire a first total amount of the first service scenario and a target total amount when the transaction of the first service scenario is completed;
在通过账管系统进行交易处理的过程中,由于当前账管系统的精确度有限,每个账户的每一次买入或卖出等涉及到账户资金的操作都有可能引入误差,进而造成该业务场景的实际交易金额与理论金额不一致,实际交易金额与理论金额之间的误差即为交易尾差。In the process of transaction processing through the account management system, due to the limited accuracy of the current accounting system, each purchase or sale of each account involving the operation of the account funds may introduce errors, thereby causing the business. The actual transaction amount of the scenario is inconsistent with the theoretical amount, and the error between the actual transaction amount and the theoretical amount is the transaction tail difference.
其中,第一业务场景包括缴费、定额支付、分期定额支付、一次性支付、金额赎回、份额赎回、分期支付、不定期支付、账户调整、离职以及计划外转等业务场景中的一个或多个。在不同的实施例中,由于交易类型不同,涉及到的业务场景也不同。The first business scenario includes one of a payment scenario, a fixed payment, an instalment fixed payment, a one-time payment, a redemption, a share redemption, an installment payment, an irregular payment, an account adjustment, a resignation, and an out-of-plan transfer. Multiple. In different embodiments, the business scenarios involved are different due to different transaction types.
第一总金额是指该第一业务场景所对应的各个账户的交易金额之和,可以通过第一业务场景对应的总份额以及单价计算获得,目标总金额是指该第一业务场景所对应的总金额,可将该每一个业务场景的总金额与该业务场景对应的标识信息关联存储在预设数据库中,直接根据该第一业务场景的标识信息在预设数据库中查找获得该总金额。例如,在第一业务场景为缴费、定额支付、分期定额支付、一次性支、分期支付或不定期支付等业务场景时,第一总金额为各个账户应缴费对应的份额与该第一业务场景单价的乘积,目标总金额为该第一业务场景应缴费的总金额;在第一业务场景为金额赎回、份额赎回等业务场景时,第一总金额为各个账户赎回份额与该第一业务场景单价的乘积,目标总金额为该第一业务场景应赎回的总金额。The first total amount is the sum of the transaction amounts of the respective accounts corresponding to the first service scenario, and can be obtained by calculating the total share corresponding to the first service scenario and the unit price, and the total target amount is the corresponding corresponding to the first service scenario. The total amount may be stored in a preset database in association with the identification information corresponding to the service scenario, and the total amount may be found in the preset database according to the identification information of the first service scenario. For example, when the first business scenario is a payment, a fixed payment, a fixed-rate payment, a one-time payment, an instalment payment, or an irregular payment, the first total amount is a share corresponding to each account payment and the first business scenario. The product of the unit price, the total amount of the target is the total amount of the first business scenario, and when the first business scenario is a redemption of the amount, redemption, etc., the first total amount is the redemption share of each account and the first The product of the unit price of a business scenario, the total amount of the target is the total amount that should be redeemed for the first business scenario.
在本实施例中,在第一业务场景的交易完成时,获取第一业务场景的第一总金额以及目标总金额,以便于通过获取到的第一总金额以及目标总金额计算当前第一业务场景的交易产生的尾差。其中,第一业务场景的交易完成是指:在第一业务场景的单价更新时,根据第一业务场景当前的交易请求进行交易处理,但未根据交易后的数据更新对应的用户账户,当前的交易请求包括第一业务场景的单价更新之前的未处理的交易请求。In this embodiment, when the transaction of the first service scenario is completed, the first total amount of the first service scenario and the target total amount are obtained, so as to calculate the current first service by using the obtained first total amount and the target total amount. The tail difference produced by the trading of the scene. The transaction completion of the first service scenario refers to: when the unit price of the first service scenario is updated, the transaction processing is performed according to the current transaction request of the first service scenario, but the corresponding user account is not updated according to the post-transaction data, and the current The transaction request includes an unprocessed transaction request prior to the unit price update of the first business scenario.
步骤S20,计算所述第一总金额与所述目标总金额之间的第一差值;Step S20, calculating a first difference between the first total amount and the target total amount;
其中,该第一差值为第一总金额与所述目标总金额之差的绝对值。The first difference is an absolute value of a difference between the first total amount and the target total amount.
步骤S30,获取所述第一业务场景中的各个账户对应的资产占有比;Step S30: Obtain an asset occupation ratio corresponding to each account in the first service scenario;
其中,资产占有比是指各个账户所占有的该第一业务场景的资产在该第一业务场景的总资产中所占的比例。具体的,可通过获取该第一业务场景的总份额以及该第一业务场景中的各个账户所占有的份额,该资产占有比可以通过各个账户所占有的该第一业务场景的份额除以该第一业务场景的总份额得到,优选地,可将该每一个业务场景的总份额与该业务场景中的各个账户所占有的份额关联存储在预设数据库中,直接根据该第一业务场景的标识信息在预设数据库中查找获得该总份额以及各个账户所占有的份额,将获取到的每一个账户所占有的份额除以总份额即得到各个账户对应的资产占有比;或者,还可以通过获取该第一业务场景的总金额以及该第一业务场景中的各个账户所占有的金额,该资产占有比可通过各个账户所占有的该第一业务场景的金额除以该第一业务场景的总金额得到,优选地,可将该每一个业务场景的总金额与该业务场景中的各个账户所占有的金额关联存储在预设数据库中,直接根据该第一业务场景的标识信息在预设数据库中查找获得该总金额以及各个账户所占有的金额,将获取到的每一个账户所占有的金额除以总金额即得到各个账户对应的资产占有比。The asset occupancy ratio refers to the proportion of the assets of the first business scenario occupied by each account in the total assets of the first business scenario. Specifically, the total share of the first service scenario and the share occupied by each account in the first service scenario may be obtained, where the asset occupancy ratio may be divided by the share of the first service scenario occupied by each account. The total share of the first service scenario is obtained. Preferably, the total share of each service scenario is associated with the share occupied by each account in the service scenario, and is stored in a preset database, directly according to the first service scenario. The identification information is found in the preset database to obtain the total share and the share occupied by each account, and the share of each account obtained by dividing the obtained share by the total share is obtained by the account share ratio corresponding to each account; or, Obtaining a total amount of the first service scenario and an amount occupied by each account in the first service scenario, where the asset occupancy ratio is divided by the amount of the first service scenario occupied by each account by the first service scenario The total amount is obtained, preferably, the total amount of each business scenario can be accounted for by each account in the business scenario. The amount association is stored in the preset database, and the total amount and the amount occupied by each account are directly found in the preset database according to the identification information of the first business scenario, and the amount occupied by each account is divided. In the total amount, the ratio of assets corresponding to each account is obtained.
在本实施例中,在获得第一差值时,获取第一业务场景中的各个账户对应的资产占有比,以便于根据该资产占有比分配该第一差值。In this embodiment, when the first difference is obtained, the asset occupancy ratio corresponding to each account in the first service scenario is obtained, so as to allocate the first difference according to the asset occupancy ratio.
步骤S40,基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额,并基于所述第一金额更新各个所述账户的账户余额。Step S40: Calculate a first amount corresponding to each account based on the asset occupancy ratio and the first difference, and update an account balance of each of the accounts based on the first amount.
在本实施例中,基于资产占有比以及第一差值计算各个账户对应的第一金额,并基于所述第一金额更新各个所述账户的账户余额,具体包括:将各个账户的资产占有比与第一差值的乘积作为各个账户对应的待补尾差,获取交易后各个账户的当前金额,将各个账户对应的当前金额与待补尾差之和作为账户的金额,其中,该第一金额是指各个账户在补尾差之后的金额。例如,在第一业务场景为缴费、定额支付、分期定额支付、一次性支、分期支付或不定期支付等业务场景时,该第一金额是指该第一业务场景中的各个账户在补缴尾差之后的金额,在第一业务场景为金额赎回、份额赎回等业务场景时,该第一金额是指该第一业务场景中的各个账户应该补充赎回尾差之后的金额。In this embodiment, the first amount corresponding to each account is calculated based on the asset occupancy ratio and the first difference, and the account balance of each account is updated based on the first amount, which specifically includes: occupying an asset share ratio of each account. The product of the first difference is used as the to-be-compensated tail difference corresponding to each account, and the current amount of each account after the transaction is obtained, and the sum of the current amount corresponding to each account and the to-be-compensated difference is used as the amount of the account, wherein the first The amount refers to the amount of each account after the tail difference. For example, when the first business scenario is a payment, a fixed payment, a fixed-rate payment, a one-time payment, an instalment payment, or an irregular payment, the first amount refers to the payment of each account in the first business scenario. The amount after the tail difference, when the first business scenario is a business scenario such as amount redemption and share redemption, the first amount refers to the amount after each account in the first business scenario should be supplemented with the redemption tail difference.
提高本实施例的方案,能够根据第一业务场景的第一总金额及目标总金额,对该第一业务场景中的各个账户进行尾差处理,进而在账管系统的精确度有限情况下,尽可能减少涉及到账户资金的操作引入的误差,在确保用户资产的准确性的同时,还能够确保该第一业务场景对应的信息披露报告的准确性,进而避免目前因交易过程中的尾差而使信息披露报告不准确时,需要业务和IT进行手工核对以及需要向监管层解释该情况的原因,进而能够提高交易处理的效率。The scheme of the embodiment is improved, and each account in the first service scenario is subjected to a tail difference processing according to the first total amount of the first service scenario and the target total amount, and further, when the accuracy of the account management system is limited, Minimize the error introduced by the operation involving the account funds, and ensure the accuracy of the information disclosure report corresponding to the first business scenario while ensuring the accuracy of the user assets, thereby avoiding the current tail difference in the transaction process. When the information disclosure report is inaccurate, it is necessary to manually check the business and IT and explain the reasons for the situation to the regulatory level, thereby improving the efficiency of transaction processing.
本实施例提出的交易尾差处理方法,通过在第一业务场景的交易完成时,获取第一业务场景的第一总金额以及目标总金额,接着计算第一总金额与目标总金额之间的第一差值,而后获取第一业务场景中的各个账户对应的资产占有比,最后基于资产占有比以及第一差值计算各个账户对应的第一金额,并基于第一金额更新各个所述账户的账户余额,能够根据第一业务场景的第一总金额及目标总金额,对该第一业务场景中的各个账户进行尾差处理,进而在账管系统的精确度有限情况下,尽可能减少涉及到账户资金的操作引入的误差,提高用户资产的准确性,以及确保用户资产不会吟到账户资金的操作的误差而受损。The transaction tail difference processing method proposed in this embodiment obtains the first total amount of the first service scenario and the target total amount when the transaction of the first service scenario is completed, and then calculates the relationship between the first total amount and the target total amount. a first difference, and then obtaining an asset share ratio corresponding to each account in the first service scenario, and finally calculating a first amount corresponding to each account based on the asset occupancy ratio and the first difference, and updating each of the accounts based on the first amount The balance of the account can be processed according to the first total amount of the first business scenario and the total amount of the target, and the tail difference processing is performed on each account in the first business scenario, thereby reducing the accuracy of the account management system as much as possible. Errors introduced by operations involving account funds, increased accuracy of user assets, and impaired operations that ensure that user assets do not fall into the operation of account funds.
基于第一实施例,提出本发明交易尾差处理方法的第二实施例,参照图3,在本实施例中,步骤S40包括:Based on the first embodiment, a second embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 3, in the embodiment, step S40 includes:
步骤S41,基于所述资产占有比以及所述第一差值计算各个账户对应的待补尾差;Step S41, calculating, according to the asset occupancy ratio and the first difference, a to-be-compensated tail difference corresponding to each account;
在本实施例中,在获取到各个账户对应资产占有比时,根据该资产占有比以及第一差值计算各个账户对应的待补尾差,具体地,该待补尾差为资产占有比*第一差值。In this embodiment, when the corresponding asset occupation ratio of each account is obtained, the to-be-compensated tail difference corresponding to each account is calculated according to the asset occupancy ratio and the first difference, and specifically, the to-be-compensated tail difference is the asset occupation ratio* The first difference.
步骤S42,基于所述第一业务场景中,各个账户对应的份额及单价计算各个账户的当前金额;Step S42: Calculate the current amount of each account based on the share and unit price corresponding to each account in the first service scenario;
在本实施例中,获取第一业务场景中各个账户对应的份额,以及该第一业务场景对应的单价,并根据各个账户对应的份额及单价计算各个账户的当前金额,具体地,各个账户对应的份额与单价的乘积为对应的各个账户的当前金额。In this embodiment, the share corresponding to each account in the first service scenario and the unit price corresponding to the first service scenario are obtained, and the current amount of each account is calculated according to the share and unit price corresponding to each account. Specifically, each account corresponds to The product of the share and the unit price is the current amount of each account.
步骤S43,基于所述待补尾差以及当前金额计算各个所述账户对应的第一金额。Step S43, calculating a first amount corresponding to each of the accounts based on the to-be-compensated tail difference and the current amount.
在本实施例中,在获得各个账户的当前金额以及对应的待补尾差时,基于该待补尾差以及当前金额计算各个账户对应的第一金额,具体地,该第一金额为对应账户的待补尾差与该账户当前金额之和。In this embodiment, when the current amount of each account and the corresponding to-be-sufficient difference are obtained, the first amount corresponding to each account is calculated based on the to-be-completed difference and the current amount. Specifically, the first amount is a corresponding account. The sum of the pending tail difference and the current amount of the account.
本实施例提出的交易尾差处理方法,通过基于资产占有比以及第一差值计算各个账户对应的待补尾差,接着基于第一业务场景中,各个账户对应的份额及单价计算各个账户的当前金额,而后基于待补尾差以及当前金额计算各个账户对应的第一金额,实现了根据各个账户对应的资产占有比、第一差值准确的计算第一金额,进而对该第一业务场景中的各个账户进行尾差处理,在账管系统的精确度有限情况下,尽可能减少涉及到账户资金的操作引入的误差,进一步提高用户资产的准确性。The transaction tail difference processing method proposed in this embodiment calculates the to-be-compensated tail difference corresponding to each account based on the asset occupancy ratio and the first difference, and then calculates each account based on the share and unit price of each account in the first service scenario. The current amount, and then the first amount corresponding to each account is calculated based on the to-be-completed difference and the current amount, and the first amount is accurately calculated according to the asset occupancy ratio and the first difference corresponding to each account, and then the first business scenario is further Each account in the account is subjected to tail difference processing. When the accuracy of the account management system is limited, the error introduced by the operation involving the account funds is minimized, and the accuracy of the user assets is further improved.
基于第一实施例,提出本发明交易尾差处理方法的第三实施例,参照图4,在本实施例中,步骤S30包括:Based on the first embodiment, a third embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 4, in the embodiment, step S30 includes:
步骤S31,确定所述第一差值是否大于预设差值;Step S31, determining whether the first difference is greater than a preset difference;
其中,预设差值可以根据实际需求进行合理设置,例如,预设差值可以设置为0.01元。The preset difference can be reasonably set according to actual needs. For example, the preset difference can be set to 0.01 yuan.
在本实施例中,通过确定第一差值是否大于预设差值,判断当前是否需要对交易后产生的尾差进行处理。In this embodiment, by determining whether the first difference is greater than the preset difference, it is determined whether it is necessary to process the tail difference generated after the transaction.
步骤S32,在所述第一差值大于预设差值时,获取所述第一业务场景中的各个账户对应的资产占有比。In step S32, when the first difference is greater than the preset difference, the asset occupation ratio corresponding to each account in the first service scenario is obtained.
在本实施例中,在确定第一差值大于预设差值时,当前交易过程中产生的尾差需要进行处理,因此,获取第一业务场景中各个账户对应的资产占有比,以便于通过该资产占有比对各个账户进行尾差处理,In this embodiment, when it is determined that the first difference is greater than the preset difference, the tail difference generated in the current transaction process needs to be processed. Therefore, the asset occupation ratio corresponding to each account in the first service scenario is obtained, so as to facilitate The asset possesses the tail difference processing for each account.
其中,资产占有比是指各个账户所占有的该第一业务场景的资产在该第一业务场景的总资产中所占的比例,具体的,该资产占有比可以通过各个账户所占有的该第一业务场景的份额除以该第一业务场景的总份额得到,或者,通过各个账户所占有的该第一业务场景的金额除以该第一业务场景的总金额得到。The asset occupancy ratio refers to the proportion of the assets of the first business scenario occupied by each account in the total assets of the first business scenario. Specifically, the asset possession ratio can be occupied by each account. The share of a service scenario is obtained by dividing the total share of the first service scenario, or by the amount of the first service scenario occupied by each account divided by the total amount of the first service scenario.
本实施例提出的交易尾差处理方法,通过确定第一差值是否大于预设差值,接着在第一差值大于预设差值时,获取第一业务场景中的各个账户对应的资产占有比,实现了在第一差值大于预设差值时对交易产生的尾差进行处理,避免尾差过小或者不存在时进行尾差处理,而影响交易的效率。The transaction tail difference processing method in this embodiment determines whether the first difference is greater than the preset difference, and then obtains the asset possession corresponding to each account in the first service scenario when the first difference is greater than the preset difference. Compared, the tail difference generated by the transaction is processed when the first difference is greater than the preset difference, and the tail difference processing is avoided when the tail difference is too small or does not exist, thereby affecting the efficiency of the transaction.
基于第一实施例,提出本发明交易尾差处理方法的第四实施例,参照图5,在本实施例中,步骤S10包括:Based on the first embodiment, a fourth embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 5, in the embodiment, step S10 includes:
步骤S11,获取当前第一业务场景对应的总份额以及单价;Step S11: Obtain a total share and a unit price corresponding to the current first service scenario;
在本实施例中,在第一业务场景的交易完成时,获取当前第一业务场景对应的总份额以及单价。例如,在第一业务场景的单价更新时,根据第一业务场景当前的交易请求进行交易处理,获取交易处理之后第一业务场景对应的总份额。其中,第一业务场景的单价是指更新后的单价。In this embodiment, when the transaction of the first service scenario is completed, the total share and the unit price corresponding to the current first service scenario are obtained. For example, when the unit price of the first service scenario is updated, the transaction processing is performed according to the current transaction request of the first service scenario, and the total share corresponding to the first service scenario after the transaction processing is obtained. The unit price of the first service scenario refers to the updated unit price.
步骤S12,基于所述总份额及所述单价计算所述第一总金额。Step S12, calculating the first total amount based on the total share and the unit price.
在本实施例中,基于总份额及单价计算第一总金额具体是指:将总份额与单价乘积作为第一总金额。In this embodiment, calculating the first total amount based on the total share and the unit price specifically means: the product of the total share and the unit price as the first total amount.
本实施例提出的交易尾差处理方法,通过获取当前第一业务场景对应的总份额以及单价,接着基于总份额及单价计算第一总金额,实现了根据第一业务场景的总份额及单价准确的得到第一总金额,能够准确的得到该第一总金额,进而提高了尾差处理过程中第一差值的准确性,进一步提高了为差处理后用户资产的准确性。The transaction tail difference processing method proposed in this embodiment obtains the total share and the unit price corresponding to the current first service scenario, and then calculates the first total amount based on the total share and the unit price, thereby realizing the accurate total share and unit price according to the first service scenario. The first total amount is obtained, and the first total amount can be accurately obtained, thereby improving the accuracy of the first difference in the process of the tail difference processing, and further improving the accuracy of the user assets after the difference processing.
基于第一实施例,提出本发明交易尾差处理方法的第五实施例,参照图6,在本实施例中,在步骤S40之后,该交易尾差处理方法还包括:Based on the first embodiment, a fifth embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 6, in the embodiment, after the step S40, the transaction tail difference processing method further includes:
步骤S50,在接收到所述第一业务场景对应的第一交易请求时,获取所述第一交易请求对应的第二金额;Step S50: Acquire a second amount corresponding to the first transaction request when receiving the first transaction request corresponding to the first service scenario;
其中,第二金额是指第一交易请求对应的账户更新后的账户余额。The second amount refers to the account balance after the account corresponding to the first transaction request is updated.
在本实施例中,在接收到第一业务场景对应的第一交易请求时,获取第一交易请求对应的第二金额,以根据更新后的账户余额基于第一交易请求进行交易,确保交易的准确性。In this embodiment, when receiving the first transaction request corresponding to the first service scenario, acquiring a second amount corresponding to the first transaction request, to perform a transaction based on the first transaction request according to the updated account balance, and ensuring the transaction. accuracy.
步骤S60,基于所述第二金额对所述第一交易请求对应的账户进行交易操作。Step S60: Perform a transaction operation on the account corresponding to the first transaction request based on the second amount.
在本实施例中,在获取到第二金额时,基于第二金额对第一交易请求对应的账户进行交易操作,以根据更新后的账户余额进行交易,确保交易的准确性。In this embodiment, when the second amount is acquired, a transaction operation is performed on the account corresponding to the first transaction request based on the second amount, so as to perform transactions according to the updated account balance, and the accuracy of the transaction is ensured.
本实施例提出的交易尾差处理方法,通过在接收到第一业务场景对应的第一交易请求时,获取第一交易请求对应的第二金额,接着基于第二金额对第一交易请求对应的账户进行交易操作,以使第一业务场景后续根据更新后各个账户的账户余额进行交易,进而避免再次出现误差,提高交易的准确性及效率。The transaction tail difference processing method of the present embodiment, when receiving the first transaction request corresponding to the first service scenario, acquiring the second amount corresponding to the first transaction request, and then corresponding to the first transaction request based on the second amount The account performs a transaction operation, so that the first business scenario is subsequently traded according to the account balance of each account after the update, thereby avoiding recurrence of errors and improving the accuracy and efficiency of the transaction.
基于上述实施例,提出本发明交易尾差处理方法的第六实施例,参照图7,在本实施例中,该交易尾差处理方法还包括:Based on the foregoing embodiment, a sixth embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 7, in this embodiment, the transaction tail difference processing method further includes:
步骤S70,在第二业务场景对应的单价更新、且当前存在第二交易请求时,对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额;Step S70: Perform a pre-transaction operation on the account to be traded corresponding to the second transaction request when the unit price corresponding to the second service scenario is updated and the second transaction request currently exists, to determine the account to be traded after the pre-transaction Whether the remaining amount is less than the preset amount;
其中,第二业务场景包括金额赎回、份额赎回、离职以及计划外转等业务场景中的一个或多个。第二交易请求包括在单价更新之前第二业务场景中未处理的交易请求,以及第二业务场景的单价更新之后接收到第二业务场景的交易请求,具体地,该第二交易请求包括用户输入的交易份额或交易金额。The second business scenario includes one or more of a business scenario such as amount redemption, share redemption, resignation, and planned outbound. The second transaction request includes a transaction request that is not processed in the second service scenario before the unit price update, and a transaction request that receives the second service scenario after the unit price update of the second service scenario, specifically, the second transaction request includes user input Trading share or transaction amount.
预设金额是指小于该预设金额时,无法对该账户进行相应的交易的最小金额,该预设金额可以根据实际进行合理的设置,例如,该预设金额可设置为0.01元。The preset amount refers to the minimum amount that cannot be correspondingly traded to the account when the preset amount is less than the preset amount. The preset amount can be reasonably set according to the actual situation. For example, the preset amount can be set to 0.01 yuan.
在本实施例中,在第二业务场景对应的单价更新后,若当前存在第二交易请求,则对该第二交易请求对应的待交易账户进行预交易操作,得到预交易后该待交易账户的剩余金额,并判断该剩余金额是否小于预设金额。In this embodiment, after the unit price corresponding to the second service scenario is updated, if there is currently a second transaction request, the pre-transaction operation is performed on the account to be traded corresponding to the second transaction request, and the account to be traded after the pre-transaction is obtained. The remaining amount and determine whether the remaining amount is less than the preset amount.
例如,预设金额为0.01元时,若该第二交易请求为赎回请求,在预交易后该待交易账户的剩余金额小于该预设金额,即小于0.01元,该剩余金额由于过小而无法再次被赎回,进而导致该待交易账户始终存在该剩余金额,进而造成用户的资产无法全部被赎回,导致用户资产受损。For example, when the preset amount is 0.01 yuan, if the second transaction request is a redemption request, the remaining amount of the to-be-traded account after the pre-transaction is less than the preset amount, that is, less than 0.01 yuan, and the remaining amount is too small. Can not be redeemed again, resulting in the remaining amount of the account to be traded, resulting in the user's assets can not be redeemed, resulting in damage to the user's assets.
步骤S80,在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作。Step S80: When the remaining amount is less than the preset amount, the total share of the second service scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
在本实施例中。在剩余金额小于预设金额时,将待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作,即将交易前该待交易账户的总份额进行全部交易,以使交易后该待交易账户的剩余金额清零,以保证该待交易账户对应的用户能够将资产全部赎回。In this embodiment. When the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as the transaction share, and the total share of the account to be traded before the transaction is all transactions, so that the transaction is to be traded after the transaction. The remaining amount of the account is cleared to ensure that the user corresponding to the account to be traded can redeem the assets.
在一实施例中,该步骤S80可替换为在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总金额作为交易份额进行交易操作。In an embodiment, the step S80 may be replaced by performing a transaction operation by using the total amount of the second service scenario corresponding to the to-be-traded account as the transaction share when the remaining amount is less than the preset amount.
本实施例提出的交易尾差处理方法,通过在第二业务场景对应的单价更新、且当前存在第二交易请求时,对第二交易请求对应的待交易账户进行预交易操作,以确定预交易后待交易账户的剩余金额是否小于预设金额,接着在剩余金额小于预设金额时,将待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作,能够在剩余金额小于预设金额时将待交易账户的总份额全部交易,以保证交易后该待交易账户中不存在剩余资产,能够避免交易后该待交易账户中存在无法再次交易的剩余资产而导致用户资产受损的情况发生。The transaction tail difference processing method proposed in this embodiment performs a pre-transaction operation on the to-be-traded account corresponding to the second transaction request to determine the pre-transaction by updating the unit price corresponding to the second service scenario and currently having the second transaction request. Whether the remaining amount of the post-trade account is less than the preset amount, and then when the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as the transaction share, and the remaining amount is less than the preset amount. When the amount is used, all the total shares of the trading account will be traded to ensure that there is no remaining assets in the to-be-traded account after the transaction, and it is possible to avoid the situation where the remaining assets that cannot be traded again exist in the to-be-traded account after the transaction, and the user assets are damaged. occur.
基于第六实施例,提出本发明交易尾差处理方法的第七实施例,参照图8,在本实施例中,步骤S70包括:Based on the sixth embodiment, a seventh embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 8, in this embodiment, step S70 includes:
步骤S71,获取所述第二交易请求对应的输入金额以及所述待交易账户对应的第二业务场景的总份额;Step S71, acquiring an input amount corresponding to the second transaction request and a total share of the second service scenario corresponding to the to-be-traded account;
在本实施例中,在第二业务场景对应的单价更新、且当前存在第二交易请求时,获取第二交易请求对应的输入金额以及待交易账户对应的第二业务场景的总份额,该总份额是指该待交易账户所持有的该第二业务场景的份额。一般情况下,第二业务场景对应的标识与该第二业务场景下的所有账户的账户信息关联存储在数据库中,其中,账户信息包括账户名、该账户所持有的该第二业务场景的份额等信息,在第二业务场景对应的单价更新、且当前存在第二交易请求时,可根据该第二业务场景对应的标识以及第二交易请求对应的待交易账户、在数据库中查找到该待交易账户所持有的该第二业务场景的份额即待交易账户对应的第二业务场景的总份额。In this embodiment, when the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, the input amount corresponding to the second transaction request and the total share of the second service scenario corresponding to the account to be traded are acquired, and the total The share refers to the share of the second business scenario held by the account to be traded. In general, the identifier corresponding to the second service scenario is stored in the database in association with the account information of all the accounts in the second service scenario, where the account information includes the account name and the second service scenario held by the account. The information such as the share, when the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, the identifier corresponding to the second service scenario and the account to be traded corresponding to the second transaction request may be found in the database. The share of the second service scenario held by the transaction account is the total share of the second service scenario corresponding to the account to be traded.
步骤S72,基于所述输入金额、所述第二业务场景的单价以及所述总份额计算所述剩余金额;Step S72, calculating the remaining amount based on the input amount, the unit price of the second service scenario, and the total share;
在本实施例中,在获取到输入金额以及总份额时,根据第二业务场景当前的单价、输入金额以及总份额计算预交易后的剩余金额。In this embodiment, when the input amount and the total share are acquired, the remaining amount after the pre-transaction is calculated according to the current unit price, the input amount, and the total share of the second business scenario.
具体地,该剩余金额=单价*总份额-输入金额。Specifically, the remaining amount = unit price * total share - input amount.
步骤S73,确定所述剩余金额是否小于预设金额。Step S73, determining whether the remaining amount is less than a preset amount.
其中,预设金额是指小于该预设金额时,无法对该账户进行相应的交易的最小金额,该预设金额可以根据实际进行合理的设置,例如,该预设金额可设置为0.01元。The preset amount refers to a minimum amount that cannot be corresponding to the transaction when the preset amount is less than the preset amount, and the preset amount may be reasonably set according to actual conditions, for example, the preset amount may be set to 0.01 yuan.
在本实施例中,在计算得到剩余金额时,确定该剩余金额是否小于预设金额,以便于选择该第二交易请求对应的交易方式。In this embodiment, when the remaining amount is calculated, it is determined whether the remaining amount is less than a preset amount, so as to select a transaction mode corresponding to the second transaction request.
本实施例提出的交易尾差处理方法,通过获取第二交易请求对应的输入金额以及待交易账户对应的第二业务场景的总份额,接着基于输入金额、第二业务场景的单价以及总份额计算剩余金额,而后确定剩余金额是否小于预设金额,实现了根据输入金额、单价以及总份额计算该待交易账户的剩余金额,进而能够根据该剩余金额准确的判断是否需要将待交易账户的总份额进行全部交易,以保证交易后该待交易账户中不存在剩余资产,能够避免交易后该待交易账户中存在无法再次交易的剩余资产而导致用户资产受损的情况发生,进一步提高了交易的准确性及效率。The transaction tail difference processing method proposed in this embodiment obtains the input amount corresponding to the second transaction request and the total share of the second service scenario corresponding to the account to be traded, and then calculates the unit price based on the input amount, the second business scenario, and the total share. The remaining amount is then determined whether the remaining amount is less than the preset amount, and the remaining amount of the account to be traded is calculated according to the input amount, the unit price, and the total share, thereby being able to accurately determine whether the total share of the account to be traded needs to be determined according to the remaining amount. All transactions are carried out to ensure that there are no remaining assets in the account to be traded after the transaction, which can avoid the occurrence of damage to the user assets caused by the remaining assets that cannot be traded again after the transaction, which further improves the accuracy of the transaction. Sex and efficiency.
基于第七实施例,提出本发明交易尾差处理方法的第八实施例,参照图9,在本实施例中,步骤S72包括:Based on the seventh embodiment, an eighth embodiment of the transaction tail difference processing method of the present invention is proposed. Referring to FIG. 9, in this embodiment, step S72 includes:
步骤S721,基于所述第二业务场景的单价以及所述总份额计算所述待交易账户对应的第二总金额;Step S721: Calculate, according to the unit price of the second service scenario and the total share, a second total amount corresponding to the account to be traded;
在本实施例中,在获取到待交易账户的总份额时,根据该第二业务场景的单价以及待交易账户的总份额计算该待交易账户的第二总金额,即待交易账户所持有的该第二业务场景的总金额。具体地,该第二总金额=单价*总份额。In this embodiment, when the total share of the account to be traded is acquired, the second total amount of the account to be traded is calculated according to the unit price of the second service scenario and the total share of the account to be traded, that is, the account to be traded The total amount of the second business scenario. Specifically, the second total amount = unit price * total share.
步骤S722,计算所述第二总金额与所述输入金额之间的第二差值,并将所述第二差值作为所述剩余金额。Step S722, calculating a second difference between the second total amount and the input amount, and using the second difference as the remaining amount.
在本实施例中,在获得第二总金额时,计算该第二总金额与第二交易请求对应的输入金额之间的第二差值,并将该第二差值作为剩余金额。容易理解,若该第二交易请求中仅包含该第二业务场景对应的输入份额,则基于该输入份额以及第二业务场景的单价计算输入金额,具体地,输入金额=输入份额*单价。In this embodiment, when the second total amount is obtained, a second difference between the second total amount and the input amount corresponding to the second transaction request is calculated, and the second difference is used as the remaining amount. It is easy to understand that if the second transaction request includes only the input share corresponding to the second service scenario, the input amount is calculated based on the input share and the unit price of the second service scenario, specifically, the input amount = input share * unit price.
本实施例提出的交易尾差处理方法,通过基于第二业务场景的单价以及总份额计算待交易账户对应的第二总金额,接着计算第二总金额与输入金额之间的第二差值,并将第二差值作为剩余金额,实现了根据第二总金额以及输入金额准确的计算剩余金额,进而能够根据该剩余金额准确的判断是否需要将待交易账户的总份额进行全部交易,以保证交易后该待交易账户中不存在剩余资产,进一步提高了交易的准确性及效率。The transaction tail difference processing method proposed in this embodiment calculates a second total amount corresponding to the transaction account based on the unit price and the total share of the second service scenario, and then calculates a second difference between the second total amount and the input amount. And the second difference is used as the remaining amount, and the remaining amount is accurately calculated according to the second total amount and the input amount, so that it is possible to accurately determine whether the total share of the account to be traded needs to be all transactions according to the remaining amount, so as to ensure After the transaction, there is no remaining assets in the to-be-traded account, which further improves the accuracy and efficiency of the transaction.
本发明还提供一种计算机可读存储介质,在本实施例中,计算机可读存储介质上存储有交易尾差处理程序,所述交易尾差处理程序被所述处理器执行时实现上述交易尾差处理方法的步骤。The present invention also provides a computer readable storage medium. In this embodiment, a computer readable storage medium stores a transaction tail difference processing program, and when the transaction tail difference processing program is executed by the processor, the transaction tail is implemented. The steps of the difference processing method.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, item, or system. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in a process, method, article, or system that includes the element, without further limitation.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (20)

  1. 一种交易尾差处理方法,其特征在于,所述交易尾差处理方法包括以下步骤: A transaction tail difference processing method, characterized in that the transaction tail difference processing method comprises the following steps:
    在第一业务场景的交易完成时,获取所述第一业务场景的第一总金额以及目标总金额;Obtaining, when the transaction of the first service scenario is completed, the first total amount of the first service scenario and the total amount of the target;
    计算所述第一总金额与所述目标总金额之间的第一差值;Calculating a first difference between the first total amount and the target total amount;
    获取所述第一业务场景中的各个账户对应的资产占有比;Obtaining an asset occupation ratio corresponding to each account in the first service scenario;
    基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额,并基于所述第一金额更新各个所述账户的账户余额。Calculating a first amount corresponding to each account based on the asset occupancy ratio and the first difference, and updating an account balance of each of the accounts based on the first amount.
  2. 如权利要求1所述的交易尾差处理方法,其特征在于,所述交易尾差处理方法还包括:The transaction tail difference processing method according to claim 1, wherein the transaction tail difference processing method further comprises:
    在第二业务场景对应的单价更新、且当前存在第二交易请求时,对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额;When the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, performing a pre-transaction operation on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is Less than the preset amount;
    在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作。When the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
  3. 如权利要求2所述的交易尾差处理方法,其特征在于,所述对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额的步骤包括:The transaction tail difference processing method according to claim 2, wherein said pre-transaction operation is performed on an account to be traded corresponding to said second transaction request to determine whether a remaining amount of said account to be traded after said pre-transaction is The steps less than the preset amount include:
    获取所述第二交易请求对应的输入金额以及所述待交易账户对应的第二业务场景的总份额;Obtaining an input amount corresponding to the second transaction request and a total share of the second service scenario corresponding to the to-be-traded account;
    基于所述输入金额、所述第二业务场景的单价以及所述总份额计算所述剩余金额;Calculating the remaining amount based on the input amount, the unit price of the second business scenario, and the total share;
    确定所述剩余金额是否小于预设金额。It is determined whether the remaining amount is less than a preset amount.
  4. 如权利要求3所述的交易尾差处理方法,其特征在于,所述基于所述输入金额、所述第二业务场景的单价以及所述总份额计算剩余金额的步骤包括:The transaction tail difference processing method according to claim 3, wherein the calculating the remaining amount based on the input amount, the unit price of the second service scenario, and the total share comprises:
    基于所述第二业务场景的单价以及所述总份额计算所述待交易账户对应的第二总金额;Calculating, according to the unit price of the second service scenario and the total share, a second total amount corresponding to the account to be traded;
    计算所述第二总金额与所述输入金额之间的第二差值,并将所述第二差值作为所述剩余金额。Calculating a second difference between the second total amount and the input amount, and using the second difference as the remaining amount.
  5. 如权利要求1所述的交易尾差处理方法,其特征在于,所述基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额的步骤包括:The transaction tail difference processing method according to claim 1, wherein the step of calculating the first amount corresponding to each account based on the asset occupancy ratio and the first difference comprises:
    基于所述资产占有比以及所述第一差值计算各个账户对应的待补尾差;Calculating a to-be-compensated tail difference corresponding to each account based on the asset occupancy ratio and the first difference value;
    基于所述第一业务场景中,各个账户对应的份额及单价计算各个账户的当前金额;Calculating a current amount of each account based on the share and unit price corresponding to each account in the first service scenario;
    基于所述待补尾差以及当前金额计算各个所述账户对应的第一金额。Calculating a first amount corresponding to each of the accounts based on the to-be-compensated tail difference and the current amount.
  6. 如权利要求5所述的交易尾差处理方法,其特征在于,所述交易尾差处理方法还包括:The transaction tail difference processing method according to claim 5, wherein the transaction tail difference processing method further comprises:
    在第二业务场景对应的单价更新、且当前存在第二交易请求时,对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额;When the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, performing a pre-transaction operation on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is Less than the preset amount;
    在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作。When the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
  7. 如权利要求6所述的交易尾差处理方法,其特征在于,所述对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额的步骤包括:The transaction tail difference processing method according to claim 6, wherein the pre-transaction operation is performed on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is The steps less than the preset amount include:
    获取所述第二交易请求对应的输入金额以及所述待交易账户对应的第二业务场景的总份额;Obtaining an input amount corresponding to the second transaction request and a total share of the second service scenario corresponding to the to-be-traded account;
    基于所述输入金额、所述第二业务场景的单价以及所述总份额计算所述剩余金额;Calculating the remaining amount based on the input amount, the unit price of the second business scenario, and the total share;
    确定所述剩余金额是否小于预设金额。It is determined whether the remaining amount is less than a preset amount.
  8. 如权利要求7所述的交易尾差处理方法,其特征在于,所述基于所述输入金额、所述第二业务场景的单价以及所述总份额计算剩余金额的步骤包括:The transaction tail difference processing method according to claim 7, wherein the calculating the remaining amount based on the input amount, the unit price of the second service scenario, and the total share comprises:
    基于所述第二业务场景的单价以及所述总份额计算所述待交易账户对应的第二总金额;Calculating, according to the unit price of the second service scenario and the total share, a second total amount corresponding to the account to be traded;
    计算所述第二总金额与所述输入金额之间的第二差值,并将所述第二差值作为所述剩余金额。Calculating a second difference between the second total amount and the input amount, and using the second difference as the remaining amount.
  9. 如权利要求1所述的交易尾差处理方法,其特征在于,所述获取所述第一业务场景中的各个账户对应的资产占有比的步骤包括:The transaction tail difference processing method according to claim 1, wherein the step of acquiring an asset occupancy ratio corresponding to each account in the first service scenario comprises:
    确定所述第一差值是否大于预设差值;Determining whether the first difference is greater than a preset difference;
    在所述第一差值大于预设差值时,获取所述第一业务场景中的各个账户对应的资产占有比。When the first difference is greater than the preset difference, the asset occupation ratio corresponding to each account in the first service scenario is obtained.
  10. 如权利要求9所述的交易尾差处理方法,其特征在于,所述交易尾差处理方法还包括:The transaction tail difference processing method according to claim 9, wherein the transaction tail difference processing method further comprises:
    在第二业务场景对应的单价更新、且当前存在第二交易请求时,对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额;When the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, performing a pre-transaction operation on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is Less than the preset amount;
    在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作。When the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
  11. 如权利要求10所述的交易尾差处理方法,其特征在于,所述对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额的步骤包括:The transaction tail difference processing method according to claim 10, wherein the pre-transaction operation is performed on the account to be trade corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is The steps less than the preset amount include:
    获取所述第二交易请求对应的输入金额以及所述待交易账户对应的第二业务场景的总份额;Obtaining an input amount corresponding to the second transaction request and a total share of the second service scenario corresponding to the to-be-traded account;
    基于所述输入金额、所述第二业务场景的单价以及所述总份额计算所述剩余金额;Calculating the remaining amount based on the input amount, the unit price of the second business scenario, and the total share;
    确定所述剩余金额是否小于预设金额。It is determined whether the remaining amount is less than a preset amount.
  12. 如权利要求11所述的交易尾差处理方法,其特征在于,所述基于所述输入金额、所述第二业务场景的单价以及所述总份额计算剩余金额的步骤包括:The transaction tail difference processing method according to claim 11, wherein the calculating the remaining amount based on the input amount, the unit price of the second service scenario, and the total share comprises:
    基于所述第二业务场景的单价以及所述总份额计算所述待交易账户对应的第二总金额;Calculating, according to the unit price of the second service scenario and the total share, a second total amount corresponding to the account to be traded;
    计算所述第二总金额与所述输入金额之间的第二差值,并将所述第二差值作为所述剩余金额。Calculating a second difference between the second total amount and the input amount, and using the second difference as the remaining amount.
  13. 如权利要求1所述的交易尾差处理方法,其特征在于,所述获取所述第一业务场景的第一总金额的步骤包括:The transaction tail difference processing method according to claim 1, wherein the step of acquiring the first total amount of the first service scenario comprises:
    获取当前第一业务场景对应的总份额以及单价;Obtain the total share and unit price corresponding to the current first service scenario;
    基于所述总份额及所述单价计算所述第一总金额。The first total amount is calculated based on the total share and the unit price.
  14. 如权利要求13所述的交易尾差处理方法,其特征在于,所述交易尾差处理方法还包括:The transaction tail difference processing method according to claim 13, wherein the transaction tail difference processing method further comprises:
    在第二业务场景对应的单价更新、且当前存在第二交易请求时,对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额;When the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, performing a pre-transaction operation on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is Less than the preset amount;
    在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作。When the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
  15. 如权利要求14所述的交易尾差处理方法,其特征在于,所述对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额的步骤包括:The transaction tail difference processing method according to claim 14, wherein the pre-transaction operation is performed on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is The steps less than the preset amount include:
    获取所述第二交易请求对应的输入金额以及所述待交易账户对应的第二业务场景的总份额;Obtaining an input amount corresponding to the second transaction request and a total share of the second service scenario corresponding to the to-be-traded account;
    基于所述输入金额、所述第二业务场景的单价以及所述总份额计算所述剩余金额;Calculating the remaining amount based on the input amount, the unit price of the second business scenario, and the total share;
    确定所述剩余金额是否小于预设金额。It is determined whether the remaining amount is less than a preset amount.
  16. 如权利要求15所述的交易尾差处理方法,其特征在于,所述基于所述输入金额、所述第二业务场景的单价以及所述总份额计算剩余金额的步骤包括:The transaction tail difference processing method according to claim 15, wherein the calculating the remaining amount based on the input amount, the unit price of the second service scenario, and the total share comprises:
    基于所述第二业务场景的单价以及所述总份额计算所述待交易账户对应的第二总金额;Calculating, according to the unit price of the second service scenario and the total share, a second total amount corresponding to the account to be traded;
    计算所述第二总金额与所述输入金额之间的第二差值,并将所述第二差值作为所述剩余金额。Calculating a second difference between the second total amount and the input amount, and using the second difference as the remaining amount.
  17. 如权利要求1所 述的交易尾差处理方法,其特征在于,所述基于所述资产占有比以及所述第一差值计算各个账户对应的第一金额,并基于所述第一金额更新各个所述账户的账户余额的步骤之后,所述交易尾差处理方法还包括:As in claim 1 The transaction tail difference processing method is characterized in that the first amount corresponding to each account is calculated based on the asset occupancy ratio and the first difference, and an account of each account is updated based on the first amount After the step of the balance, the transaction tail difference processing method further includes:
    在接收到所述第一业务场景对应的第一交易请求时,获取所述第一交易请求对应的第二金额;Obtaining a second amount corresponding to the first transaction request when receiving the first transaction request corresponding to the first service scenario;
    基于所述第二金额对所述第一交易请求对应的账户进行交易操作。And performing a transaction operation on the account corresponding to the first transaction request based on the second amount.
  18. 如权利要求17所述的交易尾差处理方法,其特征在于,所述交易尾差处理方法还包括:The transaction tail difference processing method according to claim 17, wherein the transaction tail difference processing method further comprises:
    在第二业务场景对应的单价更新、且当前存在第二交易请求时,对所述第二交易请求对应的待交易账户进行预交易操作,以确定预交易后所述待交易账户的剩余金额是否小于预设金额;When the unit price corresponding to the second service scenario is updated, and the second transaction request currently exists, performing a pre-transaction operation on the account to be traded corresponding to the second transaction request to determine whether the remaining amount of the account to be traded after the pre-transaction is Less than the preset amount;
    在所述剩余金额小于预设金额时,将所述待交易账户对应的第二业务场景的总份额作为交易份额进行交易操作。When the remaining amount is less than the preset amount, the total share of the second business scenario corresponding to the account to be traded is used as a transaction share for the transaction operation.
  19. 一种交易尾差处理装置,其特征在于,所述交易尾差处理装置包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的交易尾差处理程序,所述交易尾差处理程序被所述处理器执行时实现如权利要求1所述的方法的步骤。A transaction tail difference processing apparatus, characterized in that: the transaction tail difference processing apparatus comprises: a memory, a processor, and a transaction tail difference processing program stored on the memory and operable on the processor, The steps of the method of claim 1 are implemented when the transaction handoff handler is executed by the processor.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有交易尾差处理程序,所述交易尾差处理程序被处理器执行时实现如权利要求1所述的交易尾差处理方法的步骤。A computer readable storage medium, characterized in that the computer readable storage medium stores a transaction tail difference processing program, and the transaction tail difference processing program is executed by a processor to implement the transaction tail according to claim 1. The steps of the difference processing method.
PCT/CN2018/076213 2017-06-26 2018-02-11 Transaction tail difference processing method, apparatus and computer readable storage medium WO2019000968A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710497672.1 2017-06-26
CN201710497672.1A CN109118357A (en) 2017-06-26 2017-06-26 Transaction tail difference processing method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019000968A1 true WO2019000968A1 (en) 2019-01-03

Family

ID=64740950

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076213 WO2019000968A1 (en) 2017-06-26 2018-02-11 Transaction tail difference processing method, apparatus and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN109118357A (en)
WO (1) WO2019000968A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020954B (en) * 2019-03-26 2023-09-05 创新先进技术有限公司 Revenue distribution method and device and computer equipment
CN110852731A (en) * 2019-11-12 2020-02-28 腾讯科技(深圳)有限公司 Fund transaction method and related device
CN117372166B (en) * 2023-10-26 2024-03-08 北京开科唯识技术股份有限公司 Efficient tail-end distribution processing method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013075A (en) * 2009-09-07 2011-04-13 中国工商银行股份有限公司 Financial product data distributing server and distributing method
CN102467696A (en) * 2010-11-19 2012-05-23 金蝶软件(中国)有限公司 Process control method for articles being processed and system thereof
CN102521713A (en) * 2011-12-28 2012-06-27 用友软件股份有限公司 Data processing device and data processing method
CN103544601A (en) * 2012-07-11 2014-01-29 上海宝钢浦东国际贸易有限公司 Transaction information system and method thereof
JP2015028814A (en) * 2014-10-28 2015-02-12 沖電気工業株式会社 Cash management system and cash management method
CN106485579A (en) * 2016-10-21 2017-03-08 百望股份有限公司 A kind of tax declaration method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013075A (en) * 2009-09-07 2011-04-13 中国工商银行股份有限公司 Financial product data distributing server and distributing method
CN102467696A (en) * 2010-11-19 2012-05-23 金蝶软件(中国)有限公司 Process control method for articles being processed and system thereof
CN102521713A (en) * 2011-12-28 2012-06-27 用友软件股份有限公司 Data processing device and data processing method
CN103544601A (en) * 2012-07-11 2014-01-29 上海宝钢浦东国际贸易有限公司 Transaction information system and method thereof
JP2015028814A (en) * 2014-10-28 2015-02-12 沖電気工業株式会社 Cash management system and cash management method
CN106485579A (en) * 2016-10-21 2017-03-08 百望股份有限公司 A kind of tax declaration method

Also Published As

Publication number Publication date
CN109118357A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
WO2019061614A1 (en) Loan product matching method, apparatus and computer-readable storage medium
WO2018107610A1 (en) Service data processing method, system and device, and computer-readable storage medium
WO2019119618A1 (en) Health insurance product purchase method, apparatus and device, and readable storage medium
WO2018233301A1 (en) Product recommendation method, apparatus, and device, and computer readable storage medium
WO2019061611A1 (en) Marketing campaign management method, apparatus, device, and computer storage medium
WO2019037454A1 (en) Premium payment method, apparatus, device, and readable storage medium
WO2019192085A1 (en) Method, apparatus and device for direct-connected communication between bank and enterprise, and computer-readable storage medium
WO2018205545A1 (en) Data generation method, apparatus, terminal, and computer-readable storage medium
WO2013131444A1 (en) Content sharing method, terminal, server, and system, and computer storage medium
WO2018227880A1 (en) Data comparison method, apparatus and device, and readable storage medium
WO2019037396A1 (en) Account clearing method, device and equipment and storage medium
WO2019000968A1 (en) Transaction tail difference processing method, apparatus and computer readable storage medium
WO2018233351A1 (en) Self-service claim method and device, server, and computer readable storage medium
WO2019174375A1 (en) Interface test method, apparatus and device, and computer-readable storage medium
WO2019153486A1 (en) Customer risk assessment method, apparatus and device, and computer-readable storage medium
WO2019104876A1 (en) Insurance product pushing method and system, terminal, client terminal, and storage medium
WO2014180149A1 (en) Method, system and computer storage medium for handling of account theft in online games
WO2018166314A1 (en) Limit approval method, apparatus and device, and computer-readable storage medium
WO2015196960A1 (en) Method and system for checking security of url for mobile terminal
WO2015144052A1 (en) Method and apparatus for collecting statistics on network information
WO2019062109A1 (en) Method of mounting disk array, android device and storage medium
WO2019109521A1 (en) Identity approval method, apparatus and device for video interview, and readable storage medium
WO2018053963A1 (en) Method and apparatus for upgrading system of smart television
WO2020006837A1 (en) Business card associated supervision method and system, and terminal and readable storage medium
WO2019062102A1 (en) Method of mounting disk array, android device and storage medium

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

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 19.05.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18824222

Country of ref document: EP

Kind code of ref document: A1