Current limiting method, device, electronic device and computer readable medium
By using a rate limiting method that matches custom flow control configuration information with business characteristic data, the problem that existing rate limiting algorithms cannot effectively control downstream traffic is solved, and fine-grained traffic management and load optimization are achieved.
Patent Information
- Application Number
- CN202011186053.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2040-10-29
AI Technical Summary
Existing rate limiting algorithms cannot effectively control the traffic sent downstream. The rate limiting granularity is too large, and the flexibility and scalability are poor, resulting in excessive server load when traffic surges.
By using customized flow control configuration information, and matching control condition groups with business characteristic data, flexible flow limiting operations can be achieved, including fine-grained control of traffic.
It achieves effective traffic control, solves the problem of excessive server load caused by sudden traffic surges, and improves the versatility and flexibility of traffic limiting scenarios.
Smart Images

Figure CN112367266B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a current limiting method, apparatus, device, and computer-readable medium. Background Art
[0002] With the rapid development of Internet technology, various businesses are also changing and developing. When faced with the growth of software users, flash sales, malicious attacks, and server stress testing, external services may experience a sudden increase in traffic. This kind of short-term sudden increase in traffic can easily cause business service overload, resulting in the server being unable to provide services normally or downstream businesses being unable to operate normally. Summary of the invention
[0003] The content of this disclosure is used to introduce concepts in a brief form, and these concepts will be described in detail in the specific implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution for which protection is claimed, nor is it intended to limit the scope of the technical solution for which protection is claimed. Some embodiments of the present disclosure propose methods, devices, equipment, and computer-readable media for current limiting to solve the technical problems mentioned in the above background technology section.
[0004] In a first aspect, some embodiments of the present disclosure provide a flow limiting method, the method comprising: receiving request data, extracting business characteristic data in the request data; detecting whether a control condition group in at least one preset flow control configuration information matches the business characteristic data, wherein at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group; in response to the presence of a target control condition group matching the business characteristic data in at least one control condition group, determining target control behavior information corresponding to the target control condition group; and performing flow limiting operations based on the target control behavior information.
[0005] In a second aspect, some embodiments of the present disclosure provide a current limiting device, comprising: a request acquisition unit, configured to receive request data and extract business feature data in the request data; a current limiting matching unit, configured to detect whether a control condition group in at least one preset flow control configuration information matches the business feature data, wherein at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group; a behavior determination unit, configured to determine target control behavior information corresponding to the target control condition group in response to the presence of a target control condition group matching the business feature data in at least one control condition group; and a current limiting operation unit, configured to perform a current limiting operation based on the target control behavior information.
[0006] In a third aspect, some embodiments of the present disclosure provide a method for generating a flow control configuration, the method comprising: obtaining historical monitoring data, wherein the historical monitoring data is historical business data; generating and sending flow control configuration information based on the historical business data, wherein the flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group.
[0007] In a fourth aspect, some embodiments of the present disclosure provide a flow control configuration generation device, the device comprising: an information acquisition unit, configured to acquire historical monitoring data, wherein the historical monitoring data is historical business data; an information sending unit, configured to generate and send flow control configuration information based on the historical business data, wherein the flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group.
[0008] In a fifth aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0009] In a sixth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner in the first aspect is implemented.
[0010] One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: through the flow limiting method of some embodiments of the present disclosure, effective control of the flow is achieved, thereby solving the problem of excessive load caused by sudden increase in flow. Specifically, the inventor found that the reason for the related excessive load is that the existing flow limiting algorithms are basically integrated into the service governance framework to limit the flow of specific interfaces. The existing technology is basically unable to limit the flow sent to the downstream, and the flow limiting granularity is too large, and the flexibility and scalability are poor. Based on this, the flow limiting method of some embodiments of the present disclosure flexibly realizes the universality of the flow limiting scenario according to the custom configured flow control configuration information. In the process of flow limiting implementation, the control condition group in the flow control configuration information is matched with the business feature data in the request data. And the request data is flow limited according to the target control behavior information corresponding to the matched target control condition group. Thereby, effective control of the flow is achieved, thereby solving the problem of excessive load caused by sudden increase in flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0012] Figure 1 is a schematic diagram of an application scenario of the current limiting method according to some embodiments of the present disclosure;
[0013] Figure 2 is a flow chart of some embodiments of the current limiting method according to the present disclosure;
[0014] Figure 3 is a flow chart of other embodiments of the current limiting method according to the present disclosure;
[0015] Figure 4 is a schematic structural diagram of some embodiments of the current limiting device according to the present disclosure;
[0016] Figure 5 is a flow chart of some embodiments of the flow control configuration generation method according to the present disclosure;
[0017] Figure 6 is a schematic diagram of the structure of some embodiments of the flow control configuration generating device according to the present disclosure;
[0018] Figure 7 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0020] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0024] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0025] Figure 1 is a schematic diagram 100 of an application scenario of a current limiting method according to some embodiments of the present disclosure.
[0026] like Figure 1 As shown, the computing device 101 first receives the request data 102. The request can be obtained by sending through an interface or by calling a function. The request data includes business feature data 103, which is data including specific business information. For example, the business feature data 103 is data including an age field and a specific age value. The business feature data 103 can also be data including a gender field and a specific gender value. In response to receiving the request data 102, the computing device 101 obtains the flow control configuration information 104. The flow control configuration information 104 includes four control condition groups and control behavior information corresponding to the above four control condition groups. Determine whether there is a control condition group matching the above business feature data in the above four control condition groups. As an example, it can be first determined whether the fields in the business feature data 103 are the same as the fields in the control conditions a1 and a2 shown in the reference numeral 105. The control conditions a1 and a2 shown in the reference numeral 105 constitute a control condition group. When the data fields in the above-mentioned service characteristic data 103 and the control conditions a1 and a2 shown in reference numeral 105 are the same, the control behavior information A corresponding to the control conditions a1 and a2 can be determined. Similarly, the control behavior information B can be determined according to the control conditions b1 and b2 shown in reference numeral 106. Similarly, the control behavior information C can be determined according to the control conditions c1 and c2 shown in reference numeral 107, and the control behavior information D can be determined according to the control conditions d1 and d2 shown in reference numeral 108. After the above-mentioned control behavior information is obtained, the control behavior information can be sent to the server 109 so that the server performs a current limiting operation according to the control behavior information.
[0027] It is understandable that the current limiting method can be performed by the above-mentioned computing device 101. Among them, the computing device 101 can be hardware or software. When the computing device 101 is hardware, it can be various computing devices with information processing capabilities, including but not limited to smart phones, tablet computers, e-book readers, laptop computers, desktop computers, servers, etc. When the computing device 101 is software, it can be installed in the computing devices listed above. It can be implemented as multiple software or software modules for providing distributed services, for example, or it can be implemented as a single software or software module. No specific limitation is made here.
[0028] It should be understood that Figure 1 The number of computing devices in the embodiment is only illustrative. Any number of computing devices may be provided according to implementation requirements.
[0029] Continue to refer Figure 2 , shows a process 200 of some embodiments of the current limiting method according to the present disclosure. The current limiting method comprises the following steps:
[0030] Step 201: Receive request data and extract service feature data from the request data.
[0031] In some embodiments, the execution subject of the current limiting method may be a server. The execution subject of the current limiting method receives the request data through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultrawideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0032] In some embodiments, the execution subject extracts the received request data to obtain service feature data, wherein the service feature data is data containing service information.
[0033] Step 202, detecting whether a control condition group in at least one preset flow control configuration information matches the service characteristic data, wherein at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group.
[0034] In some embodiments, the flow control configuration information is information that can be used for flow limiting. The flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group. The above-mentioned execution subject detects whether the control condition group in at least one preset flow control configuration information matches the business characteristic data based on the business information contained in the business characteristic data. The control behavior information includes information indicating the behavior adopted to control the flow. As an example, the control behavior information may be "30% of transactions are sent to banks." As an example, the control behavior information may be behavior information for limiting the flow within a certain time period.
[0035] In some optional implementations of some embodiments, step 202 may also be performed as follows:
[0036] The first step is to obtain at least one of the above-mentioned preset flow control configuration information in response to receiving the request data, wherein each of the above-mentioned at least one flow control configuration information includes at least one control group.
[0037] As an example, the flow control configuration information may include control group 1 and control group 2.
[0038] As an example, a method for obtaining the at least one flow control configuration information includes at least one of the following: importing from a file, calling a third-party service, and reading from a flow control service, wherein the flow control service is a service that executes a flow limiting method.
[0039] The second step is to obtain at least one control item of each control group in the at least one control group, wherein the control item includes the control condition group and control behavior information corresponding to the control condition group.
[0040] As an example, the flow control configuration information may include control group 1, and control group 1 may include control item 1. As another example, control group 1 may include control item 1 and control item 2, and control group 2 may include control item 3.
[0041] As an example, a control item may include a control condition group and control behavior information corresponding to the control condition group. For example, control item 1 may include control condition group 1 and control behavior information 1.
[0042] The third step is to match the control condition group in each control item of the at least one control item with the characteristic data.
[0043] As an example, the above-mentioned business characteristic data is data containing business characteristic fields and business characteristic values. For example, in a payment scenario, a user makes a bank transfer. The data of the initiated transfer transaction in the payment system can be used as business characteristic data, and the data contains the following fields: transaction ID, payee and payee user ID, transfer method: scan code, red envelope, etc., currency, amount, current transaction status, payee and payee user bank, transaction creation time, etc. The business characteristic field is a field contained in the request data, and the business characteristic value is the value of the business characteristic field. As an example, the business characteristic field can be "receiving bank" and the business characteristic value can be "first bank". As an example, the business characteristic field can be "paying bank" and the business characteristic value can be "second bank". As an example, the business characteristic field can be "age" and the business characteristic value can be "17". As an example, the business characteristic field can be "name" and the business characteristic value can be "Li Li". As an example, the business characteristic field can be "gender" and the business characteristic value can be "female".
[0044] As an example, the third step above can be implemented by the following steps:
[0045] First, the execution entity extracts the conditional control field of each control condition in the control condition group in each control item to obtain at least one conditional control field.
[0046] Each control condition in the control condition group includes a condition control field. As an example, the condition control field in the control condition group may be "receiving bank" and the value corresponding to the condition control field may be set to "first bank". As another example, the condition control field in the control condition group may be "paying bank" and the value corresponding to the condition control field may be set to "first bank" and / or "second bank".
[0047] Afterwards, in response to each conditional control field in the at least one conditional control field matching a service feature field in the service feature data, it is determined that the control condition group matches the service feature data.
[0048] As an example, each conditional control field in the at least one control field mentioned above matches the business characteristic field in the business characteristic data mentioned above, which means that the conditional control field and its value are respectively the same as the business characteristic field and the business characteristic value. For example, the business characteristic data of the request data includes the business characteristic field "receiving bank" and the business characteristic value "first bank". And in a certain control condition group in the flow control configuration information, there is a conditional control field called "receiving bank", and the value of the conditional control field is set to "first bank". The above-mentioned business characteristic field and business characteristic value are respectively consistent with the conditional control field and value in the above-mentioned control condition group. Then it is determined that the above-mentioned control condition group matches the above-mentioned business characteristic data.
[0049] Step 203: In response to the existence of a target control condition group matching the service characteristic data in at least one control condition group, target control behavior information corresponding to the target control condition group is determined.
[0050] In some embodiments, in response to determining that there is a target control condition group matching the business characteristic data of the request data in the at least one control condition group, the execution subject may determine the target control behavior information corresponding to the business characteristic data of the request data. As an example, the target control behavior information may be control behavior information including a transaction number field, a weight type, and a flow limit value of 30%.
[0051] In some optional implementations of some embodiments, step 203 may be performed by the following steps:
[0052] In the first step, in response to the existence of a target control condition group matching the business characteristic data in the at least one control condition group, the control group where the target control condition group is located is determined as the target control group to obtain the target control group.
[0053] In the second step, the control behavior information included in the target control group is determined as the target control behavior information to obtain the target control behavior information.
[0054] Step 204: Perform current limiting operation based on the target control behavior information.
[0055] In some embodiments, the flow limiting operation may be an operation performed on the traffic according to the target control behavior information. For example, the flow limiting operation may be to limit the amount of traffic passing through, or to limit the traffic within a certain time period, or to limit both of the above. The execution subject of the flow limiting operation may be a server, a switch, a router, and other devices.
[0056] As an example, the flow limiting operation may be to release the traffic. The execution subject of the flow limiting operation receives the business data of the request data, for example, the data sent to the first bank received between 3 pm and 4 pm on a certain day. According to the target control behavior, for example, the flow limiting 30% control behavior. The flow of the data sent to the first bank is limited to non-intercepted traffic, and the non-intercepted traffic is released.
[0057] In some optional implementations of some embodiments, the execution subject, in response to receiving the request data, limits the flow of the request data according to the target control behavior information, wherein the request data includes at least one of the following: interface call, function call, and business request data. As an example, it is possible to limit the number of downstream service calls, the number of calls to a certain function or a certain code segment, and the number of basic service calls. This allows the generalization of flow limiting scenarios.
[0058] One of the above-mentioned embodiments of the present disclosure has the following beneficial effects: through the flow limiting method of some embodiments of the present disclosure, effective control of the flow is achieved, thereby solving the problem of excessive load caused by sudden increase in flow. Specifically, the inventor found that the reason for the related excessive load is that the existing flow limiting algorithms are basically integrated into the service governance framework to limit the flow of specific interfaces. The existing technology is basically unable to limit the flow sent to the downstream, and the flow limiting granularity is too large, and the flexibility and scalability are poor. Based on this, the flow limiting method of some embodiments of the present disclosure flexibly realizes the universality of the flow limiting scenario according to the custom configured flow control configuration information. In the process of flow limiting implementation, the control condition group in the flow control configuration information is matched with the business feature data in the request data. And the request data is subjected to flow limiting operation according to the control behavior information corresponding to the matched control condition group. Thereby, effective control of the flow is achieved, thereby solving the problem of excessive load caused by sudden increase in flow.
[0059] Continue to refer Figure 3 , shows a process 300 of some other embodiments of the current limiting method according to the present disclosure. The current limiting method comprises the following steps:
[0060] Step 301: Receive request data and extract service feature data from the request data.
[0061] Step 302: Combine at least one control condition and control behavior information in the flow control configuration information to obtain combined flow control configuration information.
[0062] In some embodiments, the control conditions and control behavior information of the flow control configuration can be rearranged to obtain combined flow control configuration information. As an example, control condition group 1 includes control condition 1 and control condition 2, and control condition group 2 includes control condition 3. After rearrangement, control condition group 1 may include control condition 1, and control condition group 2 may include control condition 2 and control condition 3. As an example, control condition group 1 includes control condition 1 and control condition 2, and control condition group 2 includes control condition 3. After rearrangement, control condition group 1 may include control condition 2, and control condition group 2 may include control condition 3 and control condition 4, that is, control conditions may be deleted or new control conditions may be added. As an example, the control behavior information of control condition group 1 is control behavior information 1. The control behavior information of control condition group 2 is control behavior information 2. After rearrangement, the control behavior information of control condition group 1 may be control behavior information 2. The control behavior information of control condition group 2 is control behavior information 1. As an example, the control behavior information of control condition group 1 is control behavior information 1. The control behavior information of control condition group 2 is control behavior information 2. After rearrangement, the control behavior information of the control condition group 1 may be the control behavior information 2. The control behavior information of the control condition group 2 is the control behavior information 3, that is, the control behavior information may be changed.
[0063] Combining at least one control condition in the above-mentioned flow control configuration information with the above-mentioned control behavior information includes: a control condition group and the control behavior information corresponding to the control condition group can be used as a control item. For example, control condition group 1 and control behavior information 1 corresponding to control condition group 1 are used as a control item. Furthermore, at least one control item is combined. As an example, control item 1 includes control condition group 1 and control behavior information 1, and control item 2 includes control condition group 2 and control behavior information 2, and control item 1 and control item 2 can be combined. As an example, control item 1 and control item 2 are a combination, and a new control item 3 can be added or control item 1 can be deleted.
[0064] At least one control item may also be used as a control group. For example, control item 1 and control item 2 may be used as a control group. Furthermore, at least one control group may be combined. As an example, control group 1 includes control item 1 and control item 2, and control group 2 includes control item 3 and control item 4. Control group 1 and control group 2 may be combined. As an example, control group 1 and control group 2 are a combination, and a new control group 3 may be added or control group 1 may be deleted.
[0065] Step 303: Detect whether the control condition group in the preset combined flow control configuration information matches the service characteristic data, wherein the combined flow control configuration information includes at least one control condition group and control behavior information corresponding to the at least one control condition group.
[0066] Step 304: in response to the existence of a target control condition group matching the service characteristic data in the at least one control condition group, determining target control behavior information corresponding to the target control condition group.
[0067] Step 305: Perform current limiting operation based on the target control behavior information.
[0068] In some embodiments, the specific implementation of steps 301, 303, 304 and 305 and the technical effects thereof can be referred to in Figure 2 Steps 201, 202, 203 and 204 in the corresponding embodiment are not described in detail here.
[0069] from Figure 3 It can be seen that Figure 2 Compared with the description of some corresponding embodiments, Figure 3 The process 300 of the current limiting method in some corresponding embodiments highlights the process of combining the flow control configuration information, obtaining the combined flow control configuration information, and performing current limiting based on the combined flow control configuration information. The combination of flow control configuration information can realize the flexible combination of the control condition group and the control behavior information in the flow control configuration, and then, different current limiting operations can be implemented according to the combined flow control configuration information.
[0070] Further references Figure 4 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a current limiting device, which are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0071] like Figure 4 As shown, the current limiting device 400 of some embodiments includes: a request acquisition unit 401, a current limiting matching unit 402, a behavior determination unit 403 and a current limiting operation unit 404. The request acquisition unit 401 is configured to receive request data and extract service feature data in the request data; the current limiting matching unit 402 is configured to detect whether the control condition group in at least one preset flow control configuration information matches the service feature data, wherein at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group; the behavior determination unit 403 is configured to determine the target control behavior information corresponding to the target control condition group in response to the presence of a target control condition group matching the service feature data in at least one control condition group; the current limiting operation unit 404 is configured to perform a current limiting operation based on the above target control behavior information.
[0072] In an optional implementation of some embodiments, the above-mentioned current limiting matching unit 402 is further configured to: in response to receiving request data, obtain at least one preset flow control configuration information, wherein each flow control configuration information in the at least one flow control configuration information includes at least one control group; obtain at least one control item of each control group in the at least one control group, wherein the control item includes a control condition group and control behavior information corresponding to the control condition group; match the control condition group in each control item in the at least one control item with the business characteristic data.
[0073] In optional implementations of some embodiments, the method for obtaining the above-mentioned flow control configuration information includes at least one of the following: importing from a file, calling a third-party service, and reading from a flow control service, wherein the flow control service is a service that executes a flow limiting method.
[0074] In an optional implementation of some embodiments, the service feature data is data including service feature fields and service feature values. And the current limiting matching unit 402 is further configured to: extract the condition control field of each control condition in the control condition group in each control item to obtain at least one condition control field; in response to each condition control field in the at least one condition control field matching the service feature field in the service feature data, determine that the control condition group matches the service feature data.
[0075] In an optional implementation of some embodiments, the above-mentioned behavior determination unit 403 is further configured to: determine the control group where the target control condition group is located as the target control group to obtain the target control group; determine the control behavior information contained in the target control group as the target control behavior information to obtain the target control behavior information.
[0076] In an optional implementation of some embodiments, the above-mentioned current limiting operation unit 404 is further configured to: in response to receiving request data, limit the request data according to the target control behavior information, wherein the request data includes at least one of the following: interface call, function call, business request data.
[0077] In an optional implementation of some embodiments, the apparatus further includes: a flow control combination unit. The flow control combination unit is configured to combine at least one control condition in the flow control configuration information and the control behavior information to obtain combined flow control configuration information; and the current limiting matching unit 402 is further configured to: detect whether the control condition group in the preset combined flow control configuration information matches the service feature data.
[0078] It is understood that the units described in the device 400 are similar to those described in the reference Figure 2Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 400 and the units included therein, and will not be described in detail here.
[0079] Continue to refer Figure 5 , shows a process 500 of some embodiments of the flow control configuration generation method according to the present disclosure. The method comprises the following steps:
[0080] Step 501, obtaining historical monitoring data.
[0081] In some embodiments, the execution subject of the flow control configuration generation method can obtain historical monitoring data from a database, a network link or an external storage device, wherein the historical monitoring data is historical business data. The historical business data can be historical transaction data, for example, it can be transfer transaction data of a bank.
[0082] Step 502: Generate and send flow control configuration information based on historical service data.
[0083] In some embodiments, the flow control configuration information includes at least one control condition group and control behavior information corresponding to the at least one control condition group.
[0084] In some embodiments, the execution subject may extract the service feature data from the historical service data, generate the flow control configuration information based on the service feature field in the service feature data, and send the generated flow control configuration information to a database or server.
[0085] In some optional implementations of some embodiments, step 502 may be performed in the following manner:
[0086] The first step is to analyze the above historical business data to obtain business performance indicators.
[0087] As an example, the execution subject may perform statistics on the field values corresponding to the characteristic fields in the business history data to obtain performance indicators related to the business. As an example, the performance indicators related to the business may be data related to the performance of the business history data, such as the success rate of the business execution, the response time of the business, etc.
[0088] For example, the above historical business data is the data generated during a promotion on a certain platform on March 6 of the previous year. By analyzing the response success rate of the platform to the historical business data request, the flow control configuration information related to the platform flow limit during this year's promotion is set. For example, last year there were 100,000 business request data, and 30,000 requests were successful. The business data request success rate is 30%.
[0089] The second step is to generate and send the above flow control configuration information based on the above performance indicators.
[0090] As an example, the execution subject may generate the flow control configuration information including at least one control condition group and control behavior information corresponding to at least one condition group according to the performance indicators. For example, for a certain platform promotion activity in the first step, the execution subject may set the control condition in one of the control condition groups in the flow control configuration information to "time", whose value is "March 6", and according to the 30% counted in the first step, set the flow control related control behavior information in the flow control configuration information to "30% of the business request data is released". Finally, send the set flow control configuration information to the database or server.
[0091] In some optional implementations of some embodiments, the above-mentioned flow control configuration information includes at least one control group, each control group of the above-mentioned at least one control group contains at least one control item, each control item of the above-mentioned at least one control item contains at least one control condition, and the above-mentioned at least one control condition constitutes a control condition group in each control item.
[0092] In some optional implementations of some embodiments, the storage location of the above-mentioned flow control configuration information includes at least one of the following: a file, a third-party service, and a flow control service.
[0093] One of the above embodiments of the present disclosure has the following beneficial effects: the flow control configuration generation method of some embodiments of the present disclosure generates customized flow control configuration information applicable to general flow control scenarios based on historical service data, thereby preparing for subsequent flow control operations.
[0094] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a flow control configuration generation device, and these device embodiments are Figure 5 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0095] like Figure 6 As shown, the flow control configuration generating device 600 of some embodiments includes: an information acquisition unit 601 and an information sending unit 602. The information acquisition unit 601 is configured to acquire historical monitoring data, wherein the historical monitoring data is historical service data; the information sending unit 602 is configured to generate and send flow control configuration information based on the historical service data, wherein the flow control configuration information includes at least one control condition group and control behavior information corresponding to at least one control condition group.
[0096] In an optional implementation of some embodiments, the above-mentioned information sending unit 602 is further configured to: analyze historical service data to obtain performance indicators of the service; and generate and send flow control configuration information based on the performance indicators.
[0097] In an optional implementation of some embodiments, the above-mentioned flow control configuration information includes at least one control group, each control group of the at least one control group contains at least one control item, each control item of the at least one control item contains at least one control condition, and at least one control condition constitutes a control condition group in each control item.
[0098] In an optional implementation of some embodiments, the storage location of the above-mentioned flow control configuration information includes at least one of the following: a file, a third-party service, and a flow control service.
[0099] It is understood that the units described in the device 600 are similar to those described in the reference Figure 5 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 600 and the units included therein, and will not be described in detail here.
[0100] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 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.
[0101] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0102] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0103] It should be noted that the computer-readable medium described in some embodiments of the present disclosure 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.
[0104] In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device. In some embodiments of the present disclosure, 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. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0105] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0106] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives request data, extracts service feature data in the request data; detects whether the control condition group in at least one preset flow control configuration information matches the service feature data, wherein the at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to the at least one control condition group; in response to the existence of a target control condition group matching the service feature data in the at least one control condition group, determines the target control behavior information corresponding to the target control condition group; and performs flow limiting operations based on the target control behavior information.
[0107] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0108] 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 disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the 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 implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0109] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be set in a processor. For example, they may be described as: a processor including a configuration request acquisition unit, a current limiting matching unit, a behavior determination unit, and a current limiting operation unit. The names of these units do not, in some cases, constitute a limitation on the unit itself. For example, the request acquisition unit may also be described as a "unit that receives request data and extracts business feature data from the request data."
[0110] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0111] According to one or more embodiments of the present disclosure, a flow limiting method is provided, comprising: receiving request data, extracting business characteristic data in the above request data; detecting whether a control condition group in at least one preset flow control configuration information matches the above business characteristic data, wherein the above at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to the above at least one control condition group; in response to the presence of a target control condition group matching the business characteristic data in the above at least one control condition group, determining target control behavior information corresponding to the target control condition group; and performing flow limiting operations based on the target control behavior information.
[0112] According to one or more embodiments of the present disclosure, the above-mentioned detection of whether the control condition group in at least one preset flow control configuration information matches the business characteristic data includes: in response to receiving request data, obtaining at least one preset flow control configuration information, wherein each flow control configuration information in the at least one flow control configuration information includes at least one control group; obtaining at least one control item of each control group in the at least one control group, wherein the control item includes a control condition group and control behavior information corresponding to the control condition group; matching the control condition group in each control item in the at least one control item with the business characteristic data.
[0113] According to one or more embodiments of the present disclosure, a method for obtaining the at least one flow control configuration information includes at least one of the following: importing from a file, calling a third-party service, and reading from a flow control service, wherein the flow control service is a service that executes a flow limiting method.
[0114] According to one or more embodiments of the present disclosure, the service feature data is data including service feature fields and service feature values. And the matching of the control condition group in each control item in at least one control item with the service feature data includes: extracting the condition control field of each control condition in the control condition group in each control item to obtain at least one condition control field; in response to each condition control field in the at least one condition control field matching the service feature field in the service feature data, determining that the control condition group matches the service feature data.
[0115] According to one or more embodiments of the present disclosure, in response to the presence of a target control condition group matching the business characteristic data in at least one control condition group, the target control behavior information corresponding to the target control condition group is determined, including: in response to the presence of a target control condition group matching the business characteristic data in at least one control condition group, the control group where the target control condition group is located is determined as the target control group to obtain the target control group; and the control behavior information contained in the target control group is determined as the target control behavior information to obtain the target control behavior information.
[0116] According to one or more embodiments of the present disclosure, the above-mentioned current limiting operation based on target control behavior information includes: in response to receiving request data, limiting the request data according to the target control behavior information, wherein the request data includes at least one of the following: interface call, function call, business request data.
[0117] According to one or more embodiments of the present disclosure, after the step of receiving request data and extracting the business characteristic data in the request data, and before the step of detecting whether the control condition group in at least one preset flow control configuration information matches the business characteristic data, the method further includes: combining at least one control condition and control behavior information in the flow control configuration information to obtain combined flow control configuration information; and detecting whether the control condition group in at least one preset flow control configuration information matches the business characteristic data, including: detecting whether the control condition group in the preset combined flow control configuration information matches the business characteristic data.
[0118] According to one or more embodiments of the present disclosure, a method for generating a flow control configuration is provided, including: acquiring historical monitoring data; and generating and sending flow control configuration information based on the historical business data.
[0119] According to one or more embodiments of the present disclosure, the above-mentioned generation and sending of flow control configuration information based on historical business data includes: analyzing historical business data to obtain performance indicators of the business; and generating and sending flow control configuration information based on the performance indicators.
[0120] According to one or more embodiments of the present disclosure, the above-mentioned flow control configuration information includes at least one control group, each of the above-mentioned at least one control group contains at least one control item, each of the above-mentioned at least one control item contains at least one control condition, and the above-mentioned at least one control condition constitutes a control condition group in each control item.
[0121] According to one or more embodiments of the present disclosure, the storage location of the above-mentioned flow control configuration information includes at least one of the following: a file, a third-party service, and a flow control service.
[0122] According to one or more embodiments of the present disclosure, the current limiting device includes: a request acquisition unit, a current limiting matching unit, a behavior determination unit and a current limiting operation unit. The request acquisition unit is configured to receive request data and extract the service feature data in the request data; the current limiting matching unit is configured to detect whether the control condition group in at least one preset flow control configuration information matches the service feature data, wherein at least one flow control configuration information includes at least one control condition group and at least one control behavior information corresponding to the control condition group; the behavior determination unit is configured to determine the target control behavior information corresponding to the target control condition group in response to the existence of a target control condition group matching the service feature data in at least one control condition group; the current limiting operation unit is configured to perform a current limiting operation based on the target control behavior information.
[0123] According to one or more embodiments of the present disclosure, the above-mentioned current limiting matching unit is further configured to, in response to receiving request data, obtain at least one preset flow control configuration information, wherein each flow control configuration information in the at least one flow control configuration information includes at least one control group; obtain at least one control item of each control group in the at least one control group, wherein the control item includes a control condition group and control behavior information corresponding to the control condition group; match the control condition group in each control item in the at least one control item with the business characteristic data.
[0124] According to one or more embodiments of the present disclosure, a method for obtaining the at least one flow control configuration information includes at least one of the following: importing from a file, calling a third-party service, and reading from a flow control service, wherein the flow control service is a service that executes a flow limiting method.
[0125] According to one or more embodiments of the present disclosure, the above-mentioned business characteristic data is data containing business characteristic fields and business characteristic values; and the current limiting matching unit is further configured to extract the conditional control field of each control condition in the control condition group in each control item to obtain at least one conditional control field; in response to each conditional control field in at least one conditional control field matching the business characteristic field in the business characteristic data, determine that the control condition group matches the business characteristic data.
[0126] According to one or more embodiments of the present disclosure, the above-mentioned behavior determination unit is further configured to, in response to the presence of a target control condition group matching the business characteristic data in at least one control condition group, determine the control group where the target control condition group is located as the target control group to obtain the target control group; determine the control behavior information contained in the target control group as the target control behavior information to obtain the target control behavior information.
[0127] According to one or more embodiments of the present disclosure, the above-mentioned current limiting operation unit is further configured to, in response to receiving request data, limit the request data according to the target control behavior information, wherein the request data includes at least one of the following: interface call, function call, and business request data.
[0128] According to one or more embodiments of the present disclosure, the above-mentioned device also includes: a configuration combination unit, which is further configured to combine at least one control condition and control behavior information in the flow control configuration information to obtain combined flow control configuration information; and the current limiting matching unit is further configured to detect whether the control condition group in the preset combined flow control configuration information matches the service feature data.
[0129] According to one or more embodiments of the present disclosure, a flow control configuration generating device is provided, including: an information acquiring unit configured to acquire historical monitoring data; an information sending unit configured to generate and send flow control configuration information based on historical business data.
[0130] According to one or more embodiments of the present disclosure, the above-mentioned information sending unit is further configured to analyze historical service data to obtain performance indicators of the service; and generate and send flow control configuration information based on the performance indicators.
[0131] According to one or more embodiments of the present disclosure, the above-mentioned flow control configuration information includes at least one control group, each control group of at least one control group contains at least one control item, each control item of at least one control item contains at least one control condition, and at least one control condition constitutes a control condition group in each control item.
[0132] According to one or more embodiments of the present disclosure, the storage location of the above-mentioned flow control configuration information includes at least one of the following: a file, a third-party service, and a flow control service.
[0133] According to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above methods.
[0134] According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein when the program is executed by a processor, the method described in any of the above embodiments is implemented.
[0135] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A current limiting method, applied to a computing device other than a server, comprising: Receive request data, and extract service feature data from the request data; wherein the service feature data includes a service feature field; Detecting whether a control condition group in at least one preset flow control configuration information matches the service characteristic data, comprising: detecting whether a condition control field of each control condition in the control condition group matches the service characteristic field; wherein the at least one flow control configuration information comprises at least one control condition group and control behavior information corresponding to the at least one control condition group; the flow control configuration information is information used for flow limiting, and the control behavior information is behavior information adopted for controlling flow; the at least one flow control configuration information is generated based on the service characteristic field of historical service data; wherein the flow control configuration information is specifically generated in the following manner: acquiring historical monitoring data, wherein the historical monitoring data is historical service data; extracting the service characteristic field in the historical service data, and generating and sending the flow control configuration information based on the service characteristic field, wherein the flow control configuration information comprises at least one control condition group and control behavior information corresponding to the at least one control condition group; The detecting whether the condition control field of each control condition in the control condition group matches the service feature field includes: In response to the at least one conditional control field and the value of the conditional control field being the same as the service feature field and the service feature value of the service feature field, determining that the conditional control field matches the service feature field; In response to the existence of a target control condition group matching the service feature data in the at least one control condition group, determining target control behavior information corresponding to the target control condition group; A current limiting operation is performed based on the target control behavior information.
2. The method according to claim 1, wherein: The detecting whether a control condition group in at least one preset flow control configuration information matches the service feature data includes: In response to receiving the request data, obtaining at least one of the preset flow control configuration information, wherein each of the at least one flow control configuration information includes at least one control group; Acquire at least one control item of each control group in the at least one control group, wherein the control item includes the control condition group and control behavior information corresponding to the control condition group; The control condition group in each control item of the at least one control item is matched with the service characteristic data.
3. The method according to claim 2, wherein: The at least one flow control configuration information is obtained by at least one of the following methods: importing from a file, calling a third-party service, and reading from a flow control service, wherein the flow control service is a service that executes a flow limiting method.
4. The method according to claim 2, wherein: The service feature data is data including service feature fields and service feature values; as well as The matching the control condition group in each control item in the at least one control item with the service feature data includes: Extracting the condition control field of each control condition in the control condition group in each control item to obtain at least one condition control field; In response to each of the at least one conditional control field matching the service characteristic field in the service characteristic data, it is determined that the control condition group matches the service characteristic data.
5. The method according to claim 2, wherein: In response to the existence of a target control condition group matching the service feature data in the at least one control condition group, determining the target control behavior information corresponding to the target control condition group includes: In response to the existence of a target control condition group matching the service characteristic data in the at least one control condition group, determining the control group where the target control condition group is located as the target control group, thereby obtaining the target control group; The control behavior information included in the target control group is determined as the target control behavior information to obtain the target control behavior information.
6. The method according to claim 5, wherein: The performing a current limiting operation based on the target control behavior information includes: In response to receiving the request data, limiting the flow of the request data according to the target control behavior information, wherein the request data includes at least one of the following: interface call, function call, and service request data.
7. The method according to claim 1, wherein: After receiving the request data and extracting the service characteristic data in the request data in the step, and before detecting whether the control condition group in the preset at least one flow control configuration information matches the service characteristic data in the step, the method further includes: combining at least one control condition in the flow control configuration information with the control behavior information to obtain combined flow control configuration information; and The detecting whether a control condition group in at least one preset flow control configuration information matches the service feature data includes: Detect whether the control condition group in the preset combined flow control configuration information matches the service feature data.
8. The method according to claim 1, wherein: The generating and sending flow control configuration information based on the historical service data includes: Analyze the historical business data to obtain business performance indicators; Based on the performance indicator, the flow control configuration information is generated and sent.
9. The method according to claim 1, wherein: The flow control configuration information includes at least one control group, each of the at least one control group includes at least one control item, each of the at least one control item includes at least one control condition, and the at least one control condition constitutes a control condition group in each control item.
10. The method according to claim 1, wherein: The storage location of the flow control configuration information includes at least one of the following: a file, a third-party service, and a flow control service.
11. A current limiting device, applied to a computing device other than a server, comprising: A request acquisition unit, configured to receive request data and extract service feature data from the request data; wherein the service feature data includes a service feature field; A flow limiting matching unit, configured to detect whether a control condition group in at least one preset flow control configuration information matches the service feature data; specifically configured to: detect whether a condition control field of each control condition in the control condition group matches the service feature field; wherein the at least one flow control configuration information includes at least one control condition group and control behavior information corresponding to the at least one control condition group; the flow control configuration information is information used for flow limiting, and the control behavior information is behavior information adopted for controlling flow; the at least one flow control configuration information is generated based on the service feature field of historical service data; specifically configured to: in response to the at least one condition control field and the value of the condition control field being the same as the service feature field and the service feature value of the service feature field, determine that the condition control field matches the service feature field; a behavior determination unit, configured to, in response to the existence of a target control condition group matching the service feature data in the at least one control condition group, determine target control behavior information corresponding to the target control condition group; a current limiting operation unit, configured to perform a current limiting operation based on the target control behavior information; An information acquisition unit is configured to acquire historical monitoring data, wherein the historical monitoring data is historical business data; An information sending unit is configured to extract a service feature field from the historical service data, and generate and send flow control configuration information based on the service feature field, wherein the flow control configuration information includes at least one control condition group and control behavior information corresponding to the at least one control condition group.
12. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
13. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Data detection method and device
CN108737333A
Method and system for detecting source network load system interaction message abnormity
CN110401624A
Service flow limiting method, device and system
CN110830384A
Page view control method and page view control device
CN111131058A
Flow control method and device and computing equipment
CN111726303A
