Flow control method and device, storage medium and computer program product

By extracting and combining business fields, multiple target flow control items are identified and incremental traffic monitoring is performed, which solves the problem of poor accuracy in existing flow control, realizes fine-grained and precise flow management, and improves system stability and user experience.

CN121125633APending Publication Date: 2025-12-12CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511392462.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Existing traffic control mechanisms suffer from poor accuracy when faced with rapidly changing business environments and diverse service requests, leading to a lack of precision in traffic control and impacting business accuracy due to extensive management practices.

Method used

By acquiring real-time business information, extracting multiple business fields, and combining these fields under multi-dimensional flow control types to determine target flow control items, fine-grained traffic control is performed based on the flow control table, including keyword matching and incremental traffic monitoring, thus implementing fine-grained traffic management.

Benefits of technology

It enables more refined traffic management across multiple dimensions, improving the accuracy of traffic control and system stability, and avoiding accidental damage and service interruptions caused by a one-size-fits-all traffic control solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125633A_ABST
    Figure CN121125633A_ABST
Patent Text Reader

Abstract

The invention discloses a traffic control method and device, a storage medium and a computer program product, and the traffic control method comprises the steps: obtaining a service request carrying real-time service information, and extracting a plurality of service fields of a service from the real-time service information; and determining the service type of the service request, combining the service contents of the plurality of service fields under the condition that the service type belongs to a multi-dimensional flow control type, and determining a plurality of target flow control items matched with the real-time service request based on the service combined contents. Determining respective flow increment of the plurality of target flow control items; and under the condition that the traffic increment of any target traffic control item meets the preset traffic control condition, performing traffic control on the target traffic control item, so that a plurality of target traffic control items are determined through the service combination content of the service field, that is, traffic control is performed according to a plurality of traffic control dimensions, thereby realizing fine-grained traffic control management and improving the traffic control efficiency. And the accuracy of flow control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a traffic control method and device, storage medium and computer program product. BACKGROUND

[0002] In the process of traffic control of services, most flow control mechanisms are based on static configuration, and the flow control parameters of transaction interfaces are set in advance through configuration files. Once the flow control condition is triggered, uniform traffic limitation will be implemented on all requests meeting the definition of the transaction interface. Although this single flow control method can alleviate the pressure in peak periods to a certain extent, it is not effective in dealing with rapidly changing business environment and diversified service requests.

[0003] Specifically, when an overload risk is detected, the existing flow control scheme tends to limit the entire transaction interface or service type, and the flow control effect is too extensive, especially in an environment with frequent transactions and a large number of users. This extensive management method seriously affects the accuracy of traffic control. SUMMARY

[0004] Embodiments of the present application provide a traffic control method and device, storage medium and computer program product to at least solve the problem of extensive flow control and poor traffic control accuracy in related technologies.

[0005] According to an embodiment of the present application, a traffic control method is provided, including: obtaining a service request carrying real-time service information, and extracting a plurality of service fields of a service from the real-time service information. Determining a service type of the service request, and in the case that the service type belongs to a multi-dimensional flow control type, combining service contents of the plurality of service fields, determining a plurality of target flow control items matched with the real-time service request based on the service combination contents. Wherein, the target flow control item is used to indicate the dimension of traffic control of the service traffic. Determining the traffic increment of each of the plurality of target flow control items. In the case that the traffic increment of any of the target flow control items meets a preset traffic control condition, performing traffic control on the target flow control item.

[0006] In an exemplary embodiment, the determining a plurality of target flow control items matched with the real-time service request based on the service combination contents includes: obtaining a flow control table corresponding to the service type of the service request. Wherein, the flow control table at least includes a plurality of flow control items and flow control contents of each of the plurality of flow control items. Based on the flow control contents of each of the plurality of flow control items in the flow control table and the service combination contents, a plurality of target flow control items corresponding to the real-time service request are determined.

[0007] In an example embodiment, the determining the multiple target flow control items corresponding to the real-time service request based on the flow control content of each of the multiple flow control items in the flow control table and the service combination content comprises: performing keyword matching between the service combination content and the flow control content of each of the multiple flow control items in the flow control table to obtain a first matching result; and determining, based on the first matching result, the flow control items corresponding to the flow control content matching the service combination content as the multiple target flow control items matching the real-time service request.

[0008] In an example embodiment, the method further comprises: in a case where the service type belongs to a single-dimension flow control type, determining the target flow control item matching the real-time service request directly based on the service content corresponding to each of the multiple service fields.

[0009] In an example embodiment, the determining the target flow control item matching the real-time service request directly based on the service content corresponding to each of the multiple service fields comprises: performing keyword matching between the service content of each of the multiple service fields and the flow control content of the multiple flow control items in a flow control table to obtain a second matching result, wherein the flow control table is determined based on the service type of the service request, and the flow control table at least comprises the multiple flow control items and the flow control content of each of the multiple flow control items; and determining, based on the second matching result, the flow control item of any of the flow control content matching the service content as the target flow control item corresponding to the real-time service request.

[0010] In an example embodiment, the determining the traffic increment of each of the multiple target flow control items comprises: determining, for any of the target flow control items, a first traffic of the target flow control item at a current time and a second traffic of the target flow control item at a time prior to the current time; and determining the traffic increment of the target flow control item based on a sum of the first traffic and the second traffic.

[0011] In an example embodiment, the performing flow control on the target flow control item in a case where the traffic increment of any of the target flow control items meets a preset flow control condition comprises: obtaining a predefined flow control table, wherein the flow control table is determined based on the service type of the service; and the flow control table further comprises flow control values corresponding to the multiple flow control items respectively; comparing the flow control value of the flow control item matching the target flow control item in the flow control table with the traffic increment of the target flow control item to obtain a comparison result; and in a case where the comparison result is that the traffic increment of the target flow control item is greater than the flow control value of the flow control item matching the target flow control item, stopping receiving the service request related to the target flow control item.

[0012] According to another embodiment of the present application, a traffic control device is also provided, comprising: an acquisition module configured to acquire a service request carrying real-time service information, and extract a plurality of service fields of the service from the real-time service information; a first determination module configured to determine a service type of the service request, and combine service contents of the plurality of service fields in a case where the service type belongs to a multi-dimensional flow control type, and determine a plurality of target flow control items matched with the real-time service request based on the combined service contents, wherein the target flow control items are used to indicate dimensions of traffic control on service traffic of the service; a second determination module configured to determine traffic increments of the plurality of target flow control items respectively; and a control module configured to perform traffic control on any target flow control item in a case where the traffic increment of the target flow control item meets a preset traffic control condition.

[0013] According to still another aspect of the present application, a computer readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the traffic control method when running.

[0014] According to still another aspect of the present application, an electronic device is also provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the traffic control method by using the computer program.

[0015] According to still another aspect of the present application, a computer program product is also provided, which comprises a computer program, and the computer program is executable by a processor to implement the steps in any of the traffic control method embodiments.

[0016] In the embodiments of the present application, the traffic control is not limited to a single dimension, but is more fine-grained traffic management from multiple dimensions, by acquiring a service request carrying real-time service information, extracting a plurality of service fields of the service from the real-time service information, determining a service type of the service request, combining service contents of the plurality of service fields in a case where the service type belongs to a multi-dimensional flow control type, and determining a plurality of target flow control items matched with the real-time service request based on the combined service contents. Further, the traffic increments of the target flow control items are determined, and traffic control is performed on any target flow control item in a case where the traffic increment of the target flow control item meets a preset traffic control condition, that is, a plurality of target flow control items are determined by using the combined service contents of the plurality of service fields, and traffic control is performed according to multiple flow control dimensions, thereby realizing fine-grained flow control management and improving the accuracy of traffic control. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0018] Figure 1 is a hardware structure block diagram of a computer device of a flow control method according to an embodiment of the application;

[0019] Figure 2 is a flow chart of a flow control method according to an embodiment of the application;

[0020] Figure 3 is a flow chart of a flow control method according to an embodiment of the application;

[0021] Figure 4 is an architecture diagram of a flow control method according to an embodiment of the application;

[0022] Figure 5 is a structure block diagram of a flow control device according to an embodiment of the application. DETAILED DESCRIPTION

[0023] In order to enable persons skilled in the art to better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence, and it should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" 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 does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product or device; "a plurality of" means two or more.

[0025] The method embodiments provided by the embodiments of the present application can be executed in a computer device or similar computing device or cloud platform or independent physical server or software platform, wherein the software platform is run by one or more servers. Taking the case of running on a computer device,Figure 1 is a hardware structure block diagram of a flow control method according to an embodiment of the present application. As shown in Figure 1 , the computer device can include one or more (only one is shown in Figure 1 ) processors 102 and a memory 104 for storing data, and in an example embodiment, the computer device can further include a transmission device 106 for communication function and an input / output device 108, wherein the processor 102 can include, but not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. Those skilled in the art can understand that the structure shown in Figure 1 is only schematic, and does not limit the structure of the computer device. For example, the computer device can include more or less components than those shown in Figure 1 , or have different configurations of the components shown in Figure 1 , or have more functions than those shown in Figure 1 .

[0026] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as computer programs corresponding to the method in the embodiments of the present application. The processor 102 can execute various functional applications and data processing by running the computer programs stored in the memory 104, that is, implement the above-mentioned method. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0027] The transmission device 106 is used to receive or send data via a network. The specific examples of the above-mentioned network can include a wireless network provided by a communication provider of the computer device. In an example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In an example, the transmission device 106 can be a radio frequency (Radio Frequency, RF) module which is used to communicate with the Internet in a wireless manner.

[0028] In the present embodiment, a flow control method is provided, which is applied to the above-mentioned computer device, and the computer device can be a server device. Figure 2 is a flow chart of a flow control method according to an embodiment of the present application, which includes the following steps S202-S208:

[0029] In step S202, a service request carrying real-time service information is obtained, and a plurality of service fields of the service are extracted from the real-time service information.

[0030] The real-time service information refers to information generated in real time when the service request occurs, reflecting the current service operation state and details. For a certain transaction scenario, such as in a payment system, the real-time service information can include user ID (Identification, identification code), transaction time, transaction limit, transaction type (transaction code), payment channel (third-party ID), project number, and other key fields, which collectively depict the overall picture of a specific transaction.

[0031] The service request is an instruction initiated by a user based on a terminal device, requiring a specific service operation to be performed. In a transaction scenario, a service request can be a payment instruction, a refund request, a bill query, etc. These requests contain real-time service information and are the basis for flow control mechanism judgment and control.

[0032] The service field is a specific data item in the real-time service information, which is the key to business processing and flow control decision-making. For example, in a payment transaction, the "user ID" field is used to identify a specific payment user; the "transaction code" field indicates the type of transaction, such as electricity payment, water payment, etc.; and the "third-party ID" field indicates the payment channel through which the transaction is conducted.

[0033] In some embodiments, a user submits a payment request to a server device through a terminal device or a website. The payment request carries real-time service information, including but not limited to user ID, transaction code (such as a code identifying electricity payment), third-party ID (user-selected payment channel), project number (specific payment project), transaction timestamp, etc. The server device receives the service request, first parses the service request, and extracts the real-time service information therein. The parsing process can be completed through a pre-set parsing rule or regular expression to map the data items in the service request to internal data structures or fields. For example, a regular expression or JSON parser is used to extract "user ID" and "transaction code" from the real-time service information. By extracting a plurality of service fields from the service request, specific data basis is provided for subsequent flow control decision-making and traffic increment calculation, thereby ensuring the effectiveness and accuracy of the flow control mechanism.

[0034] In step S204, the service type of the service request is determined, and in the case where the service type belongs to a multi-dimensional flow control type, the service content of the plurality of service fields is combined, and based on the service combination content, a plurality of target flow control items matching the real-time service request are determined; wherein the target flow control item is used to indicate the dimension of traffic control for the service traffic.

[0035] Among them, the target flow control item refers to a specific dimension or rule set for controlling and managing business traffic based on multiple business fields in real-time business requests. In the transaction scenario, the target flow control item can be a flow control policy for specific user ID, transaction type (transaction code), third-party payment channel, project number, etc. Each target flow control item has its explicit control conditions, such as maximum concurrent request volume, request frequency limit per unit time, etc., to guide the system on how to effectively control specific business traffic.

[0036] Business type refers to different categories based on business characteristics and business functions. The flow control table is a data structure for storing flow control policies and rules, usually presented in table form, to define how to control business traffic under different business types.

[0037] The dimension of traffic control, i.e., control dimension, is the standard used to define the control range and rules in the flow control policy. It can be understood that multi-dimensional flow control type refers to traffic control based on the combination of multiple fields (such as user ID + transaction code, or user ID + third-party ID + transaction code), rather than a single business field (such as user ID or transaction code), to achieve more refined traffic management. Different control dimensions correspond to different business scenarios and needs, for example: user ID dimension: used to control the transaction frequency of a single user within a certain time period, to prevent malicious or abnormal user activities from causing overload to the system. Transaction code dimension: flow control for different types of transactions, such as electricity payment, water payment, etc., to ensure the stability of high-priority transactions. Third-party payment channel dimension: control the traffic of specific payment channels to cope with the system pressure or maintenance needs of the channel party. Project number dimension: traffic control for specific payment projects, such as electricity payment for a large customer, to ensure the continuity of key project transactions and service quality.

[0038] In some embodiments, multiple business fields such as user ID, transaction code (electricity payment), third-party ID (Alipay), and project number are extracted from real-time business information. Based on the combination of business content of these business fields, multiple target flow control items corresponding to business requests can be determined for refined traffic control. Specifically, a corresponding target flow control item can be set based on each business field; for example, a corresponding target flow control item is set based on the third-party ID, and a corresponding target flow control item is set based on the project number; of course, the directory flow control item can also be set based on the combination of multiple business fields, such as setting a corresponding target flow control item based on a specific user ID and transaction type (transaction code); setting a corresponding target flow control item based on a third-party payment channel and a project number.

[0039] In one specific application, in the case of setting corresponding target flow control items based on a specific user ID and transaction type (transaction code), if the target flow control item corresponding to the user ID and transaction code indicates that the current request volume is too high, flow control measures will be taken for requests that include the user ID and transaction code.

[0040] Step S206, determine the traffic increment of each target flow control item.

[0041] The traffic increment refers to the change in the number of business requests or the amount of data transmission for a specific target flow control item within a certain period of time. It can be the increase in the number of requests or the growth in the number of data transmission bytes, and is an important indicator of the dynamic change of business traffic. The determination of traffic increment is the core of the flow control mechanism, which is used to monitor and evaluate system load in real time, to ensure that measures can be taken in time to avoid overload during peak business periods or abnormal conditions.

[0042] In some embodiments, for each target flow control item, a traffic counter is initialized to count the number of business requests for each target flow control item in the past period of time. This time window can be 10S, 5 minutes or any suitable period for business needs. The server device continuously receives and processes business requests, and each time a business request is received, the business fields in the request are parsed and the traffic counter of the relevant target flow control item is updated.

[0043] At the end of each preset time window, the change in the number of business requests for each target flow control item since the end of the previous window, i.e. the traffic increment, is calculated. For example, for a target flow control item based on a specific user ID, the number of requests at the end of the current window is compared with the number of requests at the end of the previous window to obtain the traffic increment.

[0044] Step S208, if the traffic increment of any target flow control item meets the preset traffic control condition, perform traffic control on the target flow control item.

[0045] The preset traffic control condition refers to the traffic threshold or traffic limiting rules set for each target flow control item in order to maintain system stability and response performance. The traffic control condition can be based on historical data analysis and business needs to determine when the flow control mechanism should be started to limit or control the business traffic in a specific dimension. The preset traffic control condition can include but is not limited to the maximum number of requests allowed per unit time, the upper limit of concurrent requests, the abnormal traffic detection threshold, etc.

[0046] Traffic control refers to a series of technical measures taken by the system when it detects that the traffic increment of a certain target flow control item reaches or exceeds the preset traffic control condition, in order to limit or optimize the traffic in this dimension. The purpose of flow control is to prevent system overload, ensure the normal operation of critical business, improve user experience and response speed. Traffic control measures may include but are not limited to traffic limiting (such as rejecting part of the request), downgrading service (providing a simplified version of the service), introducing a waiting queue, adjusting request priority, etc.

[0047] The above steps S202-S208, by obtaining a service request carrying real-time service information, and extracting a plurality of service fields of the service from the real-time service information, then determining the service type of identifying the service request, and in the case of the service type belonging to multi-dimensional flow control, combining the service contents of the plurality of service fields. Further, based on the service combination content, a plurality of target flow control items matching the real-time service request are determined, which makes the traffic control not only limited to a single dimension, but also more fine-grained traffic management from multiple dimensions. Further determine the traffic increment of the target flow control item, in the case that the traffic increment of any target flow control item meets the preset traffic control condition, the target flow control item is subjected to traffic control, that is, a plurality of target flow control items are determined through the service combination content of a plurality of service fields, that is, traffic control is carried out according to a plurality of flow control dimensions, realizing fine-grained flow control management and improving the accuracy of traffic control.

[0048] In one exemplary embodiment, based on the service combination content, a plurality of target flow control items matching the real-time service request are determined, including: obtaining a flow control table corresponding to the service type of the service request. Wherein, the flow control table at least includes: a plurality of flow control items, and the flow control content of each of the plurality of flow control items. Based on the flow control content of each of the plurality of flow control items in the flow control table and the service combination content, a plurality of target flow control items corresponding to the real-time service request are determined.

[0049] It should be noted that each row in the flow control table represents a flow control item, which contains the unique identifier of the flow control item, the flow control content, the service object (such as user ID, transaction code, third party, etc.), the flow control strategy (such as traffic limiting algorithm, threshold, etc.), the flow control action (such as rejecting the request, queuing, etc.) and other key information. It is an important tool for precise traffic control, enabling the system to quickly locate and apply the correct flow control rules among a large number of service requests.

[0050] The flow control item is the basic unit in the flow control table, which defines a set of traffic control policies for specific business objects and business scenarios. Each flow control item contains specific business information (such as user ID, transaction type, project number, etc.) and matching flow control parameters (such as the maximum number of requests per unit time, the average value of request frequency, etc.). The setting of flow control items should take into account the characteristics of the business and the carrying capacity of the system to achieve efficient and fair traffic management.

[0051] The flow control content refers to the specific business information contained in the flow control items defined in the flow control table. The business content refers to the business field information carried in the real-time business request, such as user ID, transaction code, third-party payment channel, etc., which together describe the characteristics of the business request.

[0052] Specifically, when receiving a real-time business request, the business fields in the request need to be parsed to identify the business type. According to the identified business type, the preset flow control table is searched. Each business type may correspond to an independent flow control table, which lists in detail the flow control items related to this type. For example, for the electricity payment business type, the flow control table may have flow control items for the "electricity payment" transaction code, and also have flow control items for specific third-party payment channels. In the flow control table, each flow control item is associated with a specific set of business fields (such as user ID, third-party ID, etc.) and corresponding flow control parameters (such as maximum concurrency, number of requests per unit time, etc.). By analyzing these flow control items one by one, it is determined whether the real-time business request contains matching business fields.

[0053] In the above embodiment, the target flow control item matching the real-time business request can be accurately located based on the business combination content of multiple business fields, and then the targeted traffic control policy is implemented to ensure that when processing a specific business type, both stability and effective response to sudden high traffic challenges can be ensured. This precise flow control mechanism not only improves the pressure resistance, but also optimizes the user experience, avoiding the misjudgment and service interruption caused by the one-size-fits-all flow control scheme.

[0054] In one example embodiment, based on the flow control content of each flow control item in the flow control table and the business combination content, a plurality of target flow control items corresponding to the real-time business request are determined, including: performing keyword matching between the business combination content and the flow control content of each flow control item in the flow control table to obtain a first matching result. Based on the first matching result, the flow control items corresponding to the flow control content matching the business combination content are determined as the plurality of target flow control items matching the real-time business request.

[0055] The keyword matching refers to a process in text analysis, in which specific words or phrases in the text to be analyzed are compared with pre-set keywords to identify key information contained in the text. In the flow control mechanism, keyword matching is used to compare the business combination content (such as user ID, transaction type, third-party channel, etc.) with the flow control content in the flow control table, so as to determine the flow control rule that the request should follow.

[0056] It can be understood that the first matching result is derived from the combination of the business content of at least two business fields and the keyword matching with the flow control content involving multiple fields in the flow control table. This is usually used in more detailed flow control scenarios, such as considering both user ID and transaction type to determine the flow control rule for a specific user when performing a certain type of transaction.

[0057] The business combination content refers to the composite information formed by combining the business content of at least two business fields in real-time business requests. It provides a more comprehensive business perspective, enabling the flow control mechanism to cover more complex business scenarios. For example, combining user ID and transaction code can be used to identify and control the behavior pattern of a certain user when performing a specific transaction.

[0058] It should be noted that the business combination field is a new field formed by combining the business content of at least two business fields in real-time business requests. Such combination is usually to identify more specific and detailed business scenarios, so as to achieve more accurate traffic control. For example, combining user ID and transaction type can form a business combination field to identify the traffic characteristics of a certain specific user performing a certain specific transaction.

[0059] Specifically, the content of at least two business fields can be combined (e.g., user ID + transaction code), and then keyword matching is performed again with the flow control content in the flow control table to find the flow control content that matches the combined information. For example, user ID "U123456" is combined with transaction code "electricity payment" to find the composite flow control item. According to the first matching result, analyze which flow control items are applicable to the current real-time business request. If the business combination content completely matches any flow control item in the flow control table, the business combination content will become the target flow control item for this request, and its flow control rule will be applied to the request processing flow.

[0060] In the above embodiments, the keyword matching method based on business combination content and flow control content can achieve multi-dimensional and multi-level accurate traffic control, effectively cope with business demands in high-concurrency scenarios, avoid resource waste and excessive competition, and improve overall processing capacity and user satisfaction.

[0061] In an example embodiment, the traffic control method further comprises: in the case that the service type belongs to the single-dimension flow control type, determining the target flow control item matching the real-time service request based on the service content corresponding to each of the plurality of service fields.

[0062] In an example embodiment, determining the target flow control item matching the real-time service request based on the service content corresponding to each of the plurality of service fields comprises: performing keyword matching between the service content of each of the plurality of service fields and the flow control content of each of the plurality of flow control items in the flow control table to obtain a second matching result; wherein the flow control table is determined based on the service type of the service request; the flow control table at least includes the plurality of flow control items and the flow control content of each of the plurality of flow control items; and determining the flow control item with any flow control content matching the service content as the target flow control item corresponding to the real-time service request based on the second matching result.

[0063] It can be understood that the result obtained by performing keyword matching between the service content of a single service field and the flow control content in the flow control table is the second matching result. For example, the user ID is matched with the user ID flow control item in the flow control table to check whether there is a specific flow control strategy for the user.

[0064] Specifically, according to the first matching result, i.e., the matching result of a single service field, it is determined which flow control items are applicable to the current real-time service request. By checking all flow control items in the flow control table, it is found out which flow control items directly match the service content in the real-time service request.

[0065] In an example embodiment, in some cases, the flow control items in the first matching result may overlap or conflict with the composite flow control items in the second matching result. The first matching result and the second matching result can be integrated, and according to the service priority or strategy, it is determined which flow control rules are finally applied.

[0066] In a specific application, in the integrated analysis, it is found that the flow control items F1 and F2 respectively perform independent flow control on the user ID and the transaction code, and the flow control item F3 provides a more accurate composite flow control strategy. The server device can decide to preferentially apply F3 in the current scenario because it provides more specific control strategies, while retaining F1 and F2 as alternatives or supplements to deal with possible abnormal situations.

[0067] In the above embodiments, multi-level and multi-dimensional accurate flow control of real-time service requests can be achieved, ensuring stable operation in a high-concurrency scenario, while providing efficient and personalized service experience to meet the specific needs of different business scenarios.

[0068] In one example embodiment, determining the traffic increment of each target flow control item includes: for any target flow control item, determining a first traffic of the target flow control item at a current time, and a second traffic of the target flow control item at a previous time of the current time. Based on the sum of the first traffic and the second traffic, the traffic increment of the target flow control item is determined.

[0069] The first traffic refers to the recorded traffic of the target flow control item at the current time (i.e. the time when the real-time service request is being processed), which is usually represented as the number of service requests or data transmission volume under the flow control item at that time. The second traffic refers to the traffic of the target flow control item in a fixed time interval before the current time, i.e. the traffic data at the previous time. This time interval can be the previous minute, the previous 10 seconds, etc., depending on the setting of the flow control policy.

[0070] The traffic increment is the sum of the first traffic at the current time and the second traffic at the previous time, which reflects the change in traffic of the target flow control item in the recent time window. The calculation of the traffic increment is crucial for real-time monitoring of system load, assessment of service trends, and implementation of traffic control policies.

[0071] Specifically, the calculated traffic increment is compared with the preset traffic control condition to determine whether flow control measures need to be taken for the target flow control item. For example, if the preset condition is that the traffic increment in 10 minutes should not exceed 30 times, then the electricity payment request for user ID "U001" will trigger flow control and may take flow limiting measures. The calculation of the traffic increment can also be used to dynamically adjust the flow control policy. If the traffic increment of a target flow control item continues to grow, the threshold can be automatically adjusted or the flow control method can be changed to cope with changing business demands and system pressure.

[0072] In the above embodiment, the business traffic changes of each target flow control item can be monitored and evaluated in real time, providing accurate data basis for traffic control decisions. This not only helps to improve stability and response speed, but also ensures that measures can be taken in time during peak business periods or abnormal traffic conditions to avoid overload and ensure the normal operation of critical business.

[0073] In one example embodiment, traffic control is performed on a target traffic control item when a traffic increment of the target traffic control item meets a preset traffic control condition, including: obtaining a predefined traffic control table. The traffic control table is determined based on a service type of a service. The traffic control table further includes traffic control values corresponding to a plurality of traffic control items respectively. The traffic control value of the traffic control item in the traffic control table that matches the target traffic control item is compared with the traffic increment of the target traffic control item to obtain a comparison result. In a case where the comparison result is that the traffic increment of the target traffic control item is greater than the traffic control value of the traffic control item that matches the target traffic control item, receiving of service requests related to the target traffic control item is stopped.

[0074] Each record in the traffic control table corresponds to a traffic control item, which specifies the service object, traffic control policy, and traffic control value of the traffic control item in detail. The traffic control value is associated with each traffic control item and is used to quantify the traffic control policy, such as the maximum number of requests per unit time, the average request rate, the upper limit of the number of concurrent connections, etc.

[0075] The traffic control condition is a preset index threshold or rule used to trigger the traffic control mechanism. These conditions are formulated based on historical service data, service type requirements, and other factors, and are used to determine whether the traffic increment of real-time service requests has reached a level that requires traffic control. When the traffic increment exceeds the traffic control condition, the corresponding traffic control measures are initiated to maintain the stability and response time of the system.

[0076] The comparison result is the conclusion obtained after comparing the traffic increment of the target traffic control item with the traffic control value in the predefined traffic control table. This comparison is a key step in determining whether traffic control needs to be implemented for the target traffic control item, and the comparison result will directly determine whether the subsequent traffic control action is executed.

[0077] Specifically, the predefined traffic control table is read, and the calculated traffic increment is compared with the traffic control value of the traffic control item in the traffic control table that matches the target traffic control item. This is the core step of determining whether to trigger traffic control. If the traffic increment exceeds the traffic control value, the comparison result is recorded, indicating that the current traffic of the target traffic control item may cause pressure on the system. According to the comparison result, if the traffic increment of the target traffic control item meets the preset traffic control condition (i.e., exceeds the traffic control value), traffic control is implemented for the target traffic control item. This can include but is not limited to rejecting part of the requests, introducing a waiting queue, adjusting the request priority, or downgrading the service, etc., to ensure that the system does not overload, while maintaining the service quality as much as possible.

[0078] In the above embodiment, this mechanism based on the predefined traffic control table can achieve intelligent management of service traffic, ensuring that when facing high-concurrency requests, resource allocation can still be effectively controlled, and the performance of the entire system is not degraded or the service is not interrupted due to a surge in traffic in a certain business field.

[0079] The above-described embodiments are only part of the embodiments of the present application, not all. In order to better understand the above flow control method, the above process is described below in combination with the embodiments, but not used to limit the technical solutions of the embodiments of the present application, specifically:

[0080] In the transaction scenario, such as the payment system, it faces a large number of service requests from various channels, the customer group is large, the transaction frequency is high, and it needs to have high stability and controllability in the running process. The traditional flow control scheme mainly targets the established transaction or interface, has a large influence, is difficult to operate, and cannot adapt to the needs of various payment scenarios. The present application provides a flow control method, which can support the flexible configuration of flow control resource points of the payment system, so that the flow control object can be dynamically adjusted, and support multiple business dimensions such as projects, third parties, and transaction codes, and accurately configure the flow control target.

[0081] Reference Figure 3 As shown in the flow chart of the flow control method provided by the present application:

[0082] In the transaction scenario, three steps such as S301-S303 are involved. In S301, after obtaining the business request, the business information is parsed, a plurality of business fields are obtained, and based on the plurality of business fields, the resource point definition is performed for the key dimension of the business, such as third party, project number, transaction code and the like, and the corresponding target flow control item is created. After creating the target flow control item, flow control detection can be performed. And enter S302, in S302, enter data storage to save the related information of the target flow control item in the database. On the other hand, the data storage content in the database can be viewed through the management background, and enter S302, the user can view the data content fed back by the management background, and modify the configuration of the flow control item, such as flow control record, flow control state, flow control mode, flow control value and the like. As shown in Table 1, different target flow control items and flow control statistical rules of each target flow control item are shown:

[0083] Table 1

[0084]

[0085] Reference Figure 4 As shown in the architecture diagram of the flow control method provided by the present application, Figure 4 The business analysis module, flow control construction module and management background are included.

[0086] Business Parsing Module: This module parses flow control business objects within the business process. Using aspect-oriented programming, it embeds business parsing logic into external interfaces, extracting business fields as needed and passing the parsed information into the flow control construction process. Flow Control Construction Module: After obtaining business information, this module constructs resource objects with business object identifiers and creates corresponding control blocks to manage their traffic calculation, runtime information, flow control status, and other information. Management Backend Module: This module provides a user-friendly interactive platform for displaying flow control resources, supporting dynamic configuration of flow control resources, and providing system flow control records and runtime status monitoring.

[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0088] This application also provides a structural block diagram of a flow control device. Figure 5 This is a structural block diagram of the flow control device 50 according to an embodiment of this application; as shown below. Figure 5 As shown, it includes:

[0089] The acquisition module 52 is used to acquire a business request carrying real-time business information and extract multiple business fields from the real-time business information.

[0090] The first determining module 54 is used to determine the service type of the service request. If the service type belongs to a multi-dimensional flow control type, the service content of the multiple service fields is combined, and multiple target flow control items matching the real-time service request are determined based on the combined service content. The target flow control items are used to indicate the dimension of flow control for the service traffic.

[0091] The second determining module 56 is used to determine the flow increment of each of the plurality of target flow control items;

[0092] The control module 58 is used to perform flow control on the target flow control item when the flow increment of any of the target flow control items meets the preset flow control conditions.

[0093] By the above traffic control device, by acquiring a service request carrying real-time service information, and extracting multiple service fields of the service from the real-time service information, then determining the service type identifying the service request, and in the case that the service type belongs to multi-dimensional flow control, the service contents of the multiple service fields are combined. Further, based on the service combination content, multiple target flow control items matching the real-time service request are determined, which makes the traffic control not only limited to a single dimension, but also more fine-grained traffic management from multiple dimensions. Further, the traffic increment of the target flow control item is determined, and in the case that the traffic increment of any target flow control item meets the preset traffic control condition, the target flow control item is controlled, that is, multiple target flow control items are determined through the service combination content of multiple service fields, that is, traffic control is expanded according to multiple flow control dimensions, fine-grained flow control management is realized, and the accuracy of traffic control is improved.

[0094] In an example embodiment, the first determination module 54 is further configured to acquire a flow control table corresponding to the service type of the service request; wherein the flow control table at least includes multiple flow control items and flow control contents of the multiple flow control items respectively; and based on the flow control contents of the multiple flow control items in the flow control table and the service combination content, determine multiple target flow control items corresponding to the real-time service request.

[0095] In an example embodiment, the first determination module 54 is further configured to perform keyword matching between the service combination content and the flow control contents of the multiple flow control items in the flow control table respectively, to obtain a first matching result; and based on the first matching result, determine the flow control items corresponding to the flow control contents matching the service combination content as the multiple target flow control items matching the real-time service request.

[0096] In an example embodiment, the first determination module 54 is further configured to, in the case that the service type belongs to a single-dimensional flow control type, directly determine a target flow control item matching the real-time service request based on the service contents corresponding to the multiple service fields respectively.

[0097] In an example embodiment, the first determination module 54 is further configured to perform keyword matching between the service contents of the multiple service fields respectively and the flow control contents of the multiple flow control items in a flow control table respectively, to obtain a second matching result; wherein the flow control table is determined based on the service type of the service request; and the flow control table at least includes multiple flow control items and flow control contents of the multiple flow control items respectively; and based on the second matching result, determine the flow control item of any flow control content matching the service content as a target flow control item corresponding to the real-time service request.

[0098] In an example embodiment, the second determining module 56 is further configured to, for any one of the target flow control items, determine a first traffic of the target flow control item at a current time and a second traffic of the target flow control item at a time prior to the current time; and determine a traffic increment of the target flow control item based on a sum of the first traffic and the second traffic.

[0099] In an example embodiment, the control module 58 is further configured to, in a case where the traffic increment of any one of the target flow control items satisfies a preset traffic control condition, perform traffic control on the target flow control item, including: obtaining a predefined flow control table; wherein the flow control table is determined based on a service type of the service; the flow control table further includes flow control values corresponding to a plurality of flow control items respectively; comparing the flow control value of the flow control item in the flow control table that matches the target flow control item with the traffic increment of the target flow control item to obtain a comparison result; and in a case where the comparison result is that the traffic increment of the target flow control item is greater than the flow control value of the flow control item that matches the target flow control item, stopping receiving a service request related to the target flow control item.

[0100] Embodiments of the present application also provide a storage medium including a stored program, wherein the program performs any of the above methods when executed.

[0101] Optionally, in the present embodiment, the storage medium can be configured to store program code for performing the following steps:

[0102] S1, obtaining a service request carrying real-time service information, and extracting a plurality of service fields of the service from the real-time service information;

[0103] S2, determining a service type of the service request, combining service contents of the plurality of service fields in a case where the service type belongs to a multi-dimensional flow control type, and determining a plurality of target flow control items that match the real-time service request based on the combined service contents; wherein the target flow control item is used to indicate a dimension for performing traffic control on traffic of the service;

[0104] S3, determining a traffic increment of each of the plurality of target flow control items;

[0105] S4, in a case where the traffic increment of any one of the target flow control items satisfies a preset traffic control condition, performing traffic control on the target flow control item.

[0106] Embodiments of the present application also provide an electronic device including a memory and a processor, the memory having a computer program stored therein, and the processor being configured to execute the computer program to perform the steps in any of the above traffic control method embodiments.

[0107] Optionally, the electronic device described above can further include a transmission device connected with the processor, and an input and output device connected with the processor.

[0108] Optionally, in the embodiment, the processor can be configured to execute the following steps by means of a computer program:

[0109] S1, obtaining a service request carrying real-time service information, and extracting a plurality of service fields of the service from the real-time service information;

[0110] S2, determining the service type of the service request, combining the service content of the plurality of service fields in the case that the service type belongs to a multi-dimensional flow control type, determining a plurality of target flow control items matched with the real-time service request based on the service combination content; wherein the target flow control item is used to indicate the dimension of flow control on the service traffic;

[0111] S3, determining the traffic increment of each of the plurality of target flow control items;

[0112] S4, in the case that the traffic increment of any of the target flow control items meets the preset traffic control condition, performing traffic control on the target flow control item.

[0113] Optionally, in the embodiment, the storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0114] In the technical solution of the present application, the collection, storage, use, processing, transmission, provision and disclosure of the information such as financial data or user data comply with the relevant legal regulations and do not violate public order and good customs.

[0115] It should be noted that in the embodiments of the present application, some existing industry solutions, components, models, etc. may be mentioned, which should be considered as exemplary, and the 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 will necessarily use the solution.

[0116] The embodiments of the present application also provide a computer program product, the computer program product comprising a computer program, the computer program being executed by a processor to implement the steps in any of the flow control method embodiments.

[0117] The embodiment of the present application further provides another computer program product, comprising a nonvolatile computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps in any of the flow control method embodiments.

[0118] The embodiment of the present application further provides a computer program, which comprises computer instructions stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the steps in any of the flow control method embodiments.

[0119] Optionally, specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and the embodiment will not be described here again.

[0120] Obviously, those skilled in the art should understand that each module or each step of the present application described above can be realized by a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, each module or each step can be realized by program codes executable by a computing device, so that each module or each step can be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described can be executed in an order different from here, or each module or each step can be manufactured into an individual integrated circuit module, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0121] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the principles of the present application should be included in the protection scope of the present application.

Claims

1. A flow control method, characterized by, The method comprises: acquiring a service request carrying real-time service information, and extracting a plurality of service fields of a service from the real-time service information; determining a service type of the service request, combining service contents of the plurality of service fields in a case where the service type belongs to a multi-dimensional flow control type, determining a plurality of target flow control items matched with the real-time service request based on the service combination contents; wherein the target flow control item is used to indicate a dimension of flow control on service traffic of the service; determining a traffic increment of each of the plurality of target flow control items; in a case where the traffic increment of any one of the target flow control items meets a preset traffic control condition, performing traffic control on the target flow control item.

2. The method of claim 1, wherein, The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises:

3. The method of claim 2, wherein, in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields.

4. The method of claim 1, wherein, The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields.

5. The method of claim 4, wherein, The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises:

6. The method of claim 1, wherein, in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields. The method further comprises: in a case where the service type belongs to a single-dimensional flow control type, directly determining a target flow control item matched with the real-time service request based on service contents respectively corresponding to the plurality of service fields.

7. The method of claim 1, wherein, The traffic control on the target traffic control item in the case that the traffic increment of any target traffic control item meets a preset traffic control condition comprises: acquiring a predefined traffic control table; wherein the traffic control table is determined based on a service type of the service; the traffic control table further comprises traffic control values corresponding to a plurality of traffic control items respectively; comparing the traffic control value of the traffic control item in the traffic control table matched with the target traffic control item with the traffic increment of the target traffic control item to obtain a comparison result; stopping receiving a service request related to the target traffic control item in the case that the comparison result is that the traffic increment of the target traffic control item is greater than the traffic control value of the traffic control item matched with the target traffic control item.

8. A flow control device, characterized by comprise: an acquisition module configured to acquire a service request carrying real-time service information and extract a plurality of service fields of a service from the real-time service information; a first determination module configured to determine a service type of the service request, combine service contents of the plurality of service fields in the case that the service type belongs to a multi-dimensional traffic control type, and determine a plurality of target traffic control items matched with the real-time service request based on the service combination contents; wherein the target traffic control item is used to indicate a dimension of traffic control on service traffic of the service; a second determination module configured to determine a traffic increment of each of the plurality of target traffic control items; a control module configured to perform traffic control on any target traffic control item in the case that the traffic increment of the target traffic control item meets a preset traffic control condition.

9. A computer readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the program performs the method described in any one of claims 1 to 7 when running.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the method described in any one of claims 1 to 7.

Citation Information

Cited By

  • Multi-dimensional connection joint control method and system based on mqtt identity field

    CN122534107A