Search

CN-121996670-A - Bank account hot spot identification upgrading serial disposal method and device based on optimistic lock

CN121996670ACN 121996670 ACN121996670 ACN 121996670ACN-121996670-A

Abstract

The invention provides a serial handling method and a serial handling device for bank account hotspot identification upgrading based on optimistic locks, which relate to the field of financial science and technology and comprise the steps of receiving an external accounting request, judging the hotspot state of an account corresponding to the accounting request through a hotspot route, starting a hotspot serial identification flow of the account when the account is in a non-hotspot state, establishing a time window for identifying the account hotspot, identifying whether the current accounting request falls into the time window, adopting an optimistic lock mechanism to carry out cyclic self-increasing operation on identification counting if the current accounting request falls into the time window, judging whether a counting result reaches a preset threshold, triggering hotspot upgrading if the counting result reaches the preset threshold, pre-marking the account with the hotspot account, wherein the account state is in the hotspot upgrading state, and formally marking the account as the hotspot state after carrying out common account balance processing on the accounting request. The method and the system realize the real-time dynamic identification of the account hot spots, realize the real-time hot spot upgrading of the account, improve the processing stability of multiple concurrent accounts and ensure the normal response of the business.

Inventors

  • WEN TAO
  • WEI XIN
  • DAI DUAN
  • YANG CHAO
  • XIA PENG
  • PENG TAO

Assignees

  • 神州数码融信软件有限公司

Dates

Publication Date
20260508
Application Date
20260122

Claims (10)

  1. 1. The bank account hot spot identification upgrading serial disposal method based on the optimistic lock is characterized by comprising the following steps of: receiving an external accounting request, and judging the hot spot state of an account corresponding to the accounting request through hot spot routing; when an account is in a non-hot spot state, starting a hot spot serial identification flow for the account; Establishing a time window for account hotspot identification, and identifying whether a current billing request falls into the time window; if the identification count falls into the time window, performing cyclic self-increment operation on the identification count by adopting an optimistic lock mechanism; Judging whether the counting result reaches a preset threshold value, triggering hot spot upgrading if the counting result reaches the preset threshold value, and pre-marking the account with a hot spot account, wherein the account state is in hot spot upgrading; And after the common account balance processing is carried out on the billing request, formally marking the account as a hot spot state.
  2. 2. The optimistically locked bank account hotspot identification upgrade serial handling method of claim 1, wherein when the account is in a hotspot upgrade, the accounting request is routed to a service failure flow.
  3. 3. The optimistic lock-based serial handling method for hot spot identification upgrading of a bank account of claim 1, wherein when the account is in a non-hot spot state, starting a hot spot serial identification flow comprises: detecting the account state identifier, and if the account state identifier is in hot spot upgrading, directly returning to failure; Inquiring the validity of the account time window, and performing the time window matching according to the service time of the billing request; the counting operation is performed by an optimistic lock mechanism, including a version number checksum retry mechanism.
  4. 4. The optimistically locked bank account hotspot identification upgrade serial handling method of claim 1, wherein the establishing the time window of account hotspot identification identifies whether a current billing request falls within the time window, comprises: when a first account request is triggered, recording the starting time of the account request as the starting time of a time window, and taking the starting time plus a preset duration as the time window; for subsequent account operations, determining whether it falls within the time window: if the hot spot count falls in the time window, participating in the hot spot count of the time window; if the time window falls outside the time window, reestablishing the time window; triggering the account operation for establishing the time window, and directly entering the common account processing flow after the time window is established.
  5. 5. The optimistically locked bank account hotspot identification upgrade serial handling method of claim 1, wherein if the current billing request does not fall within the time window, the billing request enters a normal account balance processing flow.
  6. 6. The optimistic lock-based bank account hotspot identification upgrade serial handling method of claim 1, wherein the employing an optimistic lock mechanism to cycle the identification count self-increment comprises: inquiring the current count value and version number; updating the count value and the version number by taking the query result as an updating condition; if the updating is successful, judging whether the counting result reaches a preset threshold value; if the update fails, the retry is looped, and the maximum retry number is reached, and the billing request is directly responded.
  7. 7. The optimistic lock-based bank account hotspot identification upgrade serial handling method of claim 1, wherein if the count result does not reach a preset threshold, the accounting request enters a normal account balance handling flow.
  8. 8. The optimistic lock-based serial handling method for hot spot identification and upgrade of a bank account according to claim 1, wherein the hot spot status marking of the account after the current transaction is completed comprises: Setting an account 'hot spot upgrading' state in a current thread; the original business logic processing is completed; The account state persistence is marked as a hotspot.
  9. 9. The bank account hot spot identification upgrading serial disposal device based on the optimistic lock is used for realizing the method of any one of claims 1-5, and is characterized by comprising a hot spot routing module, a hot spot serial identification module, a hot spot window control module, a hot spot counting module based on the optimistic lock, a hot spot counting control module and a hot spot upgrading module; the hotspot routing module is used for: Receiving an external accounting request and judging whether the account is marked as a hot spot or not; The hot spot serial identification module is used for: When the account is not marked as a hot spot, carrying out hot spot identification through a cyclic optimistic lock counting mechanism, and carrying out serial control on the state of the account in the identification process, wherein when the account is detected to be in a hot spot upgrading state, the accounting request is routed to a service failure flow; The hotspot window control module is used for: Setting a time window for account hotspot identification, and identifying whether the account hotspot identification falls into a current time window according to the billing request occurrence time; the optimistic lock-based hotspot counting module is configured to: adopting an optimistic lock mechanism to perform identification counting and self-circulation updating, wherein the optimistic lock mechanism comprises a version number verification mechanism; The hot spot counting control module is used for: judging whether the counting result exceeds a preset threshold value, and determining whether to trigger hot spot upgrading; The hot spot upgrading module is used for: And after confirming triggering of hot spot upgrading, carrying out hot spot upgrading in-process state marking on the account, and completing the processing of the current billing request, and formally upgrading the account attribute to be hot spot state.
  10. 10. The optimistic lock-based bank account hotspot identification upgrade serial handling apparatus of claim 9, wherein the hotspot upgrade module comprises: The state marking unit is used for setting a state identifier in hot spot upgrading for an account after confirming triggering hot spot upgrading; The asynchronous processing unit keeps the original accounting request processing flow of the account unchanged; And the final marking unit marks the account state as a hot spot state after the accounting request processing is completed.

Description

Bank account hot spot identification upgrading serial disposal method and device based on optimistic lock Technical Field The invention relates to the field of financial science and technology, in particular to a bank account hot spot identification upgrading serial disposal method and device based on optimistic locks. Background With the development of internet financial services, the generation of a centralized single account issuing service initiated by the channels of banking, networking, super-networking and the like is more and more frequent, such as a settlement account opened by an online store merchant at a bank, a plurality of individual clients can transfer money to the settlement account at the same time, and account hot spots can occur at the moment. In the process of settling account billing, the traditional financial account business needs to control account balance and amount, and high-frequency operation on the same account can cause the problem of locking the account hot spot, so that various processing schemes related to the hot spot account are derived. The hot spot account proposal generally needs to mark the hot spot of the account, and then guides a system to a logic branch different from the common billing based on the hot spot mark, thereby avoiding the problems brought by the hot spot account. For the hot spot marking in the process, marking is basically carried out asynchronously in the prior art, and two hot spot identification modes are generally adopted, namely (1) before surrounding a hot spot, an independent hot spot account marking API service is provided, a channel end (counter, online banking and the like) carries out account hot spot marking operation through account opening or signing service packaging, and a client carries out active service handling at the channel end, so that an account is marked as a hot spot. (2) After the hot spot is surrounded, a post analysis prediction mark is provided, and based on a large amount of account business data analysis, the hot spot or possible hot spot of the account at a certain moment is judged, so that a hot spot account list is formed, and after the confirmation of a business operator, the hot spot mark is carried out on the account in the system. Problems of the existing automatic hot spot identification method for bank accounts include asynchronous hot spot identification, incapability of coping with sudden hot spots based on pre-subscription or post-analysis, lack of instantaneity, possibility of a large number of processing failures and poor experience when a sudden event becomes a hot spot for common accounts without marked hot spots, possibility of system paralysis when the sudden event becomes the hot spot for common accounts without marked hot spots, and high risk. Based on the above problems, there is a need for a method for identifying and upgrading a bank account in real time, which immediately realizes the hot spot upgrading of the account in the process that a common account suddenly becomes a hot spot, and avoids a large number of failure responses or risk of system paralysis. Disclosure of Invention Aiming at the problems in the background art, the invention provides a serial handling method and a serial handling device for bank account hot spot identification upgrading based on optimistic locks, which are used for carrying out hot spot marking and identification before ordinary account lock list processing in a cyclic optimistic lock counting mode, so that the problem of lock contention caused by ordinary account pessimistic locks can be effectively prevented, high-performance processing identification capacity is provided, dynamic hot spot marking identification processing is completed, thus leading accounting processing of ordinary accounts to be switched into hot account processing, carrying out version control provided by the optimistic locks for instantaneous high-concurrency account accounting, and realizing serial counting control to provide security control and hot spot upgrading processing. In order to achieve the aim, the invention provides a bank account hot spot identification upgrading serial disposal method based on optimistic lock, which comprises the steps of receiving an external billing request, and judging the hot spot state of an account corresponding to the billing request through hot spot routing; when an account is in a non-hot spot state, starting a hot spot serial identification flow for the account; Establishing a time window for account hotspot identification, and identifying whether a current billing request falls into the time window; if the identification count falls into the time window, performing cyclic self-increment operation on the identification count by adopting an optimistic lock mechanism; Judging whether the counting result reaches a preset threshold value, triggering hot spot upgrading if the counting result reaches the preset threshold value, and pre-marking the account