CN115471326A - Processing method and device for money allocation, computer equipment and storage medium - Google Patents

Processing method and device for money allocation, computer equipment and storage medium Download PDF

Info

Publication number
CN115471326A
CN115471326A CN202211313939.4A CN202211313939A CN115471326A CN 115471326 A CN115471326 A CN 115471326A CN 202211313939 A CN202211313939 A CN 202211313939A CN 115471326 A CN115471326 A CN 115471326A
Authority
CN
China
Prior art keywords
amount
allocated
value
sum
allocation
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211313939.4A
Other languages
Chinese (zh)
Inventor
顾浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
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 Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211313939.4A priority Critical patent/CN115471326A/en
Publication of CN115471326A publication Critical patent/CN115471326A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

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

Abstract

The embodiment of the application discloses a processing method and a device for money allocation, computer equipment and a storage medium, wherein the processing method comprises the following steps: receiving a request for allocation of an amount of money; acquiring a surplus value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache; if the first amount is less than or equal to the cash back reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value; receiving and responding to the timing task request to refresh the allocated sum of money in the cache; acquiring the allocated sum total value in the cache in real time based on the timing task request, and calculating a new allocated sum residual value and a new allocated sum total value based on the allocated sum total value in the cache during refreshing, the allocated sum residual value and the allocated sum total value acquired in real time respectively; according to the embodiment of the application, the handling efficiency of money cashback business is improved, and the user experience of a client is improved.

Description

Processing method and device for money allocation, computer equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of intelligent financial services, in particular to a processing method and device for money allocation, computer equipment and a storage medium.
Background
With the development of the self-service of the bank, more and more kinds of services can be transacted by customers, with the development of the technology, the customers can participate in various banking activities on platforms such as mobile phones or computers, and the bank correspondingly processes the situation that the customers participate in the banking activities.
Currently, banks initiate some banking activities to cash back cash so as to attract customers to participate in the banking activities, for example, initiating cash back activities such as credit card cash back or cash back of money handling business, the cash back activities initiated by the banks need to support real-time cash back, and the banks need to check whether the cash back activities in the banks have enough funds. However, the existing cash-back mode of the cash-back activity is to carry out cash-back according to the cash-back amount applied by the client, the cash-back amount of the whole cash-back activity is not controlled, a large amount of insufficient cash-back amount occurs when the client applies for cash-back, the client cannot receive the cash-back amount in time, the handling efficiency of the cash-back service is influenced, the handling efficiency of the cash-back service is low, the problem of poor satisfaction of the client is caused, and the loss of the client is easily caused.
Disclosure of Invention
The embodiment of the invention provides a processing method and device for money allocation, computer equipment and a storage medium, which are used for updating the remaining value of the allocated money stored in a database and the total value of the allocated money stored in a preset cache at regular time, so that the total cashback amount of the cashback activity is managed and controlled in real time, the handling efficiency of money cashback business is improved, the user experience of a client is improved, and the stickiness of the client is improved.
The embodiment of the invention provides a processing method for money allocation, which comprises the following steps:
receiving an amount allocation request, the amount allocation request including a first amount to be allocated;
acquiring a surplus value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache;
if the first amount is less than or equal to the cash back amount reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value, wherein the cash back amount reference value is determined based on the allocated amount remaining value and the allocated amount summary value;
receiving a timing task request, and refreshing the allocated sum value in the cache based on the timing task request;
acquiring an allocated sum total value in a cache in real time based on the timing task request, and taking a difference obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum residual value in the database as a new allocated sum residual value stored in the database; and subtracting the difference value of the allocated sum in the cache in the refreshing process from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
An embodiment of the present invention further provides a processing apparatus for allocating an amount of money, including:
a first receiving unit configured to receive an amount allocation request including a first amount to be allocated;
the acquisition unit is used for acquiring the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache;
an allocation unit, configured to allocate an amount based on the amount allocation request and collect the first amount into the allocated amount total value if the first amount is less than or equal to a cash-back amount reference value, where the cash-back amount reference value is determined based on the allocated amount remaining value and the allocated amount total value;
a second receiving unit, configured to receive a timing task request, and refresh the allocated amount summary value in the cache based on the timing task request;
the processing unit is used for acquiring the allocated sum total value in the cache in real time based on the timing task request, and taking a difference value obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum remaining value in the database as a new allocated sum remaining value stored in the database; and subtracting the difference value of the allocated sum in the cache during refreshing from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
In some embodiments of the present invention, there may also be provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the processing method of money allocation as described above.
In some embodiments of the present invention, there may also be provided a computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the steps of the processing method of money allocation as described above.
By adopting the embodiment of the application, the method and the device can receive the money allocation request, wherein the money allocation request comprises the first money to be allocated; then, acquiring a residual value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache; then, if the first amount is less than or equal to a cash-back amount reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value, wherein the cash-back amount reference value is determined based on the allocated amount remaining value and the allocated amount summary value; then, receiving a timing task request, and refreshing the allocated sum value in the cache based on the timing task request; finally, acquiring the allocated sum total value in the cache in real time based on the timing task request, and taking a difference obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum residual value in the database as a new allocated sum residual value stored in the database; and subtracting the difference value of the allocated sum in the cache during refreshing from the allocated sum obtained in real time to serve as a new allocated sum in the cache. According to the embodiment of the application, the surplus value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache are updated regularly, so that the entire cash-returning amount of the cash-returning activity can be managed and controlled in real time, the handling efficiency of the cash-returning service is improved, the user experience of a client is improved, and the stickiness of the client is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method of processing an allocation of money according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a processing device for allocating money according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
In the prior art, a bank can initiate some banking activities to carry out cash cashback so as to attract customers to participate in the banking activities, for example, cash-back activities such as credit card cashback or cash-back of purchase financing business are initiated, the cashback activities initiated by the bank need to support real-time cashback, and the bank needs to check whether the cash-back activities in the bank have enough funds. However, the existing cash-back mode of the cash-back activity is to carry out cash-back according to the cash-back amount applied by the client, the cash-back amount of the whole cash-back activity is not controlled, a large amount of insufficient cash-back amount occurs when the client applies for cash-back, the client cannot receive the cash-back amount in time, the handling efficiency of the cash-back service is influenced, the handling efficiency of the cash-back service is low, the problem of poor satisfaction of the client is caused, and the loss of the client is easily caused.
In order to solve the above problem, embodiments of the present application provide a processing method, an apparatus, a computer device, and a storage medium for allocating money, where a request for allocating money is received; acquiring a residual value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache; if the first amount is less than or equal to the cash-back amount reference value, performing amount allocation based on the amount allocation request, and summarizing the first amount into the allocated amount summary value; receiving and responding to the timing task request to refresh the allocated sum of money in the cache; and acquiring the allocated sum total value in the cache in real time based on the timing task request, and calculating a new allocated sum residual value and a new allocated sum total value based on the allocated sum total value in the cache during refreshing and the allocated sum residual value and the allocated sum total value acquired in real time respectively. According to the embodiment of the application, the residual value of the allocated amount of money stored in the database and the total value of the allocated amount of money stored in the preset cache are updated at regular time, so that the whole amount of money which can be returned to the cash return activity is managed and controlled in real time, the handling efficiency of the money return service is improved, the user experience of a client is improved, and the stickiness of the client is improved.
The embodiment of the application provides a processing method and device for money allocation, computer equipment and a storage medium. Specifically, the processing method for allocating the amount of money according to the embodiment of the present application may be executed by a computer device, where the computer device may be a terminal or a server. The terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like, and may further include a client, which may be an application client, a browser client carrying a control program, or an instant messaging client, and the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform.
The embodiment of the invention provides a processing method and device for money allocation, computer equipment and a storage medium. The following describes a processing method, device, computer device, and storage medium for allocating the amount of money in detail. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a processing method for allocating money according to an embodiment of the present application, and the specific flow may include the following steps 101 to 105:
101, receiving a money allocation request, wherein the money allocation request comprises a first money to be allocated.
In the embodiment of the application, a user can participate in money cashback activity on a user interface of a bank application program, when the activity condition of the user in the bank application program meets the target adjustment set by the money cashback activity, the bank application program determines the cashback money based on the current activity condition of the user to be used as a first money to be allocated, generates a money allocation request based on the first money and sends the money allocation request to a server or computer equipment such as a processing platform of the bank application program; the computer equipment receives the amount allocation request, and extracts the first amount to be allocated carried by the amount allocation request from the amount allocation request.
102, obtaining the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset buffer memory.
In this embodiment of the application, after the step "obtaining the remaining value of the allocated amount stored in the database and the aggregated value of the allocated amount stored in the preset cache", the method may include:
determining a cash back reference value based on the allocated amount remaining value and the allocated amount aggregated value.
In one embodiment, the step of "determining a cash back reference value based on the remaining allocated amount value and the aggregated allocated amount value" may comprise:
and a difference value obtained by subtracting the sum of the allocated amounts from the remaining value of the allocated amount is used as a cash return reference value.
Optionally, in order to determine whether to cash back the amount for the user, after the step "obtaining the remaining allocated amount value stored in the database and the total allocated amount value stored in the preset cache", the method may include:
and if the first amount is larger than the cash-back amount reference value, determining that the request result of the amount allocation request is refusal of the amount allocation request, and returning the request result to the terminal equipment initiating the amount allocation request to prompt that the amount allocation request of the user corresponding to the terminal equipment fails.
In order to be able to determine the type of cashback service that the user proposes for which the request for money allocation is intended, after the step "receiving a request for money allocation", the method may comprise:
acquiring service type information and a service number carried by the money allocation request;
and determining a target money allocation service based on the service type information and the service number.
Further, after the step of "determining a target money allocating service based on the service type information and the service number", the method may include:
and acquiring the residual value of the allocated amount corresponding to the target amount allocation service stored in the database and the total value of the allocated amount corresponding to the target amount allocation service stored in a preset cache.
For example, the first amount to be allocated for a payroll application cashback may be set as ACA, the application cashback amount in the current cache is summarized as ACT, and the persistent activity cashback amount in the database is ARAT. When the computer device receives the request for allocating the amount of money, the computer device may check whether the ACA can be allocated based on the ACT and the ARAT, specifically, when the ACA is not greater than the ARAT-ACT, the amount of money is allocated based on the allocation request, and the user is allocated with the first amount of moneyAnd cashing back and summarizing the first amount into the allocated amount summarizing value. When ACA>And during ARAT-ACT, the shortage of the activity amount capable of carrying out cashback activity can be known, the request result of the amount allocation request is determined to be the refusal of the amount allocation request, and the request result is returned to the terminal equipment initiating the amount allocation request so as to prompt that the amount allocation request of the user corresponding to the terminal equipment fails. Further, the new refund amount of the activity can be set to be ARAT ', the new refund amount is collected to be ACT', and the refund amount obtained in real time is collected to be ACT 1 The cash back amount in the cache is summarized as ACT 2 The computer device refreshes the buffered data by a timed task according to the formula ARAT' = ARAT-ACT 2 ,ACT=ACT 1 –ACT 2 And finishing the refreshing of the cache and the persistence of the total cash return amount.
103, if the first amount is less than or equal to a cash-back reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summarized value, wherein the cash-back reference value is determined based on the allocated amount remaining value and the allocated amount summarized value.
In the embodiment of the application, the computer device may subtract the sum of the allocated amounts from the remaining allocated amount to obtain a difference, and use the difference as the cash back reference value; then, the magnitude relation between the first amount and the cash-back reference value is judged, and at this time, if the first amount is less than or equal to the cash-back reference value, the amount is allocated based on the amount allocation request, and the first amount is collected into the allocated amount collection value. And if the first amount is larger than the cash-back amount reference value, determining that the request result of the amount allocation request is refusal of the amount allocation request, and returning the request result to the terminal equipment initiating the amount allocation request to prompt that the amount allocation request of the user corresponding to the terminal equipment fails.
And 104, receiving a timing task request, and refreshing the allocated sum value in the cache based on the timing task request.
In the embodiment of the application, when the time interval from the current time point to the last time of receiving the timed task request reaches the specified time interval, a new timed task request is received, and the residual value of the allocated money stored in the database and the total value of the allocated money stored in the preset cache are updated based on the new timed task request.
105, acquiring an allocated sum total value in a cache in real time based on the timing task request, and taking a difference value obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum remaining value in the database as a new allocated sum remaining value stored in the database; and subtracting the difference value of the allocated sum in the cache in the refreshing process from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
Based on the above description, the processing method of the amount allocation of the present application will be further described below by way of example. The following description will take an example of the application of the processing method for allocating money in a specific implementation scenario, where the specific application scenario is as follows:
(1) The computer device may receive a monetary allocation request including a first monetary value to be allocated. Specifically, the user may participate in the cash back activity on a user interface of the bank application program, and when an activity condition of the user in the bank application program satisfies a target adjustment set by the cash back activity, the bank application program determines a cash back amount based on a current activity condition of the user, and uses the cash back amount as a first amount to be allocated, generates an amount allocation request based on the first amount, and sends the amount allocation request to a server or a computer device such as a processing platform of the bank application program.
(2) The computer equipment obtains the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache.
(3) The computer device may determine a cash-back reference value based on the remaining allocated amount value and the aggregated allocated amount value, and the computer device may subtract the aggregated allocated amount value from the remaining allocated amount value to obtain a difference value, and use the difference value as the cash-back reference value. Then, the magnitude relation between the first amount and the cash-back reference value is judged, and at this time, if the first amount is less than or equal to the cash-back reference value, the amount is allocated based on the amount allocation request, and the first amount is collected into the allocated amount collection value. And if the first amount is larger than the cash return reference value, determining that the request result of the amount allocation request is refusal of the amount allocation request, and returning the request result to the terminal equipment initiating the amount allocation request to prompt that the amount allocation request of the user corresponding to the terminal equipment fails.
To sum up, the embodiment of the present application provides a processing method for allocating an amount of money, which receives an amount of money allocation request; acquiring a residual value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache; if the first amount is less than or equal to the cash back reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value; and if the first amount is larger than the cash return reference value, determining that the request result of the amount allocation request is refusal of the amount allocation request, and returning the request result to the terminal equipment initiating the amount allocation request to prompt that the amount allocation request of the user corresponding to the terminal equipment fails. According to the embodiment of the application, the whole cash amount capable of being returned of the cash returning activity is managed and controlled, the handling efficiency of the cash returning business is improved, the user experience of the client is improved, and the stickiness of the client is improved.
Optionally, the application of the processing method for allocating money provided in the embodiment of the present application in a specific implementation scenario may also be as follows, where the specific application scenario is as follows:
(1) The computer device may receive a monetary allocation request including a first monetary value to be allocated. Specifically, the user may participate in the money cashback activity on the user interface of the bank application program, and when the activity condition of the user in the bank application program meets the target adjustment set by the money cashback activity, the bank application program determines the cashback amount based on the current activity condition of the user, and uses the cashback amount as the first money to be allocated, generates a money allocation request based on the first money, and sends the money allocation request to the server or the computer device such as the processing platform of the bank application program.
(2) The computer equipment acquires the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache.
(3) The computer device may determine a cash-back reference value based on the allocated amount remaining value and the allocated amount total value, and the computer device may first subtract the allocated amount remaining value from the allocated amount total value to obtain a difference value, and use the difference value as the cash-back reference value. Then, the magnitude relation between the first amount and the cash-back amount reference value is judged, and at this time, if the first amount is less than or equal to the cash-back amount reference value, the amount is allocated based on the amount allocation request, and the first amount is summarized into the allocated amount summary value. And if the first amount is larger than the cash-back amount reference value, determining that the request result of the amount allocation request is refusal of the amount allocation request, and returning the request result to the terminal equipment initiating the amount allocation request to prompt that the amount allocation request of the user corresponding to the terminal equipment fails.
(4) The computer device receives a timed task request and refreshes the allocated monetary sum in the cache based on the timed task request.
(5) The computer equipment acquires the total value of the allocated amount in the cache in real time based on the timing task request, and takes the difference obtained by subtracting the total value of the allocated amount in the cache during refreshing from the residual value of the allocated amount in the database as a new residual value of the allocated amount stored in the database; and subtracting the difference value of the allocated sum in the cache in the refreshing process from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
In summary, the embodiment of the present application provides a processing method for allocating money, which receives a request for allocating money; acquiring a residual value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache; if the first amount is less than or equal to the cash-back amount reference value, performing amount allocation based on the amount allocation request, and summarizing the first amount into the allocated amount summary value; receiving and responding to a timing task request to refresh the allocated sum value in the cache; and acquiring the allocated sum total value in the cache in real time based on the timing task request, and calculating a new allocated sum residual value and a new allocated sum total value based on the allocated sum total value in the cache during refreshing and the allocated sum residual value and the allocated sum total value acquired in real time respectively. According to the embodiment of the application, the residual value of the allocated amount of money stored in the database and the total value of the allocated amount of money stored in the preset cache are updated at regular time, so that the whole amount of money which can be returned to the cash return activity is managed and controlled in real time, the handling efficiency of the money return service is improved, the user experience of a client is improved, and the stickiness of the client is improved.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a processing device for allocating money according to an embodiment of the present application, where the processing device for allocating money includes:
a first receiving unit 201 configured to receive an amount allocation request, where the amount allocation request includes a first amount to be allocated;
an obtaining unit 202, configured to obtain a remaining value of the allocated amount stored in the database and a total value of the allocated amount stored in a preset cache;
an allocating unit 203, configured to allocate an amount based on the amount allocation request and collect the first amount into the allocated amount total value if the first amount is less than or equal to a cash-back amount reference value, where the cash-back amount reference value is determined based on the allocated amount remaining value and the allocated amount total value;
a second receiving unit 204, configured to receive a timed task request, and refresh the allocated amount summary value in the cache based on the timed task request;
a processing unit 205, configured to obtain an allocated amount aggregation value in the cache in real time based on the timing task request, and use a difference obtained by subtracting the allocated amount aggregation value in the cache during the refreshing from the allocated amount remaining value in the database as a new allocated amount remaining value stored in the database; and subtracting the difference value of the allocated sum in the cache in the refreshing process from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
In some embodiments, the processing means of the monetary allocation comprises:
a first determining subunit operable to determine a cash back reference value based on the allocated amount remaining value and the allocated amount aggregated value.
In some embodiments, the processing means of the allocation of money comprises:
and the first processing subunit is used for subtracting the sum of the allocated amounts from the remaining allocated amount to obtain a difference value, and the difference value is used as a cash return reference value.
In some embodiments, the processing means of the monetary allocation comprises:
and the second processing subunit is configured to, if the first amount of money is greater than the cash-back amount reference value, determine that a request result of the amount allocation request is to reject the amount allocation request, and return the request result to the terminal device that initiated the amount allocation request, so as to prompt a user corresponding to the terminal device that the amount allocation request fails.
In some embodiments, the processing means of the allocation of money comprises:
the first acquiring subunit is used for acquiring the service type information and the service number carried by the money allocation request;
and the second determining subunit is used for determining a target money allocation service based on the service type information and the service number.
In some embodiments, the processing means of the monetary allocation comprises:
a second obtaining subunit, configured to obtain a remaining value of an allocated amount corresponding to the target amount allocation service stored in the database, and a total value of an allocated amount corresponding to the target amount allocation service stored in a preset cache.
In some embodiments, the processing means of the monetary allocation comprises:
and the third processing subunit is used for receiving a new timed task request when the time interval from the current time point to the last time of receiving the timed task request reaches a specified time interval, and updating the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache based on the new timed task request.
The embodiment of the application provides a processing device for allocating money, which receives a money allocation request through a first receiving unit 201, where the money allocation request includes a first money to be allocated; the obtaining unit 202 obtains the remaining value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache; if the first amount is less than or equal to the cash back reference value, the allocating unit 203 allocates the amount based on the amount allocation request, and summarizes the first amount into the allocated amount summary value, wherein the cash back reference value is determined based on the allocated amount remaining value and the allocated amount summary value; the second receiving unit 204 receives a timing task request, and refreshes the allocated money sum value in the cache based on the timing task request; the processing unit 205 acquires the total allocated amount value in the cache in real time based on the timing task request, and takes the difference obtained by subtracting the total allocated amount value in the cache at the time of refreshing from the remaining allocated amount value in the database as the new remaining allocated amount value stored in the database; and subtracting the difference value of the allocated sum in the cache during refreshing from the allocated sum obtained in real time to serve as a new allocated sum in the cache. According to the embodiment of the application, the surplus value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache are updated regularly, so that the entire cash-returning amount of the cash-returning activity can be managed and controlled in real time, the handling efficiency of the cash-returning service is improved, and the user experience of a client is improved.
In addition, an embodiment of the present invention further provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 3, which shows a schematic structural diagram of the computer device according to the embodiment of the present invention, and specifically:
the computer device may include Radio Frequency (RF) circuitry 301, memory 302 including one or more computer-readable storage media, input unit 303, display unit 304, sensor 305, audio circuitry 306, wireless Fidelity (Wi-Fi) module 307, processor 308 including one or more processing cores, and power supply 309. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 3 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 301 may be used for receiving and transmitting signals during a message transmission or communication process, and in particular, for receiving downlink information from a base station and then processing the received downlink information by the one or more processors 308; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuit 301 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuitry 301 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE), email, short Messaging Service (SMS), and the like.
The memory 302 may be used to store software programs and modules, and the processor 308 executes various functional applications and data processing by operating the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 308 and the input unit 303 access to the memory 302.
The input unit 303 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, in one particular embodiment, input unit 303 may include a touch sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 308, and can receive and execute commands sent by the processor 308. In addition, the touch sensitive surface can be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 303 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 304 may be used to display information input by or provided to the user and various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 304 may include a Display screen, and optionally, the Display screen may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display screen, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 308 to determine the type of touch event, and the processor 308 then provides a corresponding visual output on the display screen according to the type of touch event.
The computer device may also include at least one sensor 305, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts brightness of the display screen according to brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the terminal moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration (generally three axes) at each position, can detect the magnitude and position of gravity when the mobile phone is stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometers and taps), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal, detailed description is omitted here.
Audio circuitry 306, a speaker, and a microphone may provide an audio interface between a user and a computer device. The audio circuit 306 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by the audio circuit 306 and converted into audio data, which is then processed by the audio data output processor 308, and then transmitted to, for example, another terminal via the RF circuit 301, or the audio data is output to the memory 302 for further processing. The audio circuitry 306 may also include an earbud jack to provide peripheral headset communication with the terminal.
Wi-Fi belongs to the short-distance wireless transmission technology, and the terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the Wi-Fi module 307, and provides wireless broadband internet access for the user. Although fig. 3 shows the Wi-Fi module 307, it is understood that it does not belong to the essential constitution of the computer device and may be omitted entirely as needed within a scope not changing the essence of the invention.
The processor 308 is a control center of the computer device, connects various parts of the entire mobile phone by using various interfaces and lines, performs various functions of the computer device and processes data by operating or executing software programs and/or modules stored in the memory 302 and calling data stored in the memory 302, thereby integrally monitoring the mobile phone. Optionally, processor 308 may include one or more processing cores; preferably, the processor 308 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 308.
The computer device also includes a power supply 309 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 308 via a power management system that may be used to manage charging, discharging, and power consumption. The power supply 309 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the computer device may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in this embodiment, the processor 308 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 308 runs the application programs stored in the memory 302, thereby implementing various functions:
receiving an amount allocation request, the amount allocation request including a first amount to be allocated;
acquiring a surplus value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache;
if the first amount is less than or equal to the cash back amount reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value, wherein the cash back amount reference value is determined based on the allocated amount remaining value and the allocated amount summary value;
receiving a timing task request, and refreshing the allocated sum value in the cache based on the timing task request;
acquiring an allocated sum total value in a cache in real time based on the timing task request, and taking a difference obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum residual value in the database as a new allocated sum residual value stored in the database; and subtracting the difference value of the allocated sum in the cache during refreshing from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, the computer device provided in this embodiment receives an amount allocation request, where the amount allocation request includes a first amount to be allocated; then, acquiring the remaining value of the allocated amount stored in the database and the total value of the allocated amount stored in a preset cache; then, if the first amount is less than or equal to a cash back reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value, wherein the cash back reference value is determined based on the allocated amount remaining value and the allocated amount summary value; then, receiving a timing task request, and refreshing the allocated sum value in the cache based on the timing task request; finally, acquiring the allocated sum total value in the cache in real time based on the timing task request, and taking a difference obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum residual value in the database as a new allocated sum residual value stored in the database; and subtracting the difference value of the allocated sum in the cache during refreshing from the allocated sum obtained in real time to serve as a new allocated sum in the cache. According to the embodiment of the application, the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache are updated at regular time, so that the integral cash returning amount of the cash returning activity can be managed and controlled in real time, the handling efficiency of the cash returning service is improved, and the user experience of a client is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention further provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the method provided in various alternative implementations in the embodiment of the present invention.
According to an aspect of the application, there is also provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations in the embodiments described above.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any money allocation processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any money allocation processing method provided in the embodiments of the present application can be achieved, and detailed descriptions are omitted for the foregoing embodiments.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The method, the apparatus, the computer device and the storage medium for processing money allocation provided by the embodiments of the present invention are described in detail above, and the principles and embodiments of the present invention are explained herein by applying specific examples, and the description of the above embodiments is only used to help understanding the method and the core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of processing an allocation of a monetary value, comprising:
receiving an amount allocation request, the amount allocation request including a first amount to be allocated;
acquiring a residual value of the allocated amount stored in a database and a total value of the allocated amount stored in a preset cache;
if the first amount is less than or equal to the cash back amount reference value, allocating the amount based on the amount allocation request, and summarizing the first amount into the allocated amount summary value, wherein the cash back amount reference value is determined based on the allocated amount remaining value and the allocated amount summary value;
receiving a timing task request, and refreshing the allocated sum value in the cache based on the timing task request;
acquiring an allocated sum total value in a cache in real time based on the timing task request, and taking a difference obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum residual value in the database as a new allocated sum residual value stored in the database; and subtracting the difference value of the allocated sum in the cache in the refreshing process from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
2. The method of processing money allocation according to claim 1, further comprising, after acquiring the remaining value of the allocated money stored in the database and the aggregated value of the allocated money stored in the preset buffer memory:
determining a cash back reference value based on the allocated amount remaining value and the allocated amount aggregated value.
3. The method of processing a monetary allocation according to claim 2, wherein said determining a cashback reference value based on the allocated monetary residual value and the allocated monetary sum value comprises:
and a difference value obtained by subtracting the sum of the allocated amounts from the remaining value of the allocated amount is used as a cash return reference value.
4. The method of claim 2, further comprising, after acquiring the remaining value of the allocated amount stored in the database and the aggregated value of the allocated amount stored in the preset buffer, the steps of:
and if the first amount is larger than the cash return reference value, determining that the request result of the amount allocation request is refusal of the amount allocation request, and returning the request result to the terminal equipment initiating the amount allocation request to prompt that the amount allocation request of the user corresponding to the terminal equipment fails.
5. The method of processing a monetary allocation according to claim 2, further comprising, after receiving the request for monetary allocation, the steps of:
acquiring service type information and a service number carried by the money allocation request;
and determining a target money allocation service based on the service type information and the service number.
6. The method of processing money allocation according to claim 5, wherein after determining a target money allocation service based on the service type information and the service number, further comprising:
and acquiring a residual value of the allocated amount corresponding to the target amount allocation service stored in the database and a total value of the allocated amount corresponding to the target amount allocation service stored in a preset cache.
7. The method of processing a monetary allocation according to claim 1, further comprising:
and when the time interval from the current time point to the last time of receiving the timing task request is detected to reach the specified time interval, receiving a new timing task request, and updating the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache based on the new timing task request.
8. A processing apparatus for allocating money, comprising:
a first receiving unit configured to receive an amount allocation request including a first amount to be allocated;
the acquisition unit is used for acquiring the residual value of the allocated amount stored in the database and the total value of the allocated amount stored in the preset cache;
an allocation unit, configured to allocate an amount based on the amount allocation request and collect the first amount into the allocated amount total value if the first amount is less than or equal to a cash-back amount reference value, where the cash-back amount reference value is determined based on the allocated amount remaining value and the allocated amount total value;
the second receiving unit is used for receiving a timing task request and refreshing the allocated sum value in the cache based on the timing task request;
the processing unit is used for acquiring the allocated sum total value in the cache in real time based on the timing task request, and taking a difference value obtained by subtracting the allocated sum total value in the cache during refreshing from the allocated sum remaining value in the database as a new allocated sum remaining value stored in the database; and subtracting the difference value of the allocated sum in the cache during refreshing from the allocated sum obtained in real time to serve as a new allocated sum in the cache.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the method of processing money allocations according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when the computer program is run on a computer, causes the computer to carry out the steps of the processing method of money allocation according to any one of claims 1 to 7.
CN202211313939.4A 2022-10-25 2022-10-25 Processing method and device for money allocation, computer equipment and storage medium Pending CN115471326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211313939.4A CN115471326A (en) 2022-10-25 2022-10-25 Processing method and device for money allocation, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211313939.4A CN115471326A (en) 2022-10-25 2022-10-25 Processing method and device for money allocation, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115471326A true CN115471326A (en) 2022-12-13

Family

ID=84336126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211313939.4A Pending CN115471326A (en) 2022-10-25 2022-10-25 Processing method and device for money allocation, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115471326A (en)

Similar Documents

Publication Publication Date Title
US10304461B2 (en) Remote electronic service requesting and processing method, server, and terminal
US20180349987A1 (en) System, method, and apparatus for supporting cash currency exchange
US20170109756A1 (en) User Unsubscription Prediction Method and Apparatus
CN111080429B (en) Virtual resource acquisition method, device and storage medium
US20190205976A1 (en) Account number registration method, apparatus, and system
CN106502833B (en) Data backup method and device
CN115345464A (en) Service order dispatching method and device, computer equipment and storage medium
US20180336609A1 (en) Service processing method and apparatus
CN111359210B (en) Data processing method and device, electronic equipment and storage medium
CN115471326A (en) Processing method and device for money allocation, computer equipment and storage medium
CN112561590A (en) Point management method, device and storage medium
CN112995265A (en) Request distribution method and device and electronic equipment
CN115330206A (en) Service scale-based order dispatching method and device, computer equipment and storage medium
CN112667868A (en) Data detection method and device
CN111818509A (en) Resource conversion method, device and equipment
CN115187095A (en) Multi-service order collaborative dispatching method and device, computer equipment and storage medium
CN115204601A (en) Service order dispatching method and device, computer equipment and storage medium
CN115222264A (en) Customer grade-based order dispatching method and device, computer equipment and storage medium
CN115330135A (en) Service type-based order dispatching method and device, computer equipment and storage medium
CN115271419A (en) Service grade-based order dispatching method and device, computer equipment and storage medium
CN116468517A (en) Order information processing method and device, electronic equipment and storage medium
CN107920010B (en) Method and system for realizing temporary session
CN115797042A (en) Method and device for repayment of credit card storage medium and electronic device
CN115759695A (en) Service management method, device, storage medium and electronic equipment
CN115547276A (en) Screen brightness control method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination