Transaction volume control method and device based on gateway and medium
By receiving target transaction requests and determining their maximum transaction number, the problem of difficulty in accurately controlling multiple transaction requests in the prior art is solved, effective control of the gateway load is achieved, and the normal operation of the gateway is ensured.
Patent Information
- Application Number
- CN202411603360.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, when controlling the number of transaction requests received by the gateway, it is difficult to accurately control transaction requests including multiple transactions, resulting in excessive gateway load and inability to operate normally.
By receiving the target transaction request, the corresponding target key information string is determined, and the maximum transaction number is determined based on the key information string, thereby controlling the execution of the transaction request.
Accurate control of transaction requests including multiple transactions is achieved, avoiding the gateway load exceeding and ensuring the normal operation of the gateway.
Smart Images

Figure CN119561903A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the financial field or other fields, and in particular to a gateway-based transaction volume control method, device and medium. Background Art
[0002] The transaction processing of banks is inseparable from the gateway. The gateway receives various transaction requests triggered by users, but the gateway's transaction processing capacity is limited. Therefore, it is necessary to control the number of transactions in the transaction requests reaching the gateway to ensure the normal operation of the gateway.
[0003] At present, the transaction volume control of the gateway is mostly based on controlling the number of tokens issued to users to control the number of transaction requests accessing the gateway. However, for a transaction request that can include multiple transactions, this method alone cannot accurately control the number of transactions accessing the gateway, causing the gateway to still be overloaded and unable to operate normally. Summary of the invention
[0004] The embodiments of the present application provide a gateway-based transaction volume control method, device and medium to ensure the normal operation of the gateway.
[0005] In a first aspect, an embodiment of the present application provides a gateway-based transaction volume control method, comprising:
[0006] Receiving a target transaction request from a target account; wherein the target transaction request represents a transaction request including multiple transactions;
[0007] According to the target transaction request, determining a target key information string corresponding to the target transaction request; wherein the target key information string is used to classify the target transaction request;
[0008] Determining a maximum transaction quantity corresponding to the target transaction request according to the target key information string;
[0009] The target transaction request is executed according to the maximum transaction quantity corresponding to the target transaction request.
[0010] In a possible implementation, determining, according to the target transaction request, a target key information string corresponding to the target transaction request includes:
[0011] If it is determined that the value of the preset keyword in the target transaction request is valid, the target key information string is determined according to the valid preset keyword and the value of the valid preset keyword.
[0012] In a possible implementation manner, determining the target key information string according to a valid preset keyword and a value of the valid preset keyword includes:
[0013] Determining the type of the target transaction request according to the target transaction request;
[0014] Determining a configuration rule of the target key information string according to the type of the target transaction request;
[0015] The target key information string is determined according to the configuration rule of the target key information string, the valid preset keyword, and the value of the valid preset keyword.
[0016] In a possible implementation manner, the gateway has a configuration file, the configuration file includes a correspondence between a key information string and a limit value; determining the maximum transaction quantity corresponding to the target transaction request according to the target key information string includes:
[0017] If it is determined that the target key information string exists in the configuration file, the maximum transaction quantity corresponding to the target transaction request is determined according to the limit value corresponding to the target key information string included in the configuration file.
[0018] In a possible implementation, the method further includes:
[0019] If it is determined that the target key information string does not exist in the configuration file, determining a candidate key information string according to the key information strings included in the configuration file;
[0020] The maximum transaction quantity corresponding to the target transaction request is determined according to the limit value corresponding to the candidate key information string.
[0021] In a possible implementation manner, determining a candidate key information string in the target transaction request according to the key information string included in the configuration file includes:
[0022] Acquire a first candidate keyword and a second candidate keyword in the target key information string;
[0023] Determine, according to the key information string included in the configuration file, the target key information string, and the second candidate keyword, a similarity vector corresponding to the key information string included in the configuration file; wherein the similarity vector represents the similarity between the value of the second candidate keyword in the key information string included in the configuration file and the value of the second candidate keyword in the target key information string;
[0024] The candidate key information string is determined according to the key information string included in the configuration file, the first candidate keyword, the target key information string, and the similarity vector.
[0025] In a possible implementation, determining the candidate key information string according to the key information string included in the configuration file, the first candidate keyword, the target key information string, and the similarity vector includes:
[0026] determining an initial candidate key information string from the key information strings included in the configuration file according to the modulus of the similarity vector;
[0027] An initial candidate key information string in which the value of the first candidate key in the initial candidate key information string is consistent with the value of the first candidate key in the target key information string is used as the candidate key information string.
[0028] In a possible implementation, executing the target transaction request according to the maximum transaction quantity corresponding to the target transaction request includes:
[0029] Obtaining the transaction quantity included in the target transaction request;
[0030] If it is determined that the transaction quantity included in the target transaction request is less than or equal to the maximum transaction quantity corresponding to the target transaction request, all transactions included in the target transaction request are executed.
[0031] In a second aspect, an embodiment of the present application provides a gateway-based transaction volume control device, comprising:
[0032] A receiving module, configured to receive a target transaction request of a target account; wherein the target transaction request represents a transaction request including multiple transactions;
[0033] A first determination module is used to determine a target key information string corresponding to the target transaction request according to the target transaction request; wherein the target key information string is used to classify the target transaction request;
[0034] A second determination module, configured to determine a maximum transaction quantity corresponding to the target transaction request according to the target key information string;
[0035] The execution module is used to execute the target transaction request according to the maximum transaction quantity corresponding to the target transaction request.
[0036] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0037] The memory stores computer-executable instructions;
[0038] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0041] The gateway-based transaction volume control method, device and medium provided in the embodiment of the present application can determine the target key information string of the target transaction request based on the target transaction request initiated by the target account, and then determine the maximum transaction quantity corresponding to the target transaction request based on the target key information string, and execute the target transaction request based on the relationship between the maximum transaction quantity corresponding to the target transaction request and the transaction quantity included in the transaction request. In this way, the gateway can control the transaction quantity in the transaction request for a transaction request including multiple transactions, ensure that the transaction quantity that the gateway can process does not exceed the load capacity, and then ensure the normal operation of the gateway. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] Figure 1 A schematic diagram of an application scenario provided for this application;
[0044] Figure 2 Schematic diagram of the process of the gateway-based transaction volume control method provided in this application Figure 1 ;
[0045] Figure 3 Schematic diagram of the process of the gateway-based transaction volume control method provided in this application Figure 2 ;
[0046] Figure 4 A schematic diagram of the structure of the gateway-based transaction volume control device provided in this application;
[0047] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.
[0048] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0050] Figure 1 A schematic diagram of an application scenario provided for this application, such as Figure 1 As shown, the specific application scenarios of this application include gateways and external systems.
[0051] The external system is used to provide a user interface (such as a web page, APP, etc.) for users to input transaction information and submit transaction requests. The external system can be an electronic device with a client for transaction processing, such as a mobile phone, tablet computer, computer, wearable device, etc.
[0052] The above-mentioned gateway is used to receive transaction requests from external systems, and route the requests to corresponding microservices according to the content, type or destination of the requests, and return the processing results fed back by the microservices to the external system. The gateway can be an electronic device with processing capabilities, such as a server or a server cluster, which is not limited in this application. The execution subject of this application can be the gateway.
[0053] Combining the above scenarios, it can be seen that the gateway needs to process transaction requests from various external systems. In order to ensure the normal operation of the gateway, it is necessary to control the number of transactions reaching the gateway. In the prior art, most of them are based on controlling the number of tokens issued to users to control the number of transaction requests accessing the gateway. However, for a transaction request that can include multiple transactions, it is impossible to accurately control the number of transactions accessing the gateway using only this method, so that the gateway is still overloaded and cannot operate normally.
[0054] The gateway-based transaction volume control method provided in the present application determines the maximum transaction quantity corresponding to a transaction request including multiple transactions, processes the transaction request based on the maximum transaction quantity, and ensures the normal operation of the gateway.
[0055] It should be noted that the gateway-based transaction volume control method, device and medium provided in the present application can be used in the financial field or other fields, and can also be used in any field other than the financial field or other fields. The application field of the gateway-based transaction volume control method, device and medium provided in the present application is not limited.
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0057] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0058] Figure 2 Schematic diagram of the process of the gateway-based transaction volume control method provided in this application Figure 1 ,like Figure 2 As shown, the method includes:
[0059] S201: Receive a target transaction request from a target account.
[0060] Exemplarily, the target account indicates an account that can trigger multiple transactions in the same transaction request, such as a public account. The target transaction request represents a transaction request including multiple transactions. The number of transactions included in the target transaction request is related to the initiator of the transaction request, and this application does not limit this.
[0061] In some possible implementations, the gateway may monitor and receive a target transaction request from an external system. Optionally, after receiving multiple transaction requests, the gateway may determine whether the transaction request is a target transaction request based on the type of the transaction request or the number of transactions in the transaction request. For example, if the number of transactions in the transaction request is greater than a preset threshold, the transaction request is determined to be a target transaction request. Alternatively, the gateway determines whether the transaction request is a target transaction request based on the type of the account that initiates the transaction request. For example, if it is determined that the initiating account of the transaction request is a preset target account, the transaction request is determined to be a target transaction request.
[0062] Optionally, the gateway may also perform security verification on the target transaction request, for example, including checking whether the signature is valid, whether the transaction request is within the validity period, and whether the source of the transaction request is legal.
[0063] S202: Determine a target key information string corresponding to the target transaction request according to the target transaction request.
[0064] Exemplarily, the above-mentioned target key information string is used to classify the target transaction request. The target key information string may include key information in the target transaction request, such as transaction type, transaction amount range, transaction initiator, target account, transaction quantity, etc. The present application does not limit the content in the key information string.
[0065] In some possible implementations, the gateway may parse the target transaction request, extract the field values of the preset fields in the target transaction request, and concatenate them according to certain rules to obtain the target key information string.
[0066] S203: Determine the maximum transaction quantity corresponding to the target transaction request according to the target key information string.
[0067] Exemplarily, the above-mentioned maximum transaction quantity represents the gateway's ability to process transactions per unit time.
[0068] In some possible implementations, the gateway may preset a correspondence between the key information string and the maximum transaction quantity, and then the gateway may determine the maximum transaction quantity corresponding to the target transaction request based on the target key information string and the correspondence.
[0069] S204: Execute the target transaction request according to the maximum transaction quantity corresponding to the target transaction request.
[0070] Exemplarily, the gateway may determine the transaction quantity included in the target transaction request, and determine whether the transaction quantity exceeds the maximum transaction quantity corresponding to the target transaction request, and then execute the target transaction request based on the relationship between the transaction quantity and the maximum transaction quantity corresponding to the target transaction request.
[0071] In some possible implementations, if it is determined that the maximum transaction quantity corresponding to the target transaction request is exceeded, a prompt message of refusing to process the transaction request can be returned to prompt the user to modify the transaction quantity in the transaction request; the gateway may also only execute transactions with the maximum transaction quantity, and may refuse to execute transactions that exceed the quantity, or may add the transaction to a waiting queue and execute transactions in the waiting queue only after the transactions with the maximum transaction quantity are executed.
[0072] Optionally, if it is determined that the maximum transaction quantity corresponding to the target transaction request is not exceeded, the gateway may directly execute each transaction in the target transaction request.
[0073] It should be noted that this application does not limit how to execute transaction requests. For example, the gateway can pre-process each transaction, such as checking the account balance, generating a transaction serial number, etc., and ensure that each transaction complies with the transaction rules and restrictions of the gateway. Then, the transactions are executed one by one in the order in the target transaction request. After each transaction is executed, the account balance, transaction record and other information are updated, and the transaction result is returned to the target account.
[0074] It should be understood that the target transaction request accessing the gateway may be controlled by a token, and the gateway may further utilize the method provided in the present application to control the number of transactions in the target transaction request based on the token to ensure the normal operation of the gateway.
[0075] In the transaction volume control method based on the gateway provided in the embodiment of the present application, the gateway can determine the target key information string of the target transaction request based on the target transaction request initiated by the target account, and then determine the maximum transaction quantity corresponding to the target transaction request based on the target key information string, and execute the target transaction request based on the relationship between the maximum transaction quantity corresponding to the target transaction request and the transaction quantity included in the transaction request. In this way, the gateway can control the transaction quantity in the transaction request for a transaction request including multiple transactions, ensure that the transaction quantity that the gateway can process does not exceed the load capacity, and then ensure the normal operation of the gateway.
[0076] Figure 3 Schematic diagram of the process of the gateway-based transaction volume control method provided in this application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a gateway-based transaction volume control method is described in detail, and the method includes:
[0077] S301: Receive a target transaction request from a target account.
[0078] It should be noted that this step is similar to the aforementioned step S201 and will not be repeated here.
[0079] S302: If it is determined that the value of the preset keyword in the target transaction request is valid, determine the target key information string according to the valid preset keyword and the value of the valid preset keyword.
[0080] Exemplarily, the above keywords represent the field names in the transaction request, such as transaction type, transaction amount range, transaction initiator, target account, transaction quantity, etc. The gateway can preset multiple keywords in advance, and then determine whether the field value corresponding to the preset keyword in the target transaction request is valid based on the preset keywords, where valid means a valid value, or a non-null value. For example, preset keywords 1 and keyword 2, in the target transaction request, the value corresponding to keyword 1 is a null value, then the value corresponding to keyword 1 is invalid, and keyword 1 is invalid; the value corresponding to keyword 2 is 11, then the value corresponding to keyword 2 is valid, and keyword 2 is valid. Then, the valid keyword and the value of the valid keyword can be combined into the target key information string.
[0081] Optionally, the gateway may determine the type of the target transaction request based on the target transaction request; determine the configuration rules of the target key information string based on the type of the target transaction request; determine the target key information string based on the configuration rules of the target key information string, valid preset keywords, and the values of the valid preset keywords.
[0082] Optionally, if it is determined that the values of the preset keywords in the target transaction request are all invalid, the transaction request is rejected and a prompt message is returned.
[0083] S303: Determine whether the target key information string exists in the configuration file.
[0084] Exemplarily, the gateway has a configuration file, which includes a correspondence between a key information string and a limit value. The limit value represents the limit value of the gateway's transaction processing capability, in other words, the limit value of the number of transactions.
[0085] For example, the gateway may match the target key information string with the key information string included in the configuration file to determine whether the target key information string exists in the configuration file. For example, the similarity between the target key information string and the key information string included in the configuration file may be calculated. If the similarity value is greater than or equal to a preset similarity threshold, it is determined that the target key information string exists in the configuration file, otherwise. If it is determined that the target key information string exists in the configuration file, step S304 is executed; if it is determined that the target key information string does not exist in the configuration file, step S305 is executed.
[0086] S304: Determine the maximum transaction quantity corresponding to the target transaction request according to the limit value corresponding to the target key information string included in the configuration file.
[0087] Exemplarily, as mentioned above, the configuration file includes a correspondence between key information strings and limit values. Therefore, when the target key information string exists in the configuration file, the gateway can directly use the limit value corresponding to the target key information string included in the configuration file as the maximum transaction quantity corresponding to the target transaction request; or, the gateway can use the limit value corresponding to the target key information string included in the configuration file multiplied by a preset coefficient as the maximum transaction quantity corresponding to the target transaction request.
[0088] S305: Determine candidate key information strings according to the key information strings included in the configuration file.
[0089] Exemplarily, if the target key information string does not exist in the above-mentioned configuration file, a candidate key information string similar to the target key information string can be determined based on the key information strings included in the configuration file. For example, the similarity between the target key information string and each key information string included in the configuration file can be determined, and the key information strings with similarities exceeding a threshold are selected as candidate key information strings.
[0090] Optionally, this step may include the following steps:
[0091] S3051. Obtain a first candidate keyword and a second candidate keyword in the target key information string.
[0092] Exemplarily, as mentioned above, the gateway can preset multiple keywords, and use the keywords with discrete values in the preset keywords as the first candidate keywords, and the keywords with continuous values as the second candidate keywords. For example, the transaction amount is continuous, which can be used as the second candidate keyword, and the transaction type is a preset discrete value, which can be used as the first candidate keyword. It should be noted that this application does not limit the number of the first candidate keywords and the second candidate keywords.
[0093] For example, the gateway may determine the first candidate keyword and the second candidate keyword included in the target key information string according to a plurality of preset first candidate keywords and second candidate keywords.
[0094] S3052: Determine a similarity vector corresponding to the key information string included in the configuration file according to the key information string included in the configuration file, the target key information string, and the second candidate keyword.
[0095] Exemplarily, the similarity vector represents the similarity between the value of the second candidate keyword in the key information string included in the configuration file and the value of the second candidate keyword in the target key information string.
[0096] For example, the gateway can determine the value of the second candidate keyword in each key information string included in the configuration file, and the similarity between the value of the second candidate keyword in the target key information string, and form the similarities of each second candidate keyword into a similarity vector corresponding to the key information string. For example, the target key information string includes 3 second candidate keywords, and the similarity vector corresponding to the key information string can be {0.5, 0.1, 0.6}, where each element represents the similarity of each second candidate keyword. It should be noted that this application does not limit the method for calculating the similarity, for example, cosine similarity can be used.
[0097] S3053. Determine a candidate key information string according to the key information string included in the configuration file, the first candidate keyword, the target key information string, and the similarity vector.
[0098] Exemplarily, after determining the similarity vector corresponding to each key information string, the gateway can first filter each key information string in the configuration file according to the modulus of the similarity vector, and then use the value of the first candidate keyword in the target key information string to determine the candidate key information string from the filtered key information strings.
[0099] Specifically, the gateway can determine the initial candidate key information string from the key information strings included in the configuration file based on the modulus of the similarity vector. For example, the key information string corresponding to the similarity vector whose modulus value is greater than or equal to a preset threshold can be used as the initial candidate key information string; and then the initial candidate key information string whose value of the first candidate keyword in the initial candidate key information string is consistent with the value of the first candidate keyword in the target key information string is used as the candidate key information string.
[0100] S306: Determine the maximum transaction quantity corresponding to the target transaction request according to the limit value corresponding to the candidate key information string.
[0101] For example, the gateway may directly use the limit value corresponding to the candidate key information string in the configuration file as the maximum transaction quantity corresponding to the target transaction request; or, the gateway may use the value obtained by multiplying the limit value corresponding to the candidate key information string in the configuration file by a preset coefficient as the maximum transaction quantity corresponding to the target transaction request.
[0102] S307: Obtain the transaction quantity included in the target transaction request.
[0103] It should be understood that the above target transaction request includes the transaction amount, so the gateway can directly extract the transaction amount from the target transaction request.
[0104] S308: If it is determined that the transaction quantity included in the target transaction request is less than or equal to the maximum transaction quantity corresponding to the target transaction request, all transactions included in the target transaction request are executed.
[0105] The gateway-based transaction volume control method provided in the embodiment of the present application can determine the target key information string of the target transaction request according to the target transaction request initiated by the target account, and then determine whether the target key information string exists in the configuration file. If it exists, the maximum transaction quantity corresponding to the target transaction request can be determined according to the target key information string included in the configuration file. If it does not exist, the candidate key information string corresponding to the target key information string is determined in the configuration file according to the target key information string, and the maximum transaction quantity corresponding to the target transaction request is determined according to the candidate key information string; and then, the target transaction request can be executed according to the relationship between the maximum transaction quantity corresponding to the target transaction request and the transaction quantity included in the transaction request. In this way, the gateway can control the transaction quantity in the transaction request for a transaction request including multiple transactions, ensure that the transaction quantity that the gateway can process does not exceed the load capacity, and then ensure the normal operation of the gateway.
[0106] In some embodiments, the gateway may set up a configuration file in advance based on the following method. The gateway may obtain historical transaction data corresponding to multiple historical accounts; for each historical transaction data, determine the key information string corresponding to the historical transaction data based on the historical transaction data and preset keywords; use the key information string corresponding to each historical transaction data as a potential key information string; for each potential key information string, use the historical transaction data whose key information string corresponding to the historical transaction data is the potential key information string as the historical transaction data corresponding to the potential key information string; determine the limit value corresponding to the potential key information string based on the historical transaction data corresponding to the potential key information string; and set up a configuration file based on each potential key information string and the corresponding limit value.
[0107] For example, the above-mentioned historical account can be an account that can trigger multiple transactions included in the same transaction request; the gateway can obtain the key information string corresponding to the historical transaction data corresponding to the historical account, obtain the union of the key information strings corresponding to all the historical transaction data, and use the key information strings in the union as potential key information strings, count the historical transaction data corresponding to each potential key information string, and then, according to the number of transactions in the historical transaction data corresponding to the potential key information string, determine the limit value corresponding to the potential key information string, for example, use the maximum number of transactions in the historical transaction data corresponding to the potential key information string as the limit value, or use the average value or weighted average value of the number of transactions in the historical transaction data corresponding to the potential key information string as the limit value, and finally set the configuration file according to each potential key information string and the corresponding limit value.
[0108] Optionally, for each historical transaction data corresponding to a potential key information string, the potential historical transaction data corresponding to the potential key information string is determined from the historical transaction data corresponding to the potential key information string based on the priority of the historical transaction data. For example, the historical transaction data has a priority, and the priority can reflect the importance of the historical transaction data. High-priority historical transaction data is more important than low-priority historical transaction data. Then, the gateway can determine, for each historical transaction data in the historical transaction data corresponding to the potential key information string, whether there is historical transaction data with a higher priority than the historical transaction data. If so, the historical transaction data is deleted; if not, the historical transaction data is added to the potential historical transaction data corresponding to the potential key information string, until all the historical transaction data corresponding to the potential key information string are traversed to obtain the potential historical transaction data corresponding to the potential key information string. Based on the number of transactions included in the potential historical transaction data corresponding to the potential key information string, determine the limit value corresponding to the potential key information string. For example, the maximum number of transactions in the potential historical transaction data corresponding to the potential key information string is used as the limit value, or the average value or weighted average value of the number of transactions in the potential historical transaction data corresponding to the potential key information string is used as the limit value.
[0109] Through the above method, the gateway can automatically and flexibly determine the correspondence between the key information string and the limit value according to the historical transaction data, and set the configuration file without manual setting, thereby improving the setting efficiency. At the same time, the correspondence between the key information string and the limit value included in the configuration file can be flexibly updated or expanded according to the historical transaction data.
[0110] Figure 4 A schematic diagram of the structure of the gateway-based transaction volume control device provided in this application, such as Figure 4As shown, the gateway-based transaction volume control device 40 provided in this embodiment includes:
[0111] A receiving module 401 is used to receive a target transaction request of a target account; wherein the target transaction request represents a transaction request including multiple transactions;
[0112] A first determination module 402 is used to determine a target key information string corresponding to the target transaction request according to the target transaction request; wherein the target key information string is used to classify the target transaction request;
[0113] A second determination module 403 is used to determine the maximum transaction quantity corresponding to the target transaction request according to the target key information string;
[0114] The execution module 404 is configured to execute the target transaction request according to the maximum transaction quantity corresponding to the target transaction request.
[0115] In a possible implementation manner, the first determining module 402 is specifically configured to:
[0116] If it is determined that the value of the preset keyword in the target transaction request is valid, the target key information string is determined according to the valid preset keyword and the value of the valid preset keyword.
[0117] In a possible implementation manner, the first determining module 402 is specifically configured to:
[0118] Determining the type of the target transaction request according to the target transaction request;
[0119] Determining a configuration rule of the target key information string according to the type of the target transaction request;
[0120] The target key information string is determined according to the configuration rule of the target key information string, the valid preset keyword, and the value of the valid preset keyword.
[0121] In a possible implementation manner, the gateway has a configuration file, and the configuration file includes a correspondence between a key information string and a limit value; the second determination module 403 is specifically used to:
[0122] If it is determined that the target key information string exists in the configuration file, the maximum transaction quantity corresponding to the target transaction request is determined according to the limit value corresponding to the target key information string included in the configuration file.
[0123] In a possible implementation manner, the second determining module 403 is specifically configured to:
[0124] If it is determined that the target key information string does not exist in the configuration file, determining a candidate key information string according to the key information strings included in the configuration file;
[0125] The maximum transaction quantity corresponding to the target transaction request is determined according to the limit value corresponding to the candidate key information string.
[0126] In a possible implementation manner, the second determining module 403 is specifically configured to:
[0127] Acquire a first candidate keyword and a second candidate keyword in the target key information string;
[0128] Determine, according to the key information string included in the configuration file, the target key information string, and the second candidate keyword, a similarity vector corresponding to the key information string included in the configuration file; wherein the similarity vector represents the similarity between the value of the second candidate keyword in the key information string included in the configuration file and the value of the second candidate keyword in the target key information string;
[0129] The candidate key information string is determined according to the key information string included in the configuration file, the first candidate keyword, the target key information string, and the similarity vector.
[0130] In a possible implementation manner, the second determining module 403 is specifically configured to:
[0131] determining an initial candidate key information string from the key information strings included in the configuration file according to the modulus of the similarity vector;
[0132] An initial candidate key information string in which the value of the first candidate key in the initial candidate key information string is consistent with the value of the first candidate key in the target key information string is used as the candidate key information string.
[0133] In a possible implementation, the execution module 404 is specifically configured to:
[0134] Obtaining the transaction quantity included in the target transaction request;
[0135] If it is determined that the transaction quantity included in the target transaction request is less than or equal to the maximum transaction quantity corresponding to the target transaction request, all transactions included in the target transaction request are executed.
[0136] The gateway-based transaction volume control device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effects are similar, and this embodiment will not be described in detail here.
[0137] Figure 5This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504. The electronic device may be the aforementioned gateway.
[0138] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0139] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0140] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0141] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0142] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0143] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0144] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0145] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0146] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0147] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0150] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0151] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0152] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A gateway-based transaction volume control method, characterized in that: include: Receiving a target transaction request from a target account; wherein the target transaction request represents a transaction request including multiple transactions; According to the target transaction request, determining a target key information string corresponding to the target transaction request; wherein the target key information string is used to classify the target transaction request; Determining a maximum transaction quantity corresponding to the target transaction request according to the target key information string; The target transaction request is executed according to the maximum transaction quantity corresponding to the target transaction request.
2. The method according to claim 1, characterized in that: Determining, according to the target transaction request, a target key information string corresponding to the target transaction request, including: If it is determined that the value of the preset keyword in the target transaction request is valid, the target key information string is determined according to the valid preset keyword and the value of the valid preset keyword.
3. The method according to claim 2, characterized in that Determining the target key information string according to a valid preset keyword and a value of the valid preset keyword includes: Determining the type of the target transaction request according to the target transaction request; Determining a configuration rule of the target key information string according to the type of the target transaction request; The target key information string is determined according to a configuration rule of the target key information string, the valid preset keyword, and the value of the valid preset keyword.
4. The method according to claim 1, characterized in that: The gateway has a configuration file, and the configuration file includes a correspondence between a key information string and a limit value; Determining the maximum transaction quantity corresponding to the target transaction request according to the target key information string includes: If it is determined that the target key information string exists in the configuration file, the maximum transaction quantity corresponding to the target transaction request is determined according to the limit value corresponding to the target key information string included in the configuration file.
5. The method according to claim 4, characterized in that The method further comprises: If it is determined that the target key information string does not exist in the configuration file, determining a candidate key information string according to the key information strings included in the configuration file; The maximum transaction quantity corresponding to the target transaction request is determined according to the limit value corresponding to the candidate key information string.
6. The method according to claim 5, characterized in that The target transaction request determines a candidate key information string according to the key information string included in the configuration file, including: Acquire a first candidate keyword and a second candidate keyword in the target key information string; Determine, according to the key information string included in the configuration file, the target key information string, and the second candidate keyword, a similarity vector corresponding to the key information string included in the configuration file; wherein the similarity vector represents the similarity between the value of the second candidate keyword in the key information string included in the configuration file and the value of the second candidate keyword in the target key information string; The candidate key information string is determined according to the key information string included in the configuration file, the first candidate keyword, the target key information string, and the similarity vector.
7. The method according to claim 6, characterized in that Determining the candidate key information string according to the key information string included in the configuration file, the first candidate keyword, the target key information string, and the similarity vector includes: determining an initial candidate key information string from the key information strings included in the configuration file according to the modulus of the similarity vector; An initial candidate key information string in which the value of the first candidate key in the initial candidate key information string is consistent with the value of the first candidate key in the target key information string is used as the candidate key information string.
8. The method according to any one of claims 1 to 7, characterized in that: Executing the target transaction request according to the maximum transaction quantity corresponding to the target transaction request includes: Obtaining the transaction quantity included in the target transaction request; If it is determined that the transaction quantity included in the target transaction request is less than or equal to the maximum transaction quantity corresponding to the target transaction request, all transactions included in the target transaction request are executed.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.