Flow control method and device, electronic equipment and computer readable medium

By updating the data structure and cutting of the data in a high concurrency environment, dynamically adjusting the traffic control strategy, the problem of slow and flexibility in the existing technology in the existing technology has been solved, and more efficient and flexible flow control is achieved.

CN119356794APending Publication Date: 2025-01-24CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411374189.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The prior art has slow response speed in high concurrency conditions and insufficient real-time monitoring methods, making it difficult to flexibly adjust strategies.

Method used

By receiving transaction requests, the cutting surface is called to update the data structure, determine the target operation based on the data structure and preset threshold, and update the metadata and cutting classes when the business demand is changed to dynamically adjust the flow control strategy.

Benefits of technology

It improves the response speed of flow control, enhances the flexibility of flow control during business demand, and ensures the stable operation of the system in a high concurrency environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356794A_ABST
    Figure CN119356794A_ABST
Patent Text Reader

Abstract

The invention discloses a flow control method and device, electronic equipment and a computer readable medium, and relates to the technical field of computers, and a specific embodiment comprises the steps of receiving a transaction request, calling a section class, and updating a data structure based on the transaction request; determining a target operation based on the data structure and a preset threshold; executing the target operation, obtaining metadata of the flow control annotation corresponding to the section class when the change of the service demand is responded, and updating the metadata based on the changed service demand; the section class is updated based on the updated metadata, and then the data structure is updated according to the updated section class; and updating the target operation according to the updated data structure, and executing the updated target operation to obtain flow control result data. And the flow control response speed and the flow control flexibility when the service demand changes are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a flow control method, device, electronic device and computer-readable medium. Background Art

[0002] At present, electronic bill payment systems are widely used in the financial industry. As the transaction volume grows, the number of concurrent requests the system bears is also increasing. Existing technologies mainly rely on server clusters, database optimization, caching, asynchronous processing, and network optimization to improve the system's concurrent processing capabilities. However, these methods are still limited in terms of performance improvement in high-concurrency situations, and there are insufficient real-time monitoring methods for flow control, making it difficult to flexibly adjust strategies. Flow control has a slow response speed. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a flow control method, device, electronic device and computer-readable medium, which can solve the problems of insufficient real-time monitoring means for existing flow control, difficulty in flexible adjustment of strategies, and slow flow control response speed.

[0004] To achieve the above object, according to one aspect of an embodiment of the present application, a flow control method is provided, including:

[0005] Receive transaction requests and call the aspect class to update the data structure based on the transaction request;

[0006] Determine the target operation based on the data structure and preset thresholds;

[0007] Execute the target operation, and in response to changes in business requirements, obtain the metadata of the flow control annotation corresponding to the aspect class, and update the metadata based on the changed business requirements;

[0008] Update the aspect class based on the updated metadata, and then update the data structure based on the updated aspect class;

[0009] The target operation is updated according to the updated data structure, and the updated target operation is executed to obtain flow control result data.

[0010] Optionally, the data structure includes a queue and a counter, and updating the data structure based on the transaction request includes:

[0011] In response to the aspect class determining that the transaction request identifier has a flow control annotation, the transaction request is added to a queue and the value of a counter is increased by one.

[0012] Optionally, based on the data structure and a preset threshold, determining a target operation includes:

[0013] In response to the value of the counter exceeding a preset threshold, the target operation is determined to be executing the current limiting processing logic.

[0014] Optionally, update metadata based on changing business needs, including:

[0015] Get request rate, concurrency limit and time window data in response to changing business needs;

[0016] Update metadata based on request rate, concurrency limit, and time window data.

[0017] Optionally, update the aspect class based on the updated metadata, including:

[0018] Determine the target annotation corresponding to the updated metadata;

[0019] Associate the target annotation and update the corresponding aspect class.

[0020] Optionally, executing the updated target operation to obtain flow control result data includes:

[0021] In response to an exception in the execution of the updated target operation, generating an exception analysis report;

[0022] Based on the abnormal analysis report, the flow control result data is obtained.

[0023] In addition, the present application also provides a flow control device, comprising:

[0024] A receiving unit, configured to receive a transaction request and call the aspect class to update a data structure based on the transaction request;

[0025] a target operation determination unit, configured to determine a target operation based on the data structure and a preset threshold;

[0026] A first updating unit is configured to execute a target operation and, in response to a change in business requirements, obtain metadata of a flow control annotation corresponding to the aspect class and update the metadata based on the changed business requirements;

[0027] A second updating unit is configured to update the aspect class based on the updated metadata, and then update the data structure according to the updated aspect class;

[0028] The execution unit is configured to update the target operation according to the updated data structure and execute the updated target operation to obtain flow control result data.

[0029] Optionally, the data structure includes a queue and a counter, and the receiving unit is further configured to:

[0030] In response to the aspect class determining that the transaction request identifier has a flow control annotation, the transaction request is added to a queue and the value of a counter is increased by one.

[0031] Optionally, the target operation determination unit is further configured to:

[0032] In response to the value of the counter exceeding a preset threshold, the target operation is determined to be executing the current limiting processing logic.

[0033] Optionally, the first updating unit is further configured to:

[0034] Get request rate, concurrency limit and time window data in response to changing business needs;

[0035] Update metadata based on request rate, concurrency limit, and time window data.

[0036] Optionally, the second updating unit is further configured to:

[0037] Determine the target annotation corresponding to the updated metadata;

[0038] Associate the target annotation and update the corresponding aspect class.

[0039] Optionally, the execution unit is further configured to:

[0040] In response to an exception in the execution of the updated target operation, generating an exception analysis report;

[0041] Based on the abnormal analysis report, the flow control result data is obtained.

[0042] In addition, the present application also provides a flow control electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by one or more processors, the one or more processors implement the flow control method as described above.

[0043] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the flow control method as described above is implemented.

[0044] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.

[0045] A computer program product according to an embodiment of the present application includes a computer program, and when the program is executed by a processor, the flow control method provided by the embodiment of the present application is implemented.

[0046] One embodiment of the above invention has the following advantages or beneficial effects: the present application receives a transaction request and calls the aspect class to update the data structure based on the transaction request; determines the target operation based on the data structure and the preset threshold; executes the target operation, and in response to changes in business requirements, obtains the metadata of the flow control annotation corresponding to the aspect class, updates the metadata based on the changed business requirements; updates the aspect class based on the updated metadata, and then updates the data structure according to the updated aspect class; updates the target operation according to the updated data structure, and executes the updated target operation to obtain the flow control result data. The flow control response speed is improved, and the flexibility of flow control when business requirements change.

[0047] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to better understand the present application and do not constitute an improper limitation on the present application.

[0049] Figure 1 is a schematic diagram of the main process of a flow control method according to an embodiment of the present application;

[0050] Figure 2 is a schematic diagram of the main process of a flow control method according to an embodiment of the present application;

[0051] Figure 3 It is a main flow chart of a flow control method according to an embodiment of the present application;

[0052] Figure 4 is a schematic diagram of the main units of the flow control device according to an embodiment of the present application;

[0053] Figure 5 is an exemplary system architecture diagram to which the embodiments of the present application can be applied;

[0054] Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following is a description of the exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, and they should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of known functions and structures is omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of the present application are in compliance with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of the present application, certain software, components, models, and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or must have used the solution. In the technical solution of the present application, the collection, analysis, use, transmission, storage, and other aspects of the user's personal information involved are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes, and are not shared, leaked, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Take necessary measures to prevent illegal access to such user personal information data, ensure that persons who have access to such personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, the risk should be minimized by limiting or even prohibiting data collection and / or deleting the data.

[0056] When used, including in certain related applications, user privacy is protected by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of data stored, controlling how data is stored, and / or other methods of de-identification.

[0057] Figure 1 is a schematic diagram of the main process of the flow control method according to an embodiment of the present application, such as Figure 1 As shown, the flow control method mainly includes the following steps S101 to S105.

[0058] Step S101, receiving a transaction request, calling the aspect class to update the data structure based on the transaction request.

[0059] In this embodiment, the execution subject of the flow control method (for example, a server) can receive a transaction request through a wired connection or a wireless connection. After receiving the transaction request, the execution subject can call the aspect class to determine whether the transaction request is a request that requires flow control, and then update the data structure according to the determination result. The data structure may include a queue and a counter of requests that need to be queued for processing.

[0060] Step S102: determining a target operation based on the data structure and a preset threshold.

[0061] The execution subject may compare the length of the queue in the data structure or the value of the counter with the corresponding preset threshold, and determine the target operation according to the comparison result. The target operation may be a flow limiting operation, which may include rejecting the request or queuing processing.

[0062] Step S103, executing the target operation, and in response to changes in business requirements, obtaining metadata of the flow control annotation corresponding to the aspect class, and updating the metadata based on the changed business requirements.

[0063] After executing the logic of the target operation, if a change in business demand is detected, the metadata of the flow control annotation corresponding to the aspect class is obtained, and the metadata may include: request rate, concurrency limit, time window, or one or more. The embodiment of the present application does not specifically limit the content of the metadata. The changed business demand is matched with the obtained metadata, and the value of the matched metadata is updated to the corresponding latest value in the matched changed business demand to achieve flexibility and accuracy of flow control.

[0064] Step S104, updating the aspect class based on the updated metadata, and then updating the data structure according to the updated aspect class.

[0065] Specifically, updating the aspect class based on the updated metadata includes: determining a target annotation corresponding to the updated metadata; associating the target annotation and updating the corresponding aspect class.

[0066] The annotation containing the updated metadata is determined as the target annotation, the target annotation is associated with the aspect class, and the aspect class associated with the target annotation is updated, so that the aspect class can more accurately identify whether the subsequent transaction request is a request that requires flow control management, thereby improving the accuracy of flow control. The transaction request carries annotations, and the aspect class determines whether the transaction request is a request that requires flow control management by judging whether the annotation carried in the transaction request is the target annotation.

[0067] Based on the updated aspect class, re-judge whether flow control management is required for the transaction requests received in real time, and update the queues and counters in the data structure based on the judgment results to ensure the accuracy of flow control.

[0068] Step S105, updating the target operation according to the updated data structure, and executing the updated target operation to obtain flow control result data.

[0069] Specifically, executing the updated target operation to obtain the flow control result data includes: generating an abnormality analysis report in response to an abnormality in the execution of the updated target operation; and obtaining the flow control result data based on the abnormality analysis report.

[0070] By setting the warning threshold, when it is detected that the execution time of the updated target operation exceeds the set warning threshold, the warning is immediately triggered and the warning information is generated, which can be an abnormal analysis report. The abnormal nodes and abnormal causes are marked in the abnormal analysis report to obtain the flow control result data, and then the flow control result data, that is, the marked abnormal analysis report, is sent to the relevant person in charge for handling the flow control abnormality.

[0071] This embodiment receives a transaction request and calls the aspect class to update the data structure based on the transaction request; determines the target operation based on the data structure and the preset threshold; executes the target operation, and in response to changes in business requirements, obtains the metadata of the flow control annotation corresponding to the aspect class, updates the metadata based on the changed business requirements; updates the aspect class based on the updated metadata, and then updates the data structure according to the updated aspect class; updates the target operation according to the updated data structure, and executes the updated target operation to obtain the flow control result data. The flow control response speed is improved, and the flexibility of flow control when business requirements change.

[0072] Figure 2 FIG. 1 is a schematic diagram of the main flow chart of a flow control method according to an embodiment of the present application. Figure 2 As shown, the flow control method mainly includes the following steps S201 to S205.

[0073] Step S201, receiving a transaction request, calling the aspect class, in response to the aspect class determining that the transaction request identifier has a flow control annotation, adding the transaction request to a queue and increasing the value of a counter by one.

[0074] Carry annotations in the transaction request. When the execution subject receives the transaction request, it immediately triggers the call of the aspect class to determine whether the annotation carried in the transaction request is an annotation that indicates the need for flow control, that is, whether it is a flow control annotation. When the aspect class determines that the transaction request is marked with a flow control annotation, the transaction request is added to the queue of requests that need to be queued for processing, and the corresponding counter used to characterize the number of requests that need to be queued for processing is increased by one. This enables accurate identification and reasonable processing of requests that require flow control.

[0075] Step S202 , in response to the value of the counter exceeding a preset threshold, determining that the target operation is to execute a current limiting processing logic.

[0076] When the counter value exceeds the preset threshold, indicating that the number of requests that need to be queued for processing has reached the flow control critical point, the target operation is determined to execute the flow control logic, such as rejecting the request or queuing it, to ensure the stability and efficiency of the corresponding transaction system.

[0077] Step S203, execute the target operation, and in response to changes in business requirements, obtain metadata of the flow control annotation corresponding to the aspect class, and update the metadata based on the changed business requirements.

[0078] Flexibly respond to changes in business requirements, and promptly update the metadata of the flow control annotations corresponding to the aspect class according to changes in business requirements to improve the accuracy of flow control through aspect class identification requests.

[0079] Step S204, updating the aspect class based on the updated metadata, and then updating the data structure according to the updated aspect class.

[0080] Based on the updated metadata, the corresponding annotation-associated aspect class is updated, and then the data structure is updated according to the updated aspect class so that the aspect class can recognize the updated annotated metadata, so as to accurately identify the requests that need to be processed by flow control, thereby improving the accuracy of flow control.

[0081] Step S205, updating the target operation according to the updated data structure, and executing the updated target operation to obtain flow control result data.

[0082] The embodiments of the present application improve the response speed of flow control and the flexibility of flow control when business requirements change.

[0083] Figure 3 FIG. 1 is a schematic diagram of the main flow chart of a flow control method according to an embodiment of the present application. Figure 3 As shown, the flow control method mainly includes the following steps S301 to S307.

[0084] Step S301, receiving a transaction request, calling the aspect class to update the data structure based on the transaction request.

[0085] Create an aspect class to implement the flow control logic. The aspect class captures all method calls annotated with @RateLimited. When a transaction request is received, call the aspect class to update the data structure. In the aspect class, use data structures (such as queues and counters) to maintain the rate and concurrency of requests to ensure that requests are limited when they exceed the set threshold, such as rejecting the request or queuing it.

[0086] Step S302: determining a target operation based on the data structure and a preset threshold.

[0087] The preset threshold may include a threshold of the queue length and a count threshold of the counter. When the length of the queue in the data structure is greater than the threshold of the queue length and the value of the counter is greater than the count threshold of the counter, the target operation is determined to be the execution of the current limiting processing logic, thereby ensuring the accuracy of the target operation determination.

[0088] Step S303, execute the target operation, and obtain the metadata of the flow control annotation corresponding to the aspect class in response to the change of business requirements.

[0089] Step S304, obtaining request rate, concurrency limit and time window data in the changing business requirements.

[0090] For example, request rate: the maximum number of requests allowed per second. Concurrency limit: the maximum number of concurrent requests allowed in the same time period. Time window: the time window of the flow control check, used to calculate and control the request rate and concurrency limit. This ensures that the flow control logic can be independent of the business code and dynamically applied to different methods and business scenarios.

[0091] Step S305: Update metadata according to the request rate, concurrency limit and time window data.

[0092] Metadata can include request rate, concurrency limit and time window. Updating metadata means updating the values ​​of request rate, concurrency limit and time window in metadata. The values ​​of request rate, concurrency limit and time window data in the original metadata can be flexibly updated according to the values ​​of request rate, concurrency limit and time window data in changing business needs, so as to improve the response speed of flow control and the flexibility of flow control when business needs change.

[0093] Step S306, updating the aspect class based on the updated metadata, and then updating the data structure according to the updated aspect class.

[0094] The corresponding aspect class is updated by updating the annotation corresponding to the updated metadata, and then the queue and counter in the data structure associated with the aspect class are updated.

[0095] Step S307, updating the target operation according to the updated data structure, and executing the updated target operation to obtain flow control result data.

[0096] The target operation is updated according to the updated data structure and the preset threshold value, and the updated target operation is executed to accurately obtain the flow control result data.

[0097] The embodiment of the present application combines the aspect programming concept and the efficient monitoring mechanism to achieve high-concurrency flow control, and improves the high-concurrency processing capability and system monitoring effect of the electronic bill payment system. For example, the flow control method based on the aspect programming concept of the present application: Flow control annotation design: define the @RateLimited annotation to identify the request that needs flow control, and the annotation contains metadata information, such as the permitted request rate, concurrency limit, etc. Flow control aspect design and implementation: separate the flow control logic and business logic through aspect programming, and create an aspect class to implement the flow control logic. The aspect class will dynamically weave the method marked with @RateLimited to ensure the flexibility and low intrusion of the flow control logic. Aspect weaving: use aspect technology to bind the flow control logic to the specific business request code. When the request reaches the critical point of flow control, the aspect will intercept and process it to ensure the stability and efficiency of the system. Dynamic adjustment and management: Dynamic policy adjustment: support real-time adjustment of flow control parameters by dynamically reading data from the database or configuration center. This flexible policy adjustment mechanism can respond to changes in traffic and business needs in a timely manner to ensure the stable operation of the system. Flow control parameter management: The adjustment and management of flow control parameters are controlled by a central management background or configuration file, which realizes global unified management and adjustment, simplifies operation and maintenance work, and improves management efficiency. System monitoring and early warning mechanism: Unified data collection: Through a custom data collection framework, all kinds of monitoring data in the system are uniformly collected, including the number of requests, response time, error rate, system resource usage, etc. Full-link system processing capacity analysis: Full-link analysis of the collected monitoring data is performed, and by associating the monitoring data of different services and components, the system's processing capacity and performance bottlenecks are fully understood, helping operation and maintenance personnel to locate and solve performance problems in a timely manner. Full-link early warning: Based on the collected monitoring data, a complete early warning mechanism is established. When the performance indicators of a certain link are abnormal, an early warning can be issued in time, and a detailed analysis of the abnormal cause can be provided to help operation and maintenance personnel take quick measures. High-performance flow control algorithm: Flow control algorithm optimization: A variety of efficient flow control algorithms are adopted, including but not limited to the leaky bucket algorithm and the token bucket algorithm. These algorithms can effectively control traffic, reduce system load, and improve the system's response speed and throughput. Asynchronous processing mechanism: Through the asynchronous processing mechanism, the impact of flow control logic on request processing speed is reduced, and the overall system performance is improved. Real-time monitoring dashboard: Visualization of monitoring data: Provides a visual monitoring dashboard to display various system performance indicators in real time and present key data in an intuitive chart form, which is convenient for operation and maintenance personnel to monitor and analyze the system. Customized alarm rules: Supports users to customize alarm rules and set different alarm thresholds according to actual business needs to ensure the flexibility and adaptability of the early warning mechanism. Data processing and analysis: Efficient data processing: Cooperate with the streaming data processing framework to improve the data processing efficiency in high concurrency situations and ensure the real-time and accuracy of collection and analysis.Data analysis report: Generate system performance analysis reports regularly to help operation and maintenance personnel understand the system operation status and identify and solve potential problems.

[0098] Through the above technical solutions, the embodiment of the present application provides a method for improving the processing capacity of the electronic bill payment system and system monitoring under high concurrency. This method not only improves the performance and real-time performance of the system, but also has flexibility and scalability. In addition, the strengthening of the system monitoring and early warning mechanism ensures the stable operation of the system in a high-concurrency environment, provides full-link performance analysis and early warning, and realizes more comprehensive and accurate system monitoring and management.

[0099] The embodiments of the present application combine aspect programming ideas and efficient monitoring mechanisms to improve the high concurrency processing capabilities and system monitoring effects of the electronic bill payment system.

[0100] For example, the flow control method based on aspect programming idea: Flow control annotation design: Define a dedicated flow control annotation @RateLimited in the system to identify requests that need flow control management. The annotation contains metadata information, such as: request rate: the maximum number of requests allowed per second; concurrency limit: the maximum number of concurrent requests allowed in the same time period; time window: the time window of flow control check, used to calculate and control the request rate and concurrency limit. This ensures that the flow control logic can be independent of the business code and dynamically applied to different methods and business scenarios. Flow control aspect design and implementation: Aspect programming technology is used to separate flow control logic from business logic. The specific implementation steps are as follows: Define aspect class: Create an aspect class to implement flow control logic. The aspect class captures all method calls annotated with the @RateLimited annotation. Flow counting and control: In the aspect class, use data structures (such as queues and counters) to maintain the request rate and concurrency to ensure that requests are limited when the set threshold is exceeded, such as rejecting requests or queuing them. Dynamic weaving: During compilation or runtime, the above flow control logic is dynamically woven into the target method through aspect technology to ensure that the flow control capability of the application is synchronized with business needs. Aspect weaving, the process of implementing aspect weaving includes: Obtaining annotation metadata: Obtaining metadata information of the @RateLimited annotation in the aspect class. Executing flow control logic: Inserting flow control check code before and after method execution, and deciding whether to release the request by judging whether the current request reaches the flow limit threshold. Business method execution: After passing the flow control check, continue to execute the original business logic, otherwise execute the flow limit operation (such as returning an error response). Dynamic adjustment and management: Dynamic policy adjustment: In order to adapt to different traffic changes and business needs, the system supports dynamic policy adjustment. Specific methods include: Configuration center management: Use the configuration center to centrally manage flow control parameters. The configuration center stores flow control policy information. The system can pull the latest configuration regularly or in real time and automatically update the flow control parameters. Database storage: Save the flow control policy parameters in the database. Update the flow control parameters in the database through the management background or automated scripts, and the system regularly reads the latest parameters and applies them. Flow control parameter management: Centralized management of flow control parameters is achieved through the central management background. The management background provides a friendly user interface, allowing operation and maintenance personnel to view and adjust flow control strategies in real time, including: Adjusting request rates and concurrency limits: Dynamically adjusting flow control policy parameters according to real-time traffic conditions and business needs. Policy release and effectiveness: After the adjusted flow control policy is released, the system can apply it immediately to ensure that the flow control policy takes effect in the shortest time. System monitoring and early warning mechanism: Unified data collection: The system uses a custom data collection framework to uniformly collect and process monitoring data. Mainly includes: Monitoring data collection: Unified collection of various monitoring data in the system, including the number of requests, response time, error rate, system resource usage, etc.Data transmission: The collected data is transmitted to a centralized storage or processing system through an efficient transmission protocol. Full-link system processing capacity analysis: Advanced data analysis technology is used to conduct full-link analysis of monitoring data: Correlation analysis: The monitoring data of different services and components are correlated for comprehensive analysis to fully understand the processing capacity of the system. Performance bottleneck location: By analyzing the performance indicators of each link of the system, performance bottlenecks can be discovered and located in a timely manner to help operation and maintenance personnel take targeted optimization measures. Full-link early warning: Based on the collected monitoring data, a complete early warning mechanism is established: Anomaly detection: By setting early warning thresholds, an early warning is triggered immediately when an abnormal situation in each link of the system is detected. Early warning notification: Early warning information is sent to relevant persons in charge through various channels (such as email, SMS, and instant messaging tools). Analysis of abnormal causes: A detailed abnormal analysis report is provided in the early warning information to help operation and maintenance personnel quickly understand the problem and take corresponding measures. High-performance flow control algorithm: Flow control algorithm optimization: A combination of multiple efficient flow control algorithms is used to ensure the flow control effect of the system in a high-concurrency environment; Leaky bucket algorithm: Smooth processing of requests, control burst traffic, and prevent sudden traffic surges from impacting the system; Token bucket algorithm: Generate tokens at a predefined rate, check and consume tokens when processing requests, and ensure that the request rate is within the set range. Asynchronous processing mechanism: In order to reduce the impact of flow control logic on request processing, the system adopts an asynchronous processing mechanism: Asynchronous queue: Put the request into the asynchronous queue for flow control inspection and processing to improve processing efficiency. Callback mechanism: After the request processing is completed, the callback mechanism is used to notify the business logic to continue execution to ensure the continuity and consistency of the business process. Real-time monitoring dashboard: Monitoring data visualization: Provide a real-time monitoring dashboard to display various system performance indicators: Dashboard design: Design an intuitive monitoring dashboard to display key performance indicators in real time, such as response time, error rate, system load, etc.; Chart display: Use charts (line charts, bar charts, pie charts, etc.) to display monitoring data to help operation and maintenance personnel quickly understand the system status. Customized alarm rules: Support users to customize alarm rules according to actual needs: Alarm threshold setting: Set different alarm thresholds according to business needs to ensure the flexibility and adaptability of the early warning mechanism. Multi-level alarm: Set different levels of alarm information according to the severity of the abnormality to ensure that problems are discovered and resolved in a timely manner. Data processing and analysis: Efficient data processing: Combined with the streaming data processing framework, improve the data processing efficiency in a high-concurrency environment; Data stream processing: Use the streaming data processing framework for efficient data processing to ensure the real-time and accuracy of monitoring data; Distributed processing: Distribute data processing tasks to multiple nodes to improve processing capabilities and reliability. Data analysis report: The system regularly generates performance analysis reports to help operation and maintenance and management personnel understand the system operation status: Report generation: Generate system performance analysis reports regularly based on monitoring data, describing the system's performance indicators and performance in detail.Problem summary: The report summarizes key issues in system operation and provides solutions to help operation and maintenance and management personnel continuously optimize the system.

[0101] Through the above detailed technical solution, the embodiment of the present application can improve the processing capacity of the electronic bill payment system and the system monitoring effect under high concurrency. This solution not only improves the performance and real-time performance of the system, but also has flexibility and scalability. In addition, the enhanced system monitoring and early warning mechanism ensures the stable operation of the system in a high-concurrency environment, provides full-link performance analysis and complete early warning, and realizes more comprehensive and accurate system monitoring and management. Achieve scalable and easy-to-maintain flow control based on aspects.

[0102] By combining aspect programming ideas and efficient monitoring mechanisms, the high-concurrency processing capability and system monitoring effect of the electronic bill payment system can be comprehensively improved. High-concurrency processing capability improvement: Through the dynamic flow control method based on aspect programming, efficient traffic management and control are achieved, effectively improving the system's processing capability under high concurrency. The implementation of flow control annotations and flow control aspects enables the system to maintain stable and efficient operation under high-concurrency requests, avoiding system overload and performance degradation caused by sudden traffic increases. Dynamic strategy adjustment: Flow control parameters can be adjusted dynamically to flexibly adapt to different business needs and traffic changes. Real-time adjustment of flow control strategies can ensure that the system can run at the best performance at any time, enhancing the flexibility and adaptability of the system. Unified data collection and full-link analysis: A unified data collection framework is used to centrally collect various types of monitoring data in the system and conduct full-link system processing capability analysis. Comprehensive monitoring data collection and analysis improves the observability and manageability of the system, helping operation and maintenance personnel to quickly locate and solve performance bottlenecks and achieve data-driven system optimization. Full-link warning mechanism: A complete warning mechanism from data collection to warning notification has been established, so that the system can detect and respond to abnormal situations in a timely manner. The warning mechanism can issue an alarm in time when the system performance is abnormal, and provide detailed abnormal cause analysis, which greatly improves the efficiency and accuracy of problem handling and ensures the continuous and stable operation of the system. High-performance flow control algorithm: The optimized flow control algorithm (such as leaky bucket algorithm, token bucket algorithm) and asynchronous processing mechanism are adopted to further improve the processing capacity of the system. The efficient flow control algorithm ensures the stability and response speed of the system in a high-concurrency environment, while the asynchronous processing mechanism reduces the impact of flow control on request processing and improves the overall system performance. Real-time monitoring dashboard: Provides an intuitive monitoring dashboard to display various performance indicators of the system in real time. Operation and maintenance personnel can use the dashboard to monitor the system operation status in real time, quickly identify and respond to potential problems, and improve the maintainability and management efficiency of the system. Customized alarm rules and multi-level alarms: Users can customize alarm rules according to their own needs and set alarm information of different levels. Flexible alarm rule settings enable the warning mechanism to accurately adapt to different business scenarios and needs, ensuring that important problems are discovered and handled in a timely manner. Efficient data processing and analysis: Combined with the streaming data processing framework, efficient data processing and analysis are performed. The streaming processing framework ensures the real-time and accuracy of data processing. The generated performance analysis report provides a reliable basis for system optimization, helping operation and maintenance personnel to continuously improve system performance and stability.

[0103] The embodiments of the present application provide a comprehensive and effective solution for improving the high-concurrency processing capability and system monitoring of the electronic bill payment system. Through efficient flow control methods, flexible policy adjustment, comprehensive monitoring and early warning mechanisms, and efficient data processing and analysis, the performance and stability of the system are significantly improved, ensuring the efficient, safe and reliable operation of the electronic bill payment system in a high-concurrency environment. By combining the high-concurrency flow control method with aspect programming ideas, more efficient system control and monitoring can be achieved.

[0104] Figure 4 Schematic diagram of the main units of the flow control device according to an embodiment of the present application. Figure 4 As shown, the flow control device 400 includes a receiving unit 401 , a target operation determining unit 402 , a first updating unit 403 , a second updating unit 404 and an executing unit 405 .

[0105] The receiving unit 401 is configured to receive a transaction request and call the aspect class to update the data structure based on the transaction request.

[0106] The target operation determination unit 402 is configured to determine the target operation based on the data structure and a preset threshold.

[0107] The first updating unit 403 is configured to execute the target operation, and in response to changes in business requirements, obtain metadata of the flow control annotation corresponding to the aspect class, and update the metadata based on the changed business requirements.

[0108] The second updating unit 404 is configured to update the aspect class based on the updated metadata, and then update the data structure according to the updated aspect class.

[0109] The execution unit 405 is configured to update the target operation according to the updated data structure, and execute the updated target operation to obtain flow control result data.

[0110] In some embodiments, the data structure includes a queue and a counter, and the receiving unit 401 is further configured to: in response to the aspect class determining that the transaction request identifier has a flow control annotation, add the transaction request to the queue and increase the value of the counter by one.

[0111] In some embodiments, the target operation determination unit 402 is further configured to: in response to the value of the counter exceeding a preset threshold, determine that the target operation is to execute the current limiting processing logic.

[0112] In some embodiments, the first updating unit 403 is further configured to: obtain request rate, concurrency limit and time window data in the changing business demand; and update metadata according to the request rate, concurrency limit and time window data.

[0113] In some embodiments, the second updating unit 404 is further configured to: determine a target annotation corresponding to the updated metadata; associate the target annotation and update the corresponding aspect class.

[0114] In some embodiments, the execution unit 405 is further configured to: generate an exception analysis report in response to an exception in the execution of the updated target operation; and obtain flow control result data based on the exception analysis report.

[0115] It should be noted that the flow control method and flow control device of the present application have a corresponding relationship in terms of specific implementation contents, so the repeated contents will not be described again.

[0116] Figure 5 An exemplary system architecture 500 is shown to which the flow control method or flow control device according to the embodiment of the present application can be applied.

[0117] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0118] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0119] The terminal devices 501, 502, 503 may be various electronic devices having a flow control processing screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0120] Server 505 can be a server that provides various services, such as a background management server that provides support for transaction requests submitted by users using terminal devices 501, 502, and 503 (only as an example). The background management server can receive transaction requests, call the aspect class to update the data structure based on the transaction request; determine the target operation based on the data structure and the preset threshold; execute the target operation, and in response to changes in business requirements, obtain the metadata of the flow control annotation corresponding to the aspect class, and update the metadata based on the changed business requirements; update the aspect class based on the updated metadata, and then update the data structure according to the updated aspect class; update the target operation according to the updated data structure, and execute the updated target operation to obtain the flow control result data. Improve the flow control response speed and the flexibility of flow control when business requirements change.

[0121] It should be noted that the flow control method provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the flow control device is generally set in the server 505.

[0122] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0123] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0124] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0125] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0126] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present application are executed.

[0127] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. Computer-readable storage media may include, for example, but are not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes a receiving unit, a target operation determination unit, a first update unit, a second update unit, and an execution unit. The names of these units do not constitute limitations on the units themselves in some cases.

[0130] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device receives a transaction request, calls the aspect class, and updates the data structure based on the transaction request; determines the target operation based on the data structure and the preset threshold; executes the target operation, and in response to changes in business requirements, obtains the metadata of the flow control annotation corresponding to the aspect class, and updates the metadata based on the changed business requirements; updates the aspect class based on the updated metadata, and then updates the data structure according to the updated aspect class; updates the target operation according to the updated data structure, and executes the updated target operation to obtain the flow control result data.

[0131] The computer program product of the present application includes a computer program, and when the computer program is executed by a processor, the flow control method in the embodiment of the present application is implemented.

[0132] According to the technical solution of the embodiment of the present application, the flow control response speed and the flexibility of flow control when business needs change can be improved.

[0133] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A flow control method, characterized in that: include: Receive a transaction request and call the aspect class to update the data structure based on the transaction request; Determining a target operation based on the data structure and a preset threshold; Execute the target operation, and in response to changes in business requirements, obtain metadata of the flow control annotation corresponding to the aspect class, and update the metadata based on the changed business requirements; Update the aspect class based on the updated metadata, and then update the data structure according to the updated aspect class; The target operation is updated according to the updated data structure, and the updated target operation is executed to obtain flow control result data.

2. The method according to claim 1, characterized in that The data structure includes a queue and a counter, and the updating of the data structure based on the transaction request includes: In response to the aspect class determining that the transaction request identifier has a flow control annotation, the transaction request is added to the queue and the value of the counter is increased by one.

3. The method according to claim 2, characterized in that The determining the target operation based on the data structure and the preset threshold comprises: In response to the value of the counter exceeding a preset threshold, determining the target operation as executing a current limiting processing logic.

4. The method according to claim 1, characterized in that: The updating of the metadata based on the changed business requirements includes: Get request rate, concurrency limit and time window data in response to changing business needs; The metadata is updated according to the request rate, the concurrency limit, and the time window data.

5. The method according to claim 1, characterized in that The updating of the aspect class based on the updated metadata includes: Determine the target annotation corresponding to the updated metadata; Associate the target annotation and update the corresponding aspect class.

6. The method according to claim 1, characterized in that The executing the updated target operation to obtain flow control result data includes: In response to an exception in the execution of the updated target operation, generating an exception analysis report; Based on the abnormal analysis report, flow control result data is obtained.

7. A flow control device, characterized in that: include: A receiving unit, configured to receive a transaction request and call the aspect class to update a data structure based on the transaction request; a target operation determining unit, configured to determine a target operation based on the data structure and a preset threshold; A first updating unit is configured to execute the target operation and, in response to a change in business requirements, obtain metadata of the flow control annotation corresponding to the aspect class and update the metadata based on the changed business requirements; A second updating unit is configured to update the aspect class based on the updated metadata, and then update the data structure according to the updated aspect class; The execution unit is configured to update the target operation according to the updated data structure, and execute the updated target operation to obtain flow control result data.

8. The device according to claim 7, characterized in that The data structure includes a queue and a counter, and the receiving unit is further configured to: In response to the aspect class determining that the transaction request identifier has a flow control annotation, the transaction request is added to the queue and the value of the counter is increased by one.

9. The device according to claim 8, characterized in that The target operation determination unit is further configured to: In response to the value of the counter exceeding a preset threshold, determining the target operation as executing a current limiting processing logic.

10. The device according to claim 7, characterized in that The first updating unit is further configured to: Get request rate, concurrency limit and time window data in response to changing business needs; The metadata is updated according to the request rate, the concurrency limit, and the time window data.

11. The device according to claim 7, characterized in that The second updating unit is further configured to: Determine the target annotation corresponding to the updated metadata; Associate the target annotation and update the corresponding aspect class.

12. The device according to claim 7, characterized in that The execution unit is further configured to: In response to an exception in the execution of the updated target operation, generating an exception analysis report; Based on the abnormal analysis report, flow control result data is obtained.

13. A flow control electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.