A transaction request processing method and device, a storage medium and an electronic device

By introducing a PID controller into the distributed system, the problem of unstable system load and uneven resource allocation can be solved by real-time monitoring and dynamic adjustment of transaction request traffic, thus achieving efficient traffic management and rapid response of high-priority transactions.

CN120416334BActive Publication Date: 2025-11-18CHONGQING ANT CONSUMER FINANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510914406.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-11-18
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

Existing technologies struggle to dynamically adapt to changes in transaction request traffic in distributed systems, leading to unstable system load, uneven resource allocation, and impact on high-priority transaction processing.

Method used

A PID controller is adopted to adapt to the transaction request processing domain, monitor and dynamically adjust the transaction request traffic in real time, and generate control signals through the traffic PID controller to adjust the request response strategy of the transaction service.

Benefits of technology

It improves system stability and throughput, enhances the intelligence and accuracy of transaction traffic management, and ensures rapid response to high-priority transactions and optimized resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120416334B_ABST
    Figure CN120416334B_ABST
Patent Text Reader

Abstract

The specification discloses a transaction request processing method and device, a storage medium and an electronic device, wherein the method comprises the following steps: determining an offline request processing link and a real-time request processing link associated with a target transaction service; monitoring current request flow parameters of the real-time request processing link and the offline request processing link by using a flow PID controller; performing flow control processing on the current request flow parameters by using the flow PID controller to obtain a flow control signal for the target transaction service; and performing request response adjustment processing on the target transaction service based on the flow control signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a transaction request processing method, apparatus, storage medium, and electronic device. Background Technology

[0002] In modern distributed systems and high-concurrency transaction processing, transaction processing is widely used in scenarios such as finance, e-commerce, database management, log analysis, credit reporting, and IoT data stream processing. Transaction request traffic, such as credit reporting query requests, transaction audit requests, and identity authentication requests, is often unstable, posing a significant challenge to the reliability and responsiveness of transaction platform systems. In actual transaction request processing, achieving precise traffic control, dynamically adapting to transaction load fluctuations, and ensuring high-priority processing of critical transactions in complex and ever-changing transaction environments has become a key focus of current transaction traffic scheduling and transaction request processing. Summary of the Invention

[0003] This specification provides a transaction request processing method, apparatus, storage medium, and electronic device, the technical solution of which is as follows:

[0004] Firstly, this specification provides a transaction request processing method, the method comprising:

[0005] Identify the offline request processing chain and the real-time request processing chain associated with the target transaction service;

[0006] A traffic PID controller is used to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link. Based on the current request traffic parameters, the traffic PID controller is used to perform traffic control processing to obtain a traffic control signal for the target transaction service.

[0007] The target transaction service is adjusted and processed based on the flow control signal.

[0008] Secondly, this specification provides a transaction request processing apparatus, the apparatus comprising:

[0009] The link determination module is used to determine the offline request processing link and the real-time request processing link associated with the target transaction service;

[0010] The control processing module is used to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link using a traffic PID controller, and to perform traffic control processing using the traffic PID controller based on the current request traffic parameters to obtain a traffic control signal for the target transaction service.

[0011] The adjustment processing module is used to perform request-response adjustment processing on the target transaction service based on the flow control signal.

[0012] Thirdly, this specification provides a computer storage medium storing at least one instruction adapted for loading by a processor and executing method steps of one or more embodiments of this specification.

[0013] Fourthly, this specification provides a computer program product storing at least one instruction adapted to be loaded by a processor and to execute the method steps of one or more embodiments of this specification.

[0014] Fifthly, this specification provides an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the method steps of one or more embodiments of this specification.

[0015] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0016] In one or more embodiments of this specification, the service platform employs a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link. Based on the current request traffic parameters, the traffic PID controller performs traffic control processing to obtain a traffic control signal for the target transaction service. Based on the traffic control signal, request response adjustment processing is performed on the target transaction service. By successfully adapting the PID feedback control mechanism, which is widely used in traditional industrial fields, to the user transaction request processing domain, real-time monitoring of transaction request traffic, calculation of control signals, and dynamic adjustment of transaction request traffic processing are achieved, thereby realizing adaptive traffic control of transaction processing. This not only significantly improves the stability and throughput of the system but also further enhances the intelligence and accuracy of transaction traffic management. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this specification or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of a transaction request processing system provided in this specification;

[0019] Figure 2 This is a flowchart illustrating a transaction request processing method provided in this specification;

[0020] Figure 3 This is a schematic diagram of a flow control processing scenario provided in this manual;

[0021] Figure 4 This is a flowchart illustrating a flow control processing method provided in this manual;

[0022] Figure 5 This is a flowchart illustrating a flow control operation provided in this manual;

[0023] Figure 6 This is a schematic diagram of the reference regulation process for a flow PID controller provided in this manual;

[0024] Figure 7 This is a flowchart illustrating a request-response adjustment process provided in this manual;

[0025] Figure 8 This is a schematic diagram of the structure of a transaction request processing device provided in this specification;

[0026] Figure 9 This is a schematic diagram of the structure of an electronic device provided in this specification. Detailed Implementation

[0027] The technical solutions in this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0028] In the description of this specification, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this specification based on the specific circumstances. Furthermore, in the description of this specification, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0029] In related technologies, transaction processing is widely used in scenarios such as finance, e-commerce, database management, log analysis, credit investigation, and IoT data stream processing. However, it often encounters one or more of the following phenomena:

[0030] 1. Large system load fluctuations: The volume of transaction requests varies significantly across different time periods, such as peak periods for bank settlements, flash sales on shopping websites, and peak trading periods in the financial markets, leading to periodic peaks and troughs in the load of the transaction processing system. 2. Complex priority management: Different types of transaction requests have different transaction priorities. For example, financial transactions have higher priority than log storage, and real-time queries have higher priority than batch offline computing. Intelligent traffic control strategies are needed to prevent low-priority transactions from preempting resources and affecting the execution of high-priority transactions. 3. Uneven resource allocation: Since transaction processing often involves multiple computing resources (such as databases, caches, message queues, and microservice nodes), the load status of different resources may vary significantly, leading to overload in some resources while other resources still have spare capacity. 4. Overload risk: If transaction processing traffic is not properly controlled, it may lead to system resource exhaustion, a sharp increase in response time, or even system crashes. For example, in database transaction processing, a large number of high-concurrency requests may exhaust the database connection pool, causing lock contention and deadlocks.

[0031] To address the challenges mentioned above, traditional transaction processing systems typically employ the following flow control schemes:

[0032] Rate limiting based on fixed thresholds: By setting a fixed maximum number of requests or maximum throughput, when the number of requests exceeds the threshold, the requests are rejected or the rate is limited.

[0033] Limitations of rate limiting based on fixed thresholds: Fixed thresholds are difficult to adapt to dynamically changing traffic, which may waste resources under low load and affect service availability under high load.

[0034] Flow control based on token bucket / leaky bucket algorithms: Token bucket: Allows bursts of traffic, but limits the long-term rate. Leaky bucket: Processes requests at a fixed rate, preventing excessive instantaneous load.

[0035] Limitations of flow control based on token bucket / leaky bucket algorithms: These methods are generally suitable for network flow control, but in transaction processing scenarios, the complexity of transactions (such as computational density, database I / O, message queue waiting time, etc.) is difficult to accurately capture by simple rate control models.

[0036] Task routing based on distributed scheduling: By using load balancing, task queues, asynchronous task distribution and other methods, transaction requests are reasonably distributed to multiple computing nodes.

[0037] Limitations of task distribution based on distributed scheduling: This method relies on the cluster's scalability, and in scenarios with insufficient or non-scalable resources (such as database connection pools and CPU-intensive tasks), it is still difficult to fundamentally solve the problem of high transaction load.

[0038] In summary, flow control in transaction processing is a key challenge in distributed systems. Traditional flow control methods are difficult to dynamically adapt to changes in transaction load and have certain limitations.

[0039] To address the aforementioned limitations, in one or more embodiments of this specification, a feedback control mechanism widely used in industrial control—the PID (Proportional-Integral-Derivative) controller—is adapted and applied to the user transaction request processing field. Based on the PID controller, adaptive flow control of transaction processing is achieved by real-time monitoring of transaction request traffic, calculating control signals, and dynamically adjusting transaction processing strategies, thereby improving system stability and throughput. This further enhances the intelligence and accuracy of transaction traffic management, making it suitable for various high-concurrency transaction scenarios such as finance, e-commerce, database management, credit reporting, and microservice architecture.

[0040] The present specification will now be described in detail with reference to specific embodiments.

[0041] Please see Figure 1 This is a schematic diagram illustrating a scenario of a transaction request processing system provided in this specification. Figure 1 As shown, the transaction request processing system may include at least a client cluster and a service platform 100.

[0042] The client cluster may include at least one client, such as Figure 1As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.

[0043] Each client in a client cluster can be an electronic device with communication capabilities, including but not limited to: wearable devices, handheld devices, personal computers, tablets, in-vehicle devices, smartphones, computing devices, or other processing devices connected to a wireless modem. Electronic devices may have different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, electronic device, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), and electronic devices in 5G networks or future evolved networks.

[0044] The service platform 100 can be a standalone server device, such as a rack-mount, blade, tower, or cabinet-type server device, or a workstation, mainframe, or other hardware device with strong computing power; or it can be a server cluster composed of multiple servers. The servers in the service cluster can be composed in a symmetrical manner, wherein each server is functionally and hierarchically equivalent in the transaction chain, and each server can provide services independently. The independent provision of services can be understood as not requiring the assistance of other servers.

[0045] In one or more embodiments of this specification, the service platform 100 can establish a communication connection with at least one client in the client cluster, and complete the data interaction during the transaction request processing based on the communication connection, such as online transaction data interaction. For example, at least one client in the cluster can initiate a transaction request to the service platform, and the service platform 100 can process the transaction request based on the transaction request processing method of this specification.

[0046] It should be noted that the service platform 100 establishes a communication connection with at least one client in the client cluster via a network for interactive communication. This network can be a wireless network or a wired network. Wireless networks include, but are not limited to, cellular networks, wireless LANs, infrared networks, or Bluetooth networks. Wired networks include, but are not limited to, Ethernet, universal serial bus (USB), or controller area networks. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network (such as target compressed packets). Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0047] The transaction request processing system embodiments provided in this specification and the transaction request processing methods described in one or more embodiments belong to the same concept. The execution entity corresponding to the transaction request processing method involved in one or more embodiments of this specification can be the aforementioned service platform 100; the execution entity corresponding to the transaction request processing method involved in one or more embodiments of this specification can also be the electronic device corresponding to the client, specifically determined based on the actual application environment. The implementation process of the transaction request processing system embodiments can be detailed in the following method embodiments, and will not be repeated here.

[0048] based on Figure 1 The following is a detailed description of the transaction request processing method provided by one or more embodiments of this specification, as illustrated in the scenario diagram.

[0049] Please see Figure 2 This document provides a flowchart illustrating a transaction request processing method according to one or more embodiments. This method can be implemented using a computer program and can run on a transaction request processing device based on the von Neumann architecture. The computer program can be integrated into an application or run as a standalone utility application. The transaction request processing device can be a service platform.

[0050] Specifically, the transaction request processing method includes:

[0051] S102: Determine the offline request processing link and the real-time request processing link associated with the target transaction service;

[0052] Target transaction service: This can be understood as the transaction service capability provided by the service platform, referring to the main transaction operations or tasks that need to be processed in a specific system or service environment. A transaction service can include a series of operations, such as data querying, updating, and transaction committing, which must ensure data integrity and consistency. A target transaction service refers to a set of transactions designated as critical operations by a specific application or transaction service process.

[0053] For example, payment processing in financial systems, order settlement on e-commerce platforms, data analysis in log systems, database query operations, and credit inquiry transactions in credit reporting services, etc. Target transaction services typically contain multiple sub-tasks and need to process different types of transaction requests initiated by clients within a specific time frame.

[0054] Offline request processing chains refer to request processing flows that do not require immediate responses. These chains can typically be executed with a delay, without directly impacting the user's real-time experience. Offline requests generated by offline request processing chains are commonly found in scenarios such as batch data processing, data mining, and report generation. In some non-real-time transactions, they can also be credit inquiry requests.

[0055] Real-time request processing pipeline: This refers to a request processing flow that requires immediate processing and rapid response. This type of processing pipeline has strict requirements on processing speed and response time, and is typically associated with online transaction processing, real-time data analysis, online user requests, credit inquiries, etc.

[0056] The service platform provides target transaction services to clients. For example, in an e-commerce platform, target transaction services might include order processing, payment processing, and inventory management. These services need to be categorized according to transaction service priority and processing requirements, and mapped to corresponding request processing chains. In this specification, target transaction services are associated with two types of request processing chains: offline request processing chains and real-time request processing chains. In practical applications, the transaction request traffic generated by each target transaction service will be associated with an appropriate processing chain based on its nature. This involves analyzing the characteristics of the transaction to determine whether it should be completed quickly through the real-time processing chain or can be allocated to the offline processing chain for deferred processing. This process requires system configuration and scheduling strategies to ensure that various transactions are routed on demand.

[0057] S104: The current request traffic parameters of the real-time request processing link and the offline request processing link are monitored by a traffic PID controller, and a traffic control signal for the target transaction service is obtained by using the traffic PID controller based on the current request traffic parameters.

[0058] Flow PID Controller: A PID controller (Proportional-Integral-Derivative) is a feedback controller widely used in industrial control systems. It dynamically adjusts a control input to improve the accuracy and stability of the system output. In this step, the PID controller is adapted and applied to the user transaction request processing domain, and its data format is modified to obtain a flow PID controller. The flow PID controller is used to adjust the request flow in the response transaction processing system according to the current request flow parameters in order to maintain the optimal operating state of the platform system.

[0059] Current request traffic parameters: These parameters include the number of transactions or queries currently being processed by the system, including real-time and offline requests. They can be expressed as queries per second (QPS), transactions per second (TPS), or other relevant metrics. These parameters reflect the current system load.

[0060] Flow control signal: It is an adjustment instruction generated by the PID controller based on the current request flow parameters and preset targets. It is used to adjust the request processing rate or resource allocation so that the number of request responses in the system flow is maintained at an ideal state.

[0061] For example, the traffic PID controller first obtains current request traffic parameters for both the real-time and offline request processing chains. These parameters may include the number of requests, processing time, waiting queue length, etc., all of which are key metrics affecting system performance.

[0062] For example, the controller compares real-time data in the current request traffic parameters with target traffic parameters (such as the system's maximum capacity or ideal response time) to calculate the deviation value. The deviation is then used to apply a PID algorithm to calculate the required traffic control signal. The traffic PID controller generates a traffic control signal that indicates how to adjust the system's resource allocation or processing rate, such as increasing or decreasing server processing capacity, adjusting request priorities, or modifying the request queue processing strategy.

[0063] S106: Perform request-response adjustment processing on the target transaction service based on the flow control signal.

[0064] Indicatively, the system serving the target transaction acquires the flow control signal generated by the flow PID controller. This signal contains the necessary adjustment information to guide how to adjust for the current system load and performance metrics.

[0065] Furthermore, the system analyzes the control signal: It automatically determines the specific adjustments needed. For example, the signal might indicate a need to increase resource allocation for real-time requests or decrease the processing priority of offline requests.

[0066] Furthermore, the system performs adjustment capture: based on the indication of the flow control signal, it executes specific adjustment operations. These include, but are not limited to:

[0067] Adjust processor resource allocation: for example, allocate more CPU cores or memory for real-time requests.

[0068] Adjust network bandwidth allocation: for example, provide higher network priority for critical transaction services.

[0069] Adjust request queue processing strategies: For example, change the order in which requests arrive or are processed, prioritizing urgent or critical requests.

[0070] Monitoring and Adjustment Effectiveness: The system continuously monitors the effects of adjustments to ensure that the changes achieve the expected improvement goals. If the effects do not meet expectations, the system may need to be adjusted again based on new performance metrics.

[0071] For example, let's assume the target transaction service is a credit reporting transaction service.

[0072] Suppose that at midday on a typical weekday, the credit scoring system is facing a large number of real-time credit score query requests from multiple banks. The PID controller detects that the response time for real-time queries is starting to exceed the target range, and therefore issues a flow control signal, requesting an increase in resource allocation for real-time requests.

[0073] Control signal execution: The system reallocates resources that were reduced to non-critical tasks (such as non-urgent credit report generation) to real-time credit score queries based on the signal.

[0074] Priority Adjustment: The system adjusts the request processing queue to prioritize real-time query requests.

[0075] Monitoring and Adjustment Results: The system monitors the adjusted response time and confirms that the real-time query response time has returned to the target range. If the adjustment effect does not meet expectations, the system will make adjustments again based on new performance data.

[0076] In this way, the credit reporting system can effectively cope with sudden high load situations, ensure rapid response to real-time transactions, and ensure the optimal use of overall system resources.

[0077] In a specific implementation scenario, taking a credit inquiry service as an example of the target transaction service, please refer to [link / reference]. Figure 3 , Figure 3 This is a schematic diagram of a flow control processing scenario. Figure 3 This demonstrates a query traffic control system centered on a traffic PID controller. This system allocates resources and manages priorities among different types of requests, such as offline queries, real-time queries, and (high)priority queries, and sends the processed request traffic to the DMZ (primarily used in this example for external services like credit inquiries, report parsing, and policy applications). The offline query module corresponds to the offline request processing chain, typically handling batch processing or queries with low timeliness requirements. Examples include batch credit data capture, data reporting, and log analysis. The real-time query module and priority query module correspond to the real-time request processing chain, handling queries requiring immediate response and high speed. Examples include new customer credit checks, real-time approvals, and online risk control assessments. In S102, the system first needs to identify the types of requests involved in the target transaction service: offline request processing chain (offline query module), real-time request processing chain (real-time query module), and (optionally) customer groups pre-selected by the offline query module who require priority queries that day (corresponding to the priority query module, belonging to the real-time request processing chain), to determine the processing chain associated with the target transaction service. The system monitors the traffic parameters of both the real-time and offline request processing links, inputs the monitoring results into a PID controller to obtain a traffic control signal, and dynamically adjusts the sending rate or queuing strategy of the three query modules based on the traffic control signal. The adjustment includes, but is not limited to: limiting the concurrency or rate of low-priority queries, ensuring the processing time of real-time queries, and accelerating the execution of offline batch tasks when resources are sufficient.

[0078] Example: When real-time query volume surges and the PID controller detects that the load on the real-time link is nearing its limit, it will reduce the rate of offline query links to avoid resource contention. If the system is in a low-peak period with fewer real-time queries, the PID controller allows offline tasks to run at a higher rate, improving resource utilization.

[0079] DMZ (Distributed Management Zone): A segregated zone between an enterprise's internal network and external networks, used for securely providing or accessing services to external entities. Figure 3In this diagram, credit reporting agencies or external services (such as third-party report parsing and policy application) are located in or accessed through the DMZ. The corresponding credit reporting, report parsing, and policy application modules rely on data from the query modules (offline query module, real-time query module, and priority query module). When the PID controller dispatches a query request to the DMZ, these external or internal services process it accordingly and return the results.

[0080] In one or more embodiments of this specification, the service platform employs a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link. Based on the current request traffic parameters, the traffic PID controller performs traffic control processing to obtain a traffic control signal for the target transaction service. Based on the traffic control signal, request response adjustment processing is performed on the target transaction service. By successfully adapting the PID feedback control mechanism, which is widely used in traditional industrial fields, to the user transaction request processing domain, real-time monitoring of transaction request traffic, calculation of control signals, and dynamic adjustment of transaction request traffic processing are achieved, thereby realizing adaptive traffic control of transaction processing. This not only significantly improves the stability and throughput of the system but also further enhances the intelligence and accuracy of transaction traffic management.

[0081] Please see Figure 4 , Figure 4 This is a flowchart illustrating a flow control processing method proposed in one or more embodiments of this specification. Specifically, it involves using a flow PID controller to monitor the current request flow parameters of the real-time request processing link and the offline request processing link, and using the PID controller to perform flow control processing based on the current request flow parameters to obtain a flow control signal for the target transaction service, including:

[0082] S202: Determine the multiple flow control parameters corresponding to the flow PID controller;

[0083] Flow control parameters: When using a flow PID controller for flow regulation, it is often necessary to set or define a set of parameters related to the control objective, control range, and control timing. These parameters include the coefficients of the PID controller itself (Kp, Ki, Kd), and may also include the target flow value. In some embodiments, they may also include transaction or system-level constraints or configurations, such as:

[0084] Fitting one or more of the following: offline maximum processing rate, controller startup time, verification time point, resource utilization threshold, and safety margin coefficient;

[0085] By combining these flow control coefficients, the flow PID controller can more accurately adjust the current requested flow.

[0086] Optionally, by analyzing transaction demands and system capacity, the system's maximum carrying capacity, peak transaction request periods, and priorities of different requests can be determined. Then, the PID controller coefficients (Kp, Ki, Kd) can be set by calling an expert or using simulation. Transaction constraint parameters (such as the maximum offline processing rate and controller startup time) can also be set. In actual operation, the above parameters can be dynamically adjusted based on real-time monitoring data. For example, when it is found that too many real-time requests lead to increased latency, the maximum offline processing rate can be reduced or the Kp value can be increased to achieve faster convergence.

[0087] S204: Based on the flow control parameters, control the flow PID controller to monitor the current request flow parameters of the real-time request processing link and the offline request processing link, and call the flow PID controller to perform flow control processing based on the flow control parameters and the current request flow parameters to obtain the flow control signal for the target transaction service.

[0088] Current request traffic parameters refer to the actual operating metrics of the system at a certain moment, such as: real-time request QPS (Queries Per Second), offline task concurrency, CPU / memory utilization, and network bandwidth usage. These current request traffic parameters, together with the previously determined traffic control parameters (Kp, Ki, Kd, ​​maximum offline processing rate, etc.), determine the traffic control signal output by the traffic PID controller.

[0089] Flow control processing: The flow PID controller generates a control quantity based on the error between the target flow value and the current flow value, combining the proportional, integral, and derivative terms (the control quantity is used to generate the flow control signal); optionally, this control quantity is used to increase or decrease the rate of real-time or offline requests, or adjust the processing priority of both.

[0090] Optionally, the flow PID controller generates a control quantity based on the error between the target flow value and the current flow value, combining the proportional, integral, and derivative terms. The control quantity can then be fine-tuned or the timing of generating the flow control signal based on the control quantity can be adjusted in conjunction with transaction constraint parameters.

[0091] Flow control signal: The command or regulation value output by the PID controller is used to regulate the system load.

[0092] As an illustration, the system continuously collects current request traffic parameters, inputs these parameters into the traffic PID controller, calls the traffic PID controller to perform traffic control processing, and outputs a traffic control signal.

[0093] This specification defines the flow control parameters, laying the foundation for flow control. Based on the set flow control parameters and the current system flow data, the PID controller is invoked to generate flow control signals, guiding the system to adaptively adjust between real-time and offline requests. This achieves the construction of a flexible and efficient flow control mechanism that meets the real-time requirements of high-priority transactions while making full use of system resources to complete offline task processing.

[0094] Optionally, the flow control parameters include target flow parameters, proportional coefficient, integral coefficient, and derivative coefficient. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a flowchart illustrating a flow control operation. Specifically, the process of calling the flow PID controller based on the flow control parameters and the current requested flow parameters to obtain a flow control signal for the target transaction service can be described in the following implementation:

[0095] proportionality coefficient K P The system reacts proportionally to the magnitude of the error at the current moment. If the error is large, a larger control signal is generated; if the error is small, a smaller control signal is generated.

[0096] Integral coefficient K i The sum of errors accumulated at all points in time from the beginning to the present is considered, with the aim of eliminating static errors, that is, persistent deviations that still exist when a steady state is reached.

[0097] Differential coefficient K d Focusing on the rate of change of errors, predicting future trends, and making adjustments in advance can help improve the system's response speed and reduce overshoot.

[0098] Target flow parameter windowobj: Used to determine flow error.

[0099] S3002: Determine the current traffic error based on the target traffic parameters and the current requested traffic parameters;

[0100] Calculation error:

[0101] Where e(t) represents the current flow error, R target R represents the target flow parameter. current Indicates the current request traffic parameters;

[0102] S3004: Input the current flow error into the flow PID controller, and use the proportional coefficient, integral coefficient and derivative coefficient of the flow PID controller to perform flow control calculation to obtain the flow adjustment control signal.

[0103] The following formulas for calculating control quantities can be used as a reference:

[0104]

[0105] Where u(t) represents the control quantity;

[0106] The control quantity is output through the control quantity calculation formula; optionally, the control quantity can be fine-tuned or the timing of generating flow control signals based on the control quantity can be adjusted by combining transaction constraint parameters.

[0107] In one feasible implementation, the flow control parameters further include the offline maximum processing rate. Execution S3004: The current flow error is input to the flow PID controller. The flow PID controller uses the proportional coefficient, the integral coefficient, and the derivative coefficient to perform flow control calculations to obtain a flow adjustment control signal. The following implementation method can be referenced:

[0108] Step A2: Determine the current offline flow error corresponding to the current flow error, and input the current offline flow error into the flow PID controller;

[0109] Offline traffic error: Since the system distinguishes between offline requests and real-time requests, it is necessary to analyze the actual processing rate or load status of the "offline request" part separately to obtain the current offline traffic error corresponding to the current traffic error.

[0110] The offline traffic error at the current moment is the difference between the target offline traffic in the target traffic parameters and the current offline traffic.

[0111] As an illustration, the actual processing rate of current offline requests is obtained through the system monitoring module to obtain the current offline traffic, such as the number of offline tasks processed per second and offline QPS. Then, the difference between the target offline traffic and the current offline traffic in the target traffic parameters is calculated as the offline traffic error at the current moment. The offline traffic error at the current moment is input into the traffic PID controller;

[0112] Step A4: The offline flow adjustment control signal is obtained by the flow PID controller using the offline maximum processing rate, the proportional coefficient, the integral coefficient and the derivative coefficient to perform flow control calculation. The offline flow adjustment control signal is used to indicate the generation of offline flow request response parameters that are less than the offline maximum processing rate.

[0113] Maximum offline processing rate: This is the highest processing rate limit set by the system for the "offline request processing chain". The maximum offline processing rate can be configured based on hardware resources, transaction requirements, or protection policies for real-time requests, and can be dynamically adjusted later.

[0114] Indicatively, the flow PID controller loads the offline maximum processing rate and performs flow control calculations using the current offline flow error based on the proportional coefficient, the integral coefficient, and the derivative coefficient to obtain a control quantity (using a control quantity calculation formula). Then, it compares the offline processing rate corresponding to the control quantity with the offline maximum processing rate. Based on the comparison result, it generates a target control quantity that is less than the offline maximum processing rate and uses this target control quantity as the offline flow adjustment control signal. The offline flow adjustment control signal indicates a new offline processing rate or concurrency limit, such as "setting the offline query rate to 1200 QPS".

[0115] Upon receiving this signal, the transaction system will update the queue, thread count, or rate limiter parameters for offline requests.

[0116] Furthermore, the PID controller utilizes the offline maximum processing rate and parameters such as Kp, Ki, and Kd for control calculations. This yields an offline flow adjustment control signal, which is then limited below the offline maximum processing rate, ensuring the system's controllability over offline requests. This enables fine-grained management of "offline requests," satisfying transactional needs while avoiding impacts on real-time requests, thereby improving the overall system stability and efficiency.

[0117] Furthermore, the flow control parameters also include controller startup time and verification time point. In some embodiments, the flow control PID controller, which monitors the current request flow parameters of the real-time request processing link and the offline request processing link based on the flow control parameters, can be executed in the following manner:

[0118] Step B2: Based on the controller startup time, start the traffic PID controller, and monitor the current request traffic parameters of the real-time request processing link and the offline request processing link by controlling the traffic PID controller;

[0119] Controller startup time: refers to a time point or time window that the system pre-sets for the flow PID controller. Before this time, the system will not activate the flow PID controller, but after the time is reached, it will start monitoring and controlling the traffic of the real-time request link and the offline request link.

[0120] As an illustration, the service platform sets a controller start time for the traffic PID controller, so that when the controller start time is reached, the traffic PID controller is turned on, and the current request traffic parameters of the real-time request processing link and the offline request processing link are monitored by controlling the traffic PID controller.

[0121] For example, start the control mechanism 30 minutes before the daily peak request period to warm up before the peak arrives.

[0122] Step B4: Based on the verification time point, invoke the traffic PID controller to trigger traffic control processing for the target transaction service.

[0123] Verification time points: These refer to pre-set time points where the system periodically assesses traffic status. These time points are used to "verify" the current system's traffic status and control effectiveness, determining whether adjustments to control strategies or parameters are needed. For example, checks might be performed at a fixed time each day, around noon or in the afternoon.

[0124] Optionally, a first verification time point can be set for the real-time request processing link, and / or a second verification time point can be set for the offline request processing link;

[0125] Indicatively, when the preset verification time point is reached, the system automatically calls the traffic PID controller to verify the current traffic monitoring data of the request processing link (such as offline request processing link or real-time request processing link) corresponding to the verification time point. For example, in S104, the system performs traffic control processing based on the current request traffic parameters using the traffic PID controller to obtain a traffic control signal for the target transaction service, and performs request response adjustment processing on the target transaction service based on the traffic control signal.

[0126] In this specification, the system can utilize preset time nodes and dynamic monitoring data to achieve precise control over transaction service traffic, ensuring that real-time requests are fully guaranteed, while effectively adjusting offline requests and improving the overall system stability and responsiveness.

[0127] Optional, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the reference regulation process for a flow PID controller, specifically:

[0128] S4002: Obtain link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics;

[0129] Link processing performance characteristics: These refer to the current processing capacity and performance indicators of each processing link (such as real-time request links and offline request links), such as: response time: the time required to process a single request; throughput: the number of requests processed per unit time (QPS); resource utilization: the usage of CPU, memory, network bandwidth, etc. Link processing performance characteristics reflect the system's operating efficiency and health status under the current load.

[0130] Historical request trend characteristics refer to information such as request volume change trends, peak distributions, and fluctuations obtained through statistical analysis of request data over a past period. Examples include daily, weekly, or monthly request volume change curves; the frequency and duration of sudden traffic spikes; these characteristics help predict future traffic changes and potential load peaks.

[0131] Transaction environment factors: These refer to external or environmental factors that affect transaction processing. These factors may include: time factors: such as weekdays and holidays, peak and off-peak business hours; special events: promotional activities, system maintenance, market fluctuations, etc.; external dependencies: third-party service response time, network latency, etc. These factors will directly affect the execution of transaction services and the distribution of request volume.

[0132] This is illustrative of how real-time monitoring of the runtime performance metrics of each link (real-time and offline) is used to obtain the link processing performance characteristics, and data such as current response time, QPS, and resource utilization are collected.

[0133] Historical request trend data can be extracted from historical logs, monitoring systems, or data warehouses to obtain historical request trend characteristics, and to statistically analyze request volume, peak values, and fluctuations.

[0134] Collect relevant information in the transaction environment to obtain characteristics of transaction environment factors, such as time period, special activities, and the status of external dependent services.

[0135] S4004: Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, a controller adjustment model is used to perform control parameter adjustment and evaluation processing on the traffic PID controller to obtain a target adjustment strategy, and target traffic control parameters for the traffic PID controller are generated based on the target adjustment strategy.

[0136] The controller regulation big model refers to the machine learning model obtained by adapting the controller regulation scenario to a basic big language model (such as the GPT series model, the Tongyi Qianwen series model, etc.). This model can automatically judge and optimize the control strategy based on multi-dimensional features (such as performance indicators, historical trends, environmental factors).

[0137] Targeted tuning strategies refer to optimization and tuning schemes determined based on the evaluation results of a large model, tailored to the current system state. These include decisions such as adjusting the rate of offline requests, modifying PID parameters, and changing the startup time window.

[0138] Target flow control parameters refer to the new control parameters set for the flow PID controller under the guidance of the target regulation strategy, such as: adjusted PID coefficients (Kp, Ki, Kd), updated offline maximum processing rate, and new target flow value.

[0139] Schematic, the link processing performance, historical request trends, and transaction environment factors obtained in step S4002 are input into the controller regulation model. The controller regulation model analyzes these inputs, evaluates the current system operating status and future traffic trends, and outputs a target regulation strategy based on the input features. This strategy includes the regulation measures to be taken in the current environment. Then, based on the target regulation strategy, specific target flow control parameters are generated. Subsequently, the target flow control parameters are passed to the flow PID controller to adjust the flow in real time, such as updating the PID coefficients, resetting the offline maximum processing rate, or the target flow value.

[0140] For example, the strategy might suggest reducing offline traffic during peak hours, adjusting PID parameters to improve response speed, or relaxing restrictions during off-peak hours to make full use of resources.

[0141] In this specification, S4002 acquires characteristics of current link processing performance, historical request trends, and transaction environment factors through monitoring and data acquisition, providing foundational data for subsequent decision-making. S4004 then utilizes a pre-established controller adjustment model to evaluate the current system state based on these multi-dimensional characteristics, outputs a target adjustment strategy, and generates target flow control parameters for the flow PID controller. The entire process achieves closed-loop control from data acquisition and feature extraction to intelligent adjustment strategy generation and parameter adjustment, which helps to dynamically optimize system flow regulation in a changing transaction environment, ensuring the stability and efficiency of critical transaction services.

[0142] In one feasible implementation, the process of performing control parameter adjustment and evaluation on the traffic PID controller based on the link processing performance characteristics, historical request trend characteristics, and transaction environment factors using a controller adjustment model to obtain a target adjustment strategy, and generating target traffic control parameters for the traffic PID controller based on the target adjustment strategy, can be performed in the following manner:

[0143] Step C2: Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, the controller adjustment model is used to evaluate the comprehensive adjustment score and future query trend characteristics of the traffic PID controller, and the target adjustment strategy is determined based on the comprehensive adjustment score and future query trend characteristics;

[0144] Comprehensive regulation score: This is a comprehensive evaluation index of the effect of the controller regulation model on the current flow PID controller regulation effect, reflecting the adaptability and stability of the current flow control of the system.

[0145] Future query trend characteristics: refers to the trend of query request volume in the future period of time predicted by the controller adjustment model based on historical and real-time data.

[0146] To illustrate, the above data is input into the controller regulation model. The model calculates and outputs two key results: 1) Comprehensive regulation score: reflecting whether the current PID controller regulation effect has met expectations, and whether there is over-regulation or under-regulation. 2) Future query trend characteristics: the predicted value or trend curve of request traffic in the future.

[0147] Then, based on the comprehensive conditioning score and the predicted future query trends, the controller conditioning model determines which conditioning strategy should be adopted. For example, if the current score is low and future queries are trending upward, a more aggressive conditioning strategy may be needed; if the score is high and the predicted future requests are stable, the current strategy or a moderately adjusted conditioning strategy is maintained. The final output target conditioning strategy can be divided into different types (e.g., Type 1 and Type 2 conditioning strategies) for use in subsequent steps.

[0148] Step C4: If the target adjustment strategy is the first type of adjustment strategy, then the controller adjustment model is used to generate the first target flow control parameters for the offline maximum processing rate, the controller startup time, and the verification time point;

[0149] The first type of adjustment strategy refers to a strategy that, under the current system state, only requires adjustment of macroscopic external control parameters without changing the core PID control parameters. External parameters typically include: maximum offline processing rate, controller startup time, and calibration time point.

[0150] First target flow control parameters: These refer to the parameter configuration generated according to the first type of regulation strategy, which guides the external control settings of the flow PID controller in the offline processing stage, such as adjusting the maximum processing rate or changing the control period.

[0151] Indicatively, when the target adjustment strategy output by the large model is classified as Type I, it indicates that the current system state is relatively stable, and the main issues are concentrated in the configuration of external parameters. The controller adjusts the large model based on current monitoring data and prediction results, adjusting external parameters as follows: Maximum offline processing rate: The processing limit for offline tasks is appropriately increased or decreased based on real-time resource conditions. Controller startup time: The startup time may be adjusted to better adapt to business needs. Verification time point: The verification frequency or timing is adjusted based on historical data and actual traffic fluctuations. The model outputs a new set of first-target flow control parameters to update the external control configuration of the flow PID controller.

[0152] Step C6: If the target adjustment strategy is the second type of adjustment strategy, then the controller adjustment model is used to generate the second target flow control parameters for the target flow parameters, the proportional coefficient, the integral coefficient and the derivative coefficient.

[0153] The second type of adjustment strategy refers to the strategy of adjusting the internal parameters (PID parameters) of the flow PID controller when there is a large deviation in the system state or a rapid change in dynamic load. In this case, not only the external control parameters need to be adjusted, but also the core PID parameters need to be modified to achieve more precise and faster response adjustment.

[0154] Second target flow control parameters: These refer to the parameter configurations generated according to the second type of regulation strategy, mainly involving: Target flow parameters: The request processing rate or load level that the system expects to achieve. PID parameters: Including the adjustment values ​​of the proportional coefficient (Kp), integral coefficient (Ki), and derivative coefficient (Kd).

[0155] Indicatively, when the controller's large-scale adjustment model determines that the current system state requires more refined internal adjustments, the target strategy is categorized as the second type, meaning that internal PID parameters need to be adjusted to cope with larger fluctuations or unstable states. Based on current link performance, historical trends, and environmental factors, the controller's large-scale adjustment model outputs a new set of target flow parameters and PID parameters: Target flow parameters: Updated target values ​​used to guide overall flow regulation. Proportional coefficient Kp, integral coefficient Ki, and derivative coefficient Kd: New PID parameter settings used to achieve faster or smoother responses and reduce the risk of system oscillations. These parameters combined constitute the second target flow control parameters, which will be directly used to reconfigure the flow PID controller and optimize flow control for the target transaction service.

[0156] In this specification, step C2 primarily involves inputting multi-dimensional features such as link performance, historical trends, and environmental factors into the controller's large-scale regulation model to obtain a comprehensive regulation score and future traffic prediction, thereby determining the target regulation strategy. This step realizes a closed-loop process from data collection to intelligent evaluation, providing a basis for subsequent strategy selection. Steps C4 and C6 correspond to different types of target regulation strategies:

[0157] When the target strategy belongs to the first type, only external parameters (such as offline maximum processing rate, startup time, and verification time point) need to be adjusted to generate the first target flow control parameters. When the target strategy belongs to the second type, the internal PID parameters and target flow parameters need to be adjusted to generate the second target flow control parameters. This hierarchical adjustment method can adjust only macro parameters when the system state is relatively stable, and can achieve fine control by modifying the internal PID parameters when the load fluctuates drastically, thereby better meeting the flow control needs of different transaction service scenarios.

[0158] S4006: Update the control parameters of the flow PID controller based on the target flow control parameters.

[0159] Control parameter update processing: This refers to writing or updating the configuration of the flow PID controller with new parameter values ​​based on the target flow control parameters, so that the controller uses the new parameters for flow control in subsequent adjustment calculations. This step achieves dynamic parameter tuning, enabling the system to adaptively respond to changes in flow and business requirements.

[0160] Indicatively, the parameter update module of the flow PID controller receives the latest target flow control parameters from the controller tuning model or target tuning strategy module. These parameters have been optimally selected based on the current system state and future predictions. The received parameters are validated to ensure their legality and rationality (e.g., PID parameters are within a certain range, and the maximum offline processing rate does not exceed the hardware's capacity limit). The target flow control parameters are then written into the flow PID controller. The updated content may include, but is not limited to:

[0161] Directly update the internal PID parameters (Kp, Ki, Kd).

[0162] Update offline maximum processing rate and target traffic value.

[0163] Adjust other relevant external parameters (such as startup time and verification time point).

[0164] Updates are typically performed within the system's configuration module and may involve calling specific APIs or modifying system configuration files. Further, after the update is complete, the flow PID controller begins performing the next round of regulation calculations using the new parameters. The system continuously monitors real-time flow and recalculates the control signals using the new parameters to finely adjust the ratio and rate of real-time and offline requests.

[0165] Optionally, the following illustrates a controller regulating the model training process of a large model:

[0166] 1) Create an initial controller regulation model for the controller regulation scenario using a basic large language model;

[0167] 2) Obtain sample training data for controller adjustment scenarios. The sample training data includes link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics. Use an expert to label the sample training data with adjustment strategy labels and flow control parameter labels.

[0168] 3) Input the sample training data into the initial controller regulation model. During the forward propagation of the model: the initial controller regulation model is used to evaluate the control parameters of the flow PID controller to obtain the predictive regulation strategy, and the predictive flow control parameters for the flow PID controller are generated based on the predictive regulation strategy. During the backward propagation of the model: the strategy prediction loss is calculated based on the regulation strategy label and the predictive regulation strategy, the parameter generation loss is calculated based on the predicted flow control parameters and the flow control parameter label, the model comprehensive loss is obtained based on the strategy prediction loss and the parameter generation loss, and the model parameters of the initial controller regulation model are adjusted using the model comprehensive loss until the model training end condition is met to complete the model training process and obtain the trained controller regulation model.

[0169] Optionally, the model's training termination conditions may include, for example, the loss function value being less than or equal to a preset loss function threshold, or the number of iterations reaching a preset threshold. Specific training termination conditions can be determined based on actual circumstances and are not specifically limited here.

[0170] Optionally, the model's training termination conditions may include, for example, the loss function value being less than or equal to a preset loss function threshold, or the number of iterations reaching a preset threshold. Specific training termination conditions can be determined based on actual circumstances and are not specifically limited here.

[0171] In one or more embodiments of this specification, the target flow control parameters generated after evaluation by a large model are used to update the parameters of the flow PID controller, enabling it to more finely adjust the system request flow in subsequent calculations. This process includes parameter reception, verification, updating, and closed-loop feedback, ensuring that the system can continuously optimize its adjustment strategy in the face of dynamic traffic and changes in business needs, thereby guaranteeing overall system performance and service quality.

[0172] Optionally, the flow control signal may include a flow adjustment control signal; in some embodiments, please refer to [link to relevant documentation]. Figure 7 , Figure 7 This is a flowchart illustrating request-response adjustment. Specifically, the request-response adjustment process for the target transaction service is performed based on the flow control signal, and can be referenced as follows:

[0173] S5002: Determine the target traffic adjustment link based on the traffic adjustment control signal, and determine the traffic request response parameters of the target traffic adjustment link. The target traffic adjustment link is at least one of the offline request processing link and the real-time request processing link.

[0174] As an illustration, based on the information transmitted in the flow adjustment control signal, the system first determines the links that need to be adjusted:

[0175] If the signal indicates that there is a risk of overload in real-time requests, then the target link is the real-time request processing link;

[0176] If the signal indicates that the offline request processing is too aggressive and may affect the overall system resources, then the target link is the offline request processing link;

[0177] In some scenarios, it may be possible to adjust one or both of the two links simultaneously.

[0178] Furthermore, extract key request traffic parameters from the identified target link, such as current request rate, average response time, and queue depth.

[0179] Furthermore, based on the traffic flow adjustment control signal content and current link parameters, the adjustment target is determined:

[0180] The adjustment objective might be to reduce the request rate of offline links to a specified value to free up resources, or to increase the concurrency capability of real-time links to cope with high traffic.

[0181] At the same time, a set of "traffic request response parameters" is generated for the target link as a benchmark for subsequent adjustment processing.

[0182] S5004: Adjust the traffic request response parameters based on the traffic adjustment control signal to obtain the adjusted traffic request response parameters, and perform request response adjustment processing on the target traffic adjustment link based on the traffic request response parameters.

[0183] Traffic request response parameters: These are key metrics that describe the link's processing capacity (such as QPS, concurrency, queue length, etc.). These parameters directly affect the link's response speed and quality to transaction requests.

[0184] Adjusted traffic request response parameters: These are the new parameters obtained after adjusting the original parameters under the action of the traffic adjustment control signal. These parameters reflect the optimization adjustments made by the system for the current load and future trends.

[0185] Request-response adjustment processing: This refers to applying adjusted parameters to the target link to dynamically change the request processing strategy, such as modifying rate limiting rules, adjusting thread pool size, or changing scheduling strategy, thereby achieving precise control over request traffic.

[0186] In one or more embodiments of this specification, in step S5002, based on the traffic adjustment control signal, the system first determines the target link (real-time or offline) that needs adjustment and obtains the current request-response parameters of that link as the basis data for subsequent adjustment. In step S5004, the system adjusts the obtained original parameters based on the traffic adjustment control signal to generate adjusted traffic request-response parameters, and applies these parameters to the target link, thereby achieving fine-grained adjustment of transaction request traffic. These two steps together constitute a closed loop for the system's dynamic adjustment of transaction service traffic. Through real-time monitoring, intelligent adjustment, and parameter updates, precise management of different request processing links is achieved, ensuring that critical business is prioritized, while resources are allocated rationally, improving the overall system's stability and response efficiency.

[0187] The following will combine Figure 8 This manual provides a detailed description of the transaction request processing apparatus provided. It should be noted that... Figure 8 The transaction request processing device shown is used to execute this specification. Figures 1-7 The methods of the embodiments shown are illustrated only in connection with this specification for ease of explanation. For specific technical details not disclosed, please refer to this specification. Figures 1-7 The example shown.

[0188] Please see Figure 8 This diagram illustrates the structure of the transaction request processing device 1 described herein. The transaction request processing device 1 can be implemented as all or part of a user electronic device through software, hardware, or a combination of both. According to some embodiments, the transaction request processing device 1 includes a link determination module 11, a control processing module 12, and an adjustment processing module 13, specifically used for:

[0189] Link determination module 11 is used to determine the offline request processing link and the real-time request processing link associated with the target transaction service;

[0190] Control processing module 12 is used to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link using a traffic PID controller, and to perform traffic control processing using the traffic PID controller based on the current request traffic parameters to obtain a traffic control signal for the target transaction service;

[0191] The adjustment processing module 13 is used to perform request-response adjustment processing on the target transaction service based on the flow control signal.

[0192] Optionally, the step of using a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link, and using the PID controller to perform traffic control processing based on the current request traffic parameters to obtain a traffic control signal for the target transaction service, includes:

[0193] Determine the multiple flow control parameters corresponding to the flow PID controller;

[0194] Based on the traffic control parameters, the traffic PID controller monitors the current request traffic parameters of the real-time request processing link and the offline request processing link, and calls the traffic PID controller to perform traffic control processing based on the traffic control parameters and the current request traffic parameters to obtain a traffic control signal for the target transaction service.

[0195] Optionally, the flow control parameters include target flow parameters, proportional coefficient, integral coefficient, and derivative coefficient.

[0196] The step of invoking the traffic PID controller based on the traffic control parameters and the current requested traffic parameters to perform traffic control processing and obtain a traffic control signal for the target transaction service includes:

[0197] The current traffic error is determined based on the target traffic parameters and the current request traffic parameters.

[0198] The current flow error is input into the flow PID controller, and the flow PID controller uses the proportional coefficient, the integral coefficient and the derivative coefficient to perform flow control calculations to obtain the flow adjustment control signal.

[0199] Optionally, the flow control signal includes a flow adjustment control signal.

[0200] The request-response adjustment processing of the target transaction service based on the flow control signal includes:

[0201] The target traffic adjustment link is determined based on the traffic adjustment control signal, and the traffic request response parameters of the target traffic adjustment link are determined. The target traffic adjustment link is at least one of the offline request processing link and the real-time request processing link.

[0202] The traffic request response parameters are adjusted based on the traffic adjustment control signal to obtain the adjusted traffic request response parameters, and the target traffic adjustment link is then subjected to request response adjustment processing based on the traffic request response parameters.

[0203] Optionally, the flow control parameters may also include offline maximum processing rate, controller startup time, and verification time point.

[0204] The step of inputting the current-time flow error into the flow PID controller and obtaining a flow adjustment control signal by the flow PID controller using the proportional coefficient, the integral coefficient, and the derivative coefficient includes: determining the current-time offline flow error corresponding to the current-time flow error; inputting the current-time offline flow error into the flow PID controller; and obtaining an offline flow adjustment control signal by the flow PID controller using the offline maximum processing rate, the proportional coefficient, the integral coefficient, and the derivative coefficient. The offline flow adjustment control signal is used to indicate the generation of an offline flow request response parameter that is less than the offline maximum processing rate.

[0205] The step of controlling the traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link based on the traffic control parameters includes: starting the traffic PID controller based on the controller startup time, monitoring the current request traffic parameters of the real-time request processing link and the offline request processing link by controlling the traffic PID controller, and triggering traffic control processing for the target transaction service by calling the traffic PID controller based on the verification time point.

[0206] Optionally, the method further includes:

[0207] Acquire link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics;

[0208] Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factors, a controller adjustment model is used to perform control parameter adjustment and evaluation processing on the traffic PID controller to obtain a target adjustment strategy, and target traffic control parameters for the traffic PID controller are generated based on the target adjustment strategy.

[0209] The flow PID controller is updated based on the target flow control parameters.

[0210] Optionally, the step of using a controller adjustment model to evaluate and adjust the control parameters of the traffic PID controller based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factors to obtain a target adjustment strategy, and generating target traffic control parameters for the traffic PID controller based on the target adjustment strategy, includes:

[0211] Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factors, a controller adjustment model is used to evaluate the comprehensive adjustment score and future query trend characteristics of the traffic PID controller, and a target adjustment strategy is determined based on the comprehensive adjustment score and future query trend characteristics.

[0212] If the target adjustment strategy is the first type of adjustment strategy, then the controller adjustment model is used to generate the first target flow control parameters for the offline maximum processing rate, the controller startup time, and the verification time point;

[0213] If the target adjustment strategy is the second type of adjustment strategy, then the controller adjustment model is used to generate the second target flow control parameters for the target flow parameters, the proportional coefficient, the integral coefficient, and the derivative coefficient.

[0214] It should be noted that the transaction request processing device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the transaction request processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the transaction request processing device and the transaction request processing method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0215] The serial numbers in this specification are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0216] In one or more embodiments of this specification, the service platform employs a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link. Based on the current request traffic parameters, the traffic PID controller performs traffic control processing to obtain a traffic control signal for the target transaction service. Based on the traffic control signal, the platform performs request-response adjustment processing on the target transaction service. By successfully adapting the PID feedback control mechanism, which is widely used in traditional industrial fields, to the user transaction request processing domain, the platform achieves real-time monitoring of transaction request traffic, calculation of control signals, and dynamic adjustment of transaction processing strategies, thereby realizing adaptive traffic control for transaction processing. This not only significantly improves the system's stability and throughput but also further enhances the intelligence and accuracy of transaction traffic management, enabling it to efficiently handle dynamic load changes and resource contention issues in multiple high-concurrency transaction scenarios such as finance, e-commerce, database management, credit processing, and microservice architecture.

[0217] This specification also provides a computer storage medium capable of storing multiple instructions adapted to be loaded and executed by a processor as described above. Figures 1-7 The transaction request processing method described in the illustrated embodiment can be found in the following document for a detailed execution process. Figures 1-7 The specific details of the illustrated embodiments will not be elaborated here.

[0218] This specification also provides a computer program product that stores at least one instruction, said at least one instruction being loaded and executed by the processor as described above. Figures 1-7 The transaction request processing method described in the illustrated embodiment can be found in the following document for a detailed execution process. Figures 1-7 The specific details of the illustrated embodiments will not be elaborated here.

[0219] Please refer to Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, memory 1020, input device 1030, and output device 1040 may be connected to each other via the bus 1050.

[0220] Processor 1010 may include one or more processing cores. Processor 1010 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 1020, and by calling data stored in memory 1020. Optionally, processor 1010 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 1010 may integrate one or more of a central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1010 and may be implemented separately through a communication chip.

[0221] The memory 1020 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1020 may include non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, code, code sets, or instruction sets.

[0222] The input device 1030 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 1040 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In this embodiment, the input device 1030 can be a temperature sensor for acquiring the operating temperature of the electronic device. The output device 1040 can be a speaker for outputting audio signals.

[0223] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WIFI) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.

[0224] In the embodiments of this specification, the executing entity for each step can be the electronic device described above. Optionally, the executing entity for each step can be the operating system of the electronic device. The operating system can be Android, iOS, or other operating systems; this specification does not limit this.

[0225] exist Figure 9 In the electronic device, the processor 1010 can be used to call a program stored in the memory 1020 and execute it to implement the transaction request processing method as described in the various method embodiments of this specification.

[0226] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.

[0227] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the features, information, traffic, etc. involved in this specification were all obtained under full authorization.

[0228] The above-disclosed embodiments are merely preferred embodiments of this specification and should not be construed as limiting the scope of this specification. Therefore, any equivalent variations made in accordance with the claims of this specification shall still fall within the scope of this specification.

Claims

1. A transaction request processing method characterized by, The method includes: Identify the offline request processing chain and the real-time request processing chain associated with the target transaction service; A traffic PID controller is used to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link. Based on the current request traffic parameters, the traffic PID controller is used to perform traffic control processing to obtain a traffic control signal for the target transaction service. Based on the flow control signal, the target transaction service is subjected to request-response adjustment processing; The method further includes: Acquire link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics; Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factors, a controller adjustment model is used to evaluate the comprehensive adjustment score and future query trend characteristics of the traffic PID controller, and a target adjustment strategy is determined based on the comprehensive adjustment score and future query trend characteristics. If the target adjustment strategy is the first type of adjustment strategy, then the controller adjustment model is used to generate the first target flow control parameters for the offline maximum processing rate, controller startup time and verification time point of the flow PID controller. If the target regulation strategy is the second type of regulation strategy, then the controller regulation model is used to generate the second target flow control parameters, namely the target flow parameters, proportional coefficient, integral coefficient, and derivative coefficient, for the flow PID controller. The flow PID controller is updated based on the target flow control parameters, which include a first target flow control parameter and a second target flow control parameter.

2. The method according to claim 1, characterized in that, The process involves using a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link, and then using the PID controller to perform traffic control processing based on the current request traffic parameters to obtain a traffic control signal for the target transaction service, including: Determine the multiple flow control parameters corresponding to the flow PID controller; Based on the traffic control parameters, the traffic PID controller monitors the current request traffic parameters of the real-time request processing link and the offline request processing link, and calls the traffic PID controller to perform traffic control processing based on the traffic control parameters and the current request traffic parameters to obtain a traffic control signal for the target transaction service.

3. The method according to claim 2, characterized in that, The flow control parameters include target flow parameters, proportional coefficient, integral coefficient, and derivative coefficient. The step of invoking the traffic PID controller based on the traffic control parameters and the current requested traffic parameters to perform traffic control processing and obtain a traffic control signal for the target transaction service includes: The current traffic error is determined based on the target traffic parameters and the current request traffic parameters. The current flow error is input into the flow PID controller, and the flow PID controller uses the proportional coefficient, the integral coefficient and the derivative coefficient to perform flow control calculations to obtain the flow adjustment control signal.

4. The method according to claim 1 or 3, characterized in that, The flow control signal includes a flow adjustment control signal. The request-response adjustment processing of the target transaction service based on the flow control signal includes: The target traffic adjustment link is determined based on the traffic adjustment control signal, and the traffic request response parameters of the target traffic adjustment link are determined. The target traffic adjustment link is at least one of the offline request processing link and the real-time request processing link. The traffic request response parameters are adjusted based on the traffic adjustment control signal to obtain the adjusted traffic request response parameters, and the target traffic adjustment link is then subjected to request response adjustment processing based on the traffic request response parameters.

5. The method according to claim 3, characterized in that, The flow control parameters also include the offline maximum processing rate, controller startup time, and verification time point. The step of inputting the current-time flow error into the flow PID controller and obtaining a flow adjustment control signal by the flow PID controller using the proportional coefficient, the integral coefficient, and the derivative coefficient includes: determining the current-time offline flow error corresponding to the current-time flow error; inputting the current-time offline flow error into the flow PID controller; and obtaining an offline flow adjustment control signal by the flow PID controller using the offline maximum processing rate, the proportional coefficient, the integral coefficient, and the derivative coefficient. The offline flow adjustment control signal is used to indicate the generation of an offline flow request response parameter that is less than the offline maximum processing rate. The step of controlling the traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link based on the traffic control parameters includes: starting the traffic PID controller based on the controller startup time, monitoring the current request traffic parameters of the real-time request processing link and the offline request processing link by controlling the traffic PID controller, and triggering traffic control processing for the target transaction service by calling the traffic PID controller based on the verification time point.

6. The method according to claim 1, characterized in that, The acquisition of link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics includes: Real-time monitoring of runtime performance metrics of real-time and offline request chains yields chain processing performance characteristics. Extract historical request trend data from historical logs, monitoring systems, or data warehouses to obtain historical request trend characteristics; Collect transaction environment factor characteristics from the transaction environment.

7. The method according to claim 1, characterized in that, The controller adjustment model is trained using the following method: An initial controller regulation model for controller regulation scenarios is created using a basic large language model. Acquire sample training data for controller adjustment scenarios. The sample training data includes link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics. Use an expert to label the sample training data with adjustment strategy labels and flow control parameter labels. The sample training data is input into the initial controller regulation model. During the forward propagation of the model: the control parameters of the flow PID controller are adjusted and evaluated using the initial controller regulation model to obtain a predictive regulation strategy, and predictive flow control parameters for the flow PID controller are generated based on the predictive regulation strategy. During the backward propagation of the model: the strategy prediction loss is calculated based on the regulation strategy label and the predictive regulation strategy; the parameter generation loss is calculated based on the predicted flow control parameters and the flow control parameter label; the model comprehensive loss is obtained based on the strategy prediction loss and the parameter generation loss; the model parameters of the initial controller regulation model are adjusted using the model comprehensive loss until the model training end condition is met, thus completing the model training process and obtaining the trained controller regulation model.

8. A transaction request processing apparatus, characterized in that, The device includes: The link determination module is used to determine the offline request processing link and the real-time request processing link associated with the target transaction service; The control processing module is used to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link using a traffic PID controller, and to perform traffic control processing using the traffic PID controller based on the current request traffic parameters to obtain a traffic control signal for the target transaction service. The adjustment processing module is used to perform request-response adjustment processing on the target transaction service based on the flow control signal; The device is also used for: Acquire link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics; Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factors, a controller adjustment model is used to evaluate the comprehensive adjustment score and future query trend characteristics of the traffic PID controller, and a target adjustment strategy is determined based on the comprehensive adjustment score and future query trend characteristics. If the target adjustment strategy is the first type of adjustment strategy, then the controller adjustment model is used to generate the first target flow control parameters for the offline maximum processing rate, controller startup time and verification time point of the flow PID controller. If the target regulation strategy is the second type of regulation strategy, then the controller regulation model is used to generate the second target flow control parameters, namely the target flow parameters, proportional coefficient, integral coefficient, and derivative coefficient, for the flow PID controller. The flow PID controller is updated based on the target flow control parameters, which include a first target flow control parameter and a second target flow control parameter.

9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as method steps as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product stores at least one instruction, which is loaded by a processor and executed as the method steps of any one of claims 1 to 7.

11. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Access traffic distribution method and device, equipment and storage medium

    CN116962298A