CN-121979589-A - Multi-AK cooperative scheduling method for bank large model interface
Abstract
The invention discloses a multi-access key AK collaborative scheduling method for a bank large model interface, which manages information such as QPS (quality control system), abnormal times and the like of the multi-access key AK through a multi-access key AK resource pool, generates a scheduling sequence every second by a scheduler, judges whether the current second number belongs to a new time slice when receiving a request, wherein the same time slice takes the multi-access key AK according to indexes, alarms when crossing boundaries, and generates and breaks the sequence according to the QPS of the multi-access key AK when taking the corresponding multi-access key AK.
Inventors
- WANG BEN
Assignees
- 中国建设银行股份有限公司浙江省分行
Dates
- Publication Date
- 20260505
- Application Date
- 20251210
Claims (10)
- 1. A multi-access key AK collaborative scheduling method for a bank large model interface is characterized by comprising the following steps: S1, when a new bank large model interface call request is received, acquiring the current seconds; s2, judging whether the current seconds are equal to the seconds where the last interface call request is located or not, if so, indicating that the current request and the last request are in the same time slice, entering a step S3, and if not, indicating that the current request enters a new time slice, and entering a step S4; s3, judging whether the current multi-access key AK scheduling sequence index is larger than or equal to the length of the multi-access key AK scheduling sequence, if so, indicating that the total flow upper limit of the current time slice is exceeded, throwing out the flow overrun abnormality and giving out the flow overrun alarm; S4, initializing scheduling configuration of a new time slice; The method specifically comprises the following substeps of constructing a new multi-access key AK scheduling sequence, taking out all valid multi-access key AK values from a multi-access key AK resource pool, repeatedly corresponding times of each multi-access key AK value according to corresponding calling frequency QPS quota to form a single sub-list of the multi-access key AK, splicing the sub-lists of all the single multi-access keys AK into a complete multi-access key AK list, scrambling the complete multi-access key AK list through a random number generator to ensure that interface calling requests are uniformly distributed among the multi-access keys AK, updating the current seconds of the last request to be 0, taking out a first multi-access key AK from the scrambled multi-access key AK scheduling sequence, adding 1 to the multi-access key AK scheduling sequence index, and entering step S5; S5, calling a bank large model API interface by using the multi-access key AK selected in the step S3 or the step S4, and recording complete transaction information in a transaction record table, wherein the transaction information comprises a multi-access key AK value, a transaction global serial number and interface response time so as to meet the auditing requirements of the financial industry, recording the abnormal times of the multi-access key AK in a multi-access key AK resource pool if the calling of the API interface fails or the response time exceeds a preset threshold value, and removing the multi-access key AK from the multi-access key AK resource pool and initiating overtime abnormal alarming if the abnormal times of a certain multi-access key AK exceeds a preset threshold value in a preset statistical period.
- 2. The collaborative scheduling method for a multi-access key AK for a bank large model interface according to claim 1, wherein the multi-access key AK resource pool is used for centrally managing core parameters corresponding to each multi-access key AK, and the core parameters include a multi-access key AK value, a call frequency QPS set value distributed by a headquarter, and abnormal times updated in real time.
- 3. The collaborative scheduling method for a bank large model interface according to claim 1, wherein the time window for constructing a new multi-access key AK scheduling sequence in step S4 is set to 1 second, and the system scheduler automatically generates the new multi-access key AK scheduling sequence once per second.
- 4. The collaborative scheduling method of multiple access keys AK for a bank large model interface according to claim 1, wherein the transaction information recorded in step S5 can be stored for a long period of time, and support searching according to dimensions such as multiple access key AK value, transaction time, transaction serial number, etc. to meet the requirements of internal and external auditing.
- 5. The method for collaborative scheduling of multiple access keys AK for a large-model interface of a bank according to claim 1 or 4, wherein the preset statistical period in step S5 is half an hour, and the threshold value of the abnormal number is set as a configurable parameter, so as to support flexible adjustment according to the operation and maintenance requirements of the bank.
- 6. The collaborative scheduling method for multiple access keys AK facing a bank large model interface according to claim 1, wherein when a headquarter adjusts the calling frequency QPS quota of a certain multiple access key AK or newly adds or deactivates the multiple access key AK, the latest multiple access key AK parameters are dynamically loaded through a database, and the new multiple access key AK scheduling sequence is automatically validated in the next 1 second time window, so that the implementation of no restart service or manual intervention is realized.
- 7. A multi-access-key AK cooperative scheduling system for implementing the method of any one of claims 1-6, comprising a multi-access-key AK resource pool, a scheduler, and an execution module, wherein parameter interaction, sequence transfer, and closed-loop cooperation of state feedback are implemented among the multi-access-key AK resource pool, the scheduler, and the execution module through standardized interfaces; the multi-access key AK resource pool is realized by a database and is used for centrally managing AK values, QPS set values, abnormal times and state information of all the multi-access keys AK; The scheduler is used for automatically generating and updating a multi-access key AK scheduling sequence according to a 1 second time window, so that the instantaneity and the accuracy of a scheduling strategy are ensured; the execution module is used for receiving a large model interface call request of a bank branch office and executing second judgment, multi-access key AK selection, API interface call and exception handling operation.
- 8. The multi-access key AK cooperative scheduling system according to claim 7, wherein the multi-access key AK resource pool supports dynamic parameter updating, and synchronization can be completed without interrupting system operation when configuration information of the multi-access key AK is changed.
- 9. The multiple access key AK cooperative dispatching system according to claim 7, wherein said execution module further integrates a transaction recording unit, specifically configured to record audit information of each API interface call, said audit information being consistent with the transaction information recorded in step S5 of claim 1.
- 10. The application of the multi-access key AK collaborative scheduling system according to claim 7, wherein the application comprises an application scenario in which the system is suitable for a banking branch office to call a large model service interface uniformly deployed by a headquarter, and can meet high requirements of financial industry on compliance, stability and auditability.
Description
Multi-AK cooperative scheduling method for bank large model interface Technical Field The invention relates to the technical field of computer interface calling and resource scheduling, in particular to a multi-access key AK collaborative scheduling method for a bank general line large model interface, which is suitable for a scene of calling a general line large model service interface by a bank branch office, in particular to an API calling environment with high compliance and stability requirements in the financial industry. Background With the rapid development of artificial intelligence technology, large language models (Large Language Model, LLM) have been widely used in banking industry for core business scenarios such as intelligent customer service, risk identification, compliance review, report generation, investment advice, etc. Because large model training and reasoning consume huge computational power resources and involve the safe management and control of customer sensitive data, most commercial banks adopt a mode of 'centralized deployment of headquarters and on-demand calling by branches', namely, the headquarters build a large model service platform uniformly and open API interface services to all branch institutions. Under the architecture, the headquarter generally distributes one or more access keys (ACCESS KEY, AK) to each branch or service system, and performs quota management on resource usage through strict calling frequency (Queries Per Second, QPS) limitation, so as to ensure the overall stability of the system, prevent resource abuse, and realize resource isolation and cost accounting between different service lines. However, this management mode faces the following prominent problems in practical applications: First, the computational effort resource is intense resulting in high interface response delays. Large model reasoning is itself computationally intensive, especially in high concurrency scenarios, single call response times often reach several seconds or even tens of seconds. If the branch side invoking policy is unreasonable, for example, a certain AK or request burst is intensively used, the current limiting mechanism of the head office side is easily triggered, which results in invoking failure or queuing delay and seriously affects user experience and service continuity. Second, the multi AK resource utilization is low. Although partial branching applies for a plurality of AKs to promote the total call capacity, a load balancing strategy based on random selection or probability is still adopted in actual scheduling. The method cannot accurately control the calling frequency of each AK, and the phenomenon of local overrun and global waste caused by the condition that a certain AK overruns and is limited in current and other AKs are in idle state can not be realized in a short time, so that the full utilization of resources can not be realized. Finally, the financial industry has extremely high requirements on compliance, stability and auditability of the system. A large number of high-latency calls in a short time may be recorded as security events, and at the same time, the calling behavior must be traceable to meet the internal and external audit requirements, which is difficult to meet by conventional scheduling methods. Disclosure of Invention The invention aims to call a general large model interface scene for a bank branch office, solve the problems of resource waste, overrun failure and insufficient compliance audit in multi-access key AK scheduling, realize accurate management and control of AK call, high-efficiency resource utilization and stable compliance of a system, and provide a multi-access key AK collaborative scheduling method for a bank large model interface. In order to achieve the above purpose, the present invention is realized by the following technical scheme: The invention discloses a multi-access key AK collaborative scheduling method for a bank large model interface, which comprises the following steps: S1, when a new bank large model interface call request is received, acquiring the current seconds (nowSecond); S2, judging whether the current seconds (nowSecond) is equal to the seconds (lastSecond) where the last interface call request is located, if the current seconds (nowSecond) are equal, the current request and the last request are in the same time slice, and entering a step S3, if the current request and the last request are different, the current request enters a new time slice, and entering a step S4; S3, judging whether the current multi-access key AK scheduling sequence index is larger than or equal to the length of the multi-access key AK scheduling sequence, if so, indicating that the total flow upper limit of the current time slice is exceeded, throwing out the flow overrun abnormality and sending out the flow overrun alarm; S4, initializing scheduling configuration of a new time slice; The method specifically comprises the follo