A method, device, electronic device and medium for controlling interface concurrency

By pre-configuring concurrency control information through filters, and obtaining and judging interface access requests, the problems of inflexible interface concurrency control and code coupling in existing technologies are solved, and unified configuration and timely effect of interface concurrency information are realized.

CN116955374BActive Publication Date: 2026-03-27PING AN BANK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies cannot flexibly control the concurrency of each interface, the modification process is complex and the effective period is long, and they are heavily coupled with the application system code.

Method used

By pre-configuring concurrency control information through filters, the system obtains access requests from terminal devices, determines whether matching concurrency control conditions exist, and determines the concurrency control result based on the conditions and access parameters, thereby achieving unified configuration and flexible control of the interface.

Benefits of technology

It enables flexible concurrency control for each interface, simplifies the modification process, reduces code coupling with the application system, and ensures timely implementation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955374B_ABST
    Figure CN116955374B_ABST
Patent Text Reader

Abstract

The application provides a method, device, electronic equipment and medium for controlling interface concurrency. The method is applied to a filter configured for a target system, and includes: obtaining an access request of a terminal device for accessing a target interface in a target application system; judging whether a target concurrency control condition matched with a target interface name exists in pre-configured concurrency control information of the filter based on the target interface name; if the target concurrency control condition exists, determining a concurrency control result for the access request based on the target concurrency control condition and access parameters; and if the target concurrency control condition does not exist, releasing the access request to enable the terminal device to access the target interface in the target application system, so that concurrency control can be flexibly implemented for each interface.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computers, in particular to a method and device for controlling interface concurrency, an electronic device and a medium. BACKGROUND

[0002] Many application systems are now designed with a separation of front and back ends. When a toC application system provides popular services to the outside world, it needs to consider the concurrency of the interface. In terms of design ideas, the interface needs to be able to withstand the pressure of concurrency to prevent the system from collapsing under high concurrency and affecting other business functions of the system.

[0003] In the prior art, the concurrency of an interface is usually controlled by an isolation gateway or the rapid tripping of an interface is realized by a hystrix component to achieve control of the concurrency of the interface. The above-mentioned solutions have the following disadvantages: the concurrency that each interface can withstand is different, and the concurrency of each interface cannot be flexibly controlled; each time the interface concurrency information needs to be modified, a process needs to be gone through to apply to other systems, or the modification needs to be made on the hystrix and then the application system needs to be released before taking effect, the modification process is complex, and the period of taking effect after modification is long; in practice, the dimensions of the concurrency that each interface needs to control are different, and the existing solutions cannot support such needs; the use of hystrix requires configuration of each interface, and the code coupling is serious. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a method and device for controlling interface concurrency, an electronic device and a medium, which can flexibly control the concurrency of each interface and decouple from the specific business code of the application system.

[0005] The method for controlling interface concurrency provided by the present application is applied to a filter configured for a target system, and the method comprises the following steps:

[0006] An access request of a terminal device accessing a target interface in a target application system is obtained, and the access request carries an access parameter and a target interface name;

[0007] Based on the target interface name, it is determined whether there is a target concurrency control condition matching the target interface name in the pre-configured concurrency control information of the filter;

[0008] If the target concurrency control condition exists, a concurrency control result of the access request is determined based on the target concurrency control condition and the access parameter;

[0009] If the target concurrency control condition does not exist, the access request is released to allow the terminal device to access the target interface in the target application system.

[0010] In some embodiments, in the method of controlling the concurrency, the determining of the concurrency control result of the access request based on the target concurrency control condition and the access parameter comprises:

[0011] determining whether the access request meets the target concurrency control condition based on the access parameter;

[0012] if yes, entering the concurrency control procedure;

[0013] if no, releasing the access request to allow the terminal device to access the target interface in the target application system.

[0014] In some embodiments, in the method of controlling the concurrency, the determining of whether the access request meets the target concurrency control condition based on the access parameter comprises:

[0015] determining a target access parameter matching a dimension concurrency control condition in at least one concurrency dimension in the target concurrency control condition;

[0016] determining whether the access request meets the dimension concurrency control condition in the matching concurrency dimension based on the target access parameter.

[0017] In some embodiments, in the method of controlling the concurrency, the determining of whether the target concurrency control condition matching the target interface name exists in the concurrency control information pre-configured in the filter comprises:

[0018] determining whether the target interface name exists in the concurrency control information pre-configured in the filter based on the target interface name;

[0019] if yes, obtaining at least one dimension concurrency control condition associated with the target interface name as the target concurrency control condition.

[0020] In some embodiments, in the method of controlling the concurrency, before the filter obtains the access request of the terminal device accessing the target interface in the target application system, the method further comprises:

[0021] configuring attribute configuration information of the target interface in the target application system in the filter; the attribute configuration information of the target interface comprises the target interface name;

[0022] configuring a dimension concurrency control condition of at least one dimension associated with the target interface name.

[0023] In some embodiments, in the method of controlling the concurrency, the attribute configuration information of the target interface and the dimension concurrency control condition are configured by the following method:

[0024] The response filter corresponds to the visual management control received configuration operation, configuration of the target interface attribute configuration information, associated dimension concurrent control condition.

[0025] In some embodiments, the control interface concurrent method also includes: in response to a modification operation for the dimension concurrent control condition, modifying the dimension concurrent control condition, so that the filter processes access requests before the modification time based on the modified dimension concurrent control condition, and processes access requests after the modification time based on the modified dimension concurrent control condition.

[0026] In some embodiments, an apparatus for controlling interface concurrency is also provided, which is applied to a filter configured for a target system; the apparatus comprises:

[0027] An acquisition module is configured to acquire an access request of a terminal device accessing a target interface in a target application system; the access request carries an access parameter and a target interface name;

[0028] A judgment module is configured to judge, based on the target interface name, whether there is a target concurrent control condition matching the target interface name in pre-configured concurrent control information of the filter;

[0029] A determination module is configured to determine, when it is judged that there is a target concurrent control condition matching the target interface name, a concurrent control result of the access request based on the target concurrent control condition and the access parameter;

[0030] A release module is configured to release the access request when it is judged that there is no target concurrent control condition matching the target interface name, so that the terminal device accesses the target interface in the target application system.

[0031] In some embodiments, an electronic device is also provided, which comprises a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the control interface concurrency method.

[0032] In some embodiments, a computer readable storage medium is also provided, which stores a computer program, and the computer program is executed by the processor to perform the steps of the control interface concurrency method.

[0033] The embodiment of the application provides a method, device, electronic equipment and medium for controlling interface concurrency, which is applied to a filter configured for a target system. The method comprises the following steps: obtaining an access request carrying an access parameter and a target interface name in a terminal device accessing a target application system; determining whether a target concurrency control condition matched with the target interface name exists in pre-configured concurrency control information of the filter; if yes, determining a concurrency control result of the access request based on the target concurrency control condition and the access parameter; and if no, releasing the access request, so that the terminal device accesses a target interface in the target application system. In this way, the pre-configured concurrency control information of the filter is used to control all interfaces of the application system that need to be controlled, the concurrency information of the interfaces is uniformly configured, and the code of the application system is decoupled. The target concurrency control condition matched with each control interface is determined based on the access request, flexible concurrency control is performed on each interface based on the concurrency that can be borne by each interface, and the interface concurrency information does not need to be applied to other systems for modification each time, so that the modification process is simple and can take effect in time. BRIEF DESCRIPTION OF DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be considered as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0035] Figure 1 A method flowchart for controlling interface concurrency is shown in the embodiment of the application;

[0036] Figure 2 A method flowchart for determining whether a target concurrency control condition matched with a target interface name exists in pre-configured concurrency control information of a filter is shown in the embodiment of the application;

[0037] Figure 3 A method flowchart for another method for controlling interface concurrency is shown in the embodiment of the application;

[0038] Figure 4 A method flowchart for determining a concurrency control result of an access request based on a target concurrency control condition and an access parameter is shown in the embodiment of the application;

[0039] Figure 5 A method flowchart for determining whether an access request meets a target concurrency control condition based on an access parameter is shown;

[0040] Figure 6 A structural schematic diagram of a device for controlling interface concurrency provided by the embodiment of the application is shown.

[0041] Figure 7 A structural schematic diagram of the electronic device is shown. DETAILED DESCRIPTION

[0042] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowcharts used in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts by those skilled in the art under the guidance of the content of the present application.

[0043] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0044] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0045] Now many application systems are front-end and back-end separated architecture design. When facing the popular services provided by the application system to toC, the interface concurrency problem needs to be considered. In the design idea, the pressure of concurrency that the interface can bear needs to be considered to prevent the system from collapsing under high concurrency and thus affecting other business functions of the system.

[0046] In the prior art, concurrent control of interfaces is usually implemented by means of an isolation gateway or fast fusing of interfaces by means of a hystrix component. The above scheme has the following disadvantages: the concurrent control of each interface cannot be flexibly controlled because the concurrent control of each interface is different; each time the interface concurrent information needs to be modified, a process needs to be gone through to apply to other systems, or the modification needs to be waited for the application system to be released before taking effect, the modification process is complex, and the period of taking effect after modification is long; in practice, the dimensions of the concurrent control of each interface are different, and the existing scheme cannot support such a demand; and the hystrix needs to be configured for each interface, and is seriously coupled with the code.

[0047] Here, each time the interface concurrent information needs to be modified, a process needs to be gone through to apply to other systems, for example, an isolation gateway. The isolation gateway and the application system are not a set of systems. If the interface concurrent information of the application system needs to be modified, a modification application needs to be submitted to the isolation gateway system, and the modification can be performed only after the modification of the isolation gateway system is agreed.

[0048] Based on this, the embodiments of the present application provide a method and device for controlling the concurrency of an interface, an electronic device and a medium. The method is applied to a filter configured for a target system. The method first acquires an access request of a terminal device accessing a target interface in a target application system, the access request carrying an access parameter and a target interface name. Then, it is determined whether there is a target concurrency control condition matching the target interface name in the pre-configured concurrency control information of the filter. If there is, a concurrency control result of the access request is determined based on the target concurrency control condition and the access parameter. If there is not, the access request is released, so that the terminal device accesses the target interface in the target application system. In this way, the pre-configured concurrency control information of the filter is used to control the concurrency of all interfaces of the application system that need to be controlled, the concurrency information of the interfaces is uniformly configured, and the code of the application system is decoupled. For each access request of a control interface, a target concurrency control condition matching the access request is determined, the concurrency of each interface is flexibly controlled based on the concurrency that each interface can bear, and each time the interface concurrent information needs to be modified, an application to other systems is no longer needed, the modification process is simple, and the modification can take effect in time.

[0049] Please refer to Figure 1 , Figure 1 A flowchart of a method for controlling the concurrency of an interface is shown. Specifically, the method for controlling the concurrency of an interface is applied to a filter configured for a target system. The method includes the following steps S101-S104.

[0050] S101, an access request of a terminal device accessing a target interface in a target application system is acquired. The access request carries an access parameter and a target interface name.

[0051] S102, determine whether there is a target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter;

[0052] S103, if there is, determine the concurrency control result of the access request based on the target concurrency control condition and the access parameter;

[0053] S104, if there is not, release the access request to enable the terminal device to access the target interface in the target application system.

[0054] The embodiment of the present application provides a method for controlling interface concurrency. First, an access request of a terminal device accessing a target application system carrying an access parameter and a target interface name is obtained. Then, it is determined whether there is a target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter. If there is, the concurrency control result of the access request is determined based on the target concurrency control condition and the access parameter. If there is not, the access request is released to enable the terminal device to access the target interface in the target application system. In this way, the concurrency control information pre-configured by the filter is used to control all interfaces of the application system that need to be controlled, the concurrency information of the interfaces is uniformly configured, and the code of the application system is decoupled. The target concurrency control condition matching each control interface is determined based on the access request of each control interface. Flexible concurrency control is performed on each interface based on the concurrency that can be tolerated by each interface. Each time the interface concurrency information needs to be modified, no application to other systems is needed, the modification process is simple, and the modification can take effect in time.

[0055] In the step S101, an access request of a terminal device accessing a target interface in a target application system is obtained. The access request carries an access parameter and a target interface name.

[0056] The filter receives an access request of a terminal device accessing a target interface in a target application system. The target interface is any interface of the target application system, not only an interface that needs to be controlled.

[0057] Here, the target interface name can be an interface identifier such as an ID of the target interface.

[0058] In the embodiment of the present application, the access parameter carried in the access request is a parameter name, which is obtained by analyzing the access request. Specifically, after the access request is obtained, the parameter name of the access parameter is obtained through the Java reflection mechanism. For example, the access parameter includes a user id, a mobile phone number, an ID card number, a device id, a device ip, and an activity id.

[0059] In the step S102, it is judged whether there is a target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter based on the target interface name.

[0060] Specifically, refer to Figure 2 , it is judged whether there is a target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter based on the target interface name, including steps S201-S202.

[0061] S201, it is judged whether there is a target interface name in the concurrency control information pre-configured by the filter based on the target interface name.

[0062] S202, if there is, at least one dimension concurrency control condition associated with the target interface name is obtained as the target concurrency control condition.

[0063] Here, the concurrency control information pre-configured by the filter includes the concurrency control information of the interfaces in the target application system that need to be controlled; wherein the concurrency control information of each interface is configured according to the concurrency that the interface can bear; and the concurrency control information of each interface includes an interface name and at least one dimension concurrency control condition associated with the interface name. The dimension concurrency control condition is the dimension concurrency control condition corresponding to the dimension of the concurrency to be controlled by the interface.

[0064] Here, the dimension of the concurrency to be controlled by the interface includes user id, mobile phone number, ID number, device id, device ip, activity id, interface access volume, etc.

[0065] Here, because the dimensions of the concurrency to be controlled by each interface are different, for example, A interface needs to count the access times of users based on user id, if the access times of user id are too high, the access request carrying the user id is not allowed to pass, so as to prevent the same user from repeatedly accessing the interface; B interface needs to count the access times of users based on ID number, if the access times of ID number are too high, the access request carrying the ID number is not allowed to pass, so as to prevent the same user from repeatedly accessing the interface; C interface does not allow the access request of the device id configured in the target list to pass.

[0066] Based on this, in the embodiments of the application, the concurrency control condition of each interface is configured according to the concurrency that the interface can bear, and further, the dimension concurrency control condition corresponding to the dimension of the concurrency to be controlled by the interface is accurately configured according to the dimension, so that the concurrency control of the application system is more flexible and accurate.

[0067] In the embodiments of the application, the concurrency control information of the interfaces in the filter also needs to be configured to obtain the configured filter.

[0068] Specifically, refer to Figure 3 Before the filter acquires an access request of a terminal device to a target interface of a target application system, the method further includes the following steps S301-S302.

[0069] S301, configure attribute configuration information of the target interface of the target application system in the filter; the attribute configuration information of the target interface includes a target interface name.

[0070] S302, configure a dimension concurrency control condition of at least one dimension associated with the target interface name.

[0071] In the embodiments of the present application, the attribute configuration information of the target interface and the dimension concurrency control condition are configured by the following method:

[0072] In response to a configuration operation received by a visual management control corresponding to the filter, the attribute configuration information of the target interface and the associated dimension concurrency control condition are configured.

[0073] That is, through the visual management control corresponding to the filter, even a business personnel who does not know how to write code can configure, adjust, and modify the attribute configuration information of the target interface and the associated dimension concurrency control condition.

[0074] For example, an interface name can be input in the visual management control, and a user id to be intercepted, an access frequency threshold corresponding to the user id, and a concurrency control condition of the user id dimension can be input; 3 times in the concurrency control condition of the user id dimension can be modified to 1 time, and so on.

[0075] In the embodiments of the present application, the attribute configuration information of the target interface and the associated dimension concurrency control condition are configured in the filter, and since all access requests will pass through the filter first, the filter can count access data of each target access parameter, such as the access frequency of a user with a user id A and the access frequency of the target interface.

[0076] Here, a redis distributed lock is created on the basis of the dimension, and the access request of a specific user or device is controlled through the redis distributed lock.

[0077] If the control is for the access amount of the interface, the access frequency of each concurrency dimension can be counted by counting the access request of the interface; specifically, the counting is performed through redis incr, and if the set value is reached, the subsequent access is intercepted.

[0078] Since the concurrency control information of all interfaces requiring concurrency control in the application system is configured in the filter, concurrency control is realized for each interface based on the access data and concurrency control information counted in the filter, thus realizing the decoupling of concurrency control and the code of the application system, and concurrency control information of each interface can be configured independently based on the filter, and there is no need to apply to other systems when configuring or modifying the concurrency control information; meanwhile, the concurrency control information of the interface can take effect immediately after being modified or configured.

[0079] In the method for controlling concurrency of interfaces, in response to a modification operation on the dimension concurrency control condition, the dimension concurrency control condition is modified, so that the filter processes access requests before the modification time based on the dimension concurrency control condition before the modification, and processes access requests after the modification time based on the dimension concurrency control condition after the modification.

[0080] In the step S103, if there is, the concurrency control result of the access request is determined based on the target concurrency control condition and the access parameter, that is, if there is a target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter, the concurrency control result of the access request is determined based on the target concurrency control condition and the access parameter.

[0081] If there is a target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter, it means that concurrency control is required for the target interface.

[0082] In the embodiments of the present application, please refer to Figure 4 , the determination of the concurrency control result of the access request based on the target concurrency control condition and the access parameter includes the following steps S401-S403.

[0083] S401, it is judged whether the access request meets the target concurrency control condition based on the access parameter.

[0084] S402, if yes, the concurrency control process is entered.

[0085] S403, if no, the access request is released to enable the terminal device to access the target interface in the target application system.

[0086] The concurrency control process includes intercepting the access request, suspending the intercepted request, and the like.

[0087] In the embodiments of the present application, please refer to Figure 5 , the judgment of whether the access request meets the target concurrency control condition based on the access parameter includes the following steps S501-S502.

[0088] S501, determine a target access parameter matching the dimension concurrency control condition in the at least one concurrency dimension of the target concurrency control condition based on the dimension concurrency control condition in the at least one concurrency dimension of the target concurrency control condition;

[0089] S502, judge whether the access request meets the dimension concurrency control condition of the matching concurrency dimension based on the target access parameter.

[0090] That is, when determining the concurrency control result of the access request, it is necessary to judge whether the access request meets the dimension concurrency control condition in any concurrency dimension of the target interface based on the access parameter; as long as the dimension concurrency control condition in one concurrency dimension is met, the access request enters the concurrency control process; otherwise, if the dimension concurrency control condition in each concurrency dimension is not met, the access request is released to enable the terminal device to access the target interface in the target application system.

[0091] Among them, the dimension concurrency control conditions in different concurrency dimensions of the target interface are different, and the access parameters corresponding to the dimension concurrency control conditions are different.

[0092] Based on this, in the step S103, the concurrency control result of the access request is determined based on the target concurrency control condition and the access parameter; specifically, whether the access request meets the dimension concurrency control condition of each concurrency dimension is judged based on the dimension concurrency control condition in at least one concurrency dimension of the target concurrency control condition and the access parameter, and a judgment result is obtained; based on the judgment result, the concurrency control result of the access request is determined.

[0093] In this way, the interface concurrency control in the embodiment of the application can not only be flexibly configured differently for different interfaces, but also can perform concurrency control on the interface in multiple concurrency dimensions, and the concurrency dimension can be specific to the user, ip, device id, etc., which is more flexible.

[0094] In the step S104, if there is no, the access request is released to enable the terminal device to access the target interface in the target application system.

[0095] That is, if there is no target concurrency control condition matching the target interface name in the concurrency control information pre-configured by the filter, it means that concurrency control is not needed for the target interface, and it can be directly released.

[0096] In the embodiments of the present application, the filter pre-configured concurrent control information does not have a target concurrent control condition matching the target interface name, that is, based on the target interface name, it is determined whether the target interface name exists in the filter pre-configured concurrent control information, and the target interface name is not found, or in other words, the filter pre-configured concurrent control information does not have a target concurrent control condition matching the target interface name, that is, the filter pre-configured concurrent control information does not have a target concurrent control condition matching the target interface name.

[0097] Based on the same inventive concept, the embodiments of the present application also provide a device for controlling interface concurrency corresponding to the method of controlling interface concurrency. Since the principle of the device in the embodiments of the present application solves the problem is similar to the above-mentioned method of controlling interface concurrency, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described.

[0098] Please refer to Figure 6 The embodiments of the present application provide a device for controlling interface concurrency, which is applied to a filter configured for a target system. Specifically, the device comprises:

[0099] The obtaining module 601 is configured to obtain an access request of a terminal device accessing a target interface in a target application system, wherein the access request carries an access parameter and a target interface name.

[0100] The judging module 602 is configured to determine, based on the target interface name, whether a target concurrent control condition matching the target interface name exists in filter pre-configured concurrent control information.

[0101] The determining module 603 is configured to, when it is determined that the target concurrent control condition matching the target interface name exists, determine a concurrent control result of the access request based on the target concurrent control condition and the access parameter.

[0102] The passing module 604 is configured to, when it is determined that the target concurrent control condition matching the target interface name does not exist, pass the access request, so that the terminal device accesses the target interface in the target application system.

[0103] The embodiment of the present application provides a device for controlling interface concurrency, first obtaining an access request of a terminal device to a target application system, the access request carrying access parameters and a target interface name, then judging whether a target concurrency control condition matched with the target interface name exists in pre-configured concurrency control information of a filter; if yes, determining a concurrency control result of the access request based on the target concurrency control condition and the access parameters; if no, releasing the access request, so that the terminal device accesses a target interface in the target application system; in this way, the pre-configured concurrency control information of the filter is used to realize concurrency control of all interfaces of an application system that need to be controlled, realize unified configuration of concurrency information of the interfaces, and decouple the code of the application system; and the target concurrency control condition matched with each access request of a control interface is determined, flexible concurrency control of each interface is realized based on the concurrency that each interface can bear, and the interface concurrency information does not need to be applied to other systems for modification each time, the modification process is simple, and the modification can take effect in time.

[0104] In some embodiments, the determining module in the device for controlling interface concurrency is specifically used for:

[0105] judging whether the access request meets the target concurrency control condition based on the access parameters;

[0106] if yes, entering a concurrency control process;

[0107] if no, releasing the access request, so that the terminal device accesses a target interface in the target application system.

[0108] In some embodiments, the determining module in the device for controlling interface concurrency is specifically used for:

[0109] determining target access parameters matched with the dimension concurrency control condition based on the dimension concurrency control condition in at least one concurrency dimension of the target concurrency control condition;

[0110] judging whether the access request meets the dimension concurrency control condition of the matched concurrency dimension based on the target access parameters.

[0111] In some embodiments, the judging module in the device for controlling interface concurrency is specifically used for:

[0112] judging whether the target interface name exists in the pre-configured concurrency control information of the filter based on the target interface name;

[0113] If there is, obtain at least one dimension concurrency control condition associated with the target interface name as the target concurrency control condition.

[0114] In some embodiments, the device for controlling interface concurrency further comprises:

[0115] A configuration module is configured to configure attribute configuration information of the target interface in the target application system in the filter before the filter obtains an access request of a terminal device accessing a target interface in a target application system; the attribute configuration information of the target interface comprises a target interface name.

[0116] The configuration module is configured to configure at least one dimension concurrency control condition of the target interface name.

[0117] In some embodiments, the configuration module in the device for controlling interface concurrency is specifically configured to:

[0118] In response to a configuration operation received by the visual management control of the filter, the configuration module is configured to configure the attribute configuration information of the target interface and the associated dimension concurrency control condition.

[0119] In some embodiments, the device for controlling interface concurrency further comprises:

[0120] A modification module is configured to modify the dimension concurrency control condition in response to a modification operation on the dimension concurrency control condition, so that the filter processes access requests before the modification time based on the dimension concurrency control condition before the modification, and processes access requests after the modification time based on the dimension concurrency control condition after the modification.

[0121] Based on the same inventive concept, the embodiments of the present application also provide a device for controlling interface concurrency corresponding to the method for controlling interface concurrency. Since the principle of the device in the embodiments of the present application solves the problem is similar to the above-mentioned method for controlling interface concurrency in the embodiments of the present application, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.

[0122] Please refer to Figure 7 , Figure 7 The structural schematic diagram of the electronic device is shown, specifically, the electronic device 700 comprises a processor 701, a memory 702 and a bus, the memory 702 stores machine readable instructions executable by the processor 701, when the electronic device 700 runs, the processor 701 and the memory 702 communicate through the bus, the machine readable instructions are executed by the processor 701 to execute the steps of the method for controlling interface concurrency.

[0123] Based on the same inventive concept, the application further provides a control interface concurrency device corresponding to the control interface concurrency method. Since the device solves problems in the same principle as the control interface concurrency method, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.

[0124] A computer readable storage medium, which stores a computer program, the computer program is run by a processor to execute the steps of the control interface concurrency method.

[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-described system and device can refer to the corresponding process in the method embodiment, and will not be described here in the application. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The above-described device embodiments are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some communication interface, device or module, which can be electrical, mechanical or other forms.

[0126] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. According to actual needs, some or all of the units can be selected to achieve the purpose of the embodiment.

[0127] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.

[0128] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a platform server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and various media that can store program codes.

[0129] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of controlling interface concurrency, the method comprising: The method is applied to a filter configured for a target system, and comprises: obtaining an access request of a terminal device for accessing a target interface in a target application system, wherein the access request carries access parameters and a target interface name; judging, based on the target interface name, whether there is a target concurrency control condition matching the target interface name in concurrency control information pre-configured by the filter; if yes, determining target access parameters matching a dimension concurrency control condition in the target concurrency control condition under at least one concurrency dimension; judging, based on the target access parameters, whether the access request meets the dimension concurrency control condition of the matching concurrency dimension; if yes, entering a concurrency control process; if no, releasing the access request to enable the terminal device to access the target interface in the target application system; if no, releasing the access request to enable the terminal device to access the target interface in the target application system.

2. The method of controlling concurrency of interfaces according to claim 1, wherein, The judging, based on the target interface name, whether there is a target concurrency control condition matching the target interface name in concurrency control information pre-configured by the filter, comprises: searching, based on the target interface name, whether there is the target interface name in the concurrency control information pre-configured by the filter; if yes, obtaining at least one dimension concurrency control condition associated with the target interface name as the target concurrency control condition.

3. The method of controlling concurrency of interfaces according to claim 1, wherein, Before the filter obtains the access request of the terminal device for accessing the target interface in the target application system, the method further comprises: configuring attribute configuration information of the target interface in the filter, wherein the attribute configuration information of the target interface comprises the target interface name; configuring dimension concurrency control conditions of at least one dimension associated with the target interface name.

4. The method of controlling concurrency of interfaces according to claim 3, wherein, The attribute configuration information of the target interface and the dimension concurrency control conditions are configured by the following method: in response to a configuration operation received by a visual management control corresponding to the filter, configuring the attribute configuration information of the target interface and the associated dimension concurrency control conditions.

5. The method of controlling concurrency of interfaces according to claim 3, wherein, in response to a modification operation for the dimension concurrency control condition, modifying the dimension concurrency control condition, so that the filter processes access requests before a modification time based on the dimension concurrency control condition before the modification and processes access requests after the modification time based on the dimension concurrency control condition after the modification.

6. An apparatus for controlling interface concurrency, the apparatus comprising: The device is applied to a filter configured for a target system, and comprises: an obtaining module configured to obtain an access request of a terminal device for accessing a target interface in a target application system, wherein the access request carries access parameters and a target interface name; a judging module configured to judge, based on the target interface name, whether there is a target concurrency control condition matching the target interface name in concurrency control information pre-configured by the filter; The determining module is configured to, when it is determined that there is a target concurrency control condition matching the target interface name, determine a target access parameter matching a dimension concurrency control condition of a dimension concurrency control condition under at least one concurrency dimension in the target concurrency control condition; determine whether the access request meets the dimension concurrency control condition of the matching concurrency dimension based on the target access parameter; if yes, enter the concurrency control process; and if no, release the access request to enable the terminal device to access the target interface in the target application system. The releasing module is configured to, when it is determined that there is no target concurrency control condition matching the target interface name, release the access request to enable the terminal device to access the target interface in the target application system.

7. An electronic device, comprising: The method comprises the following steps: A processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, the machine readable instructions are executed by the processor to execute the steps of the method for controlling interface concurrency according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program is executed by the processor to execute the steps of the method for controlling interface concurrency according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Network port protection method and system, electronic equipment and storage medium

    CN111949979A