Flow limiting strategy method and device applied to server gateway

By combining multiple current limiting policies and real-time data analysis in APISIX gateway, the lack of server gateway current limiting policies for identification of burst traffic and malicious requests is solved, and more refined traffic control is achieved, and system stability is improved. Security.

CN118984253AInactive Publication Date: 2024-11-19彩讯科技股份有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411467478.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2024-11-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing APISIX server gateway current limiting strategy is difficult to adapt to burst traffic, cannot effectively distinguish between real users and malicious requests, and lacks comprehensive consideration of multiple factors, resulting in the intricacy of the current limiting strategy.

Method used

Receive requested traffic data through APISIX gateway, verify and parse, and adopt IP current limiting policy, channel current limiting policy, first interface current limiting policy and second interface current limiting policy, combined with periodic collection of server behavior indicators, real-time analysis and update Blacklist, determine the exception data and perform current limit processing.

Benefits of technology

Effectively solve burst traffic problems, improve system stability and security, simplify configuration, greatly improve user experience, and be able to quickly identify and reject abnormal users and malicious attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118984253A_ABST
    Figure CN118984253A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a current limiting strategy method, device and equipment applied to a server gateway and a computer readable storage medium. The method comprises the following steps: receiving request flow data sent by a user through an APISIX gateway, and verifying the request flow data; if the verification is passed, analyzing the request traffic data; analyzing the analyzed request flow data through an IP flow limiting strategy, a channel flow limiting strategy, a first interface flow limiting strategy and / or a second interface flow limiting strategy, and determining current abnormal data; and processing the abnormal data, and completing the flow limiting of the request flow data sent by the current user. In this way, the problems of burst flow and the like can be effectively solved, the system stability is improved, related configuration is simplified, and the system safety and the user experience are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of data processing, and in particular to a current limiting strategy method, apparatus, device, and computer-readable storage medium applied to a server gateway. Background Art

[0002] The existing APISIX gateway traffic control technology can help the server gateway process requests to a certain extent, but it still has the following significant shortcomings: 1. The traditional flow limiting strategy based on fixed thresholds is difficult to adapt to the suddenness of traffic; 2. The current limiting method based on IP or user is easily affected by IP forgery or proxy, and cannot effectively distinguish between real users and malicious requests, resulting in the accuracy of the current limiting strategy; 3. Existing flow limiting technologies usually rely on a single flow limiting strategy and lack the ability to comprehensively consider multiple factors, such as user request types, and cannot provide refined flow control.

[0003] Therefore, in view of these shortcomings of the existing technology, how to develop a new APISIX server gateway traffic limiting strategy is an urgent problem to be solved. Summary of the invention

[0004] According to the embodiments of the present application, a flow limiting strategy solution applied to the server gateway is provided, which can effectively solve problems such as burst traffic, improve system stability, simplify related configurations, and greatly improve system security and user experience.

[0005] In a first aspect of the present application, a current limiting strategy method applied to a server gateway is provided. The method comprises: Receive the request traffic data sent by the user through the APISIX gateway and verify the request traffic data; if the verification is successful, parse the request traffic data; Analyze the parsed request flow data through the IP flow limiting strategy, the channel flow limiting strategy, the first interface flow limiting strategy and / or the second interface flow limiting strategy to determine the current abnormal data; Process the abnormal data to limit the flow of request traffic data sent by the current user; The IP current limiting strategy can calculate abnormal data in the following way: ; Where T is the time point; IPi is the i-th IP address; It is the abnormally high frequency request flag of IPi at time T; It is the abnormal large number of invalid requests of IPi at time T; It is the abnormal access pattern identifier of IPi at time T.

[0006] Furthermore, the receiving, through the APISIX gateway, the request flow data sent by the user and verifying the request flow data includes: The validity of the token and user permissions in the request traffic are verified through the APISIX gateway.

[0007] Furthermore, the IP current limiting strategy includes: IP request information is collected by periodically collecting server behavior indicators.

[0008] Furthermore, the parsed request traffic data is analyzed through the IP current limiting strategy to determine that the current abnormal data includes: Analyze the collected IP request information and update the abnormal IP information to the blacklist in the following ways: ; in, The IPi obtained from multiple security intelligence sources at time T is a malicious identifier, 1 for yes and 0 for no; Based on the blacklist, blocking and limiting are performed in the following ways: .

[0009] Furthermore, the parsed request flow data is analyzed through the channel flow limiting strategy to determine that the current abnormal data includes: Through the channel flow limiting strategy, the parsed request flow data is analyzed and the current abnormal data is determined in the following ways: ; Among them, C is the channel; t is time; N(C, t) is the number of requests from channel C in time t; M(C) is the maximum number of visits per second configured for channel C.

[0010] Furthermore, the parsed request flow data is analyzed through the first interface current limiting strategy to determine that the current abnormal data includes: The parsed request traffic data is analyzed through the first interface current limiting strategy, and the current abnormal data is determined in the following way: ; Among them, C is the channel; I is the interface; t is time; N(C, I, t) is the number of requests made by interface I of channel C in time t.

[0011] Furthermore, the parsed request flow data is analyzed through the second interface current limiting strategy to determine that the current abnormal data includes: Through the second interface current limiting strategy, the parsed request traffic data is analyzed and the current abnormal data is determined by the following method: ; Wherein, I is the interface; t is time; N(I, t) is the number of requests of interface I in time t in the omnichannel; M(I) is the maximum number of accesses per second configured on interface I.

[0012] In a second aspect of the present application, a current limiting strategy device applied to a server gateway is provided. The device includes: A verification module is used to receive the request flow data sent by the user through the APISIX gateway and verify the request flow data; if the verification is successful, the request flow data is parsed; A policy module is used to analyze the parsed request flow data through an IP flow limiting policy, a channel flow limiting policy, a first interface flow limiting policy, and / or a second interface flow limiting policy to determine current abnormal data; A flow limiting module is used to process the abnormal data and complete the flow limiting of the request flow data sent by the current user; The IP current limiting strategy can calculate abnormal data in the following way: ; Where T is the time point; IPi is the i-th IP address; It is the abnormally high frequency request flag of IPi at time T; It is the abnormal large number of invalid requests of IPi at time T; It is the abnormal access pattern identifier of IPi at time T.

[0013] In a third aspect of the present application, an electronic device is provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method described above is implemented.

[0014] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect of the present application is implemented.

[0015] The flow limiting strategy method applied to the server gateway provided in the embodiment of the present application receives the request flow data sent by the user through the APISIX gateway, and verifies the request flow data; if the verification is successful, the request flow data is parsed; the parsed request flow data is analyzed through the IP flow limiting strategy, the channel flow limiting strategy, the first interface flow limiting strategy and / or the second interface flow limiting strategy to determine the current abnormal data; the abnormal data is processed to complete the flow limiting of the request flow data sent by the current user, which can effectively solve problems such as sudden flow, improve system stability, simplify related configurations, and greatly improve system security and user experience.

[0016] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein: Figure 1 It is a flow chart of a current limiting strategy method applied to a server gateway according to an embodiment of the present application; Figure 2 The following is a flow chart of an IP current limiting strategy according to an embodiment of the present application; Figure 3 is a flow chart of a channel flow limiting strategy according to an embodiment of the present application; Figure 4 is a flow chart of a first interface current limiting strategy according to an embodiment of the present application; Figure 5 is a flow chart of a second interface current limiting strategy according to an embodiment of the present application; Figure 6 is a block diagram of a current limiting strategy device applied to a server gateway according to an embodiment of the present application; Figure 7 It is a schematic diagram of the structure of a terminal device or a server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0019] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0020] Figure 1 A flow chart of a current limiting strategy method applied to a server gateway according to an embodiment of the present disclosure is shown. The method includes: S110, receiving the request traffic data sent by the user through the APISIX gateway, and verifying the request traffic data; if the verification is successful, parsing the request traffic data.

[0021] In the modern Internet service architecture, the server gateway is a front-end system responsible for receiving and processing a large number of requests from clients. With the expansion of business scale and the increase in the number of users, the server gateway faces more and more challenges, including how to effectively manage and control traffic to ensure the stability and reliability of core business.

[0022] In this disclosure, the APISIX gateway is used as the entrance to the system, responsible for receiving and verifying user requests. APISIX is a dynamic, real-time, high-performance cloud-native API gateway that provides a wealth of traffic management functions such as load balancing, dynamic upstream, grayscale release, service fuse, identity authentication, and observability. Through the APISIX gateway, the data format and structure of the request traffic data sent by the user are initially checked to ensure that the data meets the predefined standards and verify all required fields contained in the request.

[0023] After the initial inspection is passed, identity authentication is performed based on the request traffic data. That is, the validity of the token and user permissions are checked, and security measures are implemented to prevent common attacks such as SQL injection and XSS; if the request fails the verification, an error alarm is fed back to ensure the integrity, legality and security of the request; if the verification is passed, the request traffic data is parsed to obtain relevant information such as IP information, request channel information and / or interface information.

[0024] S120, analyzing the parsed request flow data through the IP flow limiting strategy, the channel flow limiting strategy, the first interface flow limiting strategy and / or the second interface flow limiting strategy to determine the current abnormal data.

[0025] In some embodiments, the parsed request traffic data is analyzed through several preset strategies, and real-time interception or restriction is performed based on the anomalies or potential threats obtained from the analysis to prevent malicious attacks or illegal access, thereby ensuring the stability and security of the system.

[0026] In some embodiments, the parsed request traffic data is analyzed through the IP current limiting strategy to determine the current abnormal data.

[0027] like Figure 2 As shown, it is determined whether the user IP exists in the IP blacklist library. If it exists in the blacklist, the request is limited, the corresponding error code is returned, and further business processing is rejected; otherwise, the request is forwarded to the business processing module to continue processing the user request; At the same time, it detects anomalies by real-time monitoring of traffic patterns and request behaviors, including abnormally high-frequency requests, abnormally large numbers of invalid requests (such as 404, 502 errors), abnormal access patterns (such as fast scans or large-scale requests), etc. If abnormal activities are detected in real time or an IP is confirmed to be malicious, the IP address will be automatically added to the blacklist, and a responsive blocking mechanism will be enabled to reject all requests from the IP address.

[0028] Specifically, the prior art performs real-time traffic analysis and anomaly detection by maintaining a static IP blacklist, which cannot respond to the emergence of new malicious IPs in real time and cannot distinguish request features in different business scenarios, lacking refined flexibility.

[0029] In this disclosure, IP request information is collected by periodically collecting server behavior indicators. The corresponding traffic anomaly information can be obtained based on the behavior indicators and request frequency information: ; Where T is the time point; IPi is the i-th IP address; is the abnormally high frequency request flag of IPi at time T (1 for yes, 0 for no); is the abnormally large number of invalid requests flagged by IPi at time T (1 for yes, 0 for no); It is the abnormal access pattern identifier of IPi at time T (1 means yes, 0 means no).

[0030] In the prior art, real-time traffic analysis and anomaly detection are performed by maintaining a static IP blacklist, which cannot update new malicious IPs in real time and lacks timeliness and flexibility.

[0031] In the present disclosure, by periodically and automatically collecting request information such as abnormal IPs, the corresponding abnormal IP information can be obtained and automatically updated to the blacklist: ; in, The IPi obtained from multiple security intelligence sources at time T is an indicator of maliciousness, 1 indicates yes, and 0 indicates no.

[0032] The prior art performs real-time traffic analysis and blocking by maintaining a static IP blacklist, which cannot respond to new malicious IPs in real time to block them, and lacks timeliness and flexibility.

[0033] In this disclosure, the latest blocking can be obtained by periodically automatically collecting abnormal IP information and automatically updating the blacklist: .

[0034] In summary, through the IP flow control strategy, the IP addresses of abnormal users can be configured into the flow control IP blacklist to deny their request processing for business scenarios. The IP addresses in the blacklist can be dynamically updated by the system administrator or automated programs to cope with real-time changing threats and abnormal traffic.

[0035] In some embodiments, the parsed request traffic data is analyzed through a channel flow limiting strategy to determine the current abnormal data.

[0036] like Figure 3 As shown, extract the user channel information in the request, load the abnormal channel interface current limiting library; determine whether the user channel exists in the abnormal channel interface current limiting library. If it exists in the current limiting library, perform current limiting on the request, return the corresponding error code, and refuse further business processing. Otherwise, forward the request to the business processing module to continue processing the user request.

[0037] Specifically, the existing technology performs real-time traffic analysis and anomaly detection by maintaining a static omni-channel approach, which cannot respond to the emergence of new malicious channels in real time and lacks refined flexibility.

[0038] In this disclosure, the request channel information is collected by periodically collecting server behavior indicators. The corresponding traffic anomaly information can be obtained based on the behavior indicators and request frequency information: ; Among them, C is the channel; t is time; N(C, t) is the number of requests from channel C in time t; M(C) is the maximum number of visits per second configured for channel C.

[0039] In summary, the channel flow limiting strategy can limit the number of requests for all interfaces of abnormal channels to protect the business from malicious attacks. By configuring the maximum number of accesses per second of abnormal channels into the flow limiting rules, the request processing for all interface business scenarios of abnormal channels can be rejected. For example, all interfaces of Shandong channels can be configured to only be accessed 20,000 times per second.

[0040] In some embodiments, the parsed request traffic data is analyzed through the first interface current limiting strategy to determine the current abnormal data.

[0041] like Figure 4 As shown, extract the user channel information in the request, extract the interface information in the request, load the abnormal channel interface current limiting library, and determine whether the user channel and interface exist in the abnormal channel interface current limiting library. If they exist in the current limiting library, the request is current limited, and the corresponding error code is returned to refuse further business processing; otherwise, the request is forwarded to the business processing module to continue processing the user request.

[0042] Specifically, the prior art performs real-time traffic analysis and anomaly detection by maintaining static channels and interfaces, which cannot respond to the emergence of new malicious channels in real time and lacks refined flexibility.

[0043] In this disclosure, the request channel information is collected by periodically collecting server behavior indicators. The corresponding traffic anomaly information can be obtained based on the behavior indicators and request frequency information: ; Among them, C is the channel; I is the interface; t is time; N(C, I, t) is the number of requests made by interface I of channel C in time t.

[0044] In summary, the first interface current limiting strategy is used to limit the number of requests for a certain interface of an abnormal channel, protect the business from malicious attacks, and configure the maximum number of accesses per second of a certain interface of an abnormal channel into the current limiting rule to reject the request processing for the business scenario of a single interface of an abnormal channel. For example, the user information query interface of the Shandong channel can be configured to be accessed only 1,000 times per second.

[0045] In some embodiments, the parsed request traffic data is analyzed through the second interface current limiting strategy to determine the current abnormal data.

[0046] like Figure 5As shown, the interface information in the request is extracted, the abnormal interface current limiting library is loaded, and it is determined whether the user request interface exists in the abnormal interface current limiting library. If it exists in the current limiting library, the request is current limited, and the corresponding error code is returned to refuse further business processing. Otherwise, the request is forwarded to the business processing module for further processing. Specifically, the prior art performs real-time traffic analysis and anomaly detection by maintaining static omni-channels and interfaces, which cannot respond to the emergence of new malicious channels in real time and lacks refined flexibility.

[0047] In this disclosure, the request channel information is collected by periodically collecting server behavior indicators. The corresponding traffic anomaly information can be obtained based on the behavior indicators and request frequency information: ; Wherein, I is the interface; t is time; N(I, t) is the number of requests of interface I in time t in the omnichannel; M(I) is the maximum number of accesses per second configured on interface I.

[0048] In summary, the second interface current limiting strategy can be used to limit the number of requests to a certain interface of the omni-channel and protect the business from malicious attacks. The maximum number of accesses per second of a certain interface of the omni-channel interface can be configured into the current limiting rule. Requests to a certain interface business scenario of the omni-channel interface can be rejected. For example, the user information query interface of all channels can be configured to be accessed only 10,000 times per second.

[0049] It should be noted that, depending on the actual application scenario, the above strategies can be run in serial or in parallel, and no further limitation is made here.

[0050] S130, processing the abnormal data to complete flow limiting of the request flow data sent by the current user.

[0051] In some embodiments, the abnormal data is processed through the strategy described in step S120 to complete the flow limiting of the request traffic data sent by the current user.

[0052] According to the embodiments of the present disclosure, the following technical effects are achieved: The problem of the traditional APISIX traffic control method lacking refined control over different business scenarios and request channels is solved. The disclosed method can also effectively solve problems such as burst traffic, improve system stability, simplify related configurations, and greatly improve system security and user experience.

[0053] Specifically, through dynamically updated IP address current limiting, requests from abnormal users can be quickly identified and rejected, preventing malicious attacks and abnormal traffic; By limiting the flow of all interface requests through abnormal channels, it is possible to quickly identify and reject requests from abnormal users, preventing malicious attacks and abnormal traffic; By limiting the flow of requests from a certain interface through abnormal channels, we can quickly identify and reject requests from abnormal users, and prevent malicious attacks and abnormal traffic. By limiting the flow of requests through a certain interface on all channels, you can quickly identify and reject requests from abnormal users, and prevent malicious attacks and abnormal traffic.

[0054] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0055] The above is an introduction to the method embodiment. The following is a further explanation of the scheme described in this application through an apparatus embodiment.

[0056] Figure 6 A block diagram 600 of a current limiting strategy device applied to a server gateway according to an embodiment of the present application is shown. Figure 6 Shown include: The verification module 610 is used to receive the request flow data sent by the user through the APISIX gateway and verify the request flow data; if the verification is successful, the request flow data is parsed; The policy module 620 is used to analyze the parsed request flow data through the IP flow limiting policy, the channel flow limiting policy, the first interface flow limiting policy and / or the second interface flow limiting policy to determine the current abnormal data; The flow limiting module 630 is used to process the abnormal data and complete the flow limiting of the request flow data sent by the current user; The IP current limiting strategy can calculate abnormal data in the following way: ; Where T is the time point; IPi is the i-th IP address; It is the abnormally high frequency request flag of IPi at time T; It is the abnormal large number of invalid requests of IPi at time T; It is the abnormal access pattern identifier of IPi at time T.

[0057] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0058] Figure 7 A schematic diagram of the structure of a terminal device or server suitable for implementing an embodiment of the present application is shown.

[0059] like Figure 7 As shown, the terminal device or server includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 508 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the terminal device or server are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

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

[0061] In particular, according to an embodiment of the present application, the above method flow steps can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present application are executed.

[0062] 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. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, 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, which carries a computer-readable program code. 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.

[0063] 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 the code, and the aforementioned module, program segment or a part of the 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 and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0064] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0065] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method described in the present application.

[0066] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of application involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned application concept. For example, the above features are replaced with (but not limited to) technical features with similar functions applied in the present application.

Claims

1. A current limiting strategy method applied to a server gateway, characterized in that: include: Receive the request traffic data sent by the user through the APISIX gateway and verify the request traffic data; If the verification is successful, the request traffic data is parsed; Analyze the parsed request flow data through the IP flow limiting strategy, the channel flow limiting strategy, the first interface flow limiting strategy and / or the second interface flow limiting strategy to determine the current abnormal data; Process the abnormal data to limit the flow of request traffic data sent by the current user; The IP current limiting strategy can calculate abnormal data in the following way: ; Where T is the time point; IPi is the i-th IP address; It is the abnormally high frequency request flag of IPi at time T; It is the abnormal large number of invalid requests of IPi at time T; It is the abnormal access pattern identifier of IPi at time T.

2. The method according to claim 1, characterized in that The receiving, through the APISIX gateway, the request flow data sent by the user and verifying the request flow data includes: The validity of the token and user permissions in the request traffic are verified through the APISIX gateway.

3. The method according to claim 2, characterized in that The IP current limiting strategy includes: IP request information is collected by periodically collecting server behavior indicators.

4. The method according to claim 3, characterized in that The IP current limiting strategy is used to analyze the parsed request traffic data to determine that the current abnormal data includes: Analyze the collected IP request information and update the abnormal IP information to the blacklist in the following ways: ; in, The IP obtained from multiple security intelligence sources at time T is a malicious identifier, 1 for yes and 0 for no; Based on the blacklist, blocking and limiting are performed in the following ways: 。 5. The method according to claim 2, characterized in that: The channel flow limiting strategy is used to analyze the parsed request flow data and determine that the current abnormal data includes: Through the channel flow limiting strategy, the parsed request flow data is analyzed and the current abnormal data is determined in the following ways: ; Among them, C is the channel; t is time; N(C, t) is the number of requests from channel C in time t; M(C) is the maximum number of visits per second configured for channel C.

6. The method according to claim 2, characterized in that The first interface current limiting strategy is used to analyze the parsed request flow data to determine that the current abnormal data includes: The parsed request traffic data is analyzed through the first interface current limiting strategy, and the current abnormal data is determined in the following way: ; Among them, C is the channel; I is the interface; t is time; N(C, I, t) is the number of requests made by interface I of channel C in time t.

7. The method according to claim 2, characterized in that The second interface current limiting strategy is used to analyze the parsed request flow data to determine that the current abnormal data includes: Through the second interface current limiting strategy, the parsed request traffic data is analyzed and the current abnormal data is determined in the following way: ; Wherein, I is the interface; t is time; N(I, t) is the number of requests of interface I in time t in the omnichannel; M(I) is the maximum number of accesses per second configured on interface I.

8. A current limiting strategy device applied to a server gateway, characterized in that: include: A verification module, used to receive the request flow data sent by the user through the APISIX gateway and verify the request flow data; If the verification is successful, the request traffic data is parsed; A policy module is used to analyze the parsed request flow data through an IP flow limiting policy, a channel flow limiting policy, a first interface flow limiting policy, and / or a second interface flow limiting policy to determine current abnormal data; A flow limiting module is used to process the abnormal data and complete the flow limiting of the request flow data sent by the current user; The IP current limiting strategy can calculate abnormal data in the following way: ; Where T is the time point; IPi is the i-th IP address; It is the abnormally high frequency request flag of IPi at time T; It is the abnormal large number of invalid requests of IPi at time T; It is the abnormal access pattern identifier of IPi at time T.

9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

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

Citation Information

Patent Citations

  • Burst flow control method, device, electronic equipment and storage medium

    CN112583734A

  • Omnichannel access gateway

    CN116633725A

  • Service calling method and device, equipment and storage medium

    CN117130683A

  • API gateway and operation method thereof

    KR102619580B1