Low-code platform throttling method and apparatus

By receiving rate limiting configurations and generating rate limiting rules on a low-code platform, and combining this with circuit breaking functionality, the problem of dynamic rate limiting on low-code platforms is solved, enabling flexible rate limiting and circuit breaking management and ensuring the security and stability of applications.

CN116346728BActive Publication Date: 2026-06-26CHINA CITIC BANK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA CITIC BANK CO LTD
Filing Date
2023-03-28
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing dynamic rate limiting and circuit breaking methods are mainly high-code and cannot be applied to low-code platforms, resulting in a lack of effective rate limiting solutions for low-code platforms when facing sudden traffic surges.

Method used

This paper provides a low-code platform rate limiting method. By receiving a rate limiting configuration loading request, reading the rate limiting configuration table and generating rate limiting rules, it achieves dynamic rate limiting at the platform, application, and transaction levels. Combined with circuit breaking functionality, it uses the Sentinel framework for circuit breaking rule management.

Benefits of technology

It implements flexible and configurable dynamic rate limiting and circuit breaking functions for low-code platforms, reducing development workload and ensuring the safe and stable operation of low-code applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346728B_ABST
    Figure CN116346728B_ABST
Patent Text Reader

Abstract

The specification relates to the technical field of low-code platform, and particularly discloses a low-code platform flow limiting method and device, wherein the method comprises: receiving a flow limiting configuration loading request; the flow limiting configuration loading request carries a target server identifier and a target container identifier; in response to the flow limiting configuration loading request, reading a first flow limiting configuration table; the first flow limiting configuration table comprises a corresponding relationship between a server identifier, a container identifier, a flow limiting switch state and a platform-level flow upper limit threshold value; querying a target flow limiting switch state corresponding to the target server identifier and the target container identifier from the first flow limiting configuration table; in the case that the target flow limiting switch state is on, reading a target platform flow upper limit threshold value corresponding to the target server identifier and the target container identifier; generating and saving a first flow limiting rule based on the target platform flow upper limit threshold value, so as to realize low-code platform dynamic flow limiting based on the first flow limiting rule. The above scheme can realize flow limiting in a low-code platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of low-code platform technology, and in particular to a low-code platform rate limiting method and apparatus. Background Technology

[0002] With the development and increasing popularity of internet technology, internet applications have spread across various industries, and internet-based services are proliferating, reaching an ever-growing population. For services with large user bases, every minute of downtime online can result in irreparable economic losses and a decrease in user trust. Online services face numerous challenges, such as server crashes, network outages, and human error. Among these, the biggest challenge for stable online services is unpredictable traffic fluctuations, such as during ticket sales or flash sales. How to quickly and effectively respond to sudden surges in online traffic, how to maximize the use of computer resources to provide the best user experience, how to protect services, and how to prevent system crashes, restarts, or freezes due to excessive request traffic are all key research areas.

[0003] Currently, in order to solve the above-mentioned technical problems, dynamic rate limiting strategies are generally used for rate limiting and circuit breaking. However, existing dynamic rate limiting and circuit breaking methods are all high-code forms, which require coding and cannot be applied to low-code platforms.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This specification provides a method and apparatus for rate limiting on a low-code platform to address problems in the prior art.

[0006] This specification provides an embodiment of a low-code platform rate limiting method, including:

[0007] Receive a rate limiting configuration loading request; the rate limiting configuration loading request carries the target server identifier and the target container identifier;

[0008] In response to the rate limiting configuration loading request, the first rate limiting configuration table is read; the first rate limiting configuration table includes the correspondence between server identifier, container identifier, rate limiting switch status and platform-level traffic limit threshold.

[0009] Query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table; if the target rate limiting switch status is enabled, read the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier.

[0010] A first rate limiting rule is generated and saved based on the target platform's traffic limit threshold, so as to realize dynamic rate limiting on the low-code platform based on the first rate limiting rule.

[0011] In one embodiment, after querying the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table, the method further includes:

[0012] If the target current limiting switch is in the ON state, read the application service registration form;

[0013] From the application service registration table, query the application registration information in the platform corresponding to the target server identifier and the target container identifier; the application registration information includes the registration information of each application service in multiple application services.

[0014] For applications whose registration information includes an application rate limiting field value, set the application rate limiting field value to the application rate limiting upper limit threshold of the corresponding application service;

[0015] A second rate limiting rule is generated and saved based on the application rate limiting upper limit threshold.

[0016] In one embodiment, after querying the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table, the method further includes:

[0017] When the target current limiting switch is in the ON state, read the transaction code data table; the transaction code data table includes transaction code data for various transactions in a variety of transactions;

[0018] From the transaction code data table, query the transaction code data of various applications in the platform corresponding to the target server identifier and the target container identifier;

[0019] For transactions whose transaction code data contains a transaction rate limiting field value, set the transaction rate limiting field value to the corresponding transaction rate limiting upper limit threshold.

[0020] A third rate limiting rule is generated and saved based on the aforementioned transaction rate limiting upper limit threshold.

[0021] In one embodiment, after generating and saving the third rate-limiting rule based on the transaction rate-limiting upper limit threshold, the method further includes:

[0022] Receive a transaction request; the transaction request includes a transaction element identifier;

[0023] Based on the transaction element identifier, determine the corresponding backend server cluster information; allocate the transaction service request to the backend server in the backend server cluster corresponding to the backend server cluster information;

[0024] If the transaction corresponding to the transaction service request has rate limiting enabled, a platform-level token is obtained based on the first rate limiting rule, an application service-level token is obtained based on the second rate limiting rule, and a transaction-level token is obtained based on the third rate limiting rule.

[0025] If the acquisition of the platform-level token, the application service-level token, or the transaction-level token fails, the transaction service request will be rate-limited, and a transaction rate-limiting prompt message will be returned.

[0026] In one embodiment, the method further includes:

[0027] Receive circuit breaker configuration loading request;

[0028] In response to the circuit breaker configuration loading request, a circuit breaker configuration table is obtained; the circuit breaker configuration table includes circuit breaker configuration parameters for communication components that support circuit breaker functionality;

[0029] Filter communication components that support circuit breaking functionality from the circuit breaker configuration table; filter the main process that uses the communication components that support circuit breaking functionality; recursively filter the sub-processes and private business components that use the communication components that support circuit breaking functionality.

[0030] Based on the process identifier, node identifiers in the process, and communication component identifiers, a circuit breaker resource identifier is generated, and the corresponding circuit breaker configuration is loaded from the circuit breaker configuration table to generate and load the circuit breaker rules.

[0031] In one embodiment, the method further includes:

[0032] When the process engine corresponding to the transaction request reaches the target communication component that supports the circuit breaker function, it is determined whether the circuit breaker function of the target communication component is enabled.

[0033] When the circuit breaker function of the target communication component is enabled, the corresponding circuit breaker rule is invoked, and it is determined whether to breaker the transaction based on the circuit breaker rule.

[0034] In one embodiment, the method further includes:

[0035] If an exception occurs while executing the communication component, and the transaction is not in a circuit breaker state, record the exception data.

[0036] If the number of abnormal events reaches the circuit breaker threshold, the circuit breaker status of the communication component will be changed from closed to open.

[0037] This specification also provides an embodiment of a low-code platform rate limiting device, including:

[0038] The receiving module is used to receive rate limiting configuration loading requests; the rate limiting configuration loading requests carry the target server identifier and the target container identifier;

[0039] The reading module is used to read the first rate limiting configuration table in response to the rate limiting configuration loading request; the first rate limiting configuration table includes the correspondence between server identifier, container identifier, rate limiting switch status and platform-level traffic limit threshold;

[0040] The query module is used to query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table; when the target rate limiting switch status is enabled, it reads the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier.

[0041] The first rate limiting module is used to generate and save a first rate limiting rule based on the target platform's traffic limit threshold, so as to realize dynamic rate limiting on the low-code platform based on the first rate limiting rule.

[0042] This specification also provides a computer device, including a processor and a memory for storing processor-executable instructions, wherein the processor, when executing the instructions, implements the steps of the low-code platform rate limiting method described in any of the above embodiments.

[0043] This specification also provides a computer-readable storage medium storing computer instructions that, when executed, implement the steps of the low-code platform rate limiting method described in any of the above embodiments.

[0044] This specification provides an embodiment of a low-code platform rate limiting method. A server can receive a rate limiting configuration loading request, which carries a target server identifier and a target container identifier. In response to the request, the server reads a first rate limiting configuration table. This table includes the correspondence between server identifiers, container identifiers, rate limiting switch states, and platform-level traffic limit thresholds. The server queries the first rate limiting configuration table for the target rate limiting switch state corresponding to the target server identifier and target container identifier. If the target rate limiting switch state is enabled, the server reads the target platform traffic limit threshold corresponding to the target server identifier and target container identifier. Based on the target platform traffic limit threshold, a first rate limiting rule is generated and saved to implement dynamic rate limiting on the low-code platform. In the above scheme, users can configure the rate limiting function of the low-code platform through the first rate limiting configuration table. After receiving the rate limiting configuration loading request of the container, the server can query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table. When the rate limiting switch status is enabled, the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier can be read. Based on the target platform traffic limit threshold, the first rate limiting rule is generated and saved. Based on the first rate limiting rule, dynamic rate limiting of the low-code platform can be implemented, which can realize flexible and configurable dynamic rate limiting function. Applications developed on the low-code platform can achieve dynamic rate limiting by configuring rate limiting and circuit breaking rules, which reduces the development workload of low-code platform application developers and provides reliable protection for the safe and stable operation of low-code applications. Attached Figure Description

[0045] The accompanying drawings, which are included to provide a further understanding of this specification and form part of it, do not constitute a limitation thereof. In the drawings:

[0046] Figure 1 A schematic diagram of a low-code platform rate limiting method in one embodiment of this specification is shown;

[0047] Figure 2 A flowchart of a low-code platform rate limiting method according to one embodiment of this specification is shown;

[0048] Figure 3 A flowchart of a low-code platform rate limiting method according to one embodiment of this specification is shown;

[0049] Figure 4 A flowchart of a low-code platform rate limiting method according to one embodiment of this specification is shown;

[0050] Figure 5 A flowchart of a low-code platform rate limiting method according to one embodiment of this specification is shown;

[0051] Figure 6 A schematic diagram of a low-code platform rate limiting device according to one embodiment of this specification is shown;

[0052] Figure 7 A schematic diagram of a computer device according to one embodiment of this specification is shown. Detailed Implementation

[0053] The principles and spirit of this specification will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement this specification, and are not intended to limit the scope of this specification in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0054] Those skilled in the art will recognize that the embodiments described in this specification can be implemented as a system, apparatus, method, or computer program product. Therefore, the disclosure of this specification can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0055] This specification provides an example of a rate limiting method for a low-code platform. Figure 1 A flowchart of a low-code platform rate limiting method according to one embodiment of this specification is shown. While this specification provides method operation steps or apparatus structures as illustrated in the following embodiments or figures, more or fewer operation steps or module units may be included in the method or apparatus based on conventional or non-inventive effort. In steps or structures where there is no logically necessary causal relationship, the execution order of these steps or the module structure of the apparatus is not limited to the execution order or module structure described in the embodiments and figures of this specification. When the method or module structure is applied in actual devices or terminal products, it can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even a distributed processing environment) according to the method or module structure shown in the embodiments or figures.

[0056] Specifically, such as Figure 1 As shown, a low-code platform rate limiting method provided in one embodiment of this specification may include the following steps:

[0057] Step S101: Receive a rate limiting configuration loading request; the rate limiting configuration loading request carries the target server identifier and the target container identifier.

[0058] The method in this embodiment can be applied to a server. The server can receive rate limiting configuration loading requests. The rate limiting configuration loading request can be issued by a container in a low-code platform. The rate limiting configuration loading request can carry the target server identifier and the target container identifier.

[0059] Step S102: In response to the rate limiting configuration loading request, read the first rate limiting configuration table; the first rate limiting configuration table includes the correspondence between server identifier, container identifier, rate limiting switch status and platform-level traffic limit threshold.

[0060] The server can read the first rate limiting configuration table in response to a rate limiting configuration loading request. The first rate limiting configuration table can be stored locally or in a database server. Users can configure rate limiting rules using the first rate limiting configuration table. The first rate limiting configuration table can include the correspondence between server identifiers, container identifiers, rate limiting switch status, and platform-level traffic limit thresholds.

[0061] Step S103: Query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table; if the target rate limiting switch status is on, read the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier.

[0062] The server can query the target rate limiting switch status corresponding to the target server identifier and target container identifier from the first rate limiting configuration table. When the target rate limiting switch is enabled, the server can obtain the target platform traffic limit threshold corresponding to the target server identifier and target container identifier from the first rate limiting configuration table. When the target rate limiting switch is disabled, no rate limiting is applied. The target platform traffic limit threshold refers to the maximum traffic that a single container service can handle overall.

[0063] Step S104: Generate and save a first rate limiting rule based on the target platform traffic limit threshold, so as to realize dynamic rate limiting of the low-code platform based on the first rate limiting rule.

[0064] Specifically, a first rate-limiting rule can be generated based on the target platform's traffic limit threshold and stored in a cache. Subsequently, the container service can implement dynamic rate limiting for the low-code platform based on this first rate-limiting rule.

[0065] In the above embodiments, users can configure the rate limiting function of the low-code platform through the first rate limiting configuration table. After receiving the rate limiting configuration loading request of the container, the server can query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table. When the rate limiting switch status is enabled, the server can read the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier, generate and save the first rate limiting rule based on the target platform traffic limit threshold, and implement dynamic rate limiting of the low-code platform based on the first rate limiting rule. This can realize a flexible and configurable dynamic rate limiting function. Applications developed on the low-code platform can enjoy the dynamic rate limiting capability simply by configuring rate limiting and circuit breaking rules, which reduces the development workload of low-code platform application developers and provides a reliable guarantee for the safe and stable operation of low-code applications.

[0066] In some embodiments of this specification, after querying the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table, the method may further include: if the target rate limiting switch status is enabled, reading the application service registration table; querying the application registration information in the platform corresponding to the target server identifier and the target container identifier from the application service registration table; the application registration information includes the registration information of each application service among multiple application services; for applications whose registration information contains an application rate limiting field value, setting the application rate limiting field value to the application rate limiting upper limit threshold of the corresponding application service; and generating and saving a second rate limiting rule based on the application rate limiting upper limit threshold.

[0067] Specifically, when the target rate limiting switch is enabled, rate limiting configuration can also be applied to applications registered in the target container. The server can read the application service registration table. The application service registration table records the correspondence between server identifiers, container identifiers, and application registration information. The server can query the application registration information in the platform corresponding to the target server identifier and target container identifier from the application service registration table. The application registration information can include the registration information of each application service in multiple application services. For applications whose registration information includes an application rate limiting field value, the application rate limiting field value can be set to the application rate limiting upper limit threshold for that application service. Then, a second rate limiting rule can be generated and saved based on the application rate limiting upper limit threshold. The target container can implement dynamic rate limiting on the low-code platform according to the first and second rate limiting rules. Through the above method, platform-level rate limiting and application-level rate limiting on the low-code platform can be achieved.

[0068] In some embodiments of this specification, after querying the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table, the method may further include: if the target rate limiting switch status is enabled, reading a transaction code data table; the transaction code data table includes transaction code data for various transactions among various transactions; querying transaction code data for various applications in the platform corresponding to the target server identifier and the target container identifier from the transaction code data table; for transactions whose transaction code data contains a transaction rate limiting field value, setting the transaction rate limiting field value to the corresponding transaction rate limiting upper limit threshold. Then, a third rate limiting rule can be generated and saved based on the transaction rate limiting upper limit threshold.

[0069] Specifically, when the target rate limiting switch is enabled, the server can also read the transaction code data table. The transaction code data table can include transaction code data for various transactions across multiple transactions. The server can query the transaction code data table to find transaction code data for various transactions that can be implemented by multiple applications on the platform corresponding to the target server identifier and the target container identifier. For transactions whose transaction code data contains a transaction rate limiting field value, the transaction rate limiting field value can be set to the corresponding transaction rate limiting upper limit threshold; a third rate limiting rule is generated and saved based on the transaction rate limiting upper limit threshold. The target container can implement dynamic rate limiting on the low-code platform according to the first, second, and third rate limiting rules. Through the above methods, platform-level rate limiting, application-level rate limiting, and transaction-level rate limiting on the low-code platform can be achieved.

[0070] In some embodiments of this specification, after generating and saving the third rate-limiting rule based on the transaction rate-limiting upper limit threshold, the method may further include: receiving a transaction service request; the transaction service request including a transaction element identifier; determining the corresponding backend server cluster information based on the transaction element identifier; allocating the transaction service request to a backend server in the backend server cluster corresponding to the backend server cluster information; if the transaction corresponding to the transaction service request has rate-limiting enabled, obtaining a platform-level token based on the first rate-limiting rule, obtaining an application service-level token based on the second rate-limiting rule, and obtaining a transaction-level token based on the third rate-limiting rule; if obtaining the platform-level token, the application service-level token, or the transaction-level token fails, rate-limiting the transaction service request and returning a transaction rate-limiting prompt message.

[0071] After the rate limiting configuration is loaded, the server can receive transaction requests. Transaction requests may include transaction element identifiers. The corresponding backend server cluster information can be determined based on the transaction element identifier, and the transaction request can be assigned to a backend server within the corresponding backend server cluster. If rate limiting is enabled for the transaction corresponding to the transaction request, a platform-level token can be obtained based on the first rate limiting rule, an application service-level token can be obtained based on the second rate limiting rule, and a transaction-level token can be obtained based on the third rate limiting rule. If all three tokens are successfully obtained, the transaction request can be processed. Otherwise, if one or more of these tokens fail to be obtained, rate limiting is applied to the transaction request, and a rate limiting notification is returned. Through this method, dynamic rate limiting of transaction services can be implemented according to rate limiting rules.

[0072] In some embodiments of this specification, the method may further include: receiving a circuit breaker configuration loading request; in response to the circuit breaker configuration loading request, obtaining a circuit breaker configuration table; the circuit breaker configuration table includes circuit breaker configuration parameters of communication components that support circuit breaker functionality; filtering communication components that support circuit breaker functionality from the circuit breaker configuration table; filtering out main processes that use communication components that support circuit breaker functionality; recursively filtering out sub-processes and private business components that use communication components that support circuit breaker functionality; generating a circuit breaker resource identifier based on a process identifier, a node identifier in the process, and a communication component identifier, and loading the corresponding circuit breaker configuration from the circuit breaker configuration table to generate and load circuit breaker rules.

[0073] Users can also configure parameters in the circuit breaker configuration table to implement the circuit breaker function of the low-code platform. Specifically, the server can receive a circuit breaker configuration loading request and then, in response to the request, obtain the circuit breaker configuration table. The circuit breaker configuration table includes circuit breaker configuration parameters for communication components that support the circuit breaker function. The circuit breaker configuration table can include the correspondence between circuit breaker resource identifiers and circuit breaker configuration parameters. The server can filter out communication components that support the circuit breaker function from the circuit breaker configuration table, filter out the main process that uses the communication components that support the circuit breaker function, and recursively filter out the sub-processes and private business components that use the communication components that support the circuit breaker function. Then, a circuit breaker resource identifier can be generated based on the process identifier, the node identifier in the process, and the communication component identifier, and the circuit breaker configuration corresponding to the circuit breaker resource identifier can be loaded from the circuit breaker configuration table to generate and load circuit breaker rules. In this way, circuit breaker rules can be generated and loaded to realize dynamic circuit breaking of the low-code platform.

[0074] In some embodiments of this specification, the method may further include: when the process engine corresponding to the transaction business request executes to the target communication component that supports the circuit breaker function, determining whether the circuit breaker function of the target communication component is enabled; when the circuit breaker function of the target communication component is enabled, invoking the corresponding circuit breaker rule, and determining whether to circuit breaker the transaction according to the circuit breaker rule.

[0075] Specifically, when the process engine encounters a communication component that supports circuit breaking, it first checks if the circuit breaking function is enabled. If not, it continues execution according to the original logic of the communication component. If the circuit breaking function is enabled, it constructs the resource name of the corresponding circuit breaking rule based on the context object. It then determines whether to trigger the circuit breaker based on the resource name of the circuit breaking rule, i.e., it calls the Sentinel framework's `SphU.entry()` to obtain the Entry object. If the retrieval is successful, the processing logic of the communication component executes normally. If the retrieval fails, it indicates that the circuit breaker has been triggered, and the component exits directly with a status code of -1 and error code CBP4010. The status code and error code are used for subsequent business logic checks. Through this method, it is possible to determine whether to trigger a circuit breaker for a transaction based on the circuit breaking rules.

[0076] In some embodiments of this specification, the method may further include: recording abnormal data when an exception occurs during the execution of the communication component if the transaction is not in a circuit-breaking state; and changing the circuit-breaking state of the communication component from closed to open if the number of exceptions reaches a circuit-breaking threshold.

[0077] Specifically, when the communication component is not in a circuit breaker state, if an exception occurs during normal component communication, such as a connection failure with the associated system, request timeout, network failure, or service failure, the component will actively call the Sentinel framework's `Tracer.trace(e)` method to record the exception. The `StaticSolt` slot in the Sentinel framework will then record the number of exceptions. Finally, `DegradeSlot` in Sentinel will count whether the circuit breaker threshold has been reached. If the threshold is reached, the circuit breaker status of this communication component for that transaction will change from closed to open. In this way, request exceptions can be recorded, and circuit breaker processing can be initiated when the number of exceptions reaches the threshold.

[0078] When the circuit breaker duration of a certain transaction reaches the set duration, the status of the communication component that is in circuit breaker state changes from open to half-open. If a request arrives at this time, a transaction will be allowed to attempt to request the associated system. If the associated system service or network is normal at this time, the circuit breaker state will change from half-open to closed. Otherwise, if the request fails, the half-open state will be changed back to open.

[0079] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. For details, please refer to the foregoing descriptions of the relevant processing embodiments; they will not be repeated here.

[0080] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0081] The above method will be described below with reference to a specific embodiment. However, it is worth noting that this specific embodiment is only for better illustration of this specification and does not constitute an improper limitation of this specification.

[0082] This specific embodiment provides a rate limiting method for a low-code platform. The method in this embodiment is based on a low-code platform, implementing flexible and configurable dynamic rate limiting and circuit breaking functionality. Applications developed on the low-code platform can enjoy dynamic rate limiting and circuit breaking capabilities simply by configuring rate limiting and circuit breaking rules, reducing the development workload for low-code application developers and providing reliable assurance for the secure and stable operation of low-code applications.

[0083] The rate limiting function of the rapid collaborative development platform can be divided into two categories based on the overall system deployment: pre-processing rate limiting of the business processing platform and rate limiting of the business processing platform. The rate limiting level of the low-code platform is divided into three levels: platform-level rate limiting (container-level), application-level rate limiting, and transaction-level rate limiting. Platform-level rate limiting: the total traffic limit that a single container service can handle; application-level rate limiting: the traffic limit that a specified application within a single container service can handle; transaction-level rate limiting: the traffic limit that a business transaction corresponding to the six elements within a single container service can handle.

[0084] Rate limiting strategy: When the query rate per second (QPS) of a transaction on the low-code platform exceeds the set threshold, new requests will be rejected immediately by throwing a FlowException exception within the system and responding to the requester with a specific rate limiting message.

[0085] Low-code application developers can persist relevant rate limiting data in the database through a visual configuration interface, including rate limiting switches, platform-level rate limiting thresholds, application-level rate limiting thresholds, and transaction-level rate limiting thresholds.

[0086] Please refer to Figure 2 The diagram illustrates the flow chart of the rate limiting configuration loading process in this specific embodiment. Figure 2 As shown, the rate limiting configuration loading process may include the following steps:

[0087] a. Initialize platform-level rate limiting, read the T_FLOW_CONTROL table, query whether the rate limiting switch of the current container is enabled and the corresponding platform-level traffic limit threshold based on the server IP and container number (container identifier). If rate limiting is enabled, load the value of the FLOW_CONTROL field as the traffic limit of the business processing platform or the front end of the business processing platform, and use "LIMITING" as the resource name of the rate limiting rule. Save the rate limiting rule in the cache, and then execute the subsequent loading steps.

[0088] b. If the rate limiting switch for the container process is enabled, begin initializing application-level rate limiting. Read the T_SVR_RSGT table. If it is a front-end application, query all registered application information in the configuration library. Otherwise, query the application registration information of the corresponding business processing platform based on the server IP and container number. If the application has set a FLOW_CONTROL field value, load the value of this field as the rate limiting upper limit threshold for the application, and identify the rate limiting rule as "backend application server IP_application number_port". Save the rate limiting rule in the cache, and then execute the subsequent loading steps.

[0089] c. If the rate limiting switch of the container process is turned on, start executing the initialization of transaction-level rate limiting, read the T_EXT_TRN table, query the transaction code data of all registered applications under the container, if the transaction code has the FLOW_CONTROL field value set, then load the value of the field as the rate limiting upper limit threshold of the service corresponding to the transaction code, and identify the rate limiting rule with "region code_business type code_contractor code_business unit code_initiator flag_external transaction code", and save the rate limiting rule in the cache.

[0090] d. Finally, load all the rate limiting rules generated in the first three steps into the FlowRuleManager of the Sentinel framework.

[0091] Please refer to Figure 3 The diagram illustrates the execution process of the pre-rate limiting function in this specific embodiment. Figure 3 The hollow circle in the diagram represents the beginning, and the solid black circle represents the end. For example... Figure 3As shown, after the front-end receives a transaction request, it enters the transaction dispatcher's functional module. In this module, the worker thread first obtains the backend server cluster information corresponding to the six-element identifier carried by the request. Then, it allocates the backend server to which the request needs to be forwarded through a random algorithm. Next, it determines whether the service for this transaction request has rate limiting enabled. If it is not enabled, it directly enters the logic of forwarding the request; if it is enabled, it attempts to obtain a platform-level rate limiting token (i.e., by calling the platform-level rate limiting rules of the request through Sentinel's Sphu.entry() method; other tokens are similar), an application-level token, and a transaction-level token.

[0092] If platform-level token acquisition fails, it is assumed that the request QPS has reached the pre-set limit, the request is directly intercepted and a rate limiting prompt is issued. If application-level or transaction-level token acquisition fails, it is assumed that the corresponding backend server to be forwarded has reached its traffic limit. At this time, the business processing platform cluster is re-queried to see if there are any remaining servers that can handle the request. If so, the three-level token acquisition steps for the newly assigned server to be forwarded are continued. If the acquisition is successful, the request is forwarded directly. If all backend servers in the cluster that can handle the request have reached their rate limiting limits, the request is rejected and a rate limiting prompt is returned.

[0093] When rate limiting is enabled for a certain service, a request is considered acceptable and enters the forwarding logic only if all three levels of tokens are successfully acquired. Regardless of whether request forwarding fails or token acquisition at all three levels fails, an attempt will be made to reallocate the request to another server for processing. This maximizes the system's response rate and prevents situations where some services in the system are idle but refuse to provide service.

[0094] Please refer to Figure 4 This diagram illustrates the execution process of the rate limiting function of the business processing platform in this specific embodiment. Figure 4 As shown, the business processing platform adds a SentinelLimitHandler class to implement transaction rate limiting control. This handler is inserted into the execution processing chain via SPI. When a request reaches SentinelLimitHandler, it first checks whether rate limiting is enabled. If not, it continues to execute the subsequent processing chain. If rate limiting is enabled, it concatenates the resource name of the Level 3 token corresponding to the request from the context, and then attempts to obtain the token using the resource name of the platform-level token. If it fails, it returns a rate limiting message. If the platform-level token is successfully obtained, it attempts to obtain the application-level token. If it fails, it returns a rate limiting message. If the application-level token is successfully obtained, it then attempts to obtain the transaction-level token. If it fails, it returns a transaction rate limiting message. If it succeeds, it allows the request and continues to execute subsequent logic.

[0095] The low-code platform's circuit breaker function uses the communication component in the workflow orchestration as the smallest circuit breaker unit. Communication components that support the circuit breaker function will have five parameters added to the parameter list, as shown in Table 1 below.

[0096] In the visual service orchestration interface, select the communication component that supports circuit breaking, and configure the relevant threshold data for circuit breaking. The specific configuration parameters are explained in Table 1 below:

[0097] Table 1

[0098]

[0099] The circuit breaker states can include: closed, open, and partially open.

[0100] The circuit breaker configuration loading process may include the following steps:

[0101] a. Use the T_BASC and T_BASC_ARG tables to filter out communication components that support the circuit breaker function;

[0102] b. Select the main process that uses communication components that support circuit breaker functionality;

[0103] c. Recursively filter out sub-processes and private business components that use communication components that support circuit breaking functionality;

[0104] d. Use "process number + node number in the process + component number" as the unique identifier for the circuit breaker resource, load the corresponding circuit breaker configuration, and generate the corresponding circuit breaker rules;

[0105] e. Finally, load the circuit breaker rules generated in the previous step into the FlowRuleManager of the Sentinel framework.

[0106] Please refer to Figure 5 The diagram shows a flowchart illustrating the functional execution process in this specific embodiment. Figure 5 The hollow circle in the diagram represents the beginning, and the solid black circle represents the end. For example... Figure 5 As shown, the background circuit breaker function execution process may include the following steps:

[0107] When the process engine reaches a communication component that supports circuit breaking, it first checks whether the circuit breaking function is enabled. If it is not enabled, the original logic of the communication component continues to execute. If the circuit breaking function is enabled, it constructs the resource name of the corresponding circuit breaking rule based on the context object. It then determines whether to break the circuit based on the resource name of the circuit breaking rule, i.e., it calls the Sentinel framework's SphU.entry() to obtain the Entry object. If the acquisition is successful, the processing logic of the communication component is executed normally. If the acquisition fails, it means that the circuit breaking is triggered, the component exits directly, status code -1, error code: CBP4010. The status code and error code are used for subsequent business judgment.

[0108] When the communication component is not in a circuit breaker state, if a connection failure, request timeout, network failure, or service failure occurs during normal component communication, the component will actively call the Sentinel framework's `Tracer.trace(e)` method to record the exception. The `StaticSolt` slot in the Sentinel framework will then record the number of exceptions. Finally, `DegradeSlot` in Sentinel will be used to determine if the circuit breaker threshold has been reached. If the circuit breaker threshold is reached, the circuit breaker status of this communication component for that transaction will change from closed to open.

[0109] When the circuit breaker duration of a certain transaction reaches the set duration, the status of the communication component that is in circuit breaker state changes from open to half-open. If a request arrives at this time, a transaction will be allowed to attempt to request the associated system. If the associated system service or network is normal at this time, the circuit breaker state will change from half-open to closed. Otherwise, if the request fails, the half-open state will be changed back to open.

[0110] Based on the same inventive concept, this specification also provides a low-code platform rate limiting device in its embodiments, as described in the following embodiments. Since the principle by which the low-code platform rate limiting device solves the problem is similar to that of the low-code platform rate limiting method, the implementation of the low-code platform rate limiting device can refer to the implementation of the low-code platform rate limiting method, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated. Figure 6 This is a structural block diagram of a low-code platform rate limiting device according to an embodiment of this specification, such as... Figure 6 As shown, it includes: a receiving module 601, a reading module 602, a query module 603, and a first rate limiting module 604. The structure is described below.

[0111] The receiving module 601 is used to receive a rate limiting configuration loading request; the rate limiting configuration loading request carries a target server identifier and a target container identifier.

[0112] The reading module 602 is used to read the first rate limiting configuration table in response to the rate limiting configuration loading request; the first rate limiting configuration table includes the correspondence between server identifier, container identifier, rate limiting switch status and platform-level traffic limit threshold.

[0113] The query module 603 is used to query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table; when the target rate limiting switch status is on, it reads the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier.

[0114] The first rate limiting module 604 is used to generate and save a first rate limiting rule based on the target platform's traffic limit threshold, so as to realize dynamic rate limiting of the low-code platform based on the first rate limiting rule.

[0115] In some embodiments of this specification, the device may further include a second rate limiting module, which can be used to: read an application service registration table when the target rate limiting switch is in the enabled state; query application registration information in the platform corresponding to the target server identifier and the target container identifier from the application service registration table; the application registration information includes registration information of each application service among multiple application services; for applications whose registration information contains an application rate limiting field value, set the application rate limiting field value to the application rate limiting upper limit threshold of the corresponding application service; and generate and save a second rate limiting rule based on the application rate limiting upper limit threshold.

[0116] In some embodiments of this specification, the device may further include a third rate limiting module, which can be used to: read a transaction code data table when the target rate limiting switch is in the "on" state; the transaction code data table includes transaction code data for various transactions among various transactions; query transaction code data for various applications in the platform corresponding to the target server identifier and the target container identifier from the transaction code data table; for transactions whose transaction code data contains a transaction rate limiting field value, set the transaction rate limiting field value to the corresponding transaction rate limiting upper limit threshold; and generate and save a third rate limiting rule based on the transaction rate limiting upper limit threshold.

[0117] In some embodiments of this specification, the device may further include a business processing module, which may be used to: receive a transaction business request; the transaction business request includes a transaction element identifier; determine the corresponding backend server cluster information based on the transaction element identifier; allocate the transaction business request to a backend server in the backend server cluster corresponding to the backend server cluster information; if the transaction corresponding to the transaction business request has a rate limiting function enabled, obtain a platform-level token based on the first rate limiting rule, an application service-level token based on the second rate limiting rule, and a transaction-level token based on the third rate limiting rule; if obtaining the platform-level token, the application service-level token, or the transaction-level token fails, rate limit the transaction business request and return a transaction rate limiting prompt message.

[0118] In some embodiments of this specification, the device may further include a circuit breaker module, which can be used to: receive a circuit breaker configuration loading request; in response to the circuit breaker configuration loading request, obtain a circuit breaker configuration table; the circuit breaker configuration table includes circuit breaker configuration parameters of communication components that support circuit breaker functionality; filter communication components that support circuit breaker functionality from the circuit breaker configuration table; filter out main processes that use communication components that support circuit breaker functionality; recursively filter out sub-processes and private business components that use communication components that support circuit breaker functionality; generate a circuit breaker resource identifier based on the process identifier, the node identifier in the process, and the communication component identifier, and load the corresponding circuit breaker configuration from the circuit breaker configuration table to generate and load circuit breaker rules.

[0119] In some embodiments of this specification, the circuit breaker module can also be used to: determine whether the circuit breaker function of the target communication component is enabled when the process engine corresponding to the transaction business request executes to the target communication component that supports the circuit breaker function; and if the circuit breaker function of the target communication component is enabled, call the corresponding circuit breaker rule and determine whether to circuit breaker the transaction according to the circuit breaker rule.

[0120] In some embodiments of this specification, the circuit breaker module can also be used to: record abnormal data when an abnormality occurs during the execution of the communication component when the transaction is not in a circuit breaker state; and change the circuit breaker state of the communication component from closed to open when the number of abnormalities reaches the circuit breaker threshold.

[0121] As can be seen from the above description, the embodiments of this specification achieve the following technical effects: Users can configure the rate limiting function of the low-code platform through the first rate limiting configuration table. After receiving the rate limiting configuration loading request of the container, the server can query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table. When the rate limiting switch status is enabled, the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier can be read. Based on the target platform traffic limit threshold, a first rate limiting rule is generated and saved. Based on the first rate limiting rule, dynamic rate limiting of the low-code platform can be implemented, which can realize a flexible and configurable dynamic rate limiting function. Applications developed on the low-code platform can enjoy the ability of dynamic rate limiting simply by configuring rate limiting and circuit breaking rules, which reduces the development workload of low-code platform application developers and provides a reliable guarantee for the safe and stable operation of low-code applications.

[0122] This specification also provides a computer device, which can be found in the following description. Figure 7 The diagram shown illustrates the structural composition of a computer device based on the low-code platform rate limiting method provided in the embodiments of this specification. Specifically, the computer device may include an input device 71, a processor 72, and a memory 73. The memory 73 stores processor-executable instructions. When the processor 72 executes the instructions, it implements the steps of the low-code platform rate limiting method described in any of the above embodiments.

[0123] In this embodiment, the input device can specifically be one of the main devices for information exchange between the user and the computer system. The input device may include a keyboard, mouse, camera, scanner, light pen, handwriting input tablet, voice input device, etc.; the input device is used to input raw data and programs for processing these data into the computer. The input device can also receive data transmitted from other modules, units, and devices. The processor can be implemented in any suitable manner. For example, the processor can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers, etc. The memory can specifically be a memory device used to store information in modern information technology. The memory can include multiple layers; in digital systems, anything that can store binary data can be considered memory; in integrated circuits, a circuit without physical form but with storage function is also called memory, such as RAM, FIFO, etc.; in a system, a storage device with physical form is also called memory, such as a memory stick, TF card, etc.

[0124] In this embodiment, the specific functions and effects implemented by the computer device can be explained in comparison with other embodiments, and will not be repeated here.

[0125] This specification also provides a computer storage medium based on a low-code platform rate limiting method in its embodiments. The computer storage medium stores computer program instructions that, when executed, implement the steps of the low-code platform rate limiting method described in any of the above embodiments.

[0126] In this embodiment, the storage medium includes, but is not limited to, random access memory (RAM), read-only memory (ROM), cache, hard disk drive (HDD), or memory card. The memory can be used to store computer program instructions. The network communication unit can be an interface configured according to standards specified in the communication protocol for network connection communication.

[0127] In this embodiment, the specific functions and effects implemented by the program instructions stored in the computer storage medium can be explained by comparison with other embodiments, and will not be repeated here.

[0128] Obviously, those skilled in the art will understand that the modules or steps of the embodiments described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this specification are not limited to any particular combination of hardware and software.

[0129] It should be understood that the above description is for illustrative purposes and not for limitation. Many embodiments and applications beyond the provided examples will be apparent to those skilled in the art upon reading the above description. Therefore, the scope of this specification should not be determined by reference to the above description, but rather by reference to the foregoing claims and the full scope of their equivalents.

[0130] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to the embodiments described herein by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A low-code platform rate limiting method, characterized in that, include: Receive a rate limiting configuration loading request; the rate limiting configuration loading request carries the target server identifier and the target container identifier; In response to the rate limiting configuration loading request, the first rate limiting configuration table is read; the first rate limiting configuration table includes the correspondence between server identifier, container identifier, rate limiting switch status and platform-level traffic limit threshold. Query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table; When the target rate limiting switch is enabled, read the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier; A first rate limiting rule is generated and saved based on the target platform's traffic limit threshold. When the target rate limiting switch is enabled, the application service registration table of the low-code platform is queried, and the application rate limiting field value of each application service in the table is used to generate and save the second rate limiting rule. When the target rate limiting switch is enabled, the third rate limiting rule is generated and saved by querying the transaction code data table of the low-code platform and based on the transaction rate limiting field value of each transaction code in the table. The first rate limiting rule, the second rate limiting rule, and the third rate limiting rule are loaded into the traffic rule manager of the flow control framework to implement dynamic rate limiting on the low-code platform based on the first rate limiting rule, the second rate limiting rule, and the third rate limiting rule.

2. The low-code platform rate limiting method according to claim 1, characterized in that, When the target rate limiting switch is enabled, the application service registration table of the low-code platform is queried, and a second rate limiting rule is generated and saved based on the application rate limiting field values ​​of each application service in the table, including: If the target current limiting switch is in the ON state, read the application service registration form; From the application service registration table, query the application registration information in the platform corresponding to the target server identifier and the target container identifier; the application registration information includes the registration information of each application service in multiple application services. For applications whose registration information includes an application rate limiting field value, set the application rate limiting field value to the application rate limiting upper limit threshold of the corresponding application service; A second rate limiting rule is generated and saved based on the application rate limiting upper limit threshold.

3. The low-code platform rate limiting method according to claim 2, characterized in that, When the target rate limiting switch is enabled, a third rate limiting rule is generated and saved by querying the transaction code data table of the low-code platform and based on the transaction rate limiting field value of each transaction code in the table, including: When the target current limiting switch is in the ON state, read the transaction code data table; the transaction code data table includes transaction code data for various transactions in a variety of transactions; From the transaction code data table, query the transaction code data of various applications in the platform corresponding to the target server identifier and the target container identifier; For transactions whose transaction code data contains a transaction rate limiting field value, set the transaction rate limiting field value to the corresponding transaction rate limiting upper limit threshold. A third rate limiting rule is generated and saved based on the aforementioned transaction rate limiting upper limit threshold.

4. The low-code platform rate limiting method according to claim 3, characterized in that, After generating and saving the third rate-limiting rule based on the transaction rate-limiting upper limit threshold, the method further includes: Receive a transaction request; the transaction request includes a transaction element identifier; Based on the transaction element identifier, determine the corresponding backend server cluster information; allocate the transaction service request to the backend server in the backend server cluster corresponding to the backend server cluster information; If the transaction corresponding to the transaction service request has rate limiting enabled, a platform-level token is obtained based on the first rate limiting rule, an application service-level token is obtained based on the second rate limiting rule, and a transaction-level token is obtained based on the third rate limiting rule. If the acquisition of the platform-level token, the application service-level token, or the transaction-level token fails, the transaction service request will be rate-limited, and a transaction rate-limiting prompt message will be returned.

5. The low-code platform rate limiting method according to claim 1, characterized in that, Also includes: Receive circuit breaker configuration loading request; In response to the circuit breaker configuration loading request, a circuit breaker configuration table is obtained; the circuit breaker configuration table includes circuit breaker configuration parameters for communication components that support circuit breaker functionality; Filter communication components that support the circuit breaker function from the circuit breaker configuration table; filter the main process that uses the communication components that support the circuit breaker function; Recursively filter out sub-processes and private business components that use communication components that support circuit breaking; Based on the process identifier, node identifiers in the process, and communication component identifiers, a circuit breaker resource identifier is generated, and the corresponding circuit breaker configuration is loaded from the circuit breaker configuration table to generate and load the circuit breaker rules.

6. The low-code platform rate limiting method according to claim 5, characterized in that, Also includes: When the process engine corresponding to the transaction request reaches the target communication component that supports the circuit breaker function, it is determined whether the circuit breaker function of the target communication component is enabled. When the circuit breaker function of the target communication component is enabled, the corresponding circuit breaker rule is invoked, and it is determined whether to breaker the transaction based on the circuit breaker rule.

7. The low-code platform rate limiting method according to claim 6, characterized in that, Also includes: If an exception occurs while executing the communication component, and the transaction is not in a circuit breaker state, record the exception data. If the number of abnormal events reaches the circuit breaker threshold, the circuit breaker status of the communication component will be changed from closed to open.

8. A low-code platform rate limiting device, characterized in that, include: The receiving module is used to receive rate limiting configuration loading requests; The rate limiting configuration loading request carries the target server identifier and the target container identifier; The reading module is used to read the first rate limiting configuration table in response to the rate limiting configuration loading request; the first rate limiting configuration table includes the correspondence between server identifier, container identifier, rate limiting switch status and platform-level traffic limit threshold; The query module is used to query the target rate limiting switch status corresponding to the target server identifier and the target container identifier from the first rate limiting configuration table; When the target rate limiting switch is enabled, read the target platform traffic limit threshold corresponding to the target server identifier and the target container identifier; The first rate limiting module is used to generate and save a first rate limiting rule based on the target platform's traffic limit threshold; when the target rate limiting switch is enabled, it generates and saves a second rate limiting rule by querying the application service registration table of the low-code platform and based on the application rate limiting field values ​​of each application service in the table; when the target rate limiting switch is enabled, it generates and saves a third rate limiting rule by querying the transaction code data table of the low-code platform and based on the transaction rate limiting field values ​​of each transaction code in the table; and loads the first rate limiting rule, the second rate limiting rule, and the third rate limiting rule into the traffic rule manager of the flow control framework to achieve dynamic rate limiting of the low-code platform based on the first rate limiting rule, the second rate limiting rule, and the third rate limiting rule.

9. A computer device, characterized in that, It includes a processor and a memory for storing processor-executable instructions, wherein the processor, when executing the instructions, implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.