Financial transaction management and control method and device
By constructing key-value information in the financial transaction system to locate the target financial interface and applying multi-level interface control strategies, the problem that existing current limiting technology cannot meet the financial business needs in complex scenarios is solved, and the fineness of financial transactions is achieved Improved management and system stability.
Patent Information
- Application Number
- CN202411523048.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
AI Technical Summary
The current limit protection method based on leaky bucket algorithms or token bucket algorithms in the prior art cannot meet the financial business needs in complex scenarios, and it is difficult to expand to cope with the challenges of massive data and high concurrent transactions.
By obtaining the business identification, product identification and channel identification in financial transaction requests, key-value information is constructed to locate the target financial interface, and obtain its control strategy collection, including interface authorization control strategy, interface time control strategy and interface traffic control strategy. The strategy priority determines the control status of the transaction.
It has achieved multi-level and multi-dimensional refined control of financial transactions, improved the stability and sustainability of the financial system, and was able to cope with high concurrent and massive data transactions in complex scenarios.
Smart Images

Figure CN119398923A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a method and device for controlling financial transactions. Background Art
[0002] In the highly digital financial services sector, especially in the loan business, the stability and security of the processing system are of vital importance. With the rapid development of Internet finance and the increase in the number of online financial businesses, the interfaces of financial systems are facing unprecedented challenges, including but not limited to high concurrent access, large traffic impact, and transaction peaks during abnormal time periods. These challenges may not only affect the normal operation of the system, causing service delays or crashes, but also pose a hidden danger to system security.
[0003] As a key strategy to ensure system stability, the importance of current limiting technology is self-evident. Current limiting technology aims to prevent system overload by controlling concurrent access or request rate. In traditional methods, current limiting technology is usually implemented by using fixed thresholds or time window mechanisms in the network layer, access layer or application layer. By detecting indicators such as the number of network connections, traffic, CPU and memory load, once the number of requests exceeds the preset limit, the system will deny service or perform traffic shaping to protect core services from being affected.
[0004] In the related technologies, the leaky bucket algorithm and the token bucket algorithm are the two most common implementation methods. The leaky bucket algorithm stores requests in a queue and processes these requests at a fixed rate. When the requests exceed the processing capacity of the queue, the newly arrived requests will be discarded. The token bucket algorithm generates a certain number of "tokens" in advance. Requests must obtain tokens before they can be processed. If there are no tokens, the requests may be delayed or rejected. These two algorithms have their own advantages and disadvantages. The leaky bucket algorithm focuses more on smoothing burst traffic, while the token bucket algorithm tends to allow burst traffic to pass under certain conditions.
[0005] However, the flow limiting solutions in related technologies are mostly based on relatively simple business logic and interface logic, which will expose limitations and shortcomings when faced with complex and changeable loan business scenarios. With the expansion of the scale of financial business and the diversification of financial products, the management and control solutions of existing technologies may be difficult to expand and unable to cope with the challenges of massive data and high-concurrency transactions, limiting the long-term development of the financial system and business innovation.
[0006] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0007] The embodiment of the present invention provides a method and device for controlling financial transactions, so as to at least solve the technical problem that the current limiting protection method based on the leaky bucket algorithm or the token bucket algorithm in the related technology cannot meet the requirements of financial services in complex scenarios.
[0008] According to one aspect of an embodiment of the present invention, a method for controlling financial transactions is provided, comprising: obtaining a business identifier, a product identifier and a channel identifier of a target financial transaction based on a financial transaction request, and constructing key-value information based on the business identifier, the product identifier and the channel identifier; determining a target financial interface corresponding to the target financial transaction based on the key-value information, and obtaining a set of control policies for the target financial interface corresponding to the target financial transaction, wherein the set of control policies includes: M interface authorization control policies, N interface time control policies and K interface traffic control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface traffic control policy; determining the control status of the target financial transaction based on the control policies in the set of control policies.
[0009] Further, the step of determining the control status of the target financial transaction based on the control policies in the control policy set includes: extracting the interface authorization control policy in the control policy set, and obtaining the authorization status recorded in the interface authorization control policy; when the authorization status indicates that the target financial interface corresponding to the target financial transaction is in an open state, determining that the target financial interface corresponding to the target financial transaction is in an authorized state, and extracting N interface time control policies in the control policy set; obtaining the time control status of the target financial interface corresponding to the target financial transaction based on the N interface time control policies; when the time control status indicates that the target financial interface corresponding to the target financial transaction is not in a time control state, extracting K interface traffic control policies in the control policy set; obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies; determining the control status of the target financial transaction based on the authorization status, the time control status and the traffic control status.
[0010] Furthermore, after obtaining the authorization status recorded in the interface authorization control policy, it also includes: when the authorization status indicates that the target financial interface corresponding to the target financial transaction is in a closed state, determining that the target financial interface is in an unauthorized state, obtaining the control code value of the interface authorization control policy and the description information corresponding to the control code value; constructing a first return message based on the control code value and the description information of the interface authorization control policy, and sending the first return message to the initiator of the target financial transaction.
[0011] Furthermore, the step of obtaining the time control status of the target financial interface corresponding to the target financial transaction based on the N interface time control policies includes: obtaining the time information corresponding to the target financial transaction; obtaining the effective status, policy effective time, and policy expiration time of each of the interface time control policies; screening the K interface time control policies based on the effective status, the policy effective time, and the policy expiration time to obtain P interface time control policies; sorting the P interface time control policies based on the priority of each interface time control policy to obtain a time control policy list; obtaining the effective period, policy start time, and policy end time of each interface time control policy in the time control policy list; obtaining the time control status of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time, and policy end time of the interface time control policies.
[0012] Further, the step of obtaining the time control state of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time and policy end time of the interface time control policy includes: matching the time information corresponding to the target financial transaction with the effective period, policy start time and policy end time of each interface time control policy in the time control policy list according to the arrangement order to obtain a matching result; and determining that the target financial interface is in the time control state when the matching result indicates that the time information corresponding to the target financial transaction successfully matches the effective period, policy start time and policy end time of at least one of the interface time control policies. status; selecting the interface time control policy with the highest priority among all the interface time control policies that are successfully matched as the target interface time control policy corresponding to the target financial transaction, and generating a second return message based on the control code value of the target interface time control policy and the description information of the control code value, and sending the second return message to the initiator of the target financial transaction; or, when the matching result indicates that the time information corresponding to the target financial transaction fails to match the effective period, policy start time and policy end time of all the interface time control policies, determining that the target financial interface is not in the time control state, allowing the call to the target financial interface.
[0013] Furthermore, the step of obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies includes: sorting the K interface traffic control policies according to priority to obtain a traffic control policy list; performing counting processing on a counter based on the target financial transaction, and reading the count value after the counting processing of the counter; obtaining the traffic threshold of each interface traffic control policy in the traffic control policy list; obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter.
[0014] Furthermore, the step of obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter includes: step one, selecting the target interface traffic control policy from the traffic control policy list according to the arrangement order of each interface traffic control policy; step two, comparing the count value with the traffic threshold of the target interface traffic control policy, and when the count value is less than or equal to the traffic threshold of the target interface traffic control policy, removing the target interface traffic control policy from the traffic control policy list to obtain an updated traffic control policy list; repeating the above steps one to two, and when the count value is less than or equal to the traffic threshold of all the target interface traffic control policies, determining that the target financial interface is not in the traffic control state, and allowing the target financial interface to be called.
[0015] Furthermore, after comparing the count value with the traffic threshold of the target interface traffic control policy, it also includes: when the count value is greater than the traffic threshold of the target interface traffic control policy, determining that the target financial interface is in a traffic control state; constructing a third return message based on the control code value of the target interface traffic control policy and the descriptive information corresponding to the control code value, and sending the third return message to the initiator of the target financial transaction.
[0016] Furthermore, before obtaining the business identifier, product identifier and channel identifier of the target financial transaction based on the financial transaction request, it also includes: configuring the interface authorization control policy, the interface time control policy and the interface traffic control policy for the financial interface corresponding to the financial transaction in the financial system based on the business identifier, product identifier and channel identifier of the financial transaction; and storing the interface authorization control policy, the interface time control policy and the interface traffic control policy in a database.
[0017] According to another aspect of an embodiment of the present invention, a financial transaction management and control device is also provided, including: a construction unit, used to obtain a business identifier, a product identifier and a channel identifier of a target financial transaction based on a financial transaction request, and to construct key-value information based on the business identifier, the product identifier and the channel identifier; an acquisition unit, used to determine a target financial interface corresponding to the target financial transaction based on the key-value information, and to obtain a management and control policy set of the target financial interface corresponding to the target financial transaction, wherein the management and control policy set includes: M interface authorization management and control policies, N interface time management and control policies and K interface traffic management and control policies, M=1, N and K are both positive integers, the priority of the interface authorization management and control policy is greater than the priority of the interface time management and control policy, and the priority of the interface time management and control policy is greater than the priority of the interface traffic management and control policy; a determination unit, used to determine the management and control status of the target financial transaction based on the management and control policies in the management and control policy set.
[0018] Further, the determination unit includes: a first acquisition subunit, used to extract the interface authorization control policy in the control policy set, and obtain the authorization status recorded in the interface authorization control policy; a first determination subunit, used to determine that the target financial interface corresponding to the target financial transaction is in the authorization state when the authorization state indicates that the target financial interface corresponding to the target financial transaction is in the open state, and extract N interface time control policies in the control policy set; a second acquisition subunit, used to obtain the time control state of the target financial interface corresponding to the target financial transaction based on the N interface time control policies; a first extraction subunit, used to extract K interface traffic control policies in the control policy set when the time control state indicates that the target financial interface corresponding to the target financial transaction is not in the time control state; a third acquisition subunit, used to obtain the traffic control state of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies; a second determination subunit, used to determine the control state of the target financial transaction based on the authorization state, the time control state and the traffic control state.
[0019] Furthermore, the determination unit also includes: a third determination sub-unit, used to determine that the target financial interface is in an unauthorized state when the authorization status indicates that the target financial interface corresponding to the target financial transaction is in a closed state, and obtain the control code value of the interface authorization control policy and the description information corresponding to the control code value; a first construction sub-unit, used to construct a first return message based on the control code value and the description information of the interface authorization control policy, and send the first return message to the initiator of the target financial transaction.
[0020] Furthermore, the second acquisition sub-unit includes: a first acquisition module, used to acquire the time information corresponding to the target financial transaction; a second acquisition module, used to acquire the effective status, policy effective time, and policy expiration time of each of the interface time control policies; a first screening module, used to screen K of the interface time control policies based on the effective status, the policy effective time, and the policy expiration time, to obtain P of the interface time control policies; a first sorting module, used to sort the P of the interface time control policies based on the priority of each of the interface time control policies, to obtain a time control policy list; a third acquisition module, used to acquire the effective period, policy start time, and policy end time of each of the interface time control policies in the time control policy list; a fourth acquisition module, used to acquire the time control status of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time, and policy end time of the interface time control policies.
[0021] Further, the fourth acquisition module includes: a first matching submodule, which is used to match the time information corresponding to the target financial transaction with the effective period, policy start time and policy end time of each interface time control policy in the time control policy list according to the arrangement order to obtain a matching result; a first determination submodule, which is used to determine that the target financial interface is in a time control state when the matching result indicates that the time information corresponding to the target financial transaction successfully matches the effective period, policy start time and policy end time of at least one of the interface time control policies; a first selection submodule, which is used to select the interface time control policy with the highest priority among all the successfully matched interface time control policies as the target interface time control policy corresponding to the target financial transaction, and generate a second return message based on the control code value of the target interface time control policy and the description information of the control code value, and send the second return message to the initiator of the target financial transaction; a second determination submodule, which is used to determine that the target financial interface is not in a time control state and allow the call of the target financial interface when the matching result indicates that the time information corresponding to the target financial transaction fails to match the effective period, policy start time and policy end time of all the interface time control policies.
[0022] Furthermore, the third acquisition sub-unit includes: a second sorting module, used to sort the K interface traffic control policies according to priority to obtain a traffic control policy list; a first reading module, used to count the counter based on the target financial transaction, and read the count value after the counter counting processing; a fifth acquisition module, used to obtain the traffic threshold of each interface traffic control policy in the traffic control policy list; a sixth acquisition module, used to obtain the traffic control status of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter.
[0023] Furthermore, the sixth acquisition module includes: a second selection submodule, used for step one, selecting the target interface traffic control policy from the traffic control policy list according to the arrangement order of each interface traffic control strategy; a first comparison submodule, used for step two, comparing the count value with the traffic threshold of the target interface traffic control policy, and when the count value is less than or equal to the traffic threshold of the target interface traffic control policy, removing the target interface traffic control policy from the traffic control policy list to obtain an updated traffic control policy list; a third determination submodule, used to repeat steps one to two above, and when the count value is less than or equal to the traffic threshold of all the target interface traffic control policies, determining that the target financial interface is not in a traffic control state, and allowing the target financial interface to be called.
[0024] Furthermore, the sixth acquisition module also includes: a fourth determination sub-module, used to determine that the target financial interface is in a traffic control state when the count value is greater than the traffic threshold of the target interface traffic control policy; a first construction sub-module, used to construct a third return message based on the control code value of the target interface traffic control policy and the description information corresponding to the control code value, and send the third return message to the initiator of the target financial transaction.
[0025] Furthermore, the financial transaction control device also includes: a first configuration subunit, used to configure the interface authorization control policy, the interface time control policy and the interface traffic control policy for the financial interface corresponding to the financial transaction in the financial system based on the business identification, product identification and channel identification of the financial transaction; a first storage subunit, used to store the interface authorization control policy, the interface time control policy and the interface traffic control policy in a database.
[0026] In the present application, the following steps are performed: based on the financial transaction request, the business identifier, product identifier and channel identifier of the target financial transaction are obtained, and key-value information is constructed based on the business identifier, product identifier and channel identifier; then, the target financial interface corresponding to the target financial transaction is determined based on the key-value information, and a set of control policies for the target financial interface corresponding to the target financial transaction is obtained, wherein the control policy set includes: M interface authorization control policies, N interface time control policies and K interface traffic control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, the priority of the interface time control policy is greater than the priority of the interface traffic control policy, and finally, the control status of the target financial transaction is determined based on the control policies in the control policy set.
[0027] In this application, key-value information is automatically constructed based on the business identifier, product identifier, and channel identifier of the target financial business, and the key-value information is used as an index for querying the control policy set. Through the key-value information, the system can quickly locate the specific financial interface corresponding to the target financial transaction. At the same time, through the application of multi-level strategies such as interface authorization control strategy, interface time control strategy, and interface traffic control strategy, it ensures the most stringent and reasonable control of financial transaction requests in multiple dimensions, achieves the purpose of fine-grained control of financial system interfaces, and achieves the technical effect of improving the stability and sustainability of the financial system, thereby solving the technical problem that the current limiting protection method based on the leaky bucket algorithm or the token bucket algorithm in the related technology cannot meet the needs of financial services in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0029] Figure 1 is a flow chart of an optional financial transaction management and control method according to an embodiment of the present invention;
[0030] Figure 2 is an optional flow chart of determining the control status of a financial transaction according to an embodiment of the present invention;
[0031] Figure 3 is a schematic diagram of an optional financial transaction control device according to an embodiment of the present invention;
[0032] Figure 4 It is a hardware structure block diagram of an electronic device (or mobile device) for executing a financial transaction control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] It should be noted that the financial transaction control method and device in the present application can be used in the field of financial technology when financial transactions are controlled based on control strategies, and can also be used in any field other than the field of financial technology when financial transactions are controlled based on control strategies. The application of the financial transaction control method and device in the present application does not limit the application field.
[0036] It should be noted that the relevant 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 this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0037] It should be noted that in this application, when collecting and analyzing customer information, corresponding operation entrances are provided for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0038] The following embodiments of the present invention can be applied to various financial transaction management systems / applications / devices. The present invention performs interface authorization management, interface time management, and interface traffic management on financial interfaces according to different transactions, different channels, and different products, and the interface restrictions between products and channels do not affect each other. Business personnel can control product interface permissions, time restrictions, and traffic restrictions at any time through interface management strategies, and have a more detailed protection system, as well as reduce the damage and impact of malicious damage from external systems or centralized large-scale transactions on the financial system. It can also ensure timely restrictions at the interface entrance, reduce the impact and pressure on downstream related systems, and increase the stability and sustainability of the current system.
[0039] The present invention is described in detail below in conjunction with various embodiments.
[0040] Embodiment 1
[0041] According to an embodiment of the present invention, an embodiment of a method for controlling financial transactions is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 1 is a flow chart of an optional financial transaction management and control method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0043] Step S101, obtaining a business identifier, a product identifier and a channel identifier of a target financial transaction based on a financial transaction request, and constructing key value information based on the business identifier, the product identifier and the channel identifier.
[0044] It should be noted that in the financial system, financial interfaces play a key role in connecting different systems or services. Interfaces can be regarded as a "protocol" or "channel" that allows software applications to communicate and exchange data with each other. When performing financial services, it is necessary to call relevant financial interfaces to access subsystems or external services under the financial system to perform financial transactions. Financial systems are usually composed of multiple subsystems, such as account management systems, payment systems, risk control systems, reporting systems, etc. Financial interfaces provide a standardized way of interaction between these subsystems, so that one subsystem (such as an account system) can call the functions of another subsystem (such as a payment system) without directly accessing its internal code or database. At the same time, financial systems often need to interact with external services, such as credit assessment services, payment gateways, regulatory reporting systems, third-party data providers, etc. Through financial interfaces, financial systems can safely exchange data and call functions with these external services without exposing the internal structure or sensitive information of the core system. In addition, financial apps or API gateways provided by financial institutions to external users or partners are all implemented through interfaces. These interfaces allow external users or systems to access the services provided by the financial system in a secure and controllable manner, and to perform operations such as queries, transactions, and information updates. In summary, the financial interfaces of the financial system can provide a variety of financial services efficiently and securely, while responding to complex market and technical challenges. Therefore, managing and controlling the financial interfaces can maintain the stability and continuity of the financial system and ensure the security of the financial system.
[0045] It should be noted that the embodiment of the present invention performs refined control on each interface of the financial system from three dimensions: business attributes, product types, and source channels of financial transactions, and is suitable for complex and changeable application scenarios. For example, during the promotion of loan products, a large number of loan application requests in a short period of time will cause pressure on the system. The flow control of the embodiment of the present invention can set a product-level flow threshold. Once it is detected that the flow of related loan products under a certain loan business exceeds the preset limit, the processing rate can be automatically adjusted or the interface can be temporarily closed to prevent the system from crashing due to instantaneous high flow, while ensuring that the transaction processing of other products is not affected; or, at a certain moment, due to market changes or risk assessment adjustments, financial institutions need to temporarily increase the application threshold for small and medium-sized enterprise loans. Through the authorization control function of the embodiment of the present invention, the interface of the small and medium-sized enterprise loan product can be immediately adjusted to restrict applications that do not meet the new conditions from entering the approval process, which can quickly respond to market changes and protect financial institutions from potential credit risks.
[0046] Optionally, before obtaining the business identifier, product identifier and channel identifier of the target financial transaction based on the financial transaction request, it also includes: configuring an interface authorization control policy, an interface time control policy and an interface traffic control policy for the financial interface corresponding to the financial transaction in the financial system based on the business identifier, product identifier and channel identifier of the financial transaction; and storing the interface authorization control policy, interface time control policy and interface traffic control policy in a database.
[0047] It should be noted that the embodiment of the present invention manages and restricts all interfaces in the financial system based on business type, source channel, and financial product as management and control dimensions, thereby realizing refined management and control of financial loans. At the same time, even if two transaction requests need to call the same interface, the financial businesses, source channels, and financial products corresponding to the two transaction requests are different. Based on this, the management and control strategies provided for different transaction requests in this embodiment are also different, thereby realizing product-level interface management and control.
[0048] It should be noted that in the field of financial transactions, the financial business to which financial transactions belong is an important interaction point between financial institutions and users, and is also a key link for financial institutions to achieve profitability and risk control. Business can be divided into major categories such as loan business, payment business, deposit business, and investment business. Each major category can also be divided into multiple subcategories. For example, loan business can be subdivided into multiple sub-businesses such as credit, payment, inquiry, and calculation; while the source channel indicates the scene of interaction between financial institutions and users. The source channel can be physical or virtual, such as financial institution outlets, ATMs, financial APPs, self-service terminals, and third-party platforms. Financial institutions will design corresponding business processes, service content, and financial interfaces for different source channels to meet the needs of different user groups. Financial products are a tool for investment, savings, lending, payment, or risk management provided by financial service institutions to users. They can include loan products, deposit products, payment products, investment products, and other major categories. Each product category can include multiple subcategories. For example, loan products can be divided into consumer loan products, housing loan products, and education loan products. In short, with the continuous increase in the number of current financial businesses, source channels, and financial products, the business scenarios faced by the financial system are becoming more and more complex.
[0049] Specifically, when managing and controlling the financial interfaces of a financial system, first configure product-level attribute information for all financial interfaces of the financial system, mark the financial interfaces by the business type, source channel, and financial product of the specific financial transaction, and subsequently locate the specific financial interface by the business identifier, channel identifier, and product identifier of the financial transaction. The business identifier, channel identifier, and product identifier may be in the form of numbers, letters, or a combination of numbers and letters. After configuring product-level attribute information for the financial interface, it is also necessary to configure multi-level interface control policies for the financial interfaces corresponding to each specific financial transaction, including interface authorization control policy, interface time control policy and interface traffic control policy. The interface authorization control policy is used to directly control the use rights of the financial interface, the interface time control policy is used to control the use rights of the financial interface at a specific time, and the interface traffic control policy is used to control the use rights of the financial interface in a specific traffic scenario. For the financial interface of the same financial product, multiple control policies can be configured, and different types of control policies have priorities. The priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface traffic control policy. There are also priorities between multiple control policies of the same type. After creating the interface authorization control policy, the interface time control policy and the interface traffic control policy of the financial interface, the business identifier, product identifier and channel identifier of the financial transaction and the various control policies of the financial interface are matched.
[0050] Table 1 Example of interface authorization control policy
[0051]
[0052]
[0053] As shown in Table 1 above, an interface authorization control policy records at least multiple fields such as service identifier (service_code), channel identifier (channel_code), product identifier (product_code), authorization status (auth_status), control code value (auth_code) and data update time (date_update_time). Each field has corresponding description information. The control code value is used to construct a return message when the target financial transaction is under status control.
[0054] Table 2 Interface time control strategy example
[0055]
[0056] As shown in Table 2 above, an interface time control policy records at least the service identifier (service_code), channel identifier (channel_code), product identifier (product_code), control period (crtl_time_segment), control policy start time (crtl_start_time), control policy end time (crtl_end_time), control policy priority (crtl_priority), control code value (auth_code), control policy effective time (crtl_valid_time), control policy invalid time (crtl_invalid_time), control policy switch status (crtl_status), and data update time (date_update_time).
[0057] Table 3 Example of interface traffic control policy
[0058]
[0059] As shown in Table 3 above, an interface traffic control policy records at least the service identifier (service_code), channel identifier (channel_code), product identifier (product_code), maximum flow threshold (crtl_max_flow), control period (crtl_time_segment), control policy priority (crtl_priority), control code value (auth_code), control policy switch status (crtl_status), and data update time (date_update_time).
[0060] When processing financial transactions, after the financial system receives the financial transaction request from the user, it parses the financial transaction, obtains the target financial transaction to be executed and the financial business, source channel and financial product corresponding to the target financial transaction, obtains the business identifier, product identifier and channel identifier of the target financial product, and then concatenates the business identifier, product identifier and channel identifier to generate key-value information. The key-value information is used to locate the target financial interface corresponding to the target financial business and call the relevant interface management and control strategy.
[0061] Step S102: determining a target financial interface corresponding to the target financial transaction based on the key-value information, and acquiring a set of management and control policies for the target financial interface corresponding to the target financial transaction.
[0062] It should be noted that based on the specific key value information, the target financial interface corresponding to the target financial transaction can be located, and the control policy set corresponding to the target financial interface can be obtained. The control policy set can include multiple types of interface control policies, namely interface authorization control policy, interface time control policy and interface traffic control policy.
[0063] Step S103: determining the control status of the target financial transaction based on the control policies in the control policy set.
[0064] It should be noted that for each financial transaction request, after the system matches the corresponding control policy set according to the key information (transaction number @ product number @ channel number), it is necessary to further evaluate whether the financial transaction meets the conditions set by the policy. For a transaction request that matches multiple types of control policies at the same time, the system needs to process it according to the priority of the policy. In the embodiment of the present invention, the order of priority from high to low is: interface authorization control policy> interface time control policy> interface traffic control policy. This means that even if time or traffic control allows the transaction, if the authorization control is rejected, the transaction will not be processed. According to the results of the policy evaluation, the system will determine the control status of the target financial transaction. Once the control status of the transaction request is determined, the system will execute the corresponding policy. At the same time, the system will continue to monitor the transaction request to ensure the effectiveness and timeliness of the control policy. For transactions that need to be rejected, the system will immediately return the corresponding control failure response, and will not allow the transaction to enter the system's internal processing flow, thereby effectively protecting system resources and stability.
[0065] Figure 2 is an optional flow chart of determining the control status of a financial transaction according to an embodiment of the present invention, such as Figure 2 As shown, the step of determining the control status of the target financial transaction based on the control policies in the control policy set includes:
[0066] Step S201: extract the interface authorization control policy in the control policy set, and obtain the authorization status recorded in the interface authorization control policy.
[0067] It should be noted that according to the priority of the interface control policy, the interface authorization control policy is evaluated first. If there is no interface authorization control policy in the interface control policy set, other interface control policies are evaluated according to the priority. If there is an interface authorization control policy in the interface control policy set, for the interface authorization control policy, the authorization status field is accessed and read to determine whether the transaction request can be authorized.
[0068] Optionally, after obtaining the authorization status recorded in the interface authorization control policy, it also includes: when the authorization status indicates that the target financial interface corresponding to the target financial transaction is in a closed state, determining that the target financial interface is in an unauthorized state, obtaining the control code value of the interface authorization control policy and the description information corresponding to the control code value; constructing a first return message based on the control code value and the description information of the interface authorization control policy, and sending the first return message to the initiator of the target financial transaction.
[0069] It should be noted that the authorization status recorded in the interface authorization control policy may include: ON, indicating that the target financial interface is authorized to access and the target financial transaction can continue; OFF, indicating that the target financial interface is not authorized to access, the target financial transaction will be blocked and a response of authorization failure will be returned. A decision is made based on the extracted authorization status. If the authorization status is OFF, indicating that the target financial interface corresponding to the target financial transaction is currently in an unauthorized state, the system will immediately construct a response message (i.e., the first return message), which includes a control code value and descriptive information corresponding to the control code value. The control code value is in the system language, which is used to instruct the financial system to reject the target financial transaction. The descriptive information is used to describe the status or reason for the transaction failure. The response message is returned directly to the transaction requester to prevent further processing of the transaction request.
[0070] The following is an exemplary first return message:
[0071]
[0072] The value corresponding to the above retCode field is the control code value, and the value corresponding to the retMsg field is the description information of the control code value.
[0073] It should be noted that the embodiment of the present invention controls the access and call permissions of the financial interface with one click through the interface authorization management and control strategy, ensuring that financial transactions are carried out within the authorized scope, thereby avoiding the threat to system security and stability caused by unauthorized access. At the same time, this mechanism also provides a high degree of flexibility. Business personnel can dynamically adjust the access permissions of different products, channels and businesses by configuring the authorization status to adapt to changing business needs and risk management strategies.
[0074] Step S202: when the authorization status indicates that the target financial interface corresponding to the target financial transaction is in an open state, determine that the target financial interface corresponding to the target financial transaction is in an authorized state, and extract N interface time control policies from the control policy set.
[0075] It should be noted that if the authorization status field of the interface authorization control policy is ON, that is, the target financial interface corresponding to the target financial transaction is in the open state, indicating that the target financial interface is currently in the authorized state, and then the N interface time control policies in the control policy set need to be evaluated. The value of N can be 0, 1, 2... When the value of N is 0, skip step S203 and execute step S204.
[0076] Step S203: acquiring the time control status of the target financial interface corresponding to the target financial transaction based on the N interface time control policies.
[0077] It should be noted that, for the case where N is not 0, it is necessary to evaluate the interface time management strategy one by one. The interface time management strategy is used to limit the usage time period of the interface. For example, the interface time management strategy can be used to control the A business A channel A product from not being allowed to access the loan system from 9 a.m. to 12 p.m., or to control the A business A channel A product from not being allowed to access the loan system from 9 a.m. to 12 p.m. within a certain period.
[0078] Optionally, the step of obtaining the time control status of the target financial interface corresponding to the target financial transaction based on N interface time control policies includes: obtaining the time information corresponding to the target financial transaction; obtaining the effective status, policy effective time, and policy expiration time of each interface time control policy; screening K interface time control policies based on the effective status, policy effective time, and policy expiration time to obtain P interface time control policies; sorting the P interface time control policies based on the priority of each interface time control policy to obtain a time control policy list; obtaining the effective period, policy start time, and policy end time of each interface time control policy in the time control policy list; obtaining the time control status of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time, and policy end time of the interface time control policies.
[0079] It should be noted that the interface time control policy contains multiple fields. When evaluating the interface time control policy, it is first necessary to obtain the time information of the target financial transaction, which is usually read directly from the financial transaction request, and can be the receiving time of the financial transaction request or the processing timestamp contained in the financial transaction request; and read the key fields in each interface time control policy, including the effective status, the policy effective time and the policy expiration time. The policy effective time is used to determine when the interface time control policy starts to be applied, and the policy expiration time is used to determine when the interface time control policy ends. Then, a comparison operation is performed based on the values of the above key fields and the time information of the target financial transaction to determine the interface time control policy hit by the target financial transaction. The hit conditions include: the policy is in effect (that is, the effective status of the interface time control policy is ON), and the value in the time information of the target financial transaction is between the policy effective time and the policy expiration time. Through the above conditions, P valid interface time control policies can be screened out, and then the P interface time control policies are evaluated again in turn.
[0080] Optionally, the step of acquiring the time control state of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time and policy end time of the interface time control policy includes: matching the time information corresponding to the target financial transaction with the effective period, policy start time and policy end time of each interface time control policy in the time control policy list according to the arrangement order to obtain a matching result; when the matching result indicates that the time information corresponding to the target financial transaction successfully matches the effective period, policy start time and policy end time of at least one interface time control policy, determining that the target financial interface is in the time control state; selecting the interface time control policy with the highest priority among all successfully matched interface time control policies as the target interface time control policy corresponding to the target financial transaction, and generating a second return message based on the control code value and the description information of the control code value of the target interface time control policy, and sending the second return message to the initiator of the target financial transaction; or, when the matching result indicates that the time information corresponding to the target financial transaction fails to match the effective period, policy start time and policy end time of all interface time control policies, determining that the target financial interface is not in the time control state, and allowing the target financial interface to be called.
[0081] It should be noted that, for the P valid interface time control policies obtained by screening, the P time control policies are sorted according to the value of the priority field in the interface time control policy to create a time control policy list. The policy with a high priority will be placed at the front of the list to ensure that the policy with a high priority can be applied first in the case of a conflict; from the sorted list, first obtain the time control field of each interface time control policy in the order of arrangement: the effective period of the policy, such as a specific time period of a day, a week, or a month; the start time of the policy, which is used to determine the starting point of the policy in each period; the end time of the policy, which is used to determine the end point of the policy in each period, and then match the time information of the target financial transaction with the value of the time control field. If the target financial transaction successfully matches at least one interface time control policy, it means that the target financial interface is in a time control state, and currently access and call are not allowed. The interface time control policy with the highest priority among all successfully matched interface time control policies is selected, and its control code value and the description information of the control code value are obtained, and a second return message is generated and sent to the user end that initiates the target financial transaction to reject the financial transaction request of the user end.
[0082] The following is an exemplary second return message:
[0083]
[0084]
[0085] On the contrary, if the matching result indicates that the time information of the target financial transaction matches all the interface time control policies successfully, it means that the target financial interface corresponding to the target financial transaction is not in the control period and is allowed to be called at the time specified by the time information.
[0086] Step S204: when the time control state indicates that the target financial interface corresponding to the target financial transaction is not in the time control state, extract K interface traffic control policies from the control policy set.
[0087] It should be noted that when the target financial interface is not in a time control state, K interface traffic policies are extracted from the control policy set. If K is 0, step S205 is skipped and step S206 is executed. If there is a traffic control policy, that is, K is not 0, it is necessary to continue to evaluate the control state of the target financial interface based on the traffic control policy.
[0088] Step S205: acquiring the traffic control state of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies.
[0089] It should be noted that the interface traffic control strategy is implemented through a counter, which can control the number of financial transactions within a certain unit time. If the number exceeds the access threshold, access to the financial system is no longer allowed. For example, the interface traffic control strategy can be used to control the number of A business A channel A products within 1 day / 1 hour / 1 minute / 1 second / no more than 500 transactions. The embodiment of the present invention can control the flow dimension of financial transactions to ensure that the number of accesses or transactions to the financial interface within a unit time does not exceed the maximum allowed flow, thereby avoiding the impact on the system caused by large flow or centralized transactions, and improving the stability and security of the system. At the same time, through policy priority sorting and dynamic flow monitoring, the system can quickly respond to changing business needs and provide a more flexible and efficient flow management solution.
[0090] Optionally, the step of obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on K interface traffic control policies includes: sorting the K interface traffic control policies according to priority to obtain a traffic control policy list; performing counting processing on the counter based on the target financial transaction, and reading the count value after the counting processing of the counter; obtaining the traffic threshold of each interface traffic control policy in the traffic control policy list; obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter.
[0091] It should be noted that after obtaining K interface traffic control policies, the K interface traffic control policies are first sorted according to priority to obtain a traffic control policy list, and then the target financial transaction is counted through a counter to obtain the count value of the counter. The count value reflects the traffic of the target financial interface corresponding to the target financial transaction during the target period. At the same time, the traffic threshold of each interface traffic management policy in the traffic control policy list is obtained. By comparing the count value with the traffic threshold of each interface traffic management policy, it can be determined whether the target financial interface corresponding to the target financial transaction is in a traffic control state.
[0092] In another optional embodiment, if the counter of the target financial interface corresponding to the target financial transaction is obtained, a counter is created for the target financial interface, and the count value of the counter is initialized to 0.
[0093] In another optional embodiment, if the count value of the counter obtained is 1, it indicates that it is the first call in the current cycle, and an expiration time needs to be configured for the counter. If the expiration time is reached, the count value of the counter can be automatically initialized to 0 and then restart counting.
[0094] Optionally, the step of obtaining the traffic control status of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter includes: step one, selecting the target interface traffic control policy from the traffic control policy list according to the arrangement order of each interface traffic control policy; step two, comparing the count value with the traffic threshold of the target interface traffic control policy, and when the count value is less than or equal to the traffic threshold of the target interface traffic control policy, removing the target interface traffic control policy from the traffic control policy list to obtain an updated traffic control policy list; repeating the above steps one to two, and when the count value is less than or equal to the traffic threshold of all target interface traffic control policies, determining that the target financial interface is not in the traffic control state, and allowing the target financial interface to be called.
[0095] It should be noted that when comparing the count value with the traffic threshold, in order to ensure the wired execution of high-priority policies, the following steps are followed: First, select the target interface traffic control policy from the traffic control policy list in order of arrangement. The target interface traffic control policy is the interface traffic control policy with the highest priority in the traffic control list. Then compare the count value of the counter with the traffic threshold recorded in the target interface traffic control policy. If the count value is less than or equal to the traffic threshold of the target interface traffic control policy, it means that the target financial interface is not currently in the traffic control state of the target interface traffic control policy. Then remove the target interface traffic control policy from the traffic control policy list to obtain an updated traffic control policy list. Repeat the above steps based on the updated traffic control policy list, and reselect the target interface traffic control policy for comparison. If the count value is less than or equal to the traffic threshold of all target interface traffic control policies, it means that the target financial interface is not in the traffic control state, and the target financial interface is allowed to be called.
[0096] Optionally, after comparing the count value with the traffic threshold of the target interface traffic control policy, it also includes: when the count value is greater than the traffic threshold of the target interface traffic control policy, determining that the target financial interface is in a traffic control state; constructing a third return message based on the control code value of the target interface traffic control policy and the descriptive information corresponding to the control code value, and sending the third return message to the initiator of the target financial transaction.
[0097] On the other hand, when the count value is compared with the traffic threshold of the target interface traffic control policy, the count value is greater than or equal to the traffic threshold of the target interface traffic control policy, indicating that the target financial interface is in a traffic control state, and a third return message is constructed based on the control code value of the target interface traffic control policy and the description information of the control code value, and the third return message is sent to the initiator of the target financial transaction.
[0098] The following is an exemplary third return message:
[0099]
[0100]
[0101] Step S206, determining the control status of the target financial transaction based on the authorization status, time control status and flow control status.
[0102] It should be noted that the control of target financial transactions through the above-mentioned multi-level interface control strategies can ensure that financial transactions are carried out under the premise of compliance, security and efficiency, and effectively avoid the risks that unauthorized access, non-working time transactions and large traffic shocks may cause to the system. This multi-dimensional and dynamic transaction control mechanism provides strong security protection for financial institutions and can flexibly adapt to changing business needs.
[0103] Through the above steps, the business identifier, product identifier and channel identifier of the target financial transaction are obtained based on the financial transaction request, and key-value information is constructed based on the business identifier, product identifier and channel identifier. Then, the target financial interface corresponding to the target financial transaction is determined based on the key-value information, and the control policy set of the target financial interface corresponding to the target financial transaction is obtained, wherein the control policy set includes: M interface authorization control policies, N interface time control policies and K interface traffic control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface traffic control policy. Finally, the control status of the target financial transaction is determined based on the control policies in the control policy set.
[0104] In this embodiment, key value information is automatically constructed based on the business identifier, product identifier and channel identifier of the target financial business, and the key value information is used as the index for querying the control policy set. Through the key value information, the system can quickly locate the specific financial interface corresponding to the target financial transaction, and at the same time, through the application of multi-level strategies such as interface authorization control strategy, interface time control strategy and interface flow control strategy, it ensures the most stringent and reasonable control of financial transaction requests in multiple dimensions, achieves the purpose of fine-grained control of financial system interfaces, and achieves the technical effect of improving the stability and sustainability of the financial system, thereby solving the technical problem that the current limiting protection method based on the leaky bucket algorithm or the token bucket algorithm in the related technology cannot meet the requirements of financial services in complex scenarios.
[0105] The following is a detailed description in conjunction with another embodiment.
[0106] Embodiment 2
[0107] A financial transaction management and control device provided in this embodiment includes multiple implementation units, each implementation unit corresponds to each implementation step in the above-mentioned embodiment 1. Its specific implementation methods and beneficial effects can refer to the above-mentioned method embodiments and will not be repeated here.
[0108] Figure 3 is a schematic diagram of an optional financial transaction control device according to an embodiment of the present invention, such as Figure 3 As shown, the financial transaction control device may include: a construction unit 31, an acquisition unit 32, and a determination unit 33, wherein:
[0109] A construction unit 31 is used to obtain a business identifier, a product identifier and a channel identifier of a target financial transaction based on a financial transaction request, and to construct key value information based on the business identifier, the product identifier and the channel identifier;
[0110] The acquisition unit 32 is used to determine the target financial interface corresponding to the target financial transaction based on the key value information, and acquire the control policy set of the target financial interface corresponding to the target financial transaction, wherein the control policy set includes: M interface authorization control policies, N interface time control policies, and K interface flow control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface flow control policy;
[0111] The determination unit 33 is configured to determine the control status of the target financial transaction based on the control policies in the control policy set.
[0112] The above-mentioned financial transaction control device obtains the business identifier, product identifier and channel identifier of the target financial transaction based on the financial transaction request through the construction unit 31, and constructs key information based on the business identifier, product identifier and channel identifier; determines the target financial interface corresponding to the target financial transaction based on the key information through the acquisition unit 32, and obtains the control policy set of the target financial interface corresponding to the target financial transaction, wherein the control policy set includes: M interface authorization control policies, N interface time control policies and K interface traffic control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface traffic control policy; determines the control status of the target financial transaction based on the control policies in the control policy set through the determination unit 33.
[0113] In this embodiment, key value information is automatically constructed based on the business identifier, product identifier and channel identifier of the target financial business, and the key value information is used as the index for querying the control policy set. Through the key value information, the system can quickly locate the specific financial interface corresponding to the target financial transaction, and at the same time, through the application of multi-level strategies such as interface authorization control strategy, interface time control strategy and interface flow control strategy, it ensures the most stringent and reasonable control of financial transaction requests in multiple dimensions, achieves the purpose of fine-grained control of financial system interfaces, and achieves the technical effect of improving the stability and sustainability of the financial system, thereby solving the technical problem that the current limiting protection method based on the leaky bucket algorithm or the token bucket algorithm in the related technology cannot meet the requirements of financial services in complex scenarios.
[0114] Optionally, the determination unit 33 includes: a first acquisition subunit, used to extract the interface authorization control policy in the control policy set, and obtain the authorization status recorded in the interface authorization control policy; a first determination subunit, used to determine that the target financial interface corresponding to the target financial transaction is in the authorization state when the authorization state indicates that the target financial interface corresponding to the target financial transaction is in the open state, and extract N interface time control policies from the control policy set; a second acquisition subunit, used to obtain the time control state of the target financial interface corresponding to the target financial transaction based on the N interface time control policies; the first extraction subunit, used to extract K interface traffic control policies from the control policy set when the time control state indicates that the target financial interface corresponding to the target financial transaction is not in the time control state; a third acquisition subunit, used to obtain the traffic control state of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies; and a second determination subunit, used to determine the control state of the target financial transaction based on the authorization state, the time control state and the traffic control state.
[0115] Optionally, the determination unit 33 also includes: a third determination sub-unit, used to determine that the target financial interface is in an unauthorized state when the authorization status indicates that the target financial interface corresponding to the target financial transaction is in a closed state, and obtain the control code value of the interface authorization control policy and the description information corresponding to the control code value; a first construction sub-unit, used to construct a first return message based on the control code value and the description information of the interface authorization control policy, and send the first return message to the initiator of the target financial transaction.
[0116] Optionally, the second acquisition sub-unit includes: a first acquisition module, used to obtain the time information corresponding to the target financial transaction; a second acquisition module, used to obtain the effective status, policy effective time, and policy expiration time of each interface time control policy; a first screening module, used to screen K interface time control policies based on the effective status, policy effective time, and policy expiration time to obtain P interface time control policies; a first sorting module, used to sort the P interface time control policies based on the priority of each interface time control policy to obtain a time control policy list; a third acquisition module, used to obtain the effective period, policy start time, and policy end time of each interface time control policy in the time control policy list; a fourth acquisition module, used to obtain the time control status of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time, and policy end time of the interface time control policies.
[0117] Optionally, the fourth acquisition module includes: a first matching submodule, which is used to match the time information corresponding to the target financial transaction with the effective period, policy start time and policy end time of each interface time control policy in the time control policy list according to the arrangement order to obtain a matching result; a first determination submodule, which is used to determine that the target financial interface is in a time control state when the matching result indicates that the time information corresponding to the target financial transaction successfully matches the effective period, policy start time and policy end time of at least one interface time control policy; a first selection submodule, which is used to select the interface time control policy with the highest priority among all successfully matched interface time control policies as the target interface time control policy corresponding to the target financial transaction, and generate a second return message based on the control code value of the target interface time control policy and the description information of the control code value, and send the second return message to the initiator of the target financial transaction; a second determination submodule, which is used to determine that the target financial interface is not in a time control state and allow the target financial interface to be called when the matching result indicates that the time information corresponding to the target financial transaction fails to match the effective period, policy start time and policy end time of all interface time control policies.
[0118] Optionally, the third acquisition sub-unit includes: a second sorting module, used to sort K interface traffic control policies according to priority to obtain a traffic control policy list; a first reading module, used to count the counter based on the target financial transaction, and read the count value after the counter counting processing; a fifth acquisition module, used to obtain the traffic threshold of each interface traffic control policy in the traffic control policy list; a sixth acquisition module, used to obtain the traffic control status of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter.
[0119] Optionally, the sixth acquisition module includes: a second selection sub-module, used for step one, selecting the target interface traffic control policy from the traffic control policy list according to the arrangement order of each interface traffic control policy; a first comparison sub-module, used for step two, comparing the count value with the traffic threshold of the target interface traffic control policy, and when the count value is less than or equal to the traffic threshold of the target interface traffic control policy, removing the target interface traffic control policy from the traffic control policy list to obtain an updated traffic control policy list; a third determination sub-module, used to repeat steps one to two above, and when the count value is less than or equal to the traffic threshold of all target interface traffic control policies, determining that the target financial interface is not in a traffic control state, and allowing the target financial interface to be called.
[0120] Optionally, the sixth acquisition module also includes: a fourth determination sub-module, used to determine that the target financial interface is in a traffic control state when the count value is greater than the traffic threshold of the target interface traffic control policy; a first construction sub-module, used to construct a third return message based on the control code value of the target interface traffic control policy and the descriptive information corresponding to the control code value, and send the third return message to the initiator of the target financial transaction.
[0121] Optionally, the financial transaction control device also includes: a first configuration subunit, used to configure interface authorization control policy, interface time control policy and interface traffic control policy for the financial interface corresponding to the financial transaction in the financial system based on the business identification, product identification and channel identification of the financial transaction; a first storage subunit, used to store the interface authorization control policy, interface time control policy and interface traffic control policy in a database.
[0122] The above-mentioned financial transaction control device may also include a processor and a memory. The above-mentioned construction unit 31, acquisition unit 32, determination unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0123] The above processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set to control financial transactions by adjusting kernel parameters.
[0124] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0125] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned financial transaction management and control methods.
[0126] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement any one of the above-mentioned financial transaction management and control methods.
[0127] According to another aspect of an embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program, wherein when the computer program is executed by a processor, any one of the above-mentioned financial transaction management and control methods is implemented.
[0128] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps: obtaining a business identifier, a product identifier, and a channel identifier of a target financial transaction based on a financial transaction request, and constructing key-value information based on the business identifier, the product identifier, and the channel identifier; determining a target financial interface corresponding to the target financial transaction based on the key-value information, and obtaining a set of control policies for the target financial interface corresponding to the target financial transaction, wherein the control policy set includes: M interface authorization control policies, N interface time control policies, and K interface traffic control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface traffic control policy; determining the control status of the target financial transaction based on the control policies in the control policy set.
[0129] Figure 4 1 is a hardware structure block diagram of an electronic device (or mobile device) for executing a method for controlling financial transactions according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more processors ( Figure 4 402a, 402b, ..., 402n are used to illustrate), a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.
[0130] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0131] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0132] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0133] 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0134] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0135] If the integrated unit 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0136] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for controlling financial transactions, characterized in that: include: Acquire a business identifier, a product identifier, and a channel identifier of a target financial transaction based on a financial transaction request, and construct key value information based on the business identifier, the product identifier, and the channel identifier; Determine the target financial interface corresponding to the target financial transaction based on the key value information, and obtain a control policy set of the target financial interface corresponding to the target financial transaction, wherein the control policy set includes: M interface authorization control policies, N interface time control policies, and K interface traffic control policies, M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface traffic control policy; The control status of the target financial transaction is determined based on the control policies in the control policy set.
2. The control method according to claim 1, characterized in that: The step of determining the control status of the target financial transaction based on the control policy in the control policy set includes: Extracting the interface authorization control policy from the control policy set, and obtaining the authorization status recorded in the interface authorization control policy; When the authorization status indicates that the target financial interface corresponding to the target financial transaction is in an open state, determining that the target financial interface corresponding to the target financial transaction is in an authorized state, and extracting N interface time control policies from the control policy set; Acquire the time control status of the target financial interface corresponding to the target financial transaction based on the N interface time control policies; When the time control state indicates that the target financial interface corresponding to the target financial transaction is not in the time control state, extracting K interface traffic control policies from the control policy set; Acquire the traffic control state of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies; The control status of the target financial transaction is determined based on the authorization status, the time control status, and the flow control status.
3. The control method according to claim 2, characterized in that: After obtaining the authorization status recorded in the interface authorization control policy, it also includes: When the authorization status indicates that the target financial interface corresponding to the target financial transaction is in a closed state, determining that the target financial interface is in an unauthorized state, and obtaining a control code value of the interface authorization control policy and description information corresponding to the control code value; A first return message is constructed based on the control code value and the description information of the interface authorization control policy, and the first return message is sent to the initiator of the target financial transaction.
4. The control method according to claim 2, characterized in that: The step of acquiring the time control status of the target financial interface corresponding to the target financial transaction based on the N interface time control policies includes: Acquire the time information corresponding to the target financial transaction; Obtain the effective status, effective time, and invalid time of each interface time control policy; Filter the K interface time control policies based on the effective state, the policy effective time, and the policy expiration time to obtain P interface time control policies; Sort the P interface time control policies based on the priority of each interface time control policy to obtain a time control policy list; Obtaining the effective period, policy start time and policy end time of each interface time control policy in the time control policy list; The time control state of the target financial interface corresponding to the target financial transaction is obtained based on the arrangement order, effective period, policy start time and policy end time of the interface time control policy.
5. The control method according to claim 4, characterized in that: The step of acquiring the time control state of the target financial interface corresponding to the target financial transaction based on the arrangement order, effective period, policy start time and policy end time of the interface time control policy comprises: Matching the time information corresponding to the target financial transaction with the effective period, policy start time and policy end time of each interface time control policy in the time control policy list according to the arrangement order to obtain a matching result; If the matching result indicates that the time information corresponding to the target financial transaction successfully matches the effective period, policy start time and policy end time of at least one of the interface time control policies, determining that the target financial interface is in a time control state; The interface time control policy with the highest priority among all the interface time control policies that are successfully matched is selected as the target interface time control policy corresponding to the target financial transaction, and a second return message is generated based on the control code value of the target interface time control policy and the description information of the control code value, and the second return message is sent to the initiator of the target financial transaction; or, When the matching result indicates that the time information corresponding to the target financial transaction fails to match the effective period, policy start time and policy end time of all the interface time control policies, it is determined that the target financial interface is not in a time control state, and calling the target financial interface is allowed.
6. The control method according to claim 2, characterized in that: The step of obtaining the traffic control state of the target financial interface corresponding to the target financial transaction based on the K interface traffic control policies includes: Sort the K interface traffic control policies according to priority to obtain a traffic control policy list; Performing counting processing on a counter based on the target financial transaction, and reading a count value after the counting processing of the counter; Obtaining the traffic threshold of each interface traffic control policy in the traffic control policy list; The traffic control state of the target financial interface corresponding to the target financial transaction is obtained based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter.
7. The control method according to claim 6, characterized in that: The step of acquiring the traffic control state of the target financial interface corresponding to the target financial transaction based on the arrangement order and traffic threshold of each interface traffic control policy in the traffic control policy list and the count value of the counter comprises: Step 1: Select a target interface traffic control strategy from the traffic control strategy list according to the arrangement order of each interface traffic control strategy; Step 2: Compare the count value with the traffic threshold of the target interface traffic control policy. If the count value is less than or equal to the traffic threshold of the target interface traffic control policy, remove the target interface traffic control policy from the traffic control policy list to obtain an updated traffic control policy list. Repeat steps 1 to 2 above. When the count value is less than or equal to the traffic threshold of all the target interface traffic control policies, determine that the target financial interface is not in a traffic control state, and allow calling the target financial interface.
8. The control method according to claim 7, characterized in that: After comparing the count value with the traffic threshold of the target interface traffic control policy, the method further includes: When the count value is greater than the traffic threshold of the target interface traffic control policy, determining that the target financial interface is in a traffic control state; A third return message is constructed based on the control code value of the target interface traffic control policy and the description information corresponding to the control code value, and the third return message is sent to the initiator of the target financial transaction.
9. The control method according to claim 1, characterized in that: Before obtaining the business identifier, product identifier, and channel identifier of the target financial transaction based on the financial transaction request, the following is also included: Based on the business identifier, product identifier and channel identifier of the financial transaction, the interface authorization control policy, the interface time control policy and the interface traffic control policy are configured for the financial interface corresponding to the financial transaction in the financial system; The interface authorization control policy, the interface time control policy and the interface traffic control policy are stored in a database.
10. A financial transaction control device, characterized in that: include: A construction unit, configured to obtain a service identifier, a product identifier and a channel identifier of a target financial transaction based on a financial transaction request, and to construct key value information based on the service identifier, the product identifier and the channel identifier; an acquisition unit, configured to determine a target financial interface corresponding to the target financial transaction based on the key value information, and acquire a control policy set of the target financial interface corresponding to the target financial transaction, wherein the control policy set includes: M interface authorization control policies, N interface time control policies, and K interface flow control policies, where M=1, N and K are both positive integers, the priority of the interface authorization control policy is greater than the priority of the interface time control policy, and the priority of the interface time control policy is greater than the priority of the interface flow control policy; A determination unit is used to determine the control status of the target financial transaction based on the control policy in the control policy set.
Citation Information
Cited By
Distributed system refined flow limiting method
CN120956668A
Electronic bank dynamic flow management and control method and system based on multi-dimensional data fusion
CN122247935A
Electronic bank dynamic flow management method and system based on multi-dimensional data fusion
CN122247935B