Transaction request processing method and device, storage medium and electronic equipment
By introducing PID controllers in a distributed system, dynamically monitoring and adjusting transaction request traffic, the problems of system load instability and unbalanced resource allocation are solved, and efficient traffic regulation and transaction processing capabilities are achieved.
Patent Information
- Application Number
- CN202510914406.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-07-02
AI Technical Summary
The prior art is difficult to dynamically adapt to changes in transaction request traffic in distributed systems, resulting in unstable system load and unbalanced resource allocation, which affects the reliability and response capabilities of high-priority transaction processing.
The PID controller is used to monitor transaction request traffic, and dynamically adjust transaction processing strategies through the proportional-integral-differential control algorithm to realize adaptive traffic regulation, optimize resource allocation and request response.
It improves the stability and throughput capabilities of the system, enhances the intelligence and accuracy of transaction traffic management, and can effectively deal with dynamic load changes in high-concurrency transaction scenarios.
Smart Images

Figure CN120416334A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and particularly to a method, apparatus, storage medium, and electronic device for transaction request processing. Background Art
[0002] In modern distributed systems and high-concurrency transaction processing, transaction processing is widely applied in scenarios such as finance, e-commerce, database management, log analysis, credit investigation processing, and Internet of Things data stream processing. Transaction request traffic corresponding to transaction requests such as credit investigation transaction query requests, transaction review requests, and identity authentication requests is usually unstable, posing a huge challenge to the reliability and response ability of the transaction platform system. In actual transaction request processing, in a complex and changeable transaction environment, it is necessary to achieve precise traffic control, dynamically adapt to transaction load fluctuations, and ensure high-priority processing of critical transactions, which has become the focus of current transaction traffic scheduling and transaction request processing. Summary of the Invention
[0003] This specification provides a method, apparatus, storage medium, and electronic device for transaction request processing. The technical solutions are as follows: In a first aspect, this specification provides a method for transaction request processing. The method includes: Determine the offline request processing link and the real-time request processing link associated with the target transaction service; Use 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 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; Perform request response adjustment processing on the target transaction service based on the traffic control signal.
[0004] In a second aspect, this specification provides a device for transaction request processing. The device includes: A link determination module for determining the offline request processing link and the real-time request processing link associated with the target transaction service; A control processing module for 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 performing 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; An adjustment processing module for performing request response adjustment processing on the target transaction service based on the traffic control signal.
[0005] In a third aspect, this specification provides a computer storage medium storing at least one instruction, which is adapted to be loaded and executed by a processor to perform the method steps of one or more embodiments of this specification.
[0006] In a fourth aspect, this specification provides a computer program product storing at least one instruction, which is adapted to be loaded and executed by a processor to perform the method steps of one or more embodiments of this specification.
[0007] In a fifth aspect, this specification provides an electronic device, which may include: a processor and a memory; wherein, the memory stores a computer program, which is adapted to be loaded and executed by the processor to perform the method steps of one or more embodiments of this specification.
[0008] The beneficial effects brought by the technical solutions provided in some embodiments of this specification at least include: In one or more embodiments of this specification, the service platform uses a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link, uses the traffic 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, and performs request response adjustment processing on the target transaction service based on the traffic control signal. By successfully cross-adapting the PID feedback control mechanism widely used in the traditional industrial field to the user transaction request processing field, it realizes real-time monitoring of transaction request traffic, calculation of control signals, and dynamic adjustment of transaction request traffic processing, thereby realizing adaptive traffic regulation 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this specification. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0010] Figure 1 is a schematic diagram of the scenario of a transaction request processing system provided by this specification; Figure 2 is a flowchart of a transaction request processing method provided by this specification; Figure 3 is a schematic diagram of a traffic control processing scenario provided by this specification; Figure 4 is a flowchart of a traffic control processing method provided by this specification; Figure 5 It is a schematic flow diagram of a flow control operation provided in this specification; Figure 6 It is a schematic flow diagram of a reference adjustment of a flow PID controller provided in this specification; Figure 7 It is a schematic flow diagram of a request response adjustment provided in this specification; Figure 8 It is a schematic structural diagram of a transaction request processing device provided in this specification; Figure 9 It is a schematic structural diagram of an electronic device provided in this specification. Detailed implementation manners
[0011] Next, the technical solutions in this specification will be clearly and completely described in conjunction with the accompanying drawings in this specification. Obviously, the described embodiments are only a part of the embodiments in this specification, rather than all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification.
[0012] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In the description of this specification, it should be noted that unless otherwise clearly specified and limited, "including" 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 optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood according to specific circumstances. In addition, in the description of this specification, unless otherwise stated, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0013] In related technologies, transaction processing is widely used in scenarios such as finance, e-commerce, database management, log analysis, credit investigation and approval, and Internet of Things data stream processing, but usually encounters one or more of the following phenomena: 1. Large system load fluctuations: There are significant differences in the volume of transaction requests during different time periods, such as the peak period of bank settlement, flash sales on shopping websites, and peak trading periods in financial markets. This leads to periodic peaks and valleys 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 a higher priority than log storage, and real-time queries have a higher priority than batch offline calculations. Intelligent traffic control strategies are required 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), there may be significant differences in the load status of different resources, resulting in local resource overload while other resources still have remaining capacity. 4. Overload risk: If the transaction processing traffic is not reasonably controlled, it may lead to system resource exhaustion, a sharp increase in response time, or even system downtime. For example, in database transaction processing, a large number of high-concurrency requests may cause the database connection pool to be exhausted, leading to lock contention and deadlocks.
[0014] To address the above challenges, traditional transaction processing systems typically adopt the following traffic control schemes: Rate limiting based on a fixed threshold: By setting a fixed maximum number of requests or maximum throughput, when the request volume exceeds the threshold, requests are rejected or processed at a limited speed.
[0015] Limitations of rate limiting based on a fixed threshold: Fixed thresholds are difficult to adapt to dynamically changing traffic, which may waste resources during low load and affect service availability during high load.
[0016] Traffic control based on the token bucket / leaky bucket algorithm: Token bucket: Allows bursty traffic but is rate-limited in the long term. Leaky bucket: Processes requests at a fixed rate to prevent instantaneous overload.
[0017] Limitations of traffic control based on the token bucket / leaky bucket algorithm: These methods are usually applicable to network traffic control, but in the context of transaction processing, 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.
[0018] Task shunting based on distributed scheduling: By means of load balancing, task queues, asynchronous task distribution, etc., transaction requests are reasonably distributed to multiple computing nodes.
[0019] Limitations of task shunting based on distributed scheduling: This method relies on the cluster's scalability. In scenarios where resources are insufficient or not scalable (such as database connection pools and CPU-intensive tasks), it is still difficult to fundamentally solve the problem of high transaction load.
[0020] In summary, the traffic control of transaction processing is a key challenge in distributed systems. Traditional traffic control methods are difficult to dynamically adapt to changes in transaction loads and have certain limitations. To address the above limitations, in one or more embodiments of this specification, a feedback control mechanism widely used in the industrial control field - the PID (Proportional-Integral-Derivative) controller is cross-domain adapted and applied to the field of user transaction request processing. Based on the PID controller, by real-time monitoring transaction request traffic, calculating control signals, and dynamically adjusting transaction processing strategies, adaptive traffic regulation for transaction processing is achieved, improving the stability and throughput capacity of the system. Furthermore, the intelligence and accuracy of transaction traffic management are enhanced, making it applicable to multiple high-concurrency transaction scenarios such as finance, e-commerce, database management, credit reporting processing, and microservice architectures.
[0021] The following provides a detailed description of this specification with specific embodiments.
[0022] Please refer to Figure 1 , which is a scenario schematic diagram of a transaction request processing system provided by this specification. As Figure 1 shown, the transaction request processing system may at least include a client cluster and a service platform 100.
[0023] The client cluster may include at least one client. As Figure 1 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.
[0024] Each client in the client cluster may be an electronic device with communication capabilities. Such electronic devices include, but are not limited to: wearable devices, handheld devices, personal computers, tablet computers, in-vehicle devices, smartphones, computing devices, or other processing devices connected to a wireless modem, etc. In different networks, the electronic device may be called by different names. For example: user equipment, access terminal, user unit, user station, mobile station, mobile device, 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), electronic device in a 5G network or future evolved network, etc.
[0025] The service platform 100 may be a separate server device, such as a rack-mounted, blade, tower, or cabinet-style server device, or a hardware device with strong computing capabilities such as a workstation or a mainframe computer; it may also be a server cluster composed of multiple servers. The servers in the service cluster may be composed symmetrically, where each server is functionally equivalent and has an equivalent status in the transaction link, and each server can provide services independently. The independent service provision can be understood as not requiring the assistance of another server.
[0026] In one or more embodiments of the present 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 this 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 described in this specification.
[0027] It should be noted that the service platform 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication. Among them, the network can be a wireless network or a wired network. The wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network, or a Bluetooth network. The wired network includes but is not limited to an Ethernet, a universal serial bus (USB), or a controller area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent the data (such as the target compressed package) exchanged through the network. In addition, 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 of the links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0028] The embodiment of the transaction request processing system provided in this specification and the transaction request processing method in one or more embodiments belong to the same concept. The execution subject corresponding to the transaction request processing method involved in one or more embodiments of the specification may be the above-mentioned service platform 100; the execution subject corresponding to the transaction request processing method involved in one or more embodiments of the specification may also be the electronic device corresponding to the client, which is specifically determined based on the actual application environment. For the implementation process of the embodiment of the transaction request processing system, reference can be made to the following method embodiments, which will not be elaborated here.
[0029] Based on Figure 1 the scene schematic diagram shown below, the transaction request processing method provided in one or more embodiments of this specification will be introduced in detail.
[0030] Please refer to Figure 2 , which is a schematic flowchart of a transaction request processing method provided in one or more embodiments of this specification. This method can be implemented depending on a computer program and can run on a transaction request processing device based on the von Neumann architecture. This computer program can be integrated into an application or run as an independent tool class application. The transaction request processing device can be a service platform.
[0031] Specifically, this transaction request processing method includes: S102: Determine the offline request processing link and the real-time request processing link associated with the target transaction service; Target transaction service: It 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. Transaction services can include a series of operations such as data query, update, transaction submission, etc., and these operations need to ensure data integrity and consistency. The target transaction service refers to the set of transactions designated as key operations by a specific application or transaction service process.
[0032] For example: Payment processing in the financial system, order settlement in the e-commerce platform, data analysis in the log system, query operations in the database, credit inquiry transactions in the credit investigation service, etc. The target transaction service usually includes multiple subtasks and needs to process different types of transaction requests initiated by the client within a specific time.
[0033] Offline request processing link: It refers to those request processing processes that do not require immediate response. Such processing links can usually be executed later and will not directly affect the user's real-time experience. Offline requests generated by the offline request processing link are common in scenarios such as batch data processing, data mining, report generation, etc., and can also be credit inquiry requests in some non-immediate transaction requirements; Real-time request processing link: Refers to the request processing process that needs to be processed immediately and respond quickly. This type of processing link has strict requirements for processing speed and response time, and is usually associated with online transaction processing, real-time data analysis, online user requests, credit investigation queries, etc.
[0034] The service platform provides target transaction services to the client externally. For example, in an e-commerce platform, the target transaction services may include order processing, payment processing, and inventory management. These services need to be classified according to the transaction service priority and processing requirements and mapped to the corresponding request processing links. In this specification, the target transaction services are associated with two request processing links, the offline request processing link and the real-time request processing link; in practical applications, the transaction request traffic generated by each target transaction service will be associated with an appropriate processing link according to its nature. This involves analyzing the characteristics of the transaction to determine whether it should be quickly completed through the real-time processing link or can be assigned to the offline processing link for deferred processing. This process requires the system configuration and scheduling strategy to ensure that various transactions are routed as needed.
[0035] S104: Use 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 use the traffic 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; Traffic PID controller: The PID controller (Proportional-Integral-Derivative controller) 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 (Proportional-Integral-Derivative) controller is cross-adapted and applied to the field of user transaction request processing and its data form is transformed to obtain the traffic PID controller; the traffic PID controller is used to adjust the request traffic in the response transaction processing system according to the current request traffic parameters to maintain the optimal operating state of the platform system.
[0036] Current request traffic parameter: The parameter includes the number of transactions or queries currently processed by the system, including real-time requests and offline requests, and can be expressed in queries per second (QPS), transactions per second (TPS), or other relevant metrics. The parameter reflects the current load status of the system.
[0037] Traffic control signal: It is an adjustment instruction generated by the PID controller according to the current request traffic parameter and the preset target, and is used to adjust the request processing rate or resource allocation so that the number of request responses of the system traffic is maintained in an ideal state.
[0038] Exemplarily, the traffic PID controller first obtains the current request traffic parameters regarding the real-time request processing link and the offline request processing link. These parameters may include the number of requests, processing time, waiting queue length, etc., which are all key metrics affecting system performance.
[0039] Exemplarily, the controller compares the real-time data in the current request traffic parameters with the target traffic parameters (such as the maximum load capacity or ideal response time designed for the system), calculates the deviation value. Then, it uses the deviation to apply the PID algorithm to calculate the required traffic control signal. A traffic control signal generated by the traffic PID controller indicates how to adjust the system's resource allocation or processing rate, such as increasing or decreasing the server processing capacity, adjusting the request priority, or modifying the request queue processing strategy.
[0040] S106: Perform request response adjustment processing on the target transaction service based on the traffic control signal.
[0041] Schematically, the system of the target transaction service obtains the traffic control signal generated by the traffic PID controller, which contains the necessary adjustment information to guide how to make adjustments according to the current system load and performance metrics.
[0042] Furthermore, parse the control signal: The system parses this traffic control signal and automatically determines the specific adjustments to be made. For example, the signal may indicate that more resource allocation for real-time requests is needed, or the processing priority of offline requests is to be reduced.
[0043] Furthermore, execute the adjustment: According to the indication of the traffic control signal, the system performs specific adjustment operations. These include but are not limited to: Adjust processor resource allocation: For example, allocate more CPU cores or memory for real-time requests.
[0044] Adjust network bandwidth allocation: For example, provide higher network priority for critical transaction services.
[0045] Adjust request queue processing strategy: For example, change the request entry order or processing order to prioritize urgent or critical requests.
[0046] Monitor the adjustment effect: The system continuously monitors the effect after the adjustment to ensure that the adjustments made have achieved the expected improvement goals. If the effect does not meet the expectations, the system may need to make further adjustments based on new performance metrics.
[0047] Example, assume that the target transaction service is the credit investigation transaction service as an example. Suppose that at noon on a typical working day, the credit investigation system faces a large number of real-time credit score query requests from multiple banks. The PID controller monitors that the response time of real-time queries starts to exceed the target range, and then issues a flow control signal to request an increase in the resource allocation for real-time requests.
[0048] Execution of the control signal: The system reduces the resources allocated to non-critical tasks (such as non-urgent credit report generation) according to the signal and reallocates these resources to real-time credit score queries.
[0049] Adjusting priorities: The system adjusts the request processing queue so that real-time query requests are given priority.
[0050] Monitoring the adjustment result: The system monitors the response time after adjustment and confirms that the response time of real-time queries has returned to the target range. If the adjustment effect does not meet the expectation, the system will make adjustments again based on the new performance data.
[0051] In this way, the credit investigation system can effectively cope with sudden high-load situations, ensure the fast response of real-time transactions, and at the same time ensure the optimal use of overall system resources.
[0052] In a specific implementation scenario, taking the target transaction service as the credit investigation query service as an example for interpretation, please refer to Figure 3 , Figure 3 which is a schematic diagram of a flow control processing scenario, Figure 3Shows a query traffic regulation system centered around a traffic PID controller, which is used for resource allocation and priority management 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 area (which is mainly used for external services such as credit investigation queries, report parsing, and policy application in this example). The offline query module corresponds to the offline request processing link, usually for batch processing or queries with low requirements for timeliness. For example, batch credit data scraping, data reports, log analysis, etc. The real-time query module and the priority query module can correspond to the real-time request processing link, which requires immediate response and has high requirements for response speed. For example, new customer credit investigation verification, real-time approval, online risk control judgment, etc. In S102, the system needs to first identify which types of requests are involved in the target transaction service: the offline request processing link (offline query module), the real-time request processing link (real-time query module), and (optionally) the customer group that needs to be preferentially queried on the same day pre-screened based on the offline query module (corresponding to the priority query module, belonging to the real-time request processing link), so as to determine the processing link associated with the target transaction service. Monitor the traffic parameters of the real-time request processing link and the offline request processing link, input the monitoring results into the PID controller to obtain a traffic control signal, and dynamically adjust the sending rate or queuing strategy of the three query modules according to the traffic control signal. The adjustment processing includes but is not limited to: restricting 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.
[0053] Example: When the real-time query volume suddenly increases and the PID controller detects that the load on the real-time link has approached the upper limit, it will reduce the rate of the offline query link to avoid resource preemption. If the system is in a non-peak period and the real-time query volume is small, the PID controller allows the offline task to run at a higher rate to improve resource utilization.
[0054] DMZ area: An isolation area between the enterprise internal network and the external network, used to provide or access services externally securely. Here Figure 3 In this example, the credit investigation query institution or external service (such as third-party report parsing, policy application) is located in the DMZ area or accessed through the DMZ area. The corresponding functional modules such as credit investigation reports, report parsing, and policy application rely on data from the query module (offline query module, real-time query module, priority query module). After the PID controller schedules the query request to the DMZ area, these external or internal services will perform corresponding processing and return the results.
[0055] In one or more embodiments of this specification, the service platform uses 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 based on the current request traffic parameters, uses the traffic PID controller to perform 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 cross-adapting the PID feedback control mechanism widely used in the traditional industrial field to the user transaction request processing field, real-time monitoring of transaction request traffic, calculation of control signals, and dynamic adjustment of transaction request traffic processing are realized, thereby achieving adaptive traffic regulation for transaction processing. This not only significantly improves the stability and throughput capacity of the system, but also further enhances the intelligence and accuracy of transaction traffic management.
[0056] Please refer to Figure 4 , Figure 4 FIG. is a schematic flowchart of a traffic control processing method proposed in one or more embodiments of this specification. Specifically, the steps 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 based on the current request traffic parameters, using the PID controller to perform traffic control processing to obtain a traffic control signal for the target transaction service include: S202: Determine multiple traffic control parameters corresponding to the traffic PID controller; Traffic control parameters: When using a traffic PID controller for traffic regulation, a set of parameters related to control objectives, control ranges, control times, etc. often need to be set or determined. These parameters include the coefficients (Kp, Ki, Kd) of the PID controller itself, and can also include the target traffic value. In some embodiments, they can also include constraints or configurations at the transaction or system level, such as: Fitting of one or more of the offline maximum processing rate, controller startup time, verification time point, resource utilization threshold, and safety margin coefficient; By comprehensively considering these traffic control coefficients, the traffic PID controller can more accurately adjust the current request traffic.
[0057] Optionally, by analyzing transaction requirements and system capacity, determine the maximum bearing capacity of the system, peak transaction request periods, and priorities of different requests, and then call the expert terminal or use simulation to set the PID controller coefficients (Kp, Ki, Kd), and can also set transaction constraint parameters (such as offline maximum processing rate, controller startup time, etc.). During actual operation, according to real-time monitoring data, dynamically adjust the above parameters. For example, when it is found that too many real-time requests lead to an increase in latency, the offline maximum processing rate can be reduced or the Kp value can be increased to converge faster.
[0058] S204: Based on the traffic control parameters, control the traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link, and call the traffic PID controller for 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.
[0059] Current request traffic parameters: Refer to the actual operation metrics of the system at a certain moment, such as: real-time request QPS (Queries Per Second), offline task concurrency, CPU / memory usage, network bandwidth occupancy; These current request traffic parameters and the previously determined traffic control parameters (Kp, Ki, Kd, offline maximum processing rate, etc.) jointly determine the traffic control signal output by the traffic PID controller.
[0060] Traffic control processing: The traffic PID controller generates a control variable (the control variable will be used to generate a traffic control signal) by synthesizing the proportional term, integral term, and differential term according to the error between the target traffic value and the current traffic value; Optionally, this control variable is used to increase or decrease the rate of real-time requests or offline requests, or adjust the processing priorities of the two.
[0061] Optionally, after the traffic PID controller generates a control variable by synthesizing the proportional term, integral term, and differential term according to the error between the target traffic value and the current traffic value, it can fine-tune the control variable or adjust the timing of generating the traffic control signal based on the control variable in combination with the transaction constraint parameters.
[0062] Traffic control signal: The instruction or adjustment value finally output by the PID controller, used to adjust the system load.
[0063] Schematically, continuously collect the current request traffic parameters, input these current request traffic parameters into the traffic PID controller, call the traffic PID controller for traffic control processing, and output a traffic control signal.
[0064] In this specification, determining the traffic control parameters lays the foundation for traffic control. Based on the set traffic control parameters and the current system traffic data, call the PID controller to generate a traffic control signal, guide the system to perform adaptive adjustment between real-time requests and offline requests, and realize the construction of a flexible and efficient traffic control mechanism, which not only meets the real-time requirements of high-priority transactions but also makes full use of system resources to complete offline task processing.
[0065] Optionally, the traffic control parameters include target traffic parameters, proportional coefficient, integral coefficient, and differential coefficient. Please refer to Figure 5 , Figure 5It is a schematic flowchart of a flow control operation. Specifically, when performing the flow control process of calling the flow PID controller based on the flow control parameter and the current request flow parameter to obtain a flow control signal for the target transaction service, the following implementation manners can be referred to: Proportional coefficient K P : Responds proportionally based on the magnitude of the error at the current moment. If the error is large, a large control signal is generated; if the error is small, a small control signal is generated.
[0066] Integral coefficient K i : Considers the sum of the errors accumulated at all time points from the start to the present, aiming to eliminate the static error, that is, the persistent deviation that still exists when reaching the steady state.
[0067] Derivative coefficient K d : Focuses on the rate of change of the error, predicts future trends, and makes adjustments in advance accordingly, which helps to improve the response speed of the system and reduce overshoot phenomena.
[0068] Target flow parameter windowobj: Used to determine the flow error.
[0069] S3002: Determine the flow error at the current moment based on the target flow parameter and the current request flow parameter; Calculate the error:
[0070] Among them, e(t) represents the flow error at the current moment, R target represents the target flow parameter, R current represents the current request flow parameter; S3004: Input the flow error at the current moment into the flow PID controller, and the flow PID controller performs a flow control operation using the proportional coefficient, the integral coefficient, and the derivative coefficient to obtain a flow adjustment control signal.
[0071] The following control quantity calculation formula can be referred to:
[0072] Among them, u(t) represents the control quantity; Output the control quantity through the control quantity calculation formula; Optionally, the control quantity can be finely adjusted or the timing of generating the flow control signal based on the control quantity can be adjusted in combination with the transaction constraint parameter.
[0073] In a feasible implementation manner, the traffic control parameter further includes an offline maximum processing rate. Step S3004 is executed: input the current moment traffic error into the traffic PID controller, and the traffic PID controller performs traffic control operations using the proportional coefficient, the integral coefficient, and the differential coefficient to obtain a traffic adjustment control signal. The following implementation manner can be referred to: Step A2: Determine the current moment offline traffic error corresponding to the current moment traffic error, and input the current moment offline traffic error into the traffic PID controller; Offline traffic error: Since the system differentiates between offline requests and real-time requests, it is necessary to separately analyze the actual processing rate or load status of the "offline request" part, so as to obtain the current moment offline traffic error corresponding to the current moment traffic error; The (current moment) offline traffic error is also the difference between the target offline traffic in the target traffic parameter and the current offline traffic; Illustratively, the current offline traffic is obtained by the system monitoring module to acquire the actual processing rate of the current offline request, such as the number of offline tasks processed per second, offline QPS, etc. Then, the difference between the target offline traffic in the target traffic parameter and the current offline traffic is calculated as the current moment offline traffic error. The current moment offline traffic error is input into the traffic PID controller; Step A4: The traffic PID controller performs traffic control operations using the offline maximum processing rate, the proportional coefficient, the integral coefficient, and the differential coefficient to obtain an offline traffic adjustment control signal, and the offline traffic adjustment control signal is used to indicate generating an offline traffic request response parameter smaller than the offline maximum processing rate; Offline maximum processing rate: A highest processable rate upper limit set by the system for the "offline request processing link". The offline maximum processing rate can be configured based on hardware resources, transaction requirements, or protection policies for real-time requests, and can also be dynamically adjusted later.
[0074] Illustratively, the traffic PID controller loads the offline maximum processing rate, and uses the current moment offline traffic error to perform traffic control operations based on the proportional coefficient, the integral coefficient, and the differential coefficient to obtain a control quantity (the control quantity calculation formula can be used). Then, the size of the offline processing rate corresponding to the control quantity is compared with the offline maximum processing rate, and a target control quantity smaller than the offline maximum processing rate is generated according to the comparison result. The target control quantity is used as the offline traffic adjustment control signal. The offline traffic adjustment control signal indicates a new offline processing rate or concurrency limit, such as "set the offline query rate to 1200 QPS".
[0075] After receiving the signal, the transaction system updates the queue, the number of threads, or the limiter parameters of the offline requests.
[0076] Furthermore, in the PID controller, the offline maximum processing rate and parameters such as Kp, Ki, and Kd are used for control operations to obtain an offline traffic adjustment control signal, which is limited below the offline maximum processing rate to ensure the controllability of the system for offline requests. It can achieve refined management of "offline requests", avoid impacting real-time requests while meeting transaction requirements, thereby enhancing the stability and efficiency of the overall system.
[0077] Furthermore, the traffic control parameters further include the controller startup time and the verification time point. In some embodiments, when the flow control PID controller based on the traffic control parameters monitors the current request traffic parameters of the real-time request processing link and the offline request processing link, the following methods can be referred to: Step B2: Based on the controller startup time, the flow PID controller is enabled, and the current request traffic parameters of the real-time request processing link and the offline request processing link are monitored by controlling the flow PID controller; Controller startup time: It refers to a time point or time window pre-set by the system for the flow PID controller. Before this moment, the system will not enable the flow PID controller, and after reaching this time, it starts to monitor and regulate the traffic of the real-time request link and the offline request link.
[0078] Schematically, the service platform sets a controller startup time for the flow PID controller so that when the controller startup time arrives, the flow PID controller is enabled, and the current request traffic parameters of the real-time request processing link and the offline request processing link are monitored by controlling the flow PID controller.
[0079] For example: Start 30 minutes before the daily request peak to preheat the control mechanism before the peak arrives.
[0080] Step B4: Based on the verification time point, the flow PID controller is called to trigger the traffic control process for the target transaction service.
[0081] Verification time point: It refers to the time nodes pre-set by the system for regularly evaluating the traffic status. These time points are used to "verify" the current traffic status and control effect of the system, and to judge whether it is necessary to adjust the control strategy or parameters. For example: Check at a certain fixed time point at noon or in the afternoon every day.
[0082] Optionally, a first verification time point can be set for the real-time request processing link respectively, and / or a second verification time point can be set for the offline request processing link; Schematically, when a 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 corresponding to the verification time point (such as the offline request processing link and the real-time request processing link). For example, perform the traffic control processing based on the current request traffic parameters in S104 using the traffic PID controller to obtain a traffic control signal for the target transaction service, and perform request response adjustment processing on the target transaction service based on the traffic control signal.
[0083] In this specification, through the above method, the system can utilize the preset time nodes and dynamic monitoring data to achieve precise control of the transaction service traffic, ensure that real-time requests are fully guaranteed, effectively adjust offline requests at the same time, and improve the stability and response ability of the overall system.
[0084] Optionally, as Figure 6 shown, Figure 6 is a schematic diagram of the reference adjustment process of the traffic PID controller. Specifically: S4002: Obtain the link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics; Link processing performance characteristics: refer to the current processing capabilities and performance indicators of each processing link (such as the real-time request link and the offline request link). For example: 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.; The link processing performance characteristics reflect the operation efficiency and health status of the system under the current load.
[0085] Historical request trend characteristics refer to the information such as the request volume change trend, peak distribution, and fluctuation situation obtained by statistically analyzing the request data over a period of time in the past. For example: The request volume change curve daily, weekly, or monthly; The frequency and duration of sudden traffic occurrences; These characteristics help predict future traffic changes and possible load peaks.
[0086] Transaction environment factor characteristics: refer to the external or environmental factors that affect transaction processing. These factors may include: Time factors: such as weekdays and holidays, business peak hours and off-peak hours; Special events: promotional activities, system maintenance, market fluctuations, etc.; External dependency status: third-party service response time, network latency, etc.; These factors will directly affect the execution of the transaction service and the request volume distribution; Schematically, the real-time monitoring of the runtime performance indicators of each link (real-time and offline) is performed to obtain the link processing performance characteristics, and data such as the current response time, QPS, and resource utilization are collected.
[0087] Extract historical request trend data from historical logs, monitoring systems, or data warehouses to obtain historical request trend characteristics, and count the request volume, peak value, and fluctuations.
[0088] Collect relevant information in the transaction environment to obtain transaction environment factor characteristics, such as time period, special activities, external dependent service status, etc.
[0089] S4004: Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, use a controller to adjust the large model to perform an evaluation process on the control parameter adjustment of the traffic PID controller to obtain a target adjustment strategy, and generate target traffic control parameters for the traffic PID controller based on the target adjustment strategy; The controller adjustment large model refers to a machine learning model obtained by adapting the basic large language model (such as GPT series models, Tongyi Qianwen series models, etc.) to the controller adjustment scenario. This model can automatically judge and optimize the control strategy according to multi-dimensional characteristics (such as performance indicators, historical trends, environmental factors).
[0090] The target adjustment strategy refers to an optimized adjustment plan for the current system state determined according to the evaluation results of the large model. It includes decisions such as adjusting the rate of offline requests, modifying PID parameters, and changing the startup time window.
[0091] The target traffic control parameters refer to the new control parameters set for the traffic PID controller under the guidance of the target adjustment strategy, such as: adjusted PID coefficients (Kp, Ki, Kd), updated offline maximum processing rate, new target traffic value, etc. Schematically, input the link processing performance, historical request trend, and transaction environment factor characteristics obtained in step S4002 into the controller adjustment large model. The controller adjustment large model analyzes these inputs, evaluates the current system operating state and future traffic trends. The controller adjustment large model outputs a target adjustment strategy based on the input characteristics. This strategy includes the adjustment measures to be taken for the current environment. Then, according to the target adjustment strategy, specific target traffic control parameters are further generated. The subsequent target traffic control parameters will be passed to the traffic PID controller to adjust the traffic in real time, such as updating new PID coefficients, resetting the offline maximum processing rate, or the target traffic value.
[0092] For example: The strategy may suggest reducing the offline traffic during peak hours, adjusting the PID parameters to improve the response speed, or relaxing the restrictions during off-peak hours to make full use of resources.
[0093] In this specification, S4002 obtains the characteristics of the current link processing performance, historical request trends, and transaction environment factors through monitoring and data collection, providing basic data for subsequent decision-making. S4004 then uses a pre-established controller to adjust the large model, evaluates the current system state based on these multi-dimensional characteristics, outputs the target adjustment strategy, and further generates the target flow control parameters for the flow PID controller. The entire process realizes a closed-loop control from data collection, feature extraction to the generation of intelligent adjustment strategies and then to parameter adjustment, which helps to dynamically optimize the system flow control in a changing transaction environment and ensure the stability and efficiency of critical transaction services.
[0094] In a feasible implementation manner, when performing the evaluation and processing of controlling the parameter adjustment of the flow PID controller by using a controller to adjust the large model based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, and generating the target flow control parameters for the flow PID controller based on the target adjustment strategy, the following method can be referred to: Step C2: Evaluate the comprehensive adjustment score and future query trend characteristics of the flow PID controller by using a controller to adjust the large model based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, and determine the target adjustment strategy based on the comprehensive adjustment score and the future query trend characteristics; Comprehensive adjustment score: It is a comprehensive evaluation index of the adjustment effect of the controller on the current flow PID controller, reflecting the adaptability and stability of the current flow control of the system.
[0095] Future query trend characteristics: It refers to the trend of the query request volume in the future period predicted by the controller to adjust the large model based on historical data and real-time data.
[0096] Schematically, input the above data into the controller to adjust the large model, and the model calculates and outputs two key results: 1) Comprehensive adjustment score: reflecting whether the adjustment effect of the current PID controller meets the expectations and whether there is over-adjustment or under-adjustment. 2) Future query trend characteristics: the predicted value or trend curve of the request flow in the future period.
[0097] Then, according to the comprehensive adjustment score and the predicted future query trend, the controller adjusts the large model to determine what adjustment strategy should be adopted. For example: if the current score is low and the future query shows an upward trend, a more aggressive adjustment strategy may be needed; if the score is high and the future requests are predicted to be stable, maintain the current strategy or adopt a moderately adjusted strategy; the finally output target adjustment strategy can be divided into different types (such as the first type and the second type of adjustment strategies) for use in subsequent steps.
[0098] Step C4: If the target adjustment strategy is the first - type adjustment strategy, use the controller to adjust the large - model to generate the first - target flow control parameters for the offline maximum processing rate, the controller startup time, and the verification time point. The first - type adjustment strategy: refers to the strategy of only adjusting the external control parameters at the macro level without changing the PID core adjustment parameters under the current system state. External parameters usually include: offline maximum processing rate, controller startup time, verification time point, etc.
[0099] The first - target flow control parameters: refer to the parameter configuration generated according to the first - type adjustment strategy, which is used to guide the external control settings of the flow PID controller in the offline processing link, such as adjusting the maximum processing rate or changing the regulation period.
[0100] Schematically, when the target adjustment strategy output by the large - model is determined to be the first - type, it indicates that the current system state is relatively stable, and the main problems are concentrated in the external parameter configuration. The controller adjusts the large - model according to the current monitoring data and prediction results to adjust the external parameters: Offline maximum processing rate: Appropriately increase or decrease the processing upper limit of offline tasks according to the real - time resource situation. Controller startup time: May adjust the time to start in advance to better adapt to business requirements. Verification time point: Adjust the verification frequency or time point according to historical data and actual traffic fluctuations. The model outputs a new set of first - target flow control parameters to update the external regulation configuration of the flow PID controller.
[0101] Step C6: If the target adjustment strategy is the second - type adjustment strategy, use the controller to adjust the large - model to generate the second - target flow control parameters for the target flow parameters, the proportional coefficient, the integral coefficient, and the differential coefficient.
[0102] The second - type adjustment strategy: refers to the strategy of adjusting the internal parameters (PID parameters) of the flow PID controller when there are large deviations in the system state or sharp changes in dynamic load. At this time, not only external control parameters need to be adjusted, but also the core PID parameters need to be modified to achieve more refined and faster - responding adjustment.
[0103] The second - target flow control parameters: refer to the parameter configuration generated according to the second - type adjustment strategy, mainly involving: Target flow parameters: The request processing rate or load level that the system expects to achieve. PID parameters: The adjusted values of the proportional coefficient (Kp), the integral coefficient (Ki), and the differential coefficient (Kd).
[0104] Schematically, when the controller adjusts the large model to determine that the current system state requires more refined internal adjustment, the target policy is classified as the second type, that is, the internal PID parameters need to be adjusted to cope with large fluctuations or unstable states. The controller adjusts the large model to output a set of new target traffic parameters and PID parameters based on the current link performance, historical trends, and environmental factors: Target traffic parameters: The updated target value, which is used to guide the overall traffic adjustment. Proportional coefficient Kp, integral coefficient Ki, differential coefficient Kd: The new PID parameter settings are used to achieve faster or smoother responses and reduce the risk of system oscillation. These parameter combinations constitute the second target traffic control parameters, which will be directly used to reconfigure the traffic PID controller to optimize the traffic regulation for the target transaction service.
[0105] In this specification, step C2 mainly inputs multi-dimensional features such as link performance, historical trends, and environmental factors into the controller-adjusted large model to obtain a comprehensive adjustment score and future traffic prediction, and then determines the target adjustment 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 adjustment strategies respectively: When the target policy belongs to the first type, only external parameters (such as offline maximum processing rate, start time, verification time point) need to be adjusted to generate the first target traffic control parameters; when the target policy belongs to the second type, the internal PID parameters and target traffic parameters need to be adjusted to generate the second target traffic control parameters. This hierarchical adjustment method can not only adjust macroscopic parameters only when the system state is relatively stable, but also achieve fine control by modifying the internal PID parameters when the load fluctuates violently, so as to better meet the traffic regulation requirements in different transaction service scenarios.
[0106] S4006: Update the control parameters of the traffic PID controller based on the target traffic control parameters.
[0107] Control parameter update process: It means writing or updating new parameter values into the configuration of the traffic PID controller according to the target traffic control parameters, so that the controller uses the new parameters for traffic control in subsequent adjustment operations. This step realizes the dynamic optimization of parameters, enabling the system to adaptively respond to traffic changes and business requirements.
[0108] Schematically, the parameter update module of the flow PID controller receives the latest target flow control parameters from the controller adjustment large model or the target adjustment strategy module. These parameters have been optimally selected based on the current system state and future predictions. Necessary verification is performed on the received parameters to ensure the legality and rationality of the parameters (for example, the PID parameters are within a certain range, and the offline maximum processing rate does not exceed the hardware capacity limit, etc.). The target flow control parameters are written into the flow PID controller. The updated content may include but is not limited to: Directly update the internal PID parameters (Kp, Ki, Kd) Update the offline maximum processing rate and target flow value Adjust other relevant external parameters (such as startup time, verification time point) The update operation is usually completed in the system configuration module, which may involve calling specific APIs or modifying the system configuration file. Further, after the update is completed, the flow PID controller starts to perform the next round of adjustment operations using the new parameters. The system continuously monitors the real-time flow and recalculates the control signal using the new parameters to more finely adjust the ratio and rate of real-time and offline requests.
[0109] Optionally, the following schematically shows a model training process of the controller adjustment large model, as follows: 1) Use the basic large language model to create an initial controller adjustment large model in the controller adjustment scenario; 2) Obtain sample training data for the controller adjustment scenario. The sample training data includes link processing performance characteristics, historical request trend characteristics, and transaction environment factor characteristics. The expert side is used to label the adjustment strategy label and flow control parameter label for the sample training data; 3) Input the sample training data into the initial controller adjustment large model. During the forward propagation process of the model: the initial controller adjustment large model performs control parameter adjustment evaluation processing on the flow PID controller to obtain a predicted adjustment strategy, and generates predicted flow control parameters for the flow PID controller based on the predicted adjustment strategy. During the backward propagation process of the model: calculate the strategy prediction loss based on the adjustment strategy label and the predicted adjustment strategy, calculate the parameter generation loss based on the predicted flow control parameters and the flow control parameter label, obtain the model comprehensive loss based on the strategy prediction loss and the parameter generation loss, and use the model comprehensive loss to adjust the model parameters of the initial controller adjustment large model until the model end training condition is met to complete the model training process and obtain the trained controller adjustment large model.
[0110] Optionally, the model's training end condition may include, for example, that the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on the actual situation and is not specifically limited here.
[0111] Optionally, the model's training end condition may include, for example, that the value of the loss function is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific model training end condition can be determined based on the actual situation and is not specifically limited here.
[0112] In one or more embodiments of this specification, the target flow control parameters generated after the large model evaluation are used to update the parameters of the flow PID controller, enabling it to more finely adjust the system request flow in subsequent operations. This process includes parameter reception, verification, update, and closed-loop feedback, ensuring that the system can continuously optimize the adjustment strategy in the face of dynamic traffic and business demand changes, thereby guaranteeing the overall system performance and service quality.
[0113] Optionally, the flow control signal may include a flow adjustment control signal. In some embodiments, please refer to Figure 7 , Figure 7 is a schematic diagram of a request-response adjustment process. Specifically, the request-response adjustment process for the target transaction service based on the flow control signal can be referred to the following method: S5002: Determine the target flow adjustment link based on the flow adjustment control signal, and determine the flow request-response parameters of the target flow adjustment link. The target flow adjustment link is at least one of the offline request processing link and the real-time request processing link; Schematically, according to the information transmitted in the flow adjustment control signal, the system first determines the link that needs to be adjusted: If the signal indicates that there is an overload risk for real-time requests, the target link is the real-time request processing link; If the signal shows that the offline request processing is too aggressive and may affect the overall system resources, the target link is the offline request processing link; In some scenarios, it may also be possible to adjust one or both of the two links simultaneously.
[0114] Furthermore, extract the key request flow parameters of the determined target link, such as the current request rate, average response time, queue depth, etc.
[0115] Furthermore, determine the adjustment target according to the content of the flow adjustment control signal and the current link parameters: The adjustment objective may be to reduce the request rate of the offline link to a specified value to release resources, or to enhance the concurrency capacity of the real-time link to cope with high traffic.
[0116] Meanwhile, a set of "traffic request response parameters" is generated for the target link as the basis for subsequent adjustment processing.
[0117] S5004: Based on the traffic adjustment control signal, adjust the traffic request response parameters 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.
[0118] Traffic request response parameters: Refer to the key indicators describing the link processing capacity (such as QPS, concurrency count, queue length, etc.). These parameters directly affect the response speed and quality of the link to transaction requests.
[0119] Adjusted traffic request response parameters: Refer to the new parameters obtained by 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.
[0120] Request response adjustment processing: Refer to applying the adjusted parameters to the target link to dynamically change the request processing strategy, such as modifying the flow limiting rule, adjusting the thread pool size, or changing the scheduling strategy, so as to achieve precise control of the request traffic.
[0121] In one or more embodiments of this specification, in step S5002, according to the traffic adjustment control signal, the system first determines the target link (real-time or offline) to be adjusted and obtains the current request response parameters of this link as the basic data for subsequent adjustment. In step S5004, the system makes specific adjustments to the obtained original parameters based on the traffic adjustment control signal, generates the adjusted traffic request response parameters, and applies these parameters to the target link, thereby realizing the refined adjustment of the transaction request traffic. These two steps together constitute the dynamic adjustment closed loop of the system for the transaction service traffic. Through real-time monitoring, intelligent adjustment, and parameter update, precise management of different request processing links is achieved, ensuring that key services are preferentially guaranteed, while reasonably allocating resources to improve the stability and response efficiency of the overall system.
[0122] The following will be combined with Figure 8 , and a detailed introduction to the transaction request processing device provided in this specification will be given. It should be noted that Figure 8 The transaction request processing device shown is used to execute the method of the embodiment shown in this specification. For the sake of convenience of description, only the parts related to this specification are shown. For the specific technical details not disclosed, please refer to the embodiment shown in this specification Figures 1 to 7 Figures 1 to 7 Figures 1 to 7 shown in
[0123] Please refer to Figure 8 which shows a schematic structural diagram of the transaction request processing device of this specification. 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 for: The 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; The 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 by using a traffic PID controller, and perform traffic control processing based on the current request traffic parameters by using the traffic PID controller to obtain a traffic control signal for the target transaction service; The adjustment processing module 13 is used to perform request response adjustment processing on the target transaction service based on the traffic control signal.
[0124] Optionally, the step of monitoring the current request traffic parameters of the real-time request processing link and the offline request processing link by using a traffic PID controller, and performing traffic control processing based on the current request traffic parameters by using the PID controller to obtain a traffic control signal for the target transaction service includes: Determine multiple traffic control parameters corresponding to the traffic PID controller; Based on the traffic control parameters, control the traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link, and call 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.
[0125] Optionally, the traffic control parameters include a target traffic parameter, a proportional coefficient, an integral coefficient, and a differential coefficient. The step of calling 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 includes: Determine the traffic error at the current moment based on the target traffic parameter and the current request traffic parameter; Input the traffic error at the current moment into the traffic PID controller, and use the proportional coefficient, the integral coefficient, and the differential coefficient through the traffic PID controller to perform traffic control operations to obtain a traffic adjustment control signal.
[0126] Optionally, the traffic control signal includes a traffic adjustment control signal. The request response adjustment processing of the target transaction service based on the traffic control signal includes: Determine a target traffic adjustment link based on the traffic adjustment control signal, and determine the traffic request response parameters of the target traffic adjustment link, where the target traffic adjustment link is at least one of the offline request processing link and the real-time request processing link; 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.
[0127] Optionally, the traffic control parameters further include an offline maximum processing rate, a controller startup time, and a verification time point. Inputting the current moment traffic error into the traffic PID controller, and obtaining a traffic adjustment control signal through the traffic PID controller using the proportional coefficient, the integral coefficient, and the differential coefficient for traffic control operations, includes: determining the current moment offline traffic error corresponding to the current moment traffic error, inputting the current moment offline traffic error into the traffic PID controller, and obtaining an offline traffic adjustment control signal through the traffic PID controller using the offline maximum processing rate, the proportional coefficient, the integral coefficient, and the differential coefficient for traffic control operations, where the offline traffic adjustment control signal is used to indicate generating offline traffic request response parameters less than the offline maximum processing rate; 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 invoking the traffic PID controller based on the verification time point.
[0128] Optionally, the method further includes: Obtain 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 factor characteristics, use a controller adjustment large model to perform control parameter adjustment evaluation processing on the traffic PID controller to obtain a target adjustment strategy, and generate target traffic control parameters for the traffic PID controller based on the target adjustment strategy. Update the control parameters of the traffic PID controller based on the target traffic control parameters.
[0129] Optionally, the method of using the controller adjustment large model based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics to perform control parameter adjustment evaluation processing on the traffic PID controller, and generating target traffic control parameters for the traffic PID controller based on the target adjustment strategy, includes: Using the controller adjustment large model to evaluate the comprehensive adjustment score and future query trend characteristics of the traffic PID controller based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, and determining the target adjustment strategy based on the comprehensive adjustment score and the future query trend characteristics; If the target adjustment strategy is the first type of adjustment strategy, then use the controller adjustment large model to generate the first target traffic control parameters for the offline maximum processing rate, the controller startup time, and the verification time point; If the target adjustment strategy is the second type of adjustment strategy, then use the controller adjustment large model to generate the second target traffic control parameters for the target traffic parameter, the proportionality coefficient, the integral coefficient, and the differential coefficient.
[0130] It should be noted that when the transaction request processing device provided in the above embodiment executes the transaction request processing method, only the division of the above functional modules is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the transaction request processing device provided in the above embodiment and the transaction request processing method embodiment belong to the same concept, and the implementation process is detailed in the method embodiment, which will not be repeated here.
[0131] The serial numbers in this specification above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0132] In one or more embodiments of this specification, the service platform uses a traffic PID controller to monitor the current request traffic parameters of the real-time request processing link and the offline request processing link, uses the traffic 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, and performs request response adjustment processing on the target transaction service based on the traffic control signal. By successfully cross-adapting the PID feedback control mechanism widely used in the traditional industrial field to the user transaction request processing field, real-time monitoring of transaction request traffic, calculation of control signals, and dynamic adjustment of transaction processing strategies are achieved, thereby realizing adaptive traffic regulation of transaction processing. This not only significantly improves the stability and throughput capacity of the system, but also further enhances the intelligence and accuracy of transaction traffic management, enabling it to efficiently handle dynamic load changes and resource competition problems in multiple high-concurrency transaction scenarios such as finance, e-commerce, database management, credit reporting processing, and microservice architectures.
[0133] This specification also provides a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded and executed by a processor to perform the Figures 1 to 7 transaction request processing method as described in the above Figures 1 to 7 illustrated embodiment. The specific execution process can refer to the
[0134] specific description of the illustrated embodiment and will not be elaborated here. Figures 1 to 7 This specification also provides a computer program product, which stores at least one instruction. The at least one instruction is loaded and executed by the processor to perform the Figures 1 to 7 transaction request processing method as described in the above
[0135] illustrated embodiment. The specific execution process can refer to the Figure 9 specific description of the illustrated embodiment and will not be elaborated here.
[0136] The processor 1010 may include one or more processing cores. The processor 1010 connects various parts within the entire electronic device through various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1020, and by invoking the data stored in the memory 1020. Optionally, the processor 1010 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). The processor 1010 may integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing the display content; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1010 and may be implemented separately through a communication chip.
[0137] The memory 1020 may include random access memory (RAM) and may also include read-only memory (ROM). Optionally, the memory 1020 includes a non-transitory computer-readable storage medium. The memory 1020 can be used to store instructions, programs, code, code sets, or instruction sets.
[0138] Among them, the input device 1030 is used to receive input instructions or data. The input device 1030 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 1040 is used to output instructions or data. The output device 1040 includes, but is not limited to, a display device, a speaker, etc. In the embodiments of this specification, the input device 1030 may be a temperature sensor for obtaining the operating temperature of the electronic device. The output device 1040 may be a speaker for outputting an audio signal.
[0139] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above drawings does not limit the electronic device. The electronic device may include more or fewer components than shown in the drawings, or combine certain components, or have different component arrangements. For example, the electronic device may also include components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WIFI) module, a power supply, and a Bluetooth module, which will not be elaborated here.
[0140] In the embodiments of this specification, the execution subject of each step may be the electronic device introduced above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be the Android system, the IOS system, or other operating systems, and the embodiments of this specification do not limit this.
[0141] In Figure 9 the electronic device, the processor 1010 may be used to call the program stored in the memory 1020 and execute it to implement the transaction request processing method as described in various method embodiments of this specification.
[0142] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above methods. Among them, the storage medium may be a magnetic disk, an optical disc, a read-only memory, or a random access memory, etc.
[0143] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data 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 relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions. For example, the features, information, traffic, etc. involved in this specification are obtained under full authorization.
[0144] The above-disclosed are only the preferred embodiments of this specification. Of course, the scope of rights of this specification cannot be limited by this. Therefore, equivalent changes made according to the claims of this specification still fall within the scope covered by this specification.
Claims
1. A method for processing transaction requests, characterized in that, The method includes: Determining an offline request processing link and a real-time request processing link associated with a target transaction service; Using a traffic PID controller to monitor current request traffic parameters of the real-time request processing link and the offline request processing link, and performing 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; Performing request response adjustment processing on the target transaction service based on the traffic control signal.
2. The method according to claim 1, characterized in that, The step of using a traffic PID controller to monitor current request traffic parameters of the real-time request processing link and the offline request processing link, and performing traffic control processing using the PID controller based on the current request traffic parameters to obtain a traffic control signal for the target transaction service includes: Determining a plurality of traffic control parameters corresponding to the traffic PID controller; Controlling the traffic PID controller to monitor current request traffic parameters of the real-time request processing link and the offline request processing link based on the traffic control parameters, and invoking 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 traffic control parameters include a target traffic parameter, a proportional coefficient, an integral coefficient, and a differential coefficient. The step of invoking 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 includes: Determining a current traffic error based on the target traffic parameter and the current request traffic parameter; Inputting the current traffic error into the traffic PID controller, and performing traffic control operation using the proportional coefficient, the integral coefficient, and the differential coefficient through the traffic PID controller to obtain a traffic adjustment control signal.
4. The method according to claim 1 or 3, characterized in that, The traffic control signal includes a traffic adjustment control signal. The step of performing request response adjustment processing on the target transaction service based on the traffic control signal includes: 5. The method according to claim 3, wherein Inputting the current moment traffic error into the traffic PID controller, and performing traffic control operations by the traffic PID controller using the proportional coefficient, the integral coefficient, and the differential coefficient to obtain a traffic adjustment control signal, includes: determining a current moment offline traffic error corresponding to the current moment traffic error, inputting the current moment offline traffic error into the traffic PID controller, and performing traffic control operations by the traffic PID controller using the offline maximum processing rate, the proportional coefficient, the integral coefficient, and the differential coefficient to obtain an offline traffic adjustment control signal, where the offline traffic adjustment control signal is used to indicate generating an offline traffic request response parameter less than the offline maximum processing rate; Based on the traffic control parameter, 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, 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 5, wherein The method further includes: Obtaining 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 factor characteristics, using a controller adjustment large model to perform control parameter adjustment evaluation processing on the traffic PID controller to obtain a target adjustment strategy, and generating target traffic control parameters for the traffic PID controller based on the target adjustment strategy; Performing control parameter update processing on the traffic PID controller based on the target traffic control parameters.
7. The method according to claim 6, characterized in that, Based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, using a controller adjustment large model to perform control parameter adjustment evaluation processing on the traffic PID controller to obtain a target adjustment strategy, and generating target traffic control parameters for the traffic PID controller based on the target adjustment strategy, includes: Using a controller adjustment large model to evaluate the comprehensive adjustment score and future query trend characteristics of the traffic PID controller based on the link processing performance characteristics, the historical request trend characteristics, and the transaction environment factor characteristics, and determining a target adjustment strategy based on the comprehensive adjustment score and the future query trend characteristics; If the target adjustment strategy is a first type of adjustment strategy, then using a controller adjustment large model to generate first target traffic control parameters for the offline maximum processing rate, the controller startup time, and the verification time point; If the target adjustment strategy is a second type of adjustment strategy, then using a controller adjustment large model to generate second target traffic control parameters for the target traffic parameter, the proportional coefficient, the integral coefficient, and the differential coefficient.
8. A transaction request processing device, characterized in that, The device includes: A link determination module, configured to determine an offline request processing link and a real-time request processing link associated with a target transaction service; A control processing module, configured to use a traffic PID controller to monitor current request traffic parameters of the real-time request processing link and the offline request processing link, and perform traffic control processing by using the traffic PID controller based on the current request traffic parameters to obtain a traffic control signal for the target transaction service; An adjustment processing module, configured to perform request response adjustment processing on the target transaction service based on the traffic control signal.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor to perform the method steps of any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product stores at least one instruction, and the at least one instruction is loaded and executed by a processor to perform the method steps of any one of claims 1 to 7.
11. An electronic device, characterized in that, Including: A processor and a memory; wherein, the memory stores a computer program, and the computer program is suitable for being loaded and executed by the processor to perform the method steps of any one of claims 1 to 7.
Citation Information
Patent Citations
Flow forwarding control method and device, equipment and medium
CN116366560A
Access traffic distribution method and device, equipment and storage medium
CN116962298A
Network resource recommendation method and device, electronic equipment and medium
CN117435816A
PID (Proportion Integration Differentiation) control method suitable for large-lag multiple working conditions based on feedforward compensation
CN118897450A
Flow control method and device, medium and product
CN119693095A
Cited By
Activity evaluation processing method and device, storage medium and electronic equipment
CN120598440A