CN116723156A - Transaction flow switching method, device, equipment and storage medium - Google Patents

Transaction flow switching method, device, equipment and storage medium Download PDF

Info

Publication number
CN116723156A
CN116723156A CN202310681671.8A CN202310681671A CN116723156A CN 116723156 A CN116723156 A CN 116723156A CN 202310681671 A CN202310681671 A CN 202310681671A CN 116723156 A CN116723156 A CN 116723156A
Authority
CN
China
Prior art keywords
transaction
token
service system
preset
flow switching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310681671.8A
Other languages
Chinese (zh)
Inventor
陈明诗
王冬
刘若怡
马雪莹
马赈耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310681671.8A priority Critical patent/CN116723156A/en
Publication of CN116723156A publication Critical patent/CN116723156A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/29Flow control; Congestion control using a combination of thresholds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a transaction flow switching method, a device, equipment and a storage medium, which can be used in the field of artificial intelligence. The transaction flow switching method comprises the following steps: responding to the transaction mechanism with the transaction flow to be switched, and acquiring transaction data of the transaction mechanism corresponding to the token in the token bucket; determining whether a preset token increasing condition is met according to the transaction data; if yes, a token is distributed to one transaction mechanism in the transaction mechanisms with the transaction flow to be switched; the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the second service system, and the first service system is newer than the second service system. The application can effectively improve the efficiency of transaction flow switching and reduce the risk of transaction flow switching.

Description

Transaction flow switching method, device, equipment and storage medium
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a transaction flow switching method, device, apparatus, and storage medium.
Background
Financial systems are the core flow management and control systems of financial business, and the requirements for stability and reliability are very high. In the process of building a financial system, a certain business system in the financial system corresponds to two sets of systems of a new system and an old system, and at this time, transaction flow needs to be safely and stably switched from the old system to the new system in full quantity.
Currently, the transaction traffic for each financial website is typically handed off from the old system to the new system in the following manner: setting a white list in a financial system, gradually adding financial sites into the white list in a manual mode, and sending transaction flow to a new system by the financial sites in the white list and sending the transaction flow to an old system by the financial sites not in the white list. Wherein, whether to add financial network points to the white list is determined by a manual decision mode. However, the transaction flow is switched from the old system to the new system in the mode, so that the efficiency is low.
Disclosure of Invention
The application provides a transaction flow switching method, a device, equipment and a storage medium, which are used for solving the problem of low efficiency when switching transaction flow from an old system to a new system in the current mode.
In a first aspect, the present application provides a transaction flow switching method, including:
responding to the transaction mechanism with the transaction flow to be switched, and acquiring transaction data of the transaction mechanism corresponding to the token in the token bucket;
determining whether a preset token increasing condition is met according to the transaction data;
if yes, a token is distributed to one transaction mechanism in the transaction mechanisms with the transaction flow to be switched;
the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the second service system, and the first service system is newer than the second service system.
In a second aspect, the present application provides a transaction flow switching device, comprising:
the acquisition module is used for responding to the transaction mechanism with the transaction flow to be switched and acquiring the transaction data of the transaction mechanism corresponding to the token in the token bucket;
the determining module is used for determining whether a preset token increasing condition is met or not according to the transaction data;
the distribution module is used for distributing tokens to one transaction mechanism in the transaction mechanisms of the transaction flow to be switched if yes;
the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the second service system, and the first service system is newer than the second service system.
In a third aspect, the present application provides an electronic device comprising: a processor, a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the transaction flow switching method according to the first aspect of the present application.
In a fourth aspect, the present application provides a computer readable storage medium having stored therein computer program instructions which, when executed, implement a transaction flow switching method according to the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product comprising a computer program which when executed implements the transaction flow switching method according to the first aspect of the present application.
According to the transaction flow switching method, the device, the equipment and the storage medium, transaction data of a transaction mechanism corresponding to a token in a token bucket are obtained by responding to the transaction mechanism with the transaction flow to be switched; the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a second service system, and the first service system is newer than the second service system; determining whether a preset token increasing condition is met according to the transaction data; if yes, a token is distributed to one transaction mechanism in the transaction mechanisms with the transaction flow to be switched. The application determines to distribute the token for one transaction mechanism in the transaction mechanisms of the transaction flow to be switched based on the transaction data of the transaction mechanism corresponding to the token in the token bucket, so that smooth and safe transaction flow switching is realized according to the transaction mechanism, wherein the transaction requests of the new and old systems are isolated through the token, thereby effectively improving the efficiency of the transaction flow switching and reducing the risk of the transaction flow switching.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort to a person skilled in the art.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a flow chart of a transaction flow switching method according to an embodiment of the present application;
FIG. 3 is a flow chart of a transaction flow switching method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a transaction flow switching device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
It should be noted that the transaction flow switching method, device, equipment and storage medium of the present application may be used in the field of artificial intelligence, and may also be used in any field other than the field of artificial intelligence.
The requirements for stability and reliability of financial systems, such as banking systems, are very high. In the process of building a financial system, a certain business system in the financial system corresponds to two sets of systems of a new system and an old system, so that the transaction flow is safely and stably switched from the old system to the new system in full quantity, and on one hand, the system performance and the pressure of the new system need to be considered when the transaction flow is switched to the new system; on the other hand, when the new system is connected to the main channel, the flow switching and dynamic adjustment are needed to be carried out step by step, and finally, the safe and stable full-quantity switching of the transaction flow of the access channel to the new system is realized.
Currently, in a related art, a white list may be set in a financial system, and financial sites are gradually added to the white list manually, where the financial sites in the white list send transaction traffic to a new system, and the financial sites not in the white list send transaction traffic to an old system. Wherein, whether to add financial network points to the white list is determined by a manual decision mode. However, the transaction flow is switched from the old system to the new system in the mode, so that the efficiency is low, the operation flow is long, and the switching period is long.
In another related art, a switch control switch may be added in the financial system, and the switch is manually turned on to switch all transaction traffic from the old system to the new system at one time. However, the transaction flow is switched from the old system to the new system in the mode, so that the automatic switching cannot be performed, the automatic switching can only be performed once, the automatic switching cannot be performed step by step according to the financial network, and the problem of high switching risk exists.
Based on the above problems, the application provides a transaction flow switching method, device, equipment and storage medium, based on a token bucket algorithm, the identification of a transaction mechanism is used as a token key value, and whether a token is allocated to one transaction mechanism in the transaction mechanisms for switching the transaction flow is determined according to the transaction data of the transaction mechanism corresponding to the token in the token bucket, wherein the transaction request of a new system and an old system is isolated through the token, so that smooth and safe transaction flow switching is automatically performed step by step according to the transaction mechanism, the efficiency of transaction flow switching can be effectively improved, and the risk of transaction flow switching can be reduced.
In the following, first, an application scenario of the solution provided by the present application is illustrated.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application. As shown in fig. 1, the application scenario may include: the intelligent devices (such as intelligent counters) in each bank website 1 to N, and a server cluster 11, wherein the server cluster 11 is respectively in communication connection with each intelligent device. Wherein the server cluster 11 comprises a plurality of servers 111. The intelligent device automatically distributes tokens to the banking outlets to be switched with the transaction flow one by one according to the banking outlets according to the transaction data of the banking outlets corresponding to the tokens in the token bucket. When receiving the transaction request, the intelligent device sends the transaction request carrying the identifier of the banking node corresponding to the token in the token bucket to the new system on the server 111 for processing, and sends the transaction request not carrying the identifier of the banking node corresponding to the token in the token bucket to the old system on the server 111 for processing.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided by an embodiment of the present application, and the embodiment of the present application does not limit the devices included in fig. 1 or limit the positional relationship between the devices in fig. 1.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flowchart of a transaction flow switching method according to an embodiment of the application. The transaction flow switching method may be performed by software and/or hardware means, for example, the hardware means may be a transaction flow switching device, which may be an electronic device or a processing chip in an electronic device. As shown in fig. 2, the method of the embodiment of the present application includes:
s201, responding to a transaction mechanism with transaction flow to be switched, and acquiring transaction data of the transaction mechanism corresponding to the token in the token bucket; the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the second service system, and the first service system is newer than the second service system.
In the embodiment of the application, the electronic equipment executing the embodiment of the method switches the transaction flow based on the token bucket algorithm, wherein the identification of the transaction mechanism is used as the token key value. The transaction facility is a banking website, and the transaction data is transaction data corresponding to types of transactions such as transfer accounts, debit cards and the like. It can be understood that the electronic device executing the embodiment of the method is connected to a background system, where the background system includes a first service system and a second service system, and the first service system is newer than the second service system, i.e., the first service system is a new system, and the second service system is an old system. When receiving the transaction request, the token bucket can be queried according to the identification of the transaction mechanism carried by the transaction request, so that the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is sent to the first service system for processing, and the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is sent to the second service system for processing. Accordingly, transaction data of the transaction facility corresponding to the tokens in the token bucket can be obtained.
In the step, when determining that the transaction mechanism with the transaction flow to be switched exists, the transaction data of the transaction mechanism corresponding to the token in the token bucket can be acquired in response to the transaction mechanism with the transaction flow to be switched. For example, transaction data of the transaction mechanism corresponding to the tokens in the token bucket can be acquired by a batch query mode every day.
Optionally, the transaction facility corresponding to the initial token in the token bucket is determined in a random manner.
For example, a parameter table corresponding to the token bucket may be established in the electronic device executing the method embodiment, and a token corresponding to the transaction mechanism determined in a random manner is added in the parameter table as an initial token. If the transaction facility determined in a random manner is a bank website A, a token corresponding to the bank website A can be added in the parameter table as an initial token.
S202, determining whether a preset token increasing condition is met according to transaction data.
In this step, after transaction data of a transaction mechanism corresponding to the token in the token bucket is obtained, whether a preset token increasing condition is satisfied may be determined according to the transaction data. For example, the transaction data may be compared to a threshold to determine whether a preset token increment condition is met. For how to determine whether the preset token increment condition is satisfied according to the transaction data, reference may be made to the following embodiments, which are not described herein.
And S203, if yes, a token is distributed to one transaction mechanism in the transaction mechanisms with the transaction flow to be switched.
In the step, when it is determined that the preset token increasing condition is met according to the transaction data, a token is allocated to one of the transaction mechanisms of the transaction flow to be switched, and the steps S201 to S203 can be continuously executed until no transaction mechanism of the transaction flow to be switched exists, namely, the transaction flow switching of all the transaction mechanisms is completed. For example, assuming that the transaction facility corresponding to the token in the token bucket is a bank node a, if the transaction data of the bank node a meets the preset token increasing condition, the token may be automatically allocated to a bank node B in the bank node of the transaction flow to be switched. Accordingly, the transaction request carrying the identification of the bank website A is processed by the first service system, and the transaction request carrying the identification of the bank website B is processed by the first service system. When the transaction data corresponding to the bank website A and the bank website B respectively meet the preset token increasing condition, the token can be automatically distributed to the bank website C in the bank website to be switched with the transaction flow. And the like, switching transaction flow from bank website to bank website until the transaction flow switching of all bank website is completed.
Optionally, when it is determined that the preset token increasing condition is not met according to the transaction data, the allocation of the token can be suspended, and after observation and evaluation, if it is determined that the service function is abnormal, the allocation of the token can be performed after the abnormality is processed; if the preset token increasing condition is unreasonable to be set, the token can be allocated after the preset token increasing condition is estimated and adjusted.
According to the transaction flow switching method provided by the embodiment of the application, the transaction data of the transaction mechanism corresponding to the token in the token bucket is obtained by responding the transaction mechanism with the transaction flow to be switched; the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a second service system, and the first service system is newer than the second service system; determining whether a preset token increasing condition is met according to the transaction data; if yes, a token is distributed to one transaction mechanism in the transaction mechanisms with the transaction flow to be switched. The embodiment of the application determines to distribute the token to one transaction mechanism in the transaction mechanisms of which the transaction flow is to be switched based on the transaction data of the transaction mechanism corresponding to the token in the token bucket, so that smooth and safe transaction flow switching is realized automatically and gradually according to the transaction mechanism, wherein the transaction requests of the new and old systems are isolated through the token, thereby effectively improving the efficiency of the transaction flow switching and reducing the risk of the transaction flow switching.
Fig. 3 is a flowchart of a transaction flow switching method according to another embodiment of the present application. On the basis of the embodiment, the embodiment of the application further describes a transaction flow switching method. As shown in fig. 3, the method of the embodiment of the present application may include:
s301, receiving a transaction request.
The transaction request is illustratively a user input to an electronic device executing an embodiment of the method, such as a balance inquiry request.
S302, inquiring a parameter table corresponding to the token bucket according to the identification of the transaction mechanism carried by the transaction request.
The parameter table is used for storing identifications of transaction institutions corresponding to the tokens in the token bucket.
For example, a parameter table corresponding to the token bucket may be established in the electronic device executing the method embodiment, where the parameter table is used to store the identifier of the transaction mechanism corresponding to the token in the token bucket, that is, the identifier of the transaction mechanism is used as the token key value. When a transaction request is received, a parameter table corresponding to the token bucket can be queried according to the identification of a transaction mechanism carried by the transaction request.
S303, if the parameter table contains the identification of the transaction mechanism carried by the transaction request, determining that the transaction request is processed by the first service system.
In this step, if the parameter table includes an identifier of the transaction facility carried by the transaction request, that is, indicates that the transaction facility carried by the transaction request is allocated with a token, it may be determined that the transaction request is processed by the first service system.
S304, the transaction request is sent to the first service system for processing.
In this step, after determining that the transaction request is processed by the first service system, the transaction request may be sent to the first service system for processing, so as to obtain corresponding transaction data.
S305, if the parameter table does not contain the identification of the transaction mechanism carried by the transaction request, determining that the transaction request is processed by the second service system.
In this step, if the parameter table does not include the identifier of the transaction facility carried by the transaction request, that is, indicates that the transaction facility carried by the transaction request is not assigned with the token, it may be determined that the transaction request is processed by the second service system.
S306, the transaction request is sent to a second service system for processing.
In this step, after determining that the transaction request is processed by the second service system, the transaction request may be sent to the second service system for processing, so as to obtain corresponding transaction data.
In the embodiment of the present application, step S201 in fig. 2 may further include step S307 as follows:
s307, responding to the transaction mechanism with the transaction flow to be switched, and acquiring transaction data of the transaction mechanism corresponding to the token in the token bucket according to a preset period.
For example, if the preset period is a day, transaction data of the transaction mechanism corresponding to the token in the token bucket can be obtained by means of batch inquiry every day.
It should be noted that, the embodiment of the present application does not limit the execution sequence of the steps S301 and S307.
In the embodiment of the present application, the transaction data of the transaction mechanism corresponding to the token in the token bucket may include the transaction success rate and the transaction response time length of the transaction mechanism corresponding to the token within the preset time length, so step S202 in fig. 2 may further include steps S308 to S310 as follows:
s308, determining a first average value of transaction success rate of the transaction mechanism within a preset duration and a second average value of transaction response duration corresponding to the token according to the transaction data.
For example, assuming that the preset duration is 24 hours, transaction data of a transaction mechanism corresponding to a token in a token bucket within 24 hours can be obtained, and then a first average value of transaction success rates in the transaction data and a second average value of transaction response durations in the transaction data can be determined.
S309, if the first average value is greater than or equal to the success rate threshold value and the second average value is less than or equal to the duration threshold value, determining that the preset token increasing condition is met, and executing step 311.
In this step, the success rate threshold and the duration threshold may be set as required, which is not limited by the embodiment of the present application. For example, a first average of transaction success rates in the transaction data may be compared to a success rate threshold to determine if the first average is greater than or equal to the success rate threshold, and a second average of transaction response durations in the transaction data may be compared to a duration threshold to determine if the second average is less than or equal to the duration threshold. If the first average value is greater than or equal to the success rate threshold value and the second average value is less than or equal to the duration threshold value, determining that a preset token increasing condition is met.
And S310, if the first average value is smaller than the success rate threshold value or the second average value is larger than the duration threshold value, determining that the preset token increasing condition is not met.
In the step, after comparing the first average value of the transaction success rate in the transaction data with the success rate threshold value and comparing the second average value of the transaction response time length in the transaction data with the time length threshold value, if the first average value is smaller than the success rate threshold value or the second average value is larger than the time length threshold value, it is determined that the preset token increasing condition is not met, and step S311 is not executed, namely the allocation of the temporary token is not executed. After observation and evaluation, if the service function is determined to be abnormal, the token can be allocated after the abnormality is processed; if the preset token increasing condition is unreasonable to be set, the token can be allocated after the preset token increasing condition is estimated and adjusted.
Optionally, the token bucket includes a plurality of tokens, and step S202 may further include: according to the transaction data, determining a first average value of transaction success rate of the transaction mechanism corresponding to each token in a preset duration and a second average value of transaction response duration; if each first average value is larger than or equal to the success rate threshold value and each second average value is smaller than or equal to the duration threshold value, determining that a preset token increasing condition is met; if any one of the first average values is smaller than the success rate threshold value or any one of the second average values is larger than the duration threshold value, determining that the preset token increasing condition is not met.
Illustratively, it is assumed that the token bucket includes two tokens, and the transaction facilities corresponding to the two tokens are respectively a banking website A and a banking website B. The method comprises the steps that according to transaction data of a banking website A, a first average value of transaction success rate of the banking website A in a preset time period and a second average value of transaction response time period can be determined; according to the transaction data of the bank website B, a first average value of the transaction success rate of the bank website B in the preset time period and a second average value of the transaction response time period can be determined. If the two first average values are both larger than or equal to the success rate threshold value and the two second average values are both smaller than or equal to the duration threshold value, determining that a preset token increasing condition is met; if either one of the two first average values is smaller than the success rate threshold value or either one of the two second average values is larger than the duration threshold value, determining that the preset token increasing condition is not met.
It should be noted that, the transaction data of the transaction mechanism corresponding to the token in the token bucket may include the transaction success rate and the transaction response time of the transaction mechanism corresponding to the token within the preset time, and other transaction data required to be used may also be obtained according to the service requirement, so as to determine whether the preset token increasing condition is satisfied.
In the embodiment of the present application, step S203 in fig. 2 may further include step S311 as follows:
s311, according to the priority of the transaction mechanisms of the transaction flow to be switched, assigning tokens to the transaction mechanism with the highest priority in the transaction mechanisms of the transaction flow to be switched.
In the step, after determining that the preset token increasing condition is met, a token can be allocated to the transaction mechanism with the highest priority in the transaction mechanisms with the transaction flows to be switched according to the priority of the transaction mechanisms with the transaction flows to be switched, and the steps S301 to S311 can be continuously executed until the transaction mechanisms with the transaction flows to be switched are not existed, namely, the transaction flow switching of all the transaction mechanisms is completed.
According to the transaction flow switching method provided by the embodiment of the application, the transaction request is received, and the parameter table corresponding to the token bucket is inquired according to the identification of the transaction mechanism carried by the transaction request; if the parameter table contains the identification of the transaction mechanism carried by the transaction request, the transaction request is sent to the first service system for processing, and if the parameter table does not contain the identification of the transaction mechanism carried by the transaction request, the transaction request is sent to the second service system for processing; responding to a transaction mechanism with transaction flow to be switched, and acquiring transaction data of the transaction mechanism corresponding to the token in the token bucket according to a preset period; determining a first average value of transaction success rate in transaction data and a second average value of transaction response time in the transaction data based on preset time length; if the first average value is greater than or equal to the success rate threshold value and the second average value is less than or equal to the duration threshold value, determining that a preset token increasing condition is met, and distributing tokens to the transaction mechanisms with highest priority in the transaction mechanisms with the transaction flows to be switched according to the priority of the transaction mechanisms with the transaction flows to be switched; if the first average value is smaller than the success rate threshold value or the second average value is larger than the duration threshold value, determining that the preset token increasing condition is not met. The embodiment of the application determines to distribute the token to one transaction mechanism in the transaction mechanisms of which the transaction flow is to be switched based on the transaction data of the transaction mechanism corresponding to the token in the token bucket, so that smooth and safe transaction flow switching is realized automatically and gradually according to the transaction mechanism, wherein the transaction requests of the new and old systems are isolated through the token, thereby effectively improving the efficiency of the transaction flow switching and reducing the risk of the transaction flow switching.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of a transaction flow switching device according to an embodiment of the application. As shown in fig. 4, a transaction flow switching device 400 according to an embodiment of the present application includes: an acquisition module 401, a determination module 402 and an allocation module 403.
Wherein:
the obtaining module 401 is configured to obtain transaction data of a transaction mechanism corresponding to a token in the token bucket in response to the transaction mechanism having the transaction flow to be switched.
A determining module 402, configured to determine whether a preset token increment condition is satisfied according to the transaction data.
The allocation module 403 is configured to allocate a token to one of the transaction institutions for which the transaction flow is to be switched if so.
The transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by the second service system, and the first service system is newer than the second service system.
In some embodiments, the transaction data includes a transaction success rate and a transaction response duration of the transaction mechanism corresponding to the token within a preset duration, and the determining module 402 may be specifically configured to: determining a first average value of transaction success rate of a transaction mechanism corresponding to the token in a preset time period and a second average value of transaction response time period according to the transaction data; if the first average value is greater than or equal to the success rate threshold value and the second average value is less than or equal to the duration threshold value, determining that a preset token increasing condition is met; if the first average value is smaller than the success rate threshold value or the second average value is larger than the duration threshold value, determining that the preset token increasing condition is not met.
In some embodiments, where a plurality of tokens are included in the token bucket, the determination module 402 may be specifically configured to: according to the transaction data, determining a first average value of transaction success rate of the transaction mechanism corresponding to each token in a preset duration and a second average value of transaction response duration; if each first average value is larger than or equal to the success rate threshold value and each second average value is smaller than or equal to the duration threshold value, determining that a preset token increasing condition is met; if any one of the first average values is smaller than the success rate threshold value or any one of the second average values is larger than the duration threshold value, determining that the preset token increasing condition is not met.
In some embodiments, the allocation module 403 may be specifically configured to: and distributing tokens to the transaction mechanisms with highest priorities among the transaction mechanisms with the transaction flows to be switched according to the priorities of the transaction mechanisms with the transaction flows to be switched.
Optionally, the transaction flow switching device 400 may further include a processing module 404, configured to receive a transaction request before the obtaining module 401 obtains transaction data of a transaction mechanism corresponding to a token in the token bucket; inquiring a parameter table corresponding to the token bucket according to the identification of the transaction mechanism carried by the transaction request, wherein the parameter table is used for storing the identification of the transaction mechanism corresponding to the token in the token bucket; if the parameter table contains the identification of the transaction mechanism carried by the transaction request, determining that the transaction request is processed by the first service system; and if the parameter table does not contain the identification of the transaction mechanism carried by the transaction request, determining that the transaction request is processed by the second service system.
In some embodiments, the acquisition module 401 may be specifically configured to: and acquiring transaction data of a transaction mechanism corresponding to the tokens in the token bucket according to a preset period.
Optionally, the transaction facility corresponding to the initial token in the token bucket is determined in a random manner.
The device of the embodiment of the present application may be used to execute the technical solution of any of the above-described embodiments of the method, and its implementation principle and technical effects are similar, and are not repeated here.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device 500 may include: at least one processor 501 and a memory 502.
A memory 502 for storing a program. In particular, the program may include program code including computer-executable instructions.
The memory 502 may include high-speed random access memory (Random Access Memory, RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 501 is configured to execute computer-executable instructions stored in the memory 502 to implement the transaction flow switching method described in the foregoing method embodiments. The processor 501 may be a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits configured to implement embodiments of the present application. Specifically, when the transaction flow switching method described in the foregoing method embodiment is implemented, the electronic device may be, for example, an electronic device having a processing function, such as an intelligent device of a transaction facility.
Optionally, the electronic device 500 may also include a communication interface 503. In a specific implementation, if the communication interface 503, the memory 502, and the processor 501 are implemented independently, the communication interface 503, the memory 502, and the processor 501 may be connected to each other and perform communication with each other through buses. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. Buses may be divided into address buses, data buses, control buses, etc., but do not represent only one bus or one type of bus.
Alternatively, in a specific implementation, if the communication interface 503, the memory 502, and the processor 501 are integrated on a chip, the communication interface 503, the memory 502, and the processor 501 may complete communication through internal interfaces.
The electronic device is configured to execute the transaction flow switching method in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
The application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer program instructions, and when the processor executes the computer program instructions, the scheme of the transaction flow switching method is realized.
The application also provides a computer program product comprising a computer program which when executed by a processor implements the aspects of the transaction flow switching method as described above.
The computer readable storage medium described above may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read Only Memory, EEPROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit. The processor and the readable storage medium may reside as discrete components in a transaction flow switching device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application.

Claims (10)

1. A transaction flow switching method, comprising:
responding to the transaction mechanism with the transaction flow to be switched, and acquiring transaction data of the transaction mechanism corresponding to the token in the token bucket;
determining whether a preset token increasing condition is met according to the transaction data;
if yes, a token is distributed to one transaction mechanism in the transaction mechanisms of the transaction flow to be switched;
the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a second service system, and the first service system is newer than the second service system.
2. The transaction flow switching method according to claim 1, wherein the transaction data includes a transaction success rate and a transaction response time length of a transaction mechanism corresponding to the token within a preset time length, and the determining whether a preset token increasing condition is satisfied according to the transaction data includes:
determining a first average value of transaction success rate of the transaction mechanism within the preset duration and a second average value of transaction response duration corresponding to the token according to the transaction data;
if the first average value is greater than or equal to a success rate threshold value and the second average value is less than or equal to a duration threshold value, determining that the preset token increasing condition is met;
and if the first average value is smaller than the success rate threshold value or the second average value is larger than the duration threshold value, determining that the preset token increasing condition is not met.
3. The transaction flow switching method according to claim 2, wherein the token bucket includes a plurality of tokens, and the determining whether a preset token increasing condition is satisfied according to the transaction data includes:
determining a first average value of transaction success rates of transaction mechanisms corresponding to the tokens in the preset duration and a second average value of transaction response durations according to the transaction data;
if each first average value is larger than or equal to the success rate threshold value and each second average value is smaller than or equal to the duration threshold value, determining that the preset token increasing condition is met;
and if any one of the first average values is smaller than the success rate threshold value or any one of the second average values is larger than the duration threshold value, determining that the preset token increasing condition is not met.
4. The transaction flow switching method according to claim 1, wherein the assigning a token to one of the transaction mechanisms for which the transaction flow is to be switched includes:
and distributing tokens to the transaction mechanisms with highest priorities among the transaction mechanisms with the transaction flows to be switched according to the priorities of the transaction mechanisms with the transaction flows to be switched.
5. The transaction flow switching method according to claim 1, wherein before obtaining transaction data of a transaction facility corresponding to a token in the token bucket, further comprising:
receiving a transaction request;
inquiring a parameter table corresponding to the token bucket according to the identification of the transaction mechanism carried by the transaction request, wherein the parameter table is used for storing the identification of the transaction mechanism corresponding to the token in the token bucket;
if the parameter table contains the identification of the transaction mechanism carried by the transaction request, determining that the transaction request is processed by the first service system;
and if the parameter table does not contain the identification of the transaction mechanism carried by the transaction request, determining that the transaction request is processed by the second service system.
6. The transaction flow switching method according to any one of claims 1 to 5, wherein the acquiring transaction data of a transaction facility corresponding to a token in a token bucket includes:
and acquiring transaction data of a transaction mechanism corresponding to the tokens in the token bucket according to a preset period.
7. The transaction flow switching method according to any one of claims 1 to 5, wherein the transaction institution corresponding to the initial token in the token bucket is determined in a random manner.
8. A transaction flow switching device, comprising:
the acquisition module is used for responding to the transaction mechanism with the transaction flow to be switched and acquiring the transaction data of the transaction mechanism corresponding to the token in the token bucket;
the determining module is used for determining whether a preset token increasing condition is met or not according to the transaction data;
the distribution module is used for distributing tokens to one transaction mechanism in the transaction mechanisms of the transaction flow to be switched if yes;
the transaction request carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a first service system, the transaction request not carrying the identification of the transaction mechanism corresponding to the token in the token bucket is processed by a second service system, and the first service system is newer than the second service system.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the transaction flow switching method of any one of claims 1 to 7.
10. A computer readable storage medium, wherein computer program instructions are stored in the computer readable storage medium, which when executed, implement the transaction flow switching method according to any one of claims 1 to 7.
CN202310681671.8A 2023-06-09 2023-06-09 Transaction flow switching method, device, equipment and storage medium Pending CN116723156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310681671.8A CN116723156A (en) 2023-06-09 2023-06-09 Transaction flow switching method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310681671.8A CN116723156A (en) 2023-06-09 2023-06-09 Transaction flow switching method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116723156A true CN116723156A (en) 2023-09-08

Family

ID=87867345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310681671.8A Pending CN116723156A (en) 2023-06-09 2023-06-09 Transaction flow switching method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116723156A (en)

Similar Documents

Publication Publication Date Title
CN109787908B (en) Server current limiting method, system, computer equipment and storage medium
CN108848039B (en) Server, message distribution method and storage medium
CN106899666B (en) Data processing method and device for service identification
CN108711047B (en) Automatic repayment method, system and terminal equipment
WO2020248883A1 (en) Debt collection method, system and apparatus
CN104616141A (en) Information processing method and payment platform
CN111901249A (en) Service current limiting method, device, equipment and storage medium
CN103210382A (en) Arbitrating bus transactions on a communications bus based on bus device health information and related power management
CN108492109B (en) Electronic device, dynamic code request processing method and storage medium
CN110147934A (en) Service request processing method, device, computer equipment and storage medium
WO2009083599A1 (en) Transaction processing
CN112132674A (en) Transaction processing method and device
CN111092814B (en) Service handling request message distribution method and equipment
CN111260253A (en) Information sending method and device, computer equipment and storage medium
CN109600414B (en) Resource allocation method, device, equipment and storage medium
CN112634011A (en) Multi-account linkage deposit method and device, electronic equipment and storage medium
CN116723156A (en) Transaction flow switching method, device, equipment and storage medium
CN109308219B (en) Task processing method and device and distributed computer system
CN108920278B (en) Resource allocation method and device
CN116886626A (en) Service data flow limiting method and device, computer equipment and storage medium
CN114157482A (en) Service access control method, device, control equipment and storage medium
CN116723155A (en) Transaction flow switching method, device, equipment and storage medium
CN113971552B (en) Batch data processing method, device, equipment and storage medium
CN116431327B (en) Task current limiting processing method and fort machine
CN112822022B (en) Multi-signature address updating method and related device

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