CN117994035A - Request processing method and device, equipment, storage medium and program product - Google Patents

Request processing method and device, equipment, storage medium and program product Download PDF

Info

Publication number
CN117994035A
CN117994035A CN202410157655.3A CN202410157655A CN117994035A CN 117994035 A CN117994035 A CN 117994035A CN 202410157655 A CN202410157655 A CN 202410157655A CN 117994035 A CN117994035 A CN 117994035A
Authority
CN
China
Prior art keywords
target
concurrency
account
transaction
sub
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
CN202410157655.3A
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202410157655.3A priority Critical patent/CN117994035A/en
Publication of CN117994035A publication Critical patent/CN117994035A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The disclosure provides a request processing method and device, equipment, a storage medium and a program product, which can be applied to the technical fields of big data, cloud computing and financial science and technology. The request processing method comprises the following steps: responding to a target transaction request for target transaction initiated by a user, and determining a target main account to be accessed by the target transaction request; acquiring a first concurrency of a target main account in a target period; determining a first concurrency threshold and a second concurrency threshold of a target main account based on target transactions, wherein the first concurrency threshold is smaller than the second concurrency threshold; and determining the account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.

Description

Request processing method and device, equipment, storage medium and program product
Technical Field
The present disclosure relates to the field of big data technology, the field of cloud computing technology, and the field of financial technology, and more particularly, to a request processing method and apparatus, device, storage medium, and program product.
Background
With the continuous development of internet technology, more and more businesses of financial institutions tend to be internet-oriented, and a series of highly concurrent batch transactions with centralized accounts, such as centralized payment (transfer of money from one account to a different account) and centralized collection (collection of money from one account to a different account), are introduced by the internet. Such services all initiate highly concurrent transactions to the same account within a short period of time, causing hot spot account problems. The business scenario described above requires the same account to be drawn or deposited, involving account balance changes. To ensure continuity of balance change, a series of account balance operations need to be serialized in technology, queued for execution one by one. This means that once the transaction volume is large in a short time, the subsequent transactions wait for a long time, which results in failure of the transaction timeout and affects the customer experience. Therefore, the problem of hot account is the urgent problem to be solved by the financial institution transaction system in the current internet age.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: the awareness of the hot account and the processing manner of the hot account in the related art have some problems, for example: the method for setting flow control through the transaction cannot accurately sense the hot account, so that the hot account transaction cannot be timely and reasonably processed, and the customer experience is affected.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a request processing method and apparatus, a device, a storage medium, and a program product.
In one aspect of the present disclosure, a request processing method is provided, including: responding to a target transaction request for target transaction initiated by a user, and determining a target main account to be accessed by the target transaction request; acquiring a first concurrency of a target main account in a target period; determining a first concurrency threshold and a second concurrency threshold of a target main account based on target transactions, wherein the first concurrency threshold is smaller than the second concurrency threshold; and determining the account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.
According to an embodiment of the present disclosure, determining the first concurrency threshold and the second concurrency threshold for the target primary account based on the target transaction includes: obtaining a quasi-real-time transaction information sequence of a target main account based on target transaction in a preset historical time period, wherein the quasi-real-time transaction information sequence comprises: the target main account finishes the average time consumption of target transaction under a plurality of concurrency degrees sequentially ordered according to the numerical value; and determining a first concurrency threshold and a second concurrency threshold according to the quasi-real-time transaction information sequence.
According to an embodiment of the present disclosure, wherein determining the first concurrency threshold and the second concurrency threshold from the near real-time transaction information sequence comprises: generating a reference graph for representing average time consumption of different target transactions under concurrency conditions according to the quasi-real-time transaction information sequence; reading a first characteristic point and a second characteristic point from the reference curve graph, wherein the first characteristic point is a first sudden increase point of the reference curve graph, and the second characteristic point is a second sudden increase point of the reference curve graph and is a breakpoint; and determining the concurrency corresponding to the first feature point as a first concurrency threshold, and determining the concurrency corresponding to the second feature point as a second concurrency threshold.
According to an embodiment of the present disclosure, determining an account heat of a target primary account for a target transaction according to a first concurrency, a first concurrency threshold, and a second concurrency threshold includes: under the condition that the first concurrency is smaller than or equal to a first concurrency threshold, determining that the account heat of the target main account is: a non-hotspot account; under the condition that the first concurrency is larger than a first concurrency threshold and smaller than or equal to a second concurrency threshold, determining that the account heat of the target main account is: a general hotspot account; under the condition that the first concurrency is larger than the second concurrency threshold, determining that the account heat of the target main account is: limit hot spot accounts.
According to an embodiment of the present disclosure, the above request processing method further includes: under the condition that the first concurrency is larger than a first concurrency threshold and smaller than or equal to a second concurrency threshold, N sub-accounts obtained by performing the scattered modulus processing on the target main account are obtained; acquiring the second concurrency of each of the N sub-accounts in the target period; selecting M target sub-accounts with the second concurrency less than or equal to a first concurrency threshold from the N sub-accounts; and accessing the target transaction request into one of M target sub-accounts for transaction processing.
According to an embodiment of the present disclosure, the accessing the target transaction request to one of the M target sub-accounts for transaction processing includes: acquiring a request sequence number of a target transaction request and acquiring account numbers of M target sub-accounts; calculating a target remainder of the request sequence number on the account number; determining a preferred sub-account from the M target sub-accounts according to the target remainder; and accessing the target transaction request into the preferred sub-account for transaction processing.
According to the embodiment of the disclosure, randomly selecting one target sub-account from M target sub-accounts as a preferred sub-account; and accessing the target transaction request into the preferred sub-account for transaction processing.
According to an embodiment of the disclosure, obtaining the second concurrency of each of the N sub-accounts in the target period includes: and reading the second concurrency of each of the N sub-accounts in the target period from the memory database, wherein the second concurrency of each of the N sub-accounts associated with the target main account is stored in the memory database in the form of key value pairs.
According to an embodiment of the present disclosure, the above request processing method further includes: acquiring service importance information of the target transaction under the condition that the first concurrency is greater than a first concurrency threshold and less than or equal to a second concurrency threshold; and processing the target transaction request according to the business importance degree information of the target transaction.
According to an embodiment of the present disclosure, processing the target transaction request according to the business importance information of the target transaction includes: under the condition that the business importance degree information of the target transaction is that the target transaction is an important business, directly accessing a target transaction request into a target main account for transaction processing; and under the condition that the business importance degree information of the target transaction is that the target transaction is a non-important business, processing the target transaction request in an asynchronous processing mode or processing the target transaction request in a loose mode.
According to an embodiment of the present disclosure, the above request processing method further includes: and under the condition that the first concurrency is smaller than or equal to a first concurrency threshold, directly accessing the target transaction request into the target main account to perform transaction processing.
According to an embodiment of the present disclosure, the above request processing method further includes: and rejecting the access target transaction request and generating transaction alarm information under the condition that the first concurrency is greater than the second concurrency threshold.
Another aspect of the present disclosure provides a request processing apparatus, including: the device comprises a first determining module, a first acquiring module, a second determining module and a third determining module.
According to an embodiment of the disclosure, the first determining module is configured to determine, in response to a target transaction request initiated by a user for a target transaction, a target primary account to which the target transaction request is to be accessed; the first acquisition module is used for acquiring first concurrency of the target main account in the target period; the second determining module is used for determining a first concurrency threshold and a second concurrency threshold of the target main account based on the target transaction, wherein the first concurrency threshold is smaller than the second concurrency threshold; the third determining module is used for determining the account heat of the target main account aiming at the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the request processing method described above.
Another aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described request processing method.
Another aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described request processing method.
According to the request processing method, the request processing device, the request processing equipment, the request processing medium and the request processing program product, the account heat of the target main account aiming at the target transaction is determined through the first concurrency, the first concurrency threshold and the second concurrency threshold, and the account heat can be accurately perceived; different first concurrency thresholds and second concurrency thresholds are set for different transaction scenes, so that accuracy of sensing account heat can be further improved. Therefore, the technical problems that hot account transactions cannot be timely and reasonably processed and customer experience is affected are at least partially solved, and the technical effects of accurately distinguishing account heat and improving accuracy of sensing account heat are achieved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a request processing method, apparatus, device, medium and program product according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a request processing method according to an embodiment of the disclosure;
FIG. 3 illustrates a reference graph according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of selecting one of the target sub-accounts for transaction processing by a margin algorithm in accordance with an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a request processing apparatus according to an embodiment of the present disclosure; and
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a request processing method according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical solution of the present disclosure, the related user information (including, but not limited to, user personal information, user image information, user equipment information, such as location information, etc.) and data (including, but not limited to, data for analysis, stored data, displayed data, etc.) are information and data authorized by the user or sufficiently authorized by each party, and the related data is collected, stored, used, processed, transmitted, provided, disclosed, applied, etc. and processed, all in compliance with the related laws and regulations and standards of the related and regional areas, necessary security measures are taken, no prejudice to the public order is made, and corresponding operation entries are provided for the user to select authorization or rejection.
It should be noted that, the request processing method in the embodiments of the present disclosure may be applied to the big data technical field, the cloud computing technical field, and the financial technology field, and may also be applied to any field other than the big data technical field, the cloud computing technical field, and the financial technology field, and the application fields of the request processing method, the device, the equipment, the storage medium, and the program product in the embodiments of the present disclosure are not limited.
The embodiment of the disclosure provides a request processing method, which comprises the following steps: responding to a target transaction request for target transaction initiated by a user, and determining a target main account to be accessed by the target transaction request; acquiring a first concurrency of a target main account in a target period; determining a first concurrency threshold and a second concurrency threshold of a target main account based on target transactions, wherein the first concurrency threshold is smaller than the second concurrency threshold; and determining the account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.
Fig. 1 schematically illustrates an application scenario diagram of a request processing method, apparatus, device, medium and program product according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
In an application scenario of the embodiments of the present disclosure, a user may initiate a target transaction request for a target transaction through the first terminal device 101, the second terminal device 102, and the third terminal device 103, and in response to the request, the server 105 may be configured to execute a request processing method of the embodiments of the present disclosure, including: responding to a target transaction request for target transaction initiated by a user, and determining a target main account to be accessed by the target transaction request; acquiring a first concurrency of a target main account in a target period; determining a first concurrency threshold and a second concurrency threshold of a target main account based on target transactions, wherein the first concurrency threshold is smaller than the second concurrency threshold; and determining the account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.
It should be noted that, the method for processing a request provided by the embodiment of the present disclosure may be generally performed by the server 105. Accordingly, the request processing apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The request processing method provided by the embodiment of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the request processing apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The request processing method of the embodiment of the present disclosure will be described in detail below by way of fig. 2 to 6 based on the scenario described in fig. 1.
Fig. 2 schematically illustrates a flow chart of a request processing method according to an embodiment of the disclosure.
As shown in fig. 2, the request processing method of this embodiment includes operations S201 to S204.
In operation S201, in response to a target transaction request for a target transaction initiated by a user, determining a target primary account to which the target transaction request is to be accessed;
in operation S202, a first concurrency of the target primary account in the target period is obtained;
In operation S203, determining a first concurrency threshold and a second concurrency threshold of the target primary account based on the target transaction, wherein the first concurrency threshold is less than the second concurrency threshold;
In operation S204, an account heat of the target primary account for the target transaction is determined according to the first concurrency, the first concurrency threshold, and the second concurrency.
According to the embodiments of the present disclosure, because the average time consumed for the hot account to complete the transaction is long, and even the transaction response may fail, it is necessary to accurately identify the hot account, and to take different control strategies for the transactions corresponding to the non-hot account and the hot account.
In accordance with an embodiment of the present disclosure, in operation S201, the target transaction may be a transaction initiated by a user request. The target primary account may be an account corresponding to a transaction initiated by the user request. For example: and the user requests to initiate a transfer transaction, the transfer account is an A account, the target transaction is the transfer transaction, and the target main account is the A account.
In embodiments of the present disclosure, the user's consent or authorization may be obtained prior to obtaining the user's information. For example, before operation S201, a request to acquire user information may be issued to the user. In case that the user agrees or authorizes that the user information can be acquired, operation S201 is performed.
According to an embodiment of the present disclosure, the target period may be a current period corresponding to the target transaction in operation S202.
According to an embodiment of the present disclosure, the first concurrency may be a transaction amount corresponding to the target primary account in the current period. For example, during the current period, there are 3 transfer transaction requests to access the A account, so the first concurrency of the A account is 3.
According to embodiments of the present disclosure, the first concurrency corresponding to the target primary account may be different at different periods of time. For example, at 8:00-9:00, if 3 account A is to be accessed in the transfer transaction request, the first concurrency of the account A in the period is 3; at 9:00-10:00, and 1 transfer transaction request is to be accessed into the account A, and the first concurrency of the account A in the period is 4.
Because the first concurrency corresponding to the target main account may be different in different time periods, the first concurrency of the target main account needs to be updated in real time, so that the first concurrency of the target main account in the current time period is obtained.
According to an embodiment of the present disclosure, the larger the value of the first concurrency is, the larger the transaction amount corresponding to the target main account in the current period is, and the higher the account heat is.
Specifically, when the transaction amount corresponding to the target main account is smaller in the current period, the account heat is lower, and the target main account can normally complete the transaction; when the transaction amount corresponding to the target main account is large in the current period, the account heat is high, the average time consumption of the target main account for completing the transaction is possibly increased, and the transaction can still be completed; when the transaction amount corresponding to the target main account in the current period is too high, the account heat is too high, which may cause the average time for the target main account to complete the transaction to be too long, thereby causing transaction failure, and the system may report errors at the moment.
For example: in the current period, the concurrency of the target main account is 1, the account heat is low, and the average time consumption of the target main account for completing the transaction is 3min; when the concurrency of the target main account is increased to 5, the account heat is higher, and the average time consumption of the target main account for completing the transaction is increased to 7min; when the concurrency of the target main account increases to 10, the average time for the target main account to complete the transaction is too long, and the system reports errors.
In accordance with an embodiment of the present disclosure, a first concurrency threshold and a second concurrency threshold may be used to divide account heat in operation S203-operation S204.
Specifically, under the condition that the first concurrency is smaller than or equal to a first concurrency threshold, the account heat of the target main account is lower, the target transaction request aiming at the target transaction based on the target main account can be normally processed, and the processing time is smaller than a preset time threshold.
Under the condition that the first concurrency is larger than a first concurrency threshold and smaller than or equal to a second concurrency threshold, the account heat of the target main account is higher, and the target transaction request aiming at the target transaction based on the target main account can be normally processed, but the processing time is longer than a preset duration threshold.
And under the condition that the first concurrency is larger than the second concurrency threshold, the account heat of the target main account is too high, and the target transaction request aiming at the target transaction based on the target main account cannot be normally processed.
For example: the user initiates a transfer transaction, the transfer account being an account a. Under the current period, there are 3 transaction requests to access the A account. For the transfer transaction scenario, the first concurrency threshold for the a account is 5 and the second concurrency threshold is 9. Because the first concurrency of the current period is smaller than the first concurrency threshold, the account heat of the account A is low, and the account A can normally process the transfer transaction.
According to the embodiment of the disclosure, the supported concurrency thresholds are different due to different degrees of complexity of different transactions, so that the target main account can correspond to different first concurrency thresholds and second concurrency thresholds for different transaction scenes. For example: for transfer transactions (transfer of the target primary account to other accounts), the first concurrency threshold for the a account is 5 and the second concurrency threshold is 9; for a collection transaction (the target primary account accepts transfers from other accounts), the first concurrency threshold for the a account is 10 and the second concurrency threshold is 20.
According to the embodiment of the disclosure, the account heat degree can be accurately perceived by comparing the first concurrency degree with the first concurrency degree threshold value and the second concurrency degree threshold value; different first concurrency thresholds and second concurrency thresholds are set for different transaction scenes, so that accuracy of sensing account heat can be further improved.
According to an embodiment of the present disclosure, determining a first concurrency threshold and a second concurrency threshold for a target primary account based on a target transaction includes:
Operation 11, obtaining a quasi real-time transaction information sequence of the target main account based on the target transaction in a preset historical time period, wherein the quasi real-time transaction information sequence comprises: the target main account finishes the average time consumption of target transaction under a plurality of concurrency degrees sequentially ordered according to the numerical value; for obtaining more reference near real-time transaction status information, the predetermined historical time period may be, for example, a time period that is relatively close to the current time period, such as the last 1 minute of transaction information.
An operation 12 determines a first concurrency threshold and a second concurrency threshold from the near real-time transaction information sequence.
According to an embodiment of the present disclosure, in operation 11, the predetermined history period may be a custom period or a period automatically set by the system.
According to the embodiment of the disclosure, in a preset historical time period, a plurality of concurrency degrees corresponding to the target main account can be sequentially ordered according to the numerical value, and average time consumption for completing the target transaction corresponding to each concurrency degree is counted.
According to embodiments of the present disclosure, a real-time transaction information sequence may be used to record the average time consumed to complete a target transaction for each concurrency within a predetermined historical time period. For example, it can be shown in the following table 1:
TABLE 1
In accordance with an embodiment of the present disclosure, determining the first and second concurrency thresholds from the near real-time transaction information sequence may be: under the condition that the average time consumption corresponding to a certain concurrency is far greater than the time consumption of other concurrency, determining the concurrency as a first concurrency threshold; and when the system errors after exceeding a certain concurrency degree, determining the concurrency degree as a second concurrency degree threshold.
For example: as can be seen from table 1, when the concurrency is less than 5, the average time-consuming change corresponding to each concurrency is not large; when the concurrency is 5, the average time consumption for completing the transaction is far greater than the average time consumption for completing the transaction when the concurrency is between 1 and 5, so that the first concurrency threshold is determined to be 5; and when the concurrency is greater than 9, reporting errors by the system, and thus determining that the second concurrency threshold is 9.
According to the embodiment of the disclosure, the first concurrency threshold and the second concurrency threshold can be accurately and efficiently determined based on the average time consumption of the target main account for completing the target transaction at a plurality of concurrency degrees; through the real-time transaction information sequence, a plurality of concurrencies in a preset historical time period and the average time consumption for completing the target transaction corresponding to the concurrencies can be intuitively displayed.
According to an embodiment of the present disclosure, determining a first concurrency threshold and a second concurrency threshold from a near real-time transaction information sequence may include:
Generating a reference graph for representing average time consumption of different target transactions under concurrency conditions according to the quasi-real-time transaction information sequence;
Reading a first characteristic point and a second characteristic point from the reference curve graph, wherein the first characteristic point is a first sudden increase point of the reference curve graph, and the second characteristic point is a second sudden increase point of the reference curve graph and is a breakpoint;
And determining the concurrency corresponding to the first feature point as a first concurrency threshold, and determining the concurrency corresponding to the second feature point as a second concurrency threshold.
For example: fig. 3 is a generated reference graph according to table 1. As shown in fig. 3: when the concurrency is 5, the average time consumption is obviously increased, so that the concurrency is 5, corresponding to the first sudden increase point, and the first concurrency threshold value is 5; and when the concurrency is 9, the curve shows a second sudden increase, and when the concurrency is greater than the second sudden increase, the transaction fails, and the time-consuming data of the transaction is lost. Therefore, when the concurrency is 9, a breakpoint occurs, the concurrency is 9 corresponds to a second sudden increase point, and a second concurrency threshold value is 9.
According to embodiments of the present disclosure, the reference graph may be a line graph, or may be another type of graph, such as a histogram, a scatter plot, or the like, without limitation.
According to the embodiment of the disclosure, the first feature point and the second feature point can be simply and effectively determined according to the morphological change point of the curve by referring to the graph, so that the first concurrency threshold and the second concurrency threshold can be accurately and efficiently determined.
According to an embodiment of the present disclosure, according to a first concurrency, a first concurrency threshold, and a second concurrency threshold, determining an account heat of a target main account for a target transaction specifically includes:
under the condition that the first concurrency is smaller than or equal to a first concurrency threshold, determining that the account heat of the target main account is: a non-hotspot account;
Under the condition that the first concurrency is larger than a first concurrency threshold and smaller than or equal to a second concurrency threshold, determining that the account heat of the target main account is: a general hotspot account;
under the condition that the first concurrency is larger than the second concurrency threshold, determining that the account heat of the target main account is: limit hot spot accounts.
According to the embodiment of the disclosure, under the condition that the first concurrency is smaller than the first concurrency threshold, the target main account can normally complete the transaction, so that the account heat of the target main account is determined to be a non-hot-spot account;
Under the condition that the first concurrency is larger than a first concurrency threshold and smaller than or equal to a second concurrency threshold, the account heat of the target main account is higher, the average time for completing the transaction is longer, but the transaction can still be completed, so that the account heat of the target main account is determined to be a general hot spot account;
Under the condition that the first concurrency is larger than the second concurrency threshold, the account heat of the target main account is too high, and transaction failure can be caused, so that the account heat of the target main account is determined to be a limit hot spot account, at the moment, the system reports errors, and the target transaction cannot be accessed to the target main account.
According to the embodiment of the disclosure, the target main account can be divided into the non-hot-spot account, the general hot-spot account and the limit hot-spot account by comparing the first concurrency with the first concurrency threshold and the second concurrency threshold, so that the target transaction can be conveniently differentiated according to the account heat.
For a general hot spot account, further processing may be performed by operations 21-24, according to embodiments of the present disclosure.
Operation 21, obtaining N sub-accounts obtained by performing the loose modulus processing on the target main account under the condition that the first concurrency is greater than a first concurrency threshold and less than or equal to a second concurrency threshold;
operation 22, obtaining second concurrency of each of the N sub-accounts in the target period;
Operation 23, selecting M target sub-accounts with the second concurrency less than or equal to a first concurrency threshold from N sub-accounts, wherein M is less than or equal to N;
Operation 24, accessing the target transaction request into one of M target sub-accounts for transaction processing.
In accordance with an embodiment of the present disclosure, a general hot-spot account may be split into N sub-accounts through a loose-mode process at operation 21. The process of hashing may be by a random number or by a field such as a timestamp.
In accordance with an embodiment of the present disclosure, at operation 22, the second concurrency may be a corresponding concurrency of the sub-account.
According to the embodiment of the disclosure, although the concurrency of the general hot-spot account is greater than the first concurrency threshold, after the general hot-spot account is split into N sub-accounts, the target transaction of the target main account to be originally accessed can be respectively accessed into a plurality of sub-accounts. Thus, the concurrency of the sub-account may be less than the first concurrency threshold, so that the target transaction may be processed normally.
According to the embodiment of the present disclosure, in operation 23, a second concurrency of each of the N sub-accounts may be obtained, and M target sub-accounts with the second concurrency being less than or equal to the first concurrency threshold may be selected from the N sub-accounts.
For example: the transfer transactions corresponding to the general hotspot account a account during the current period include transactions 1-8. The A account can be split into 2 sub-accounts by performing the loose modulus according to the fields such as the timestamp: an A-1 account and an A-2 account. Wherein, transaction 1 and transaction 2 access the A-1 account, so the second concurrency of the A-1 account is 2; transaction 3-transaction 8 accesses a-2, so the second concurrency of a-2 is 6. Because the second concurrency of the sub-account A-1 is less than the first concurrency threshold 5, the sub-account A-1 can normally process the target transaction; because the second concurrency of sub-account A-2 is greater than the first concurrency threshold 5, the average time consumed by A-2 in processing transactions may increase. And selecting the sub-account A-1 as a target sub-account.
According to an embodiment of the present disclosure, at operation 24, there may be multiple target sub-accounts for one target main account, and thus one of the target sub-accounts needs to be selected for transaction processing.
According to the embodiment of the disclosure, a general hot spot account can be split into a plurality of sub-accounts through the scattered mode processing, so that a hot spot scene is relieved.
According to embodiments of the present disclosure, one of the target sub-accounts may be selected for transaction processing by a remainder algorithm.
FIG. 4 schematically illustrates a flow chart of selecting one of the target sub-accounts for transaction processing by a margin algorithm according to an embodiment of the present disclosure.
As shown in fig. 4, the method of selecting one of the target sub-accounts for transaction processing by the remainder algorithm in this embodiment includes operations S401 to S404.
In operation S401, a request sequence number of a target transaction request is acquired, and account numbers of M target sub-accounts are acquired;
In operation S402, a target remainder of the request order number to the account number is calculated;
In operation S403, a preferred sub-account is determined from the M target sub-accounts according to the target remainder;
in operation S404, the target transaction request is accessed to the preferred sub-account for transaction processing.
According to the embodiment of the disclosure, the target main account may correspond to a plurality of transactions in the current period, and a request sequence number may be set for each transaction, for example, the request sequence numbers may be set in sequence according to the time sequence of initiating the transactions.
The target sub-account may also be numbered according to embodiments of the present disclosure.
And determining a preferred sub-account from the M target sub-accounts according to the target remainder, wherein the preferred sub-account can be obtained by presetting the corresponding relation between the remainder and the sub-account number, and after the target remainder of the request order number to the account number is calculated, accessing the target transaction request corresponding to the request order number into the sub-account corresponding to the target remainder based on the corresponding relation between the remainder and the sub-account number. If, for the current request, the remainder is calculated to be 1, accessing the current request to the sub-account with the number of 1; when the remainder is 2, accessing the current request to a sub-account with the number of 2; in the case that the remainder is 3, the sub-account … … with the current request access number of 3 is calculated
For example: the current target transaction request has a request sequence number of 103 and the number of target sub-accounts is 10. The target remainder of the request sequence number to the account number is 3, so that the target sub-account with the number of 3 is selected as the preferred sub-account, and the target transaction request is accessed to the target sub-account with the number of 3 for transaction processing.
According to an embodiment of the present disclosure, selecting one of the target sub-accounts for transaction processing by a random selection method includes:
Randomly selecting one target sub-account from M target sub-accounts as a preferred sub-account;
And accessing the target transaction request into the preferred sub-account for transaction processing.
According to the embodiment of the disclosure, if only the sub-account with the smallest concurrency number is selected as the preferred sub-account, the sub-account may be selected for transaction in a very short time range, so that the sub-account also becomes a high concurrency hot-spot account. The preferred sub-account is selected by a remainder taking algorithm or a random selection mode, so that unbalanced concurrency distribution of a plurality of sub-accounts can be avoided, and too high concurrency of a few sub-accounts is avoided. In particular, the sub-accounts are distributed through a remainder taking algorithm, so that different requests can be uniformly distributed to access different sub-accounts, balanced distribution of the requested access is realized, and the hot spot problem of the sub-accounts is further effectively avoided.
According to an embodiment of the present disclosure, obtaining the second concurrency of each of the N sub-accounts in the target period includes: and reading the second concurrency of each of the N sub-accounts in the target period from the memory database, wherein the second concurrency of each of the N sub-accounts associated with the target main account is stored in the memory database in the form of key value pairs.
According to embodiments of the present disclosure, N sub-accounts and respective second concurrencies may be stored in an in-memory database. Specifically, it may be stored in the in-memory database in the form of key-value pairs. For example: a key-value data structure may be defined in the in-memory database: and taking the target main account as a key and taking the sub-account queue as a value. The value in the sub-account queue is a binary tuple, consisting of the sub-account number and the second concurrency.
For example, target primary account a may be split into 3 sub-accounts. The account number of the sub-account A-1 is 1×, and the concurrency is 1; the account number of sub-account a-2 is 2×, the concurrency is 2; the account number of sub-account A-3 is 3×, ×, and concurrency is 3. As shown in table 2:
TABLE 2
key value
Target primary account A 3××××××;3
Target primary account A 2××××××;2
Target primary account A 1××××××;1
According to the embodiment of the disclosure, the concurrency of each sub-account can be counted in real time, and the sub-account queues are ordered according to the magnitude of the concurrency value. For example: after the target transaction accesses a certain sub-account, the concurrent number of the sub-account is +1, and then the transaction is executed. After the transaction execution is completed (whether the transaction is successful or failed), the sub-account concurrency number is-1, and the sub-account queues are reordered according to the concurrency value.
For example: there are 3 transactions to access sub-account A-1, so the concurrency of sub-account A-1 is updated to 4, and the sub-account queues are reordered, the reordered results are shown in Table 3:
TABLE 3 Table 3
key value
Target primary account A 1××××××;4
Target primary account A 3××××××;3
Target primary account A 2××××××;2
According to the embodiment of the disclosure, by sorting, a binary search method can be used for rapidly positioning sub-accounts under a certain concurrency degree, so that all sub-accounts with the concurrency degree less than or equal to the concurrency degree are rapidly acquired, and subsequent transaction access processing is facilitated.
According to the embodiment of the invention, the concurrency sequence of each sub-account in the current period can be accurately obtained by updating the concurrency of the sub-accounts in real time and sequencing the sub-account queues in real time according to the magnitude of the concurrency value, so that the target sub-account can be accurately determined.
According to the embodiment of the disclosure, under the condition that the first concurrency is greater than a first concurrency threshold and less than or equal to a second concurrency threshold, obtaining business importance degree information of a target transaction; and processing the target transaction request according to the business importance degree information of the target transaction.
According to an embodiment of the present disclosure, specifically, processing a target transaction request according to business importance information of the target transaction includes:
operation 31, directly accessing a target transaction request into a target main account to perform transaction processing under the condition that the service importance degree information of the target transaction is that the target transaction is an important service;
In operation 32, in the case that the service importance degree information of the target transaction is that the target transaction is a non-important service, the target transaction request is processed by adopting an asynchronous processing mode or by adopting a loose mode processing mode.
According to the embodiment of the disclosure, for the target transaction corresponding to the general hot spot account, the business importance degree of the target transaction can be judged first. For the important target transaction, the target main account can be directly subjected to priority processing, and the preferential sub-account is not required to be accessed for transaction processing.
According to embodiments of the present disclosure, for non-vital target transactions, the processing may be performed by way of asynchronous processing or loose mode processing.
According to embodiments of the present disclosure, asynchronous processing or loose-mode processing may sacrifice some business functions, such as asynchronous processing of a target transaction, failure to obtain real-time transaction information, access to the transaction using a loose-mode account number, and failure to generate real-time transaction details of the target transaction. Therefore, for important business, the target transaction request can be directly accessed into the target main account for transaction processing, so that the real-time performance and the integrity of transaction information are ensured, on one hand, the important business can be preferentially processed, and on the other hand, the influence on certain business functions can be avoided, thereby causing unnecessary loss.
According to the embodiment of the disclosure, under the condition that the first concurrency is smaller than or equal to a first concurrency threshold, the target transaction request is directly accessed into the target main account to conduct transaction processing.
According to the embodiment of the disclosure, when the target main account is a non-hot spot account, the processing speed of the target main account on the target transaction is high, and the transaction can be normally completed, so that the target transaction request can be directly accessed into the target main account for transaction processing.
According to the embodiment of the disclosure, under the condition that the first concurrency is larger than the second concurrency threshold, the access target transaction request is refused, and the transaction alarm information is generated.
According to the embodiment of the disclosure, when the target main account is a limit hot spot account, the account heat of the target main account is too high, the average time for completing the transaction is too long, so that the transaction is failed, and the system reports errors at the moment. It is therefore necessary to reject the access target transaction request and generate a transaction alert message at this time.
According to the embodiment of the disclosure, the influence of the hot-spot account on the transaction can be reduced to the greatest extent by dividing the target main account into the non-hot-spot account, the general hot-spot account and the limit hot-spot account and executing different operation methods on the three accounts.
Based on the request processing method, the disclosure further provides a request processing device. The device will be described in detail below in connection with fig. 5.
Fig. 5 schematically shows a block diagram of a request processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 5, the request processing apparatus 500 of this embodiment includes a first determination module 510, a first acquisition module 520, a second determination module 530, and a third determination module 540.
The first determining module 510 is configured to determine, in response to a target transaction request initiated by a user for a target transaction, a target primary account to which the target transaction request is to be accessed. In an embodiment, the first determining module 510 may be configured to perform the operation S201 described above, which is not described herein.
The first obtaining module 520 is configured to obtain a first concurrency of the target primary account in the target period. In an embodiment, the first obtaining module 520 may be configured to perform the operation S202 described above, which is not described herein.
The second determining module 530 is configured to determine a first concurrency threshold and a second concurrency threshold for the target primary account based on the target transaction, where the first concurrency threshold is less than the second concurrency threshold. In an embodiment, the second determining module 530 may be used to perform the operation S203 described above, which is not described herein.
The third determining module 540 is configured to determine an account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold, and the second concurrency threshold. In an embodiment, the third determining module 540 may be configured to perform the operation S204 described above, which is not described herein.
According to an embodiment of the disclosure, the second determining module includes a first acquiring sub-module, a first determining sub-module.
The first acquisition sub-module is used for acquiring a quasi real-time transaction information sequence of a target main account based on target transaction in a preset historical time period, wherein the quasi real-time transaction information sequence comprises the following components: the target main account finishes the average time consumption of target transaction under a plurality of concurrency degrees sequentially ordered according to the numerical value; the first determining submodule is used for determining a first concurrency threshold and a second concurrency threshold according to the quasi-real-time transaction information sequence.
According to an embodiment of the present disclosure, the first determination submodule includes a generating unit, a reading unit, and a determining unit.
The generation unit is used for generating a reference graph for representing the average time consumption of different target transactions completed under the concurrency condition according to the quasi-real-time transaction information sequence; the reading unit is used for reading a first characteristic point and a second characteristic point from the reference curve graph, wherein the first characteristic point is a first sudden increase point of the reference curve graph, and the second characteristic point is a second sudden increase point of the reference curve graph and is a breakpoint; the determining unit is used for determining the concurrency corresponding to the first feature point as a first concurrency threshold value and determining the concurrency corresponding to the second feature point as a second concurrency threshold value.
According to an embodiment of the present disclosure, the third determination module comprises a second determination sub-module, a third determination sub-module and a fourth determination sub-module.
The second determining submodule is used for determining that the account heat of the target main account is: a non-hotspot account; the third determining submodule is used for determining that the account heat of the target main account is: a general hotspot account; the fourth determining submodule is used for determining that the account heat of the target main account is: limit hot spot accounts.
According to an embodiment of the disclosure, the request processing device further includes a second acquisition module, a third acquisition module, a selection module, and an access module.
The second acquisition module is used for acquiring N sub-accounts obtained by performing the scattered module processing on the target main account under the condition that the first concurrency is greater than a first concurrency threshold and less than or equal to a second concurrency threshold; the third acquisition module is used for acquiring the second concurrency of each of the N sub-accounts in the target period; the selecting module is used for selecting M target sub-accounts of which the second concurrency is smaller than or equal to a first concurrency threshold value from the N sub-accounts; the access module is used for accessing the target transaction request into one of M target sub-accounts for transaction processing.
According to an embodiment of the present disclosure, the access module includes a second acquisition sub-module, a calculation sub-module, a fifth determination sub-module, and a first access sub-module.
The second acquisition sub-module is used for acquiring the request sequence number of the target transaction request and acquiring the account number of M target sub-accounts; the calculation sub-module is used for calculating the target remainder of the request sequence number on the account number; the fifth determining sub-module is used for determining a preferred sub-account from M target sub-accounts according to the target remainder; the first access submodule is used for accessing the target transaction request into the preferred sub-account for transaction processing.
According to an embodiment of the present disclosure, the access module further comprises a second selection sub-module and a second access sub-module.
The second selecting sub-module is used for randomly selecting one from M target sub-accounts as a preferred sub-account; the second access sub-module is used for accessing the target transaction request into the preferred sub-account for transaction processing.
According to an embodiment of the disclosure, the third acquisition module comprises a reading sub-module.
The reading sub-module is used for reading the second concurrency of each of the N sub-accounts in the target period from the memory database, wherein the second concurrency of each of the N sub-accounts associated with the target main account is stored in the memory database in the form of key value pairs.
According to an embodiment of the present disclosure, the request processing apparatus further includes a fourth obtaining module and a first processing module.
The fourth acquisition module is used for acquiring service importance degree information of the target transaction under the condition that the first concurrency degree is larger than a first concurrency degree threshold and smaller than or equal to a second concurrency degree threshold; the processing module is used for processing the target transaction request according to the business importance degree information of the target transaction.
According to an embodiment of the present disclosure, the first processing module comprises a third access sub-module and a processing sub-module.
The third access submodule is used for directly accessing the target transaction request into the target main account to carry out transaction processing under the condition that the service importance degree information of the target transaction is that the target transaction is an important service; the processing submodule is used for processing the target transaction request in an asynchronous processing mode or in a loose mode under the condition that the business importance degree information of the target transaction is that the target transaction is a non-important business.
According to an embodiment of the present disclosure, the request processing apparatus further includes a second processing module.
The second processing module is used for directly accessing the target transaction request into the target main account for transaction processing under the condition that the first concurrency is smaller than or equal to a first concurrency threshold.
According to an embodiment of the disclosure, the request processing device further includes an alarm module.
The alarm module is used for rejecting the access target transaction request and generating transaction alarm information under the condition that the first concurrency is larger than the second concurrency threshold.
According to an embodiment of the present disclosure, any of the first determining module 510, the first acquiring module 520, the second determining module 530, and the third determining module 540 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Or at least some of the functionality of one or more of the modules may be combined with, and implemented in, at least some of the functionality of other modules. According to embodiments of the present disclosure, at least one of the first determination module 510, the first acquisition module 520, the second determination module 530, and the third determination module 540 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Or at least one of the first determination module 510, 520, the second determination module 530 and the third determination module 540 may be at least partially implemented as a computer program module which, when executed, may perform the respective functions.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a request processing method according to an embodiment of the disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
According to an embodiment of the present disclosure, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to an input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to an input/output (I/O) interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the request processing method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed over a network medium in the form of signals, downloaded and installed via the communication portion 606, and/or installed from the removable media 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (16)

1. A request processing method, comprising:
responding to a target transaction request for target transaction initiated by a user, and determining a target main account to be accessed by the target transaction request;
Acquiring a first concurrency of the target main account in a target period;
Determining a first concurrency threshold and a second concurrency threshold of the target main account based on the target transaction, wherein the first concurrency threshold is smaller than the second concurrency threshold;
And determining the account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.
2. The method of claim 1, wherein determining the target primary account based on a first concurrency threshold and a second concurrency threshold for the target transaction comprises:
Acquiring a quasi real-time transaction information sequence of the target main account based on the target transaction in a preset historical time period, wherein the quasi real-time transaction information sequence comprises: the target main account completes the average time consumption of the target transaction under a plurality of concurrency degrees sequentially ordered according to the numerical value;
and determining the first concurrency threshold and the second concurrency threshold according to the quasi-real-time transaction information sequence.
3. The method of claim 2, wherein determining the first and second concurrency thresholds from the near real-time transaction information sequence comprises:
Generating a reference graph for representing average time consumption of different target transactions completed under concurrency conditions according to the quasi-real-time transaction information sequence;
Reading a first characteristic point and a second characteristic point from the reference curve graph, wherein the first characteristic point is a first sudden increase point of the reference curve graph, and the second characteristic point is a second sudden increase point of the reference curve graph and is a break point;
And determining the concurrency corresponding to the first feature point as the first concurrency threshold, and determining the concurrency corresponding to the second feature point as the second concurrency threshold.
4. The method of claim 1, wherein determining the account heat of the target primary account for the target transaction based on the first concurrency, the first concurrency threshold, and the second concurrency threshold comprises:
and under the condition that the first concurrency is smaller than or equal to the first concurrency threshold, determining that the account heat of the target main account is: a non-hotspot account;
And under the condition that the first concurrency is greater than the first concurrency threshold and is less than or equal to the second concurrency threshold, determining that the account heat of the target main account is: a general hotspot account;
and under the condition that the first concurrency is larger than the second concurrency threshold, determining that the account heat of the target main account is: limit hot spot accounts.
5. The method of any of claims 1-4, further comprising:
obtaining N sub-accounts obtained by performing the scattered modulus processing on the target main account under the condition that the first concurrency is greater than the first concurrency threshold and is smaller than or equal to the second concurrency threshold;
acquiring second concurrency of each of the N sub-accounts in the target period;
Selecting M target sub-accounts of which the second concurrency is less than or equal to the first concurrency threshold from the N sub-accounts;
and accessing the target transaction request into one of the M target sub-accounts for transaction processing.
6. The method of claim 5, wherein accessing the target transaction request to one of the M target sub-accounts for transaction processing comprises:
Acquiring a request sequence number of the target transaction request and acquiring account numbers of the M target sub-accounts;
calculating a target remainder of the request sequence number to the account number;
determining a preferred sub-account from the M target sub-accounts according to the target remainder;
And accessing the target transaction request into the preferred sub-account for transaction processing.
7. The method according to claim 5, wherein:
randomly selecting one of the M target sub-accounts as a preferred sub-account;
And accessing the target transaction request into the preferred sub-account for transaction processing.
8. The method of claim 5, wherein obtaining the second concurrency for each of the N sub-accounts for the target period comprises:
And reading the second concurrency of each of the N sub-accounts in the target period from an internal memory database, wherein the second concurrency of each of the N sub-accounts associated with the target main account is stored in the internal memory database in the form of key value pairs.
9. The method of any of claims 1-4, further comprising:
Acquiring business importance information of the target transaction under the condition that the first concurrency is greater than the first concurrency threshold and is less than or equal to the second concurrency threshold;
And processing the target transaction request according to the business importance degree information of the target transaction.
10. The method of claim 9, wherein processing the target transaction request according to the business importance information of the target transaction comprises:
under the condition that the business importance degree information of the target transaction is that the target transaction is an important business, the target transaction request is directly accessed into the target main account for transaction processing;
and under the condition that the business importance degree information of the target transaction is that the target transaction is a non-important business, processing the target transaction request in an asynchronous processing mode or processing the target transaction request in a loose-mode processing mode.
11. The method of any of claims 1-4, further comprising:
And under the condition that the first concurrency is smaller than or equal to the first concurrency threshold, directly accessing the target transaction request into the target main account for transaction processing.
12. The method of any of claims 1-4, further comprising:
And rejecting access to the target transaction request and generating transaction alarm information under the condition that the first concurrency is greater than the second concurrency threshold.
13. A request processing apparatus comprising:
the first determining module is used for responding to a target transaction request for target transaction initiated by a user, and determining a target main account to be accessed by the target transaction request;
The first acquisition module is used for acquiring first concurrency of the target main account in a target period;
a second determining module, configured to determine a first concurrency threshold and a second concurrency threshold of the target primary account based on the target transaction, where the first concurrency threshold is less than the second concurrency threshold; and
And the third determining module is used for determining the account heat of the target main account for the target transaction according to the first concurrency, the first concurrency threshold and the second concurrency threshold.
14. An electronic device, comprising:
One or more processors;
Storage means for storing one or more programs,
Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-12.
15. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1 to 12.
16. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 12.
CN202410157655.3A 2024-02-04 2024-02-04 Request processing method and device, equipment, storage medium and program product Pending CN117994035A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410157655.3A CN117994035A (en) 2024-02-04 2024-02-04 Request processing method and device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410157655.3A CN117994035A (en) 2024-02-04 2024-02-04 Request processing method and device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN117994035A true CN117994035A (en) 2024-05-07

Family

ID=90890260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410157655.3A Pending CN117994035A (en) 2024-02-04 2024-02-04 Request processing method and device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN117994035A (en)

Similar Documents

Publication Publication Date Title
US20200327551A1 (en) Resource transferring monitoring method and device
US10241826B2 (en) Semantic-aware and user-aware admission control for performance management in data analytics and data storage systems
US20220284082A1 (en) Authentication challenges based on fraud initiation requests
CN108923996B (en) Capacity analysis method and device
CN112184154A (en) Business approval method and device
US20230087106A1 (en) Tokenization request handling at a throttled rate in a payment network
US20210216999A1 (en) Systems and methods for real-time virtual gift card purchasing
CN112181948A (en) Database operation statement processing method and device, electronic equipment and medium
US11412003B1 (en) Resource protection and verification with bidirectional notification architecture
CN111581055A (en) Business system control method and device, electronic equipment and readable storage medium
US20170249697A1 (en) System and method for machine learning based line assignment
CN117994035A (en) Request processing method and device, equipment, storage medium and program product
US11243979B1 (en) Asynchronous propagation of database events
CN114218283A (en) Abnormality detection method, apparatus, device, and medium
US20230289754A1 (en) Procuring and presenting deposit transaction details
WO2024092547A1 (en) Graph computing for electronic communication risk detection
CN113971007B (en) Information processing method, device, electronic equipment and medium
US12003550B2 (en) Resource protection and verification with bidirectional notification architecture
CN112258310B (en) Resource processing method, device and system
CN113283814A (en) Business processing efficiency determination method and device, electronic equipment and readable storage medium
CN117078392A (en) Method for determining credit limit, credit server, electronic equipment and medium
CN114860550A (en) Method and device for monitoring application in real time
CN117033443A (en) Account balance query method and device, electronic equipment and medium
CN117312398A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN117609328A (en) Service processing method, device, equipment and storage medium

Legal Events

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