CN110716794B - Information processing method, device, system and readable storage medium - Google Patents
Information processing method, device, system and readable storage medium Download PDFInfo
- Publication number
- CN110716794B CN110716794B CN201910977459.XA CN201910977459A CN110716794B CN 110716794 B CN110716794 B CN 110716794B CN 201910977459 A CN201910977459 A CN 201910977459A CN 110716794 B CN110716794 B CN 110716794B
- Authority
- CN
- China
- Prior art keywords
- account
- processed
- current
- access request
- access
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The disclosure provides an information processing method, which includes acquiring a first access request for accessing a pending account, wherein the first access request includes first account information of the pending account; determining whether the account to be processed is a hotspot account or not based on the first account information, wherein the hotspot account comprises an account which is accessed within a first preset time period for a number of times greater than a preset access number of times; and determining to perform a current limiting operation on the first access request in the case that the account to be processed is determined to be the hotspot account. Wherein the current limiting operation comprises: acquiring the number of times of access requests for accessing the account to be processed in the current time interval of the first access request; when the times are larger than the current limit threshold value, the first access request is refused to access the account to be processed; and allowing the first access request to access the pending account if the number of times is not greater than the current limit threshold. The present disclosure also provides an information processing apparatus, a system, and a computer-readable storage medium.
Description
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to an information processing method, apparatus, system, and readable storage medium.
Background
To prevent system failure due to unexpected transaction volume surges, the service interface is typically throttled to protect the system when the number of service interface processing access transactions reaches a predetermined value.
In implementing the disclosed concept, the inventors found that there are at least the following problems in the related art: it is far from sufficient that only the service interface is limited for the transactions requiring database processing, for example, due to the existence of the database transaction lock, the threshold value of the number of transactions processed by the database per second is often smaller than the predetermined value, and when the number of transactions processed by the database exceeds the threshold value, the performance of the database is reduced, and even the database is down.
Disclosure of Invention
In view of the above, the present disclosure provides an information processing method, apparatus, system, and readable storage medium.
One aspect of the present disclosure provides an information processing method, including: acquiring a first access request for accessing the account to be processed, wherein the first access request comprises first account information of the account to be processed; determining whether the account to be processed is a hotspot account or not based on the first account information; and determining to perform a current limiting operation on the first access request in the case that the account to be processed is determined to be the hotspot account.
According to an embodiment of the present disclosure, the current limiting operation includes: acquiring the number of times of access requests for accessing the account to be processed in the current time interval of the first access request; when the times are larger than the current limit threshold value, the first access request is refused to access the account to be processed; and allowing the first access request to access the pending account if the number of times is not greater than the current limit threshold.
According to the embodiment of the disclosure, the method further comprises the step of obtaining a preset current limiting time length for limiting the current of the account to be processed under the condition that the times are not greater than the current limiting threshold value; determining whether the current time length for limiting the current of the account to be processed is greater than a preset current limiting time length or not, wherein the current time length is the time length from the moment when the account to be processed is determined to be the hot account to the current moment; under the condition that the current time length is determined to be larger than the preset current limiting time length, the accessed state of the account to be processed is obtained; and under the condition that the access state indicates that the frequency of accessing the account to be processed meets the preset condition, updating the account to be processed into a non-hotspot account.
According to an embodiment of the present disclosure, acquiring an accessed state of a pending account includes: respectively acquiring first access amount corresponding to an access request for accessing the account to be processed in a plurality of continuous time intervals; comparing the plurality of first access quantities with the current limitation relieving threshold respectively to obtain comparison results; and determining an accessed state of the account to be processed based on the comparison result.
According to the embodiment of the disclosure, acquiring the number of times of the access request for accessing the account to be processed in the current time interval where the first access request is located includes: and inquiring the times of the access requests aiming at the account to be processed, which are recorded in the storage unit, based on the first account information and the time when the first access request is acquired.
According to an embodiment of the present disclosure, determining whether the account to be processed is a hotspot account based on the first account information includes: acquiring a hotspot account information list; and in response to the first account information existing in the account information list, determining that the account to be processed is the hotspot account.
According to an embodiment of the present disclosure, acquiring the hotspot account information list includes: determining second account information of the second account in response to acquiring the information that the database processes the data transaction timeout for the second account; acquiring historical overtime quantity of historical data transaction overtime aiming at a second account processed by the database in a second preset time period based on the second account information; determining whether the current number of the database processing data transaction timeout for the second account is greater than a preset timeout number based on the historical timeout number; and adding the account information of the second account into the hot account information list under the condition that the current number is determined to be larger than the preset overtime number, so that the second account is set as the hot account.
According to an embodiment of the present disclosure, the method further includes updating the historical timeout number by taking the current number as the updated historical timeout number, in case it is determined that the current number is not greater than the timeout preset number.
Another aspect of the disclosed embodiments provides an information processing apparatus including: the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a first access request for accessing a to-be-processed account, and the first access request comprises first account information of the to-be-processed account; a first determining module, configured to determine whether the account to be processed is a hotspot account based on the first account information; and the second determining module is used for determining to execute the current limiting operation on the first access request under the condition that the account to be processed is determined to be the hotspot account.
According to an embodiment of the present disclosure, the limiting operation includes obtaining a number of times of access requests for accessing the account to be processed in a current time interval in which the first access request is located, rejecting the first access request to access the account to be processed if the number of times is greater than a limiting threshold, and allowing the first access request to access the account to be processed if the number of times is not greater than the limiting threshold.
According to an embodiment of the present disclosure, the system further comprises: the second obtaining module is used for obtaining the preset current limiting time length for limiting the current of the account to be processed under the condition that the times are not greater than the current limiting threshold value; a third determining module, configured to determine whether a current time length for current limiting of the account to be processed is greater than the preset current limiting time length, where the current time length is a time length from a time when the account to be processed is determined to be a hotspot account to a current time; the third obtaining module is used for obtaining the accessed state of the account to be processed under the condition that the current time length is determined to be greater than the preset current limiting time length; and the updating module is used for updating the account to be processed into a non-hotspot account under the condition that the access state indicates that the frequency of accessing the account to be processed meets a preset condition.
According to an embodiment of the present disclosure, the first determining module includes: the second acquisition submodule is used for acquiring a hotspot account information list; and the second determining submodule is used for responding to the first account information in the account information list and determining that the account to be processed is the hotspot account.
According to an embodiment of the present disclosure, the second obtaining sub-module includes: the first determining unit is used for responding to the acquired information that the database processes the data transaction timeout aiming at the second account, and determining second account information of the second account; the acquisition unit is used for acquiring historical overtime quantity of historical data transaction overtime aiming at the second account processed by the database in a second preset time period based on the second account information; a second determining unit, configured to determine, based on the historical timeout amount, whether a current amount of the database processing for the second account that is timeout to the data transaction is greater than a preset timeout amount; and the setting unit is used for adding the account information of the second account into the hot spot account information list under the condition that the current number is determined to be larger than the preset overtime number so as to set the second account as the hot spot account.
Another aspect of the disclosure provides an information handling system comprising one or more processors; a storage device to store 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 the above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
According to the embodiment of the disclosure, the technical problem that the performance of the database is reduced when the transaction amount is increased can be at least partially solved, and therefore the pressure of the database can be reduced, and the performance of the database can be guaranteed to keep good technical effect.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically shows an exemplary architecture to which an information processing method according to an embodiment of the present disclosure may be applied;
FIG. 2 schematically shows a flow chart of an information processing method according to an embodiment of the present disclosure;
fig. 3 schematically shows an information processing method according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart for obtaining an accessed status of a pending account according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flow chart for determining whether a pending account is a hotness account according to an embodiment of the present disclosure;
FIG. 6 schematically shows a flowchart for obtaining a hotness account information list according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a flowchart of a method of obtaining a list of hot account information, according to another embodiment of the present disclosure;
FIG. 8 schematically illustrates a flow diagram of an information processing method according to another embodiment of the present disclosure;
fig. 9 schematically shows a block diagram of an information processing apparatus according to an embodiment of the present disclosure; and
FIG. 10 schematically shows a block diagram of an electronic device 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 illustrative only 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 disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not 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 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 is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have 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.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have 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.).
The embodiment of the disclosure provides an information processing method. The method comprises the following steps: the method comprises the steps of obtaining a first access request for accessing a to-be-processed account, wherein the first access request comprises first account information of the to-be-processed account, determining whether the to-be-processed account is a hot account or not based on the first account information, and determining to execute current limiting operation on the first access request under the condition that the to-be-processed account is determined to be the hot account.
According to an embodiment of the disclosure, the current limiting operation may include obtaining a number of access requests for accessing the pending account within a current time interval in which the first access request is located, denying the first access request to access the pending account if the number is greater than a current limiting threshold, and allowing the first access request to access the pending account if the number is not greater than the current limiting threshold.
Fig. 1 schematically shows an exemplary architecture 100 to which an information processing method may be applied according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
The information processing method is described below with respect to the exemplary architecture 100 shown in fig. 1, taking a payment scenario as an example.
As shown in fig. 1, a system architecture 100 according to this embodiment may include a terminal device 101, a network 102, a server 103, and a database 104. Network 102 is the medium used to provide communication links between terminal devices 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
In a payment scenario, the user's asset data may be stored, for example, in database 104, with the correctness of the user's funds flow and balance being controlled by database 104. For example, when a corporate financial staff logs on to a corporate account on the terminal device 101 and pays a prize to an employee via the corporate account, the terminal device 101 sends a request to the server 103 to send a prize to the employee. The server 103 sends the response result to the terminal device 101 in response to receiving the request, and updates the capital flow of the employee and the capital flow of the company by the database 104. In this scenario, the pressure on the database 104 is small and the database performance generally does not degrade.
However, when a corporate financial staff logs in to a corporate account on the terminal device 101 and pays a bonus to all employees through the corporate account, the database 104 needs to update the corporate fund flow every time one employee is awarded a bonus. In this scenario, the pressure on the database 104 increases dramatically due to the existence of the database transaction lock, resulting in a performance degradation of the entire database 104, and in a severe case, a downtime of the database 104.
The present disclosure provides an information processing method capable of reducing the pressure of a database when the transaction amount of the database increases to ensure that the performance of the database does not decrease.
It should be noted that the information processing method provided by the embodiment of the present disclosure may be generally executed by the server 103. Accordingly, the information processing apparatus provided by the embodiment of the present disclosure may be generally provided in the server 103. The information processing method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103. Accordingly, the information processing apparatus provided in the embodiment of the present disclosure may also be provided in a server or a server cluster that is different from the server 103 and is capable of communicating with the terminal device 101 and/or the server 103.
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.
Fig. 2 schematically shows a flow chart of an information processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S203.
In operation S201, a first access request for accessing a pending account is acquired, where the first access request includes first account information of the pending account.
According to an embodiment of the present disclosure, for example, in a payment scenario, the first account information may be, for example, a payment account number or an account name, etc.
According to an embodiment of the present disclosure, the first access request may be, for example, a deduction operation for a first account corresponding to the first account information.
In operation S202, it is determined whether the account to be processed is a hotspot account based on the first account information.
According to the embodiment of the disclosure, the hotspot accounts comprise accounts which are accessed more than the preset access times within the first preset time period. For example, a hotspot account may be an account that is frequently subject to data updates in transaction transactions, for example.
According to the embodiment of the disclosure, a person skilled in the art can set the account list belonging to the hotspot account by himself. It is understood that the hot spot account can be determined in various ways, and the determination of the hot spot account is not limited by the present disclosure.
In operation S203, in a case that it is determined that the account to be processed is the hotspot account, it is determined that a current limiting operation is performed on the first access request.
According to the embodiment of the disclosure, acquiring the number of times of the access request for accessing the account to be processed in the current time interval where the first access request is located includes: and inquiring the times of the access requests aiming at the account to be processed, which are recorded in the storage unit, based on the first account information and the time when the first access request is acquired.
According to an embodiment of the present disclosure, the relevant information for each obtained access request may be stored in a redis cache, for example. The related information, for example, may include at least account information of the pending account and an access time of the access request. For example, "current account + requested seconds" may be used as a key and "number of accesses within current time interval" may be stored as a value in the redis cache. Wherein the request seconds are the time stamp of the access request access. Specifically, if a first access request accesses the account to be processed at 11 o 'clock 15 min 02 sec 9/9, the timestamp of the historical access request may be 11 o' clock 15 min 02 sec 9/9.
Therefore, the number of accesses in the current time interval that has been cached in the redis cache can be queried by using "current account + request seconds" as the key. Specifically, the number of access requests for the first account processed by the 9 th, 11 th, 15 th, 02 sec database recorded in the redis cache is queried, for example, with "first account +9 th, 11 th, 15 th, 02 sec".
According to an embodiment of the present disclosure, the current limiting operation may include: the method comprises the steps of obtaining the number of times of access requests used for accessing to-be-processed accounts in a current time interval where a first access request is located, refusing the first access request to access to the to-be-processed accounts under the condition that the number of times is larger than a current limiting threshold value, and allowing the first access request to access to the to-be-processed accounts under the condition that the number of times is not larger than the current limiting threshold value.
For example, 1 second may be used as a time interval, and if the number of times that the account to be processed is accessed in the current second is greater than the current limit threshold, the first access request may be limited. If the number of times that the account to be processed is accessed in the current second is not greater than the current limiting threshold, the first access request may not be limited.
According to the embodiment of the disclosure, the information processing method can limit the current of the account which is accessed within the first preset time period for more than the preset access times, namely, the current of the hot account is limited, so that the system performance is improved, and the stability of the system is ensured.
Fig. 3 schematically illustrates an information processing method according to another embodiment of the present disclosure.
As shown in fig. 3, the information processing method may further include operations S301 to S304 in addition to the operations S201 to S203 shown in fig. 2.
In operation S301, a preset current limiting time length for limiting a current of an account to be processed is obtained.
For example, the preset current limiting time length may be 10 minutes, that is, a current limiting operation is performed on an access request for accessing the account to be processed for 10 minutes from the determination that the account to be processed is the hot account.
In operation S302, it is determined whether a current time length for current limiting to the account to be processed is greater than a preset current limiting time length.
According to the embodiment of the disclosure, whether the time length from the beginning of current limiting on the account to be processed to the current moment is greater than the preset current limiting time length is determined.
Specifically, for example, the preset current limiting time length may be 10 minutes, and if the current time length for limiting the current account to be processed is 12:00 and the time for accessing the account to be processed by the access request is 12:13, it is determined that the current time length for limiting the current account to be processed is greater than the preset current limiting time length.
In operation S303, in a case that it is determined that the current time length is greater than the preset current limiting time length, an accessed state of the account to be processed is acquired.
In operation S304, under the condition that the access status indicates that the frequency of the to-be-processed account being accessed satisfies the preset condition, the to-be-processed account is updated to a non-hotspot account.
According to the embodiment of the disclosure, the method realizes the dynamic adjustment of the account with the popularity, and after the access frequency of the account to be processed is reduced, the current limitation can not be carried out on the account to be processed.
Detailed example operations of operation S303 and operation S304 according to an embodiment of the present disclosure are schematically illustrated in conjunction with fig. 4.
FIG. 4 schematically shows a flowchart for obtaining an accessed state of a pending account according to an embodiment of the present disclosure.
As shown in fig. 4, the method may include operations S313 to S333.
In operation S313, first access amounts corresponding to access requests for accessing the account to be processed for a plurality of consecutive time intervals are respectively acquired.
According to an embodiment of the present disclosure, the plurality of consecutive time intervals may be a plurality of time intervals consecutive to a current time interval to which the current time belongs. The plurality of consecutive time intervals may or may not include the current time interval. E.g., the current time is the last time of the current time interval, the plurality of consecutive time intervals may comprise the current time interval. For another example, the current time is a time intermediate of the current time interval, and the plurality of consecutive time intervals may not include the current time interval.
In particular, the time interval may be 1 second, and the plurality of consecutive time intervals may be, for example, 60 consecutive 1 seconds, i.e. 1 minute. In other words, a first access amount of an access request to access the account to be processed may be obtained for each second of 1 minute, for example. It will be appreciated that the number of successive time intervals can be set according to the actual requirements.
In operation S323, the plurality of first access amounts are respectively compared with the current removal limit threshold, and a comparison result is obtained.
According to embodiments of the present disclosure, the de-current limit threshold may be, for example, 80% of the current limit threshold. And comparing the first access amount of each second with the current limit release threshold respectively to obtain comparison results.
In operation S333, an accessed state of the account to be processed is determined based on the comparison result.
According to the embodiment of the disclosure, when the comparison result indicates that the first number of the first access amount smaller than the current limit removal threshold is larger than the preset number, it indicates that the frequency of the accessed accounts to be processed meets the preset condition.
For example, the first access amount per second in 1 minute is less than the un-throttling threshold, which indicates that the frequency of accessing the account to be processed satisfies the preset condition. For another example, when the first access amount of 50 seconds in 1 minute is less than the unmarshal threshold, it indicates that the frequency of accessing the account to be processed satisfies the preset condition. It is understood that the preset number can be set according to actual needs.
Fig. 5 schematically shows a flowchart of determining whether the account to be processed is a hot account in operation S202 according to an embodiment of the present disclosure.
As shown in fig. 5, the method may include operations S112 to S122.
In operation S112, a hotspot account information list is acquired.
According to the embodiment of the present disclosure, the hot account information list may be pre-stored in the storage unit, or the hot account information list may be obtained according to the method shown in fig. 6. The method shown in fig. 6 will not be described in detail here.
In operation S122, in response to the first account information existing in the account information list, it is determined that the account to be processed is a hotspot account.
FIG. 6 schematically shows a flowchart for obtaining a hotness account information list according to an embodiment of the disclosure.
As shown in fig. 6, the method may include operations S601 to S604.
In operation S601, in response to acquiring information that the database has timed out to process the data transaction of the second account, second account information of the second account is determined.
For example, when the database deducts funds of the second account, the database executes timeout to determine the second account information of the second account. The second account information may be, for example, an account name of the second account, or a bank card number, or the like.
In operation S602, based on the second account information, a history timeout number for the database to process the history data transaction timeout for the second account within a second preset time period is obtained.
For example, the redis cache may be queried to obtain a historical timeout number of historical access requests of the database for the second account that have timed out within a second preset time period. The second preset time period may be, for example, 10 seconds.
In operation S603, it is determined whether the current number of data transaction timeouts for the second account that the database processes is greater than a preset timeout number based on the historical timeout number.
For example, the historical timeout number is determined to be 20 times by querying the redis cache, and the current number of access request timeout for the second account processed by the database is determined to be 21 times based on the historical timeout number of 20 times and the current timeout. The preset timeout amount may be, for example, 20 times, and the current amount is greater than the preset timeout amount.
In operation S604, in a case that it is determined that the current number is greater than the preset timeout number, the account information of the second account is added to the hot account information list, so that the second account is set as the hot account.
According to an embodiment of the present disclosure, in a case where it is determined that the current number is not greater than the timeout preset number, the history timeout number is updated by taking the current number as the updated history timeout number. For example, the current number is 18 times, the preset number of timeout is 20 times, and the current number is not greater than the preset number of timeout, and the historical timeout number in the redis cache may be updated to 18 times.
According to the embodiment of the disclosure, the method for acquiring the hotspot account information list can further realize dynamic current limitation on the account.
Fig. 7 schematically shows a flowchart of a method for acquiring a hotness account information list according to another embodiment of the disclosure.
As shown in fig. 7, the method may include operations S701 to S707.
In operation S701, information that a data transaction for the second account is timed out is processed in response to acquiring the database. For example, operation S601 may be performed.
In operation S702, it is determined whether a second account exists in the hotspot account information list in the redis. If the second account exists in the hotspot account information list, operation S703 may be performed. If the second account does not exist in the hotspot account information list, operation S707 may be performed.
In operation S703, a current number of transaction timeouts of the database for the second account is calculated. The current number may be calculated, for example, in the method described in operation S602 and operation S603.
In operation S704, it is determined whether the current number is greater than a preset timeout number. If the current number is greater than the preset timeout number, operation S705 is performed. If the current number is not greater than the preset timeout number, operation S706 is performed.
In operation S705, a second account is added to the hot account information list.
In operation S706, the historical timeout amount for the second account is accumulated in redis.
In operation S707, redis records the transaction timeout of the second account, and records the historical timeout amount for the second account as 1.
Fig. 8 schematically shows a flowchart of an information processing method according to another embodiment of the present disclosure.
As shown in fig. 8, the information processing method may include operations S801 to S813.
In operation S801, a first access request for accessing a pending account is obtained, where the first access request may include, for example, first account information of the pending account. The data update transaction of the account to be processed is processed by the database. For example, operation S201 described above with reference to fig. 2 may be performed.
In operation S802, it is determined whether the account to be processed is a hotspot account. For example, operation S202 described above with reference to fig. 2 may be performed. Whether the account to be processed is a hotspot account may be determined, for example, by querying a list of hotspot account information.
If it is determined that the account to be processed is the hotspot account, operation S803 is performed. If it is determined that the account to be processed is not the hotspot account, operation S811 is performed.
In operation S803, the number of access requests for the account to be processed, which have been recorded in redis queried with "current account + request seconds" as a key.
In operation S804, it is determined whether the access request number for the account to be processed has been recorded in redis.
If the access request number for the account to be processed has been recorded in the redis, operation S805 is performed.
If the number of access requests for the pending account is not recorded in the redis, indicating that the current second first requests to access the pending account, operation S810 may be performed.
In operation S805, the number of access requests for the account to be processed, which have been recorded in redis increased by 1.
In operation S806, it is determined whether the current access request number is greater than the current limit threshold. In other words, the number of access requests added by 1 is compared with the current limit threshold.
If the current number of access requests is greater than the current limit threshold, operation S812 is performed, i.e., the first access request is rejected.
If the current number of access requests is not greater than the current throttling threshold, operation S807 is performed.
In operation S807, it is determined whether a time length for which an access request for accessing the account to be processed is throttled is greater than a preset throttling time length. For example, operations S301 and S302 as described in fig. 3 may be performed.
If it is determined that the time length for limiting the access request for accessing the account to be processed is greater than the preset current limiting time length, operation S808 may be performed.
If it is determined that the time period for limiting the access request for accessing the pending account is not greater than the preset current limiting time period, operation S811 may be performed.
In operation S808, the number of access requests per second for 1 minute is acquired. For example, it may be to perform operation S313 described above with reference to fig. 3.
In operation S809, it is compared whether the number of access requests per second is less than the un-current limit threshold. For example, it may be to perform operation S323 described above with reference to fig. 3.
According to one embodiment of the disclosure, if the number of access requests per second is less than the threshold for removing the current limitation, the frequency of accessing the account to be processed meets a preset condition. In this embodiment, if the number of access requests per second is less than the un-throttling threshold, operation S813 may be performed. If there are access request numbers not less than the un-current limit threshold, operation S811 may be performed.
In operation S810, the number of access requests of "current account + requested seconds" may be set to 1.
In operation S811, it is determined that the access request is not limited, access to the access request is allowed, and the database performs a data update operation.
In operation S813, the account to be processed is set as a non-hotspot account.
Fig. 9 schematically shows a block diagram of an information processing apparatus 900 according to an embodiment of the present disclosure.
As shown in fig. 9, the information processing apparatus 900 may include a first acquisition module 910, a first determination module 920, and a second determination module 930.
The first obtaining module 910, for example, may perform operation S201 described above with reference to fig. 2, for obtaining a first access request for accessing the pending account, where the first access request includes first account information of the pending account.
The first determining module 920, for example, may perform operation S202 described above with reference to fig. 2, for determining whether the account to be processed is a hotspot account based on the first account information.
The second determining module 930, for example, may perform operation S203 described above with reference to fig. 2, for determining to perform a current limiting operation on the first access request in case that it is determined that the account to be processed is a hotspot account.
According to an embodiment of the present disclosure, the current limiting operation includes: acquiring the number of times of access requests for accessing the account to be processed in the current time interval of the first access request; when the times are larger than the current limit threshold value, the first access request is refused to access the account to be processed; and allowing the first access request to access the pending account if the number of times is not greater than the current limit threshold.
According to an embodiment of the present disclosure, the information processing apparatus may further include a second obtaining module, a third determining module, a third obtaining module, and an updating module. The second obtaining module is used for obtaining the preset current limiting time length for limiting the current of the account to be processed under the condition that the times are not greater than the current limiting threshold value. The third determining module is used for determining whether the current time length for limiting the current of the account to be processed is greater than a preset current limiting time length, wherein the current time length is the time length from the moment when the account to be processed is determined to be the hotspot account to the current moment. The third acquisition module is used for acquiring the accessed state of the account to be processed under the condition that the current time length is determined to be greater than the preset current limiting time length. The updating module is used for updating the account to be processed into a non-hotspot account under the condition that the access state indicates that the frequency of the account to be processed being accessed meets the preset condition.
According to the embodiment of the disclosure, the third obtaining module further executes to respectively obtain first access amounts corresponding to access requests for accessing the account to be processed in a plurality of continuous time intervals; comparing the plurality of first access quantities with the current limitation relieving threshold respectively to obtain comparison results; and determining an accessed state of the account to be processed based on the comparison result.
According to the embodiment of the disclosure, acquiring the number of times of the access request for accessing the account to be processed in the current time interval where the first access request is located includes: and inquiring the times of the access requests aiming at the account to be processed, which are recorded in the storage unit, based on the first account information and the time when the first access request is acquired.
According to an embodiment of the present disclosure, the first determination module may include a second acquisition sub-module, a second determination sub-module, and a third determination sub-module. And the second acquisition submodule is used for acquiring the hotspot account information list. And the second determining submodule is used for responding to the first account information existing in the account information list and determining that the account to be processed is the hotspot account.
According to an embodiment of the present disclosure, the second acquisition submodule includes a first determination unit, an acquisition unit, a second determination unit, and a setting unit. The first determining unit is used for determining second account information of the second account in response to the acquired information that the database processes the data transaction for the second account overtime. The acquisition unit is used for acquiring historical timeout quantity of historical data transaction timeout aiming at the second account processed by the database in a second preset time period based on the second account information. The second determining unit is used for determining whether the current number of the data transaction overtime processed by the database aiming at the second account is larger than the preset overtime number or not based on the historical overtime number. And the setting unit is used for adding the account information of the second account into the hot account information list under the condition that the current number is determined to be larger than the preset overtime number so as to set the second account as the hot account.
According to an embodiment of the present disclosure, in a case where it is determined that the current number is not greater than the timeout preset number, the history timeout number is updated by taking the current number as the updated history timeout number.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, 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 any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any plurality of the first obtaining module 910, the first determining module 920 and the second determining module 930 may be combined and implemented in one module, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first obtaining module 910, the first determining module 920 and the second determining module 930 may be implemented at least partially as a hardware circuit, 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 by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware and firmware, or any suitable combination of any of them. Alternatively, at least one of the first obtaining module 910, the first determining module 920 and the second determining module 930 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
FIG. 10 schematically shows a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 10, an electronic device 1000 according to an embodiment of the present disclosure includes a processor 1001 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. Processor 1001 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 1001 may also include onboard memory for caching purposes. The processor 1001 may include a single processing unit or multiple processing units for performing different actions of a method flow according to embodiments of the present disclosure.
In the RAM1003, various programs and data necessary for the operation of the electronic apparatus 1000 are stored. The processor 1001, ROM 1002, and RAM1003 are connected to each other by a bus 1004. The processor 1001 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 1002 and/or the RAM 1003. Note that the programs may also be stored in one or more memories other than the ROM 1002 and the RAM 1003. The processor 1001 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. The computer program performs the above-described functions defined in the system of the embodiment of the present disclosure when executed by the processor 1001. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the 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 present 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, a computer-readable storage medium may include the ROM 1002 and/or the RAM1003 described above and/or one or more memories other than the ROM 1002 and the RAM 1003.
The flowchart 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 various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.
Claims (10)
1. An information processing method comprising:
acquiring a first access request for accessing a pending account, wherein the first access request comprises first account information of the pending account;
determining whether the account to be processed is a hotspot account based on the first account information; and
determining to perform a throttling operation on the first access request if it is determined that the pending account is a hotspot account,
the method further comprises performing, after performing a throttling operation on the first access request, if a number of access requests for accessing the pending account within a current time interval of the first access request is not greater than a throttling threshold:
acquiring preset current limiting time length for limiting the current of the account to be processed;
determining whether the current time length for limiting the access request for accessing the account to be processed is greater than the preset current limiting time length or not, wherein the current time length is the time length from the moment when the account to be processed is determined to be the hotspot account to the current moment;
under the condition that the current time length is determined to be larger than the preset current limiting time length, acquiring the accessed state of the account to be processed;
and under the condition that the access state indicates that the frequency of accessing the account to be processed meets a preset condition, updating the account to be processed into a non-hotspot account.
2. The method of claim 1, wherein the current limiting operation comprises:
acquiring the number of times of access requests for accessing the account to be processed in the current time interval of the first access request;
if the number of times is larger than a current limit threshold, rejecting the first access request to access the account to be processed; and
and allowing the first access request to access the account to be processed under the condition that the times are not greater than the current limit threshold value.
3. The method of claim 1, wherein the obtaining the accessed status of the pending account comprises:
respectively acquiring first access amount corresponding to an access request for accessing the account to be processed in a plurality of continuous time intervals;
comparing the first access quantities with a current limitation relieving threshold value respectively to obtain comparison results; and
determining an accessed state of the account to be processed based on the comparison result.
4. The method of claim 1, wherein the obtaining the number of access requests to access the pending account within the current time interval of the first access request comprises:
and inquiring the number of times of the access requests aiming at the account to be processed, which are recorded in a storage unit, based on the first account information and the time when the first access request is acquired.
5. The method of claim 1, wherein the determining whether the account to be processed is a hotspot account based on the first account information comprises:
acquiring a hotspot account information list;
in response to the first account information existing in the account information list, determining that the account to be processed is a hotspot account.
6. The method of claim 5, wherein the obtaining the list of hotspot account information comprises:
determining second account information of a second account in response to acquiring information that a database processes data transaction timeout for the second account;
acquiring historical overtime quantity of historical data transaction overtime of the database aiming at the second account in a second preset time period based on the second account information;
determining, based on the historical timeout amount, whether a current amount of the database processing data transactions for the second account that are timeout is greater than a preset timeout amount; and
and under the condition that the current number is determined to be larger than the preset timeout number, adding the account information of the second account into the hot spot account information list so as to set the second account as a hot spot account.
7. The method of claim 6, further comprising: in a case where it is determined that the current number is not greater than the timeout preset number, updating the history timeout number by taking the current number as an updated history timeout number.
8. An information processing apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a processing module, wherein the first acquisition module is used for acquiring a first access request for accessing a to-be-processed account, and the first access request comprises first account information of the to-be-processed account;
a first determining module, configured to determine whether the account to be processed is a hotspot account based on the first account information; and
a second determination module, configured to determine to perform a throttling operation on the first access request if it is determined that the account to be processed is a hotspot account,
the device further comprises:
a second obtaining module, configured to obtain a preset current limiting time length for limiting current for the account to be processed when a number of times is not greater than a current limiting threshold, where the number of times is a number of times of access requests for accessing the account to be processed in a current time interval in which the first access request is located;
a third determining module, configured to determine whether a current time length for limiting a current of an access request for accessing the account to be processed is greater than the preset current limiting time length, where the current time length is a time length from a time when the account to be processed is determined to be a hotspot account to a current time;
the third obtaining module is used for obtaining the accessed state of the account to be processed under the condition that the current time length is determined to be greater than the preset current limiting time length;
and the updating module is used for updating the account to be processed into a non-hotspot account under the condition that the access state indicates that the frequency of accessing the account to be processed meets a preset condition.
9. An information processing system comprising:
one or more processors;
a storage device 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-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910977459.XA CN110716794B (en) | 2019-10-14 | 2019-10-14 | Information processing method, device, system and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910977459.XA CN110716794B (en) | 2019-10-14 | 2019-10-14 | Information processing method, device, system and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110716794A CN110716794A (en) | 2020-01-21 |
CN110716794B true CN110716794B (en) | 2020-09-29 |
Family
ID=69211703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910977459.XA Active CN110716794B (en) | 2019-10-14 | 2019-10-14 | Information processing method, device, system and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110716794B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111756644B (en) * | 2020-06-30 | 2023-04-07 | 深圳壹账通智能科技有限公司 | Hot spot current limiting method, system, equipment and storage medium |
CN111866101B (en) * | 2020-07-08 | 2023-05-26 | 深圳市欢太科技有限公司 | Access request processing method and device, storage medium and electronic equipment |
CN113645310A (en) * | 2021-08-20 | 2021-11-12 | 北京高途云集教育科技有限公司 | Data current limiting method and device, electronic equipment and readable storage medium |
CN114756544A (en) * | 2022-03-22 | 2022-07-15 | 阿里云计算有限公司 | Hot spot identification method and current limiting method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106712972A (en) * | 2015-07-28 | 2017-05-24 | 中国移动通信集团公司 | Charging rule updating method, device and system |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102915374B (en) * | 2012-11-07 | 2016-04-06 | 北京搜狐新媒体信息技术有限公司 | A kind of method, Apparatus and system of resource access of controlling database |
CN105869043A (en) * | 2015-01-19 | 2016-08-17 | 阿里巴巴集团控股有限公司 | Disperse hot spot database account transfer-in and transfer-out accounting method and device |
CN106302390A (en) * | 2016-07-27 | 2017-01-04 | 福建富士通信息软件有限公司 | A kind of method limited based on NGINX access frequency and system |
CN106529962A (en) * | 2016-11-18 | 2017-03-22 | 中国银联股份有限公司 | Method and device used for enhancing hotspot account processing ability in trading system |
CN108255827A (en) * | 2016-12-28 | 2018-07-06 | 卓望数码技术(深圳)有限公司 | The processing method and system of a kind of hot spot data |
CN106934031B (en) * | 2017-03-14 | 2020-03-13 | 中国银行股份有限公司 | Method and device for monitoring and processing hotspot records in real-time processing system |
CN106952158A (en) * | 2017-03-17 | 2017-07-14 | 证通股份有限公司 | Solve the problems, such as the bookkeeping methods and equipment of focus account |
US10242037B2 (en) * | 2017-04-20 | 2019-03-26 | Servicenow, Inc. | Index suggestion engine for relational databases |
CN107767264A (en) * | 2017-10-27 | 2018-03-06 | 中国银行股份有限公司 | Online transaction system focus account trading flow pressure real-time monitoring method and device |
CN108647801B (en) * | 2018-03-23 | 2020-04-14 | 阿里巴巴集团控股有限公司 | Method and device for predicting financial hotspot |
CN110046142A (en) * | 2019-01-23 | 2019-07-23 | 阿里巴巴集团控股有限公司 | The removing method and its system of data update hot spot |
CN110247856B (en) * | 2019-05-24 | 2022-08-12 | 平安科技(深圳)有限公司 | Server resource release method and device |
-
2019
- 2019-10-14 CN CN201910977459.XA patent/CN110716794B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106712972A (en) * | 2015-07-28 | 2017-05-24 | 中国移动通信集团公司 | Charging rule updating method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN110716794A (en) | 2020-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110716794B (en) | Information processing method, device, system and readable storage medium | |
US20210049608A1 (en) | Transaction method and system based on centralized clearing and blockchain record keeping | |
US11042876B2 (en) | Transaction method and system based on centralized settlement and blockchain deposit certificates | |
US20210049595A1 (en) | Transaction method and system based on centralized settlement and block chain storage | |
CN110401720B (en) | Information processing method, device, system, application server and medium | |
US9998418B2 (en) | Intelligent message queue management | |
US20180365688A1 (en) | Transaction execution and validation in a blockchain | |
CN111262795B (en) | Service interface-based current limiting method and device, electronic equipment and storage medium | |
US20140201841A1 (en) | Client Security Scoring | |
US9471241B2 (en) | Methods and systems for formatting storage volumes | |
US20170098215A1 (en) | Data Protection System for Online Data | |
CN109450806B (en) | Flow control method and device and distributed cluster | |
KR101905771B1 (en) | Self defense security server with behavior and environment analysis and operating method thereof | |
US10025624B2 (en) | Processing performance analyzer and process manager | |
CN117118698A (en) | Access flow limiting method, device and equipment of metadata server | |
KR102165272B1 (en) | Method and server for managing data stored in block chain | |
US11157281B2 (en) | Prefetching data based on register-activity patterns | |
US11863561B2 (en) | Edge attestation for authorization of a computing node in a cloud infrastructure system | |
CN114968552A (en) | Cache allocation method, apparatus, device, storage medium and program product | |
CN114693358A (en) | Data processing method and device, electronic equipment and storage medium | |
CN114157482A (en) | Service access control method, device, control equipment and storage medium | |
CN114218283A (en) | Abnormality detection method, apparatus, device, and medium | |
US10754776B2 (en) | Cache balance when using hardware transactional memory | |
US10061614B2 (en) | Resource management for untrusted programs | |
CN114791859B (en) | Component processing method, device, equipment and storage medium based on block chain BaaS |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |