Access interface distribution method and device
By filtering and supplementing the response capabilities of the interface set based on account attributes on the server, the problem of low access interface allocation efficiency is solved, and load balancing of interfaces and user experience improvement are achieved.
Patent Information
- Application Number
- CN202410706465.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-10-22
AI Technical Summary
The allocation efficiency of access interfaces on the server is low, causing some access channels to occupy interfaces when frequently called, making other channels unable to be called, affecting user experience.
By receiving the target access request, the corresponding interface set is filtered out according to the account attributes, and its response capability is detected. If it is lower than the threshold, idle interfaces are called from other interface sets to supplement the load balancing among the interface sets.
It improves the allocation efficiency of server interfaces, ensures smooth access to multiple access channels, and improves user experience.
Smart Images

Figure CN118819818A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the computer field, and in particular, to a method and device for allocating an access interface. Background Art
[0002] A server is a powerful computer system used to store and process data, and is usually used to support various business needs and applications. In the modern business environment, servers play a vital role, providing stable, efficient and secure services to enterprises and organizations. Multiple access interfaces for accessing the server are deployed on the server, and the server is accessed by calling these interfaces. Currently, as the application scenarios of servers become more and more numerous, in some scenarios, the server needs to support the access needs of accounts from different access channels. Multiple access channels are connected to the access interface of the server. If an access channel frequently calls the access interface, the access interface on the server will be occupied by the access channel, making it impossible for other access channels to call the access interface, which brings a very bad user experience to users. Summary of the invention
[0003] The embodiments of the present application provide a method and device for allocating an access interface to at least solve the problems in the related art.
[0004] According to an embodiment of the present application, a method for allocating an access interface is provided, wherein a plurality of access interfaces for accessing the server are deployed on a server, and the plurality of access interfaces are divided into a plurality of interface sets according to account attributes of accounts allowed to access the server, and the method is applied to the server, comprising:
[0005] receiving a target access request to the server;
[0006] Filtering a first interface set corresponding to the target access request from the plurality of interface sets according to request information carried by the target access request, wherein the request information is used to indicate an account attribute of an account that initiates the target access request;
[0007] Detecting a relationship between a response capability of the first interface set to an access request and a predetermined response threshold;
[0008] In the case where it is detected that the response capability of the first interface set to the access request is less than the predetermined response threshold, the access interface in an idle state is retrieved from other interface sets to supplement the first interface set, so as to obtain a second interface set, wherein the other interface set is an interface set included in the plurality of interface sets except the first interface set;
[0009] A target access interface is allocated for the target access request from the access interfaces in the second interface set that are in a space state.
[0010] As an optional implementation manner, the access interface in an idle state is retrieved from other interface sets and added to the first interface set to obtain the second interface set, including:
[0011] Filtering out a third interface set from other interface sets, whose response capability to the access request is greater than or equal to the predetermined response threshold;
[0012] The access interfaces in idle state are extracted from the third interface set and added to the first interface set to obtain the second interface set.
[0013] As an optional implementation manner, the step of selecting, from other interface sets, a third interface set whose response capability to the access request is greater than or equal to the predetermined response threshold, comprises:
[0014] Detecting a target ratio of the access interfaces in the other interface set that are in an idle state to the corresponding other interface set;
[0015] When it is determined that the target ratio is greater than or equal to the first threshold, the other interface set is determined as the third interface set.
[0016] As an optional implementation manner, the step of selecting a first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request includes:
[0017] Determining a target account attribute indicated by a target account identifier, wherein the request information includes the target account identifier;
[0018] The interface set corresponding to the target account attribute among the multiple interface sets is determined as the first interface set.
[0019] As an optional implementation manner, after allocating a target access interface for the target access request from the access interfaces in the second interface set that are in a space state, the method further includes:
[0020] Detecting first status information of a fourth interface set, wherein the first status information is used to indicate the occupation status of access interfaces included in the fourth interface set, wherein the fourth interface set is an interface set obtained by adding the access interfaces in an idle state from the other interface sets to the first interface set;
[0021] In a case where the first state information is used to indicate that the response capability of the fourth interface set to the access request is less than the target response capability, detecting a first access interface in the second interface set that is in an end-of-occupancy state;
[0022] Return the first access interface to the fourth interface set.
[0023] As an optional implementation manner, after allocating a target access interface for the target access request from the access interfaces in the second interface set that are in a space state, the method further includes:
[0024] Detecting second status information of the second interface set, wherein the second status information is used to indicate an occupation status of an access interface included in the second interface set;
[0025] When the second state information is used to indicate that the proportion of the access interfaces in the second interface set that are in an idle state is greater than a target idle threshold, extracting a target number of second access interfaces from the access interfaces in the second interface set that are in an idle state, wherein the target number is equal to the number of the access interfaces retrieved from the other interface sets;
[0026] Return the second access interface to the other interface set.
[0027] As an optional implementation manner, before filtering out the first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request, the method further includes:
[0028] Acquire target account information of a target account that initiates the target access request, wherein the target account information is used to indicate the request initiation status of the target account in a time period before the current moment;
[0029] Determining the response authority of the target access request on the server according to the target account information;
[0030] In a case where the response authority indicates that the server is allowed to respond to the target access request, the first interface set corresponding to the target access request is screened out from the plurality of interface sets according to the request information carried in the target access request.
[0031] As an optional implementation manner, determining the response authority of the target access request on the server according to the target account information includes:
[0032] Matching each of the target account information in the plurality of target account information with a corresponding target response condition, wherein the plurality of target account information is used to characterize the request initiation situation of the target account from multiple dimensions;
[0033] In the case that each target account information matches the corresponding target response condition, it is determined that the server is allowed to respond to the target access request.
[0034] According to another embodiment of the present application, a device for allocating access interfaces is provided, wherein a plurality of access interfaces for accessing the server are deployed on a server, and the plurality of access interfaces are divided into a plurality of interface sets according to account attributes of accounts allowed to access the server, and the device is applied to the server, comprising:
[0035] A receiving module, used for receiving a target access request to the server;
[0036] A first screening module, configured to screen out a first interface set corresponding to the target access request from the plurality of interface sets according to request information carried by the target access request, wherein the request information is used to indicate an account attribute of an account that initiates the target access request;
[0037] A first detection module, used to detect the relationship between the response capability of the first interface set to the access request and a predetermined response threshold;
[0038] A calling module, configured to call the access interface in an idle state from other interface sets to supplement the first interface set, so as to obtain a second interface set, when detecting that the response capability of the first interface set to the access request is less than the predetermined response threshold, wherein the other interface set is an interface set included in the plurality of interface sets except the first interface set;
[0039] An allocation module is used to allocate a target access interface for the target access request from the access interfaces in the second interface set that are in a space state.
[0040] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0041] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0042] Through the present application, by classifying multiple access interfaces on a server according to the account attributes of the account accessing the server, the multiple access interfaces can be divided into interface sets corresponding to each account attribute. Therefore, a target access request sent by an account with the account attribute can select an access interface from the corresponding first interface set for response. When selecting an access interface, the relationship between the response capability of the first interface set to the access request and a predetermined response threshold is detected, and when the response capability of the first interface set to the access request is less than the predetermined threshold, other interface sets in the multiple interface sets are borrowed and supplemented to the first interface set, and then a spatial access interface is selected for the target access request from the interface set after the spatial interface is supplemented, thereby achieving load balancing between interface sets. Therefore, the technical problem of low allocation efficiency of the access interface of the server in the related technology can be solved, thereby achieving the effect of improving the allocation efficiency of the server interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a hardware structure block diagram of a server device of an access interface allocation method according to an embodiment of the present application;
[0044] Figure 2 is a flowchart of a method for allocating access interfaces according to an embodiment of the present application;
[0045] Figure 3 is a schematic diagram of a framework of a method for allocating access interfaces according to an embodiment of the present application;
[0046] Figure 4 It is a schematic diagram of an idle resource coordination processing process of the access interface allocation method according to an embodiment of the present application;
[0047] Figure 5 It is a schematic diagram of an API overlimit processing process according to the access interface allocation method of an embodiment of the present application;
[0048] Figure 6 is a schematic diagram of a controller parallel processing process in a method for allocating access interfaces according to an embodiment of the present application;
[0049] Figure 7 It is a structural block diagram of an access interface allocation device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0052] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of an access interface allocation method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0053] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for allocating access interfaces in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0054] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0055] In this embodiment, a method for allocating an access interface is provided. Figure 2is a flow chart of a method for allocating access interfaces according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:
[0056] Step S202, receiving a target access request to the server;
[0057] Step S204, filtering out a first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request, wherein the request information is used to indicate the account attribute of the account that initiates the target access request;
[0058] Step S206, detecting the relationship between the response capability of the first interface set to the access request and a predetermined response threshold;
[0059] Step S208, when it is detected that the response capability of the first interface set to the access request is less than the predetermined response threshold, the access interface in an idle state is retrieved from other interface sets to supplement the first interface set, so as to obtain a second interface set, wherein the other interface set is an interface set included in the plurality of interface sets except the first interface set;
[0060] Step S210: Allocate a target access interface for the target access request from the access interfaces in the second interface set that are in a space state.
[0061] Through the above steps, by classifying the multiple access interfaces on the server according to the account attributes of the account accessing the server, the multiple access interfaces can be divided into interface sets corresponding to each account attribute. Therefore, the target access request sent by the account with the account attribute can select an access interface from the corresponding first interface set for response. When selecting the access interface, the relationship between the response capability of the first interface set to the access request and the predetermined response threshold is detected, and when the response capability of the first interface set to the access request is less than the predetermined threshold, other interface sets in the multiple interface sets are borrowed to supplement the first interface set, and then the space access interface is selected for the target access request from the interface set after the space interface is supplemented, so as to achieve load balancing between the interface sets. Therefore, the technical problem of low allocation efficiency of the access interface of the server in the related technology can be solved, so as to achieve the effect of improving the allocation efficiency of the server interface.
[0062] Optionally, in an embodiment of the present application, the interface set is obtained by dividing the access interfaces of the server according to the account attributes of the account allowed to access the server. When dividing, the access interfaces can be evenly distributed according to the number of account attributes of the account accessing the service area, or can also be divided according to the business demand information of the account of each account attribute, wherein the business demand information is used to characterize the business priority and the number of business transactions of the corresponding account on the server, and then the specific operation of dividing according to the business demand information of the account of the account attribute can be: obtaining the business priority and the number of business transactions carried in the business attribute information, using the weights corresponding to the business priority and the business transaction data to perform weighted sum calculation on the business priority and the business transaction data, and obtaining the target score of each account attribute, and then allocating multiple interfaces according to the proportional relationship between the target scores of each account attribute, and obtaining the interface set corresponding to each account attribute. Thus, the divided interface set meets the usage requirements of the account of each account attribute.
[0063] Optionally, in an embodiment of the present application, account attributes are used to indicate business processing information on the server, such as the business type of the business processed on the server. Accounts accessing the server can be classified according to the business type into account types for maintaining server business functions and account types for using the server's business functions. For ease of management, accounts under each account type can also be divided into multiple subclasses. For example, accounts under an account type that uses service area business functions can be divided according to the range of the account's IP address, thereby obtaining multiple subclasses. This solution does not limit this.
[0064] Optionally, in the embodiment of the present application, the service handling information may also be the IP location information of the account that initiated the service request. That is, the account that initiated the service request may be classified according to the IP location to obtain multiple account attributes. This solution does not limit this.
[0065] In the embodiment provided in the above step S202, the target access request is used to request access to the server. In order to facilitate the classification of access requests and the tracing of the account that initiates the access request, the target access request may carry request information indicating the account attributes of the account that initiates the access request.
[0066] In the embodiment provided in the above step S204, after receiving the access request, the target access request is diverted according to the request information carried by the access request, so that the target access request is connected to the corresponding first interface set, and the access interface used to respond to the target access request is called from the first interface set.
[0067] In the embodiment provided in the above step S206, the response capability of the first interface set to the access request is used to indicate the number of access interfaces in the interface set that are allowed to be called. The response capability of the first interface set to the access request may be but is not limited to the number of access interfaces in the first interface set that are in an idle state, or it may also be the proportion of access interfaces in the first interface set that are in an idle state. This solution does not limit this.
[0068] Optionally, in an embodiment of the present application, the predetermined response threshold can be set according to the response requirement of the first interface set to the access request. When the response request of the first interface set to the access request is greater than or equal to the predetermined response threshold, it can be determined that the response capability of the first interface set to the access request is higher than the predetermined requirement capability. At this time, there is no need to call the idle access interface in other interface sets. When the response request of the first interface set to the access request is less than the predetermined response threshold, it can be determined that the response capability of the first interface set to the access request is lower than the predetermined requirement capability. At this time, it is necessary to call the idle access interface in other interface sets.
[0069] In the embodiment provided in the above step S208, the access interface in the idle state called from other interface sets may be but is not limited to coming from one or more interface sets. For example, the response capability of each other interface set to the access request is detected. When there are multiple reference interface sets in other interface sets, an interface set with the greatest response capability to the access request can be screened out from the multiple reference sets to perform a secondment operation on the idle access interface, wherein the multiple reference interface sets are interface sets in other interface sets whose response capability to the access request is greater than or equal to the corresponding response threshold; or when there are multiple reference interface sets in other interface sets, the response capability of the reference interface sets to the access request can be screened out. And the corresponding response threshold is matched to obtain the reference idle interface number corresponding to the part of the response capability that exceeds the corresponding response threshold (that is, the number of excess idle access interfaces while ensuring that the interface set meets the requirements of the corresponding response threshold), and then the target number of idle access interfaces borrowed from each reference interface set is determined according to the proportional relationship between the reference idle interface numbers of each reference interface set and the number of idle access interfaces required by the first interface set, and the target number of idle access interfaces is transferred from the corresponding reference interface set to supplement the first interface set, thereby achieving load balancing among multiple reference interface sets under the premise of ensuring the access request response capability of each reference interface set. This scheme does not limit this.
[0070] In the embodiment provided in the above step S210, the target access interface can be an access interface randomly selected from the idle access interfaces of the second interface set, or it can also be selected from the idle access interfaces of the second interface set based on the matching relationship between the request response speed of each access interface and the target access request business requirement. This solution does not limit this.
[0071] As an optional embodiment, the access interface in an idle state is retrieved from other interface sets and added to the first interface set to obtain the second interface set, including:
[0072] Filtering out a third interface set from other interface sets, whose response capability to the access request is greater than or equal to the predetermined response threshold;
[0073] The access interfaces in idle state are extracted from the third interface set and added to the first interface set to obtain the second interface set.
[0074] Optionally, in an embodiment of the present application, each interface set may, but is not limited to, carry a target identifier for characterizing the response capability to an access request, and then by detecting the identification value of the target identifier carried by each other interface set, when the identification value is a first identification value, it characterizes that the response capability of the interface set to the access request is greater than or equal to a predetermined response capability; when the identification value is a second identification value, it characterizes that the response capability of the interface set to the access request is less than a predetermined response capability. This scheme does not limit this.
[0075] Optionally, in an embodiment of the present application, the number of idle access interfaces extracted from the third interface set can be determined based on the demand for idle access interfaces of the first interface set and / or the surplus of idle access interfaces of the third interface set, and this scheme does not limit this.
[0076] Through the above content, by using the interface set's response capability to access requests to screen other interface sets, a third interface set is screened out, and then idle access interfaces are borrowed from the third interface set, to achieve load balancing between interface sets while ensuring the requirements of each interface set's response capability to access requests, and the impact of interface load balancing on the normal calling requirements of the interface set.
[0077] As an optional embodiment, the step of selecting, from other interface sets, a third interface set whose response capability to the access request is greater than or equal to the predetermined response threshold, comprises:
[0078] Detecting a target ratio of the access interfaces in the other interface set that are in an idle state to the corresponding other interface set;
[0079] When it is determined that the target ratio is greater than or equal to the first threshold, the other interface set is determined as the third interface set.
[0080] Optionally, in an embodiment of the present application, the target ratio of detecting other interface sets can be obtained by obtaining the number of access interfaces in the idle state in the interface set and calculating it, or it can also be achieved by detecting the identification value of the target identifier carried by the interface set, and the target identifier is used to indicate the target ratio of the access interfaces in the idle state in the interface set to the corresponding interface set.
[0081] Through the above content, by obtaining the target ratio of the number of access interfaces in the idle state in each interface set, the target ratio reflects the responsiveness of the interface set to the access request, thereby ensuring the reliability of the selected third interface combination.
[0082] As an optional embodiment, the step of selecting a first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request includes:
[0083] Determining a target account attribute indicated by a target account identifier, wherein the request information includes the target account identifier;
[0084] The interface set corresponding to the target account attribute among the multiple interface sets is determined as the first interface set.
[0085] Through the above content, after receiving the target access request, the access request is diverted according to the account identifier carried in the access request, so as to allocate the corresponding interface set to the access request, thereby improving the response efficiency to the access request.
[0086] As an optional embodiment, after allocating a target access interface for the target access request from the access interfaces in the second interface set that are in a space state, the method further includes:
[0087] Detecting first status information of a fourth interface set, wherein the first status information is used to indicate the occupation status of access interfaces included in the fourth interface set, wherein the fourth interface set is an interface set obtained by adding the access interfaces in an idle state from the other interface sets to the first interface set;
[0088] In a case where the first state information is used to indicate that the response capability of the fourth interface set to the access request is less than the target response capability, detecting a first access interface in the second interface set that is in an end-of-occupancy state;
[0089] Return the first access interface to the fourth interface set.
[0090] Optionally, in an embodiment of the present application, the status information detection operation of the fourth interface set can be performed periodically, that is, the execution frequency of the status information detection operation is set according to demand, and the detection operation of the first status information of the fourth interface set is performed according to the execution frequency; or the status information detection operation can also be performed in real time; or the status information detection operation can also be triggered by the operation information of the server, for example, the request reception information of the access request corresponding to the fourth interface set received by the server is obtained, wherein the request reception information is used to indicate the server's reception status of the access request corresponding to the fourth interface set. When the request reception information is used to indicate that the number of access requests corresponding to the fourth interface set received by the server is greater than the target number, or the growth rate of the access requests corresponding to the fourth interface set received is greater than the target growth rate, the detection operation of the first status information of the fourth interface set is triggered. In this way, it is possible to trigger the detection operation of the status information according to actual operation needs, thereby improving the stability of server operation.
[0091] Through the above content, by detecting the status information of the interface set that provides an idle access interface for the second interface set, when it is determined that the response capability of the interface set to the access request is less than the target response capability, the operation of the second interface set returning the access interface is triggered, thereby ensuring the request response capability of the interface set to the access request.
[0092] As an optional embodiment, after allocating a target access interface for the target access request from the access interfaces in the second interface set that are in a space state, the method further includes:
[0093] Detecting second status information of the second interface set, wherein the second status information is used to indicate an occupation status of an access interface included in the second interface set;
[0094] When the second state information is used to indicate that the proportion of the access interfaces in the second interface set that are in an idle state is greater than a target idle threshold, extracting a target number of second access interfaces from the access interfaces in the second interface set that are in an idle state, wherein the target number is equal to the number of the access interfaces retrieved from the other interface sets;
[0095] Return the second access interface to the other interface set.
[0096] Through the above content, after the interface set that receives the access interface uses up the borrowed access interface, it returns the access interface to the interface set that borrowed the access interface, thereby ensuring the request response capability of each interface set in the server.
[0097] As an optional embodiment, before filtering out the first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request, the method further includes:
[0098] Acquire target account information of a target account that initiates the target access request, wherein the target account information is used to indicate the request initiation status of the target account in a time period before the current moment;
[0099] Determining the response authority of the target access request on the server according to the target account information;
[0100] In a case where the response authority indicates that the server is allowed to respond to the target access request, the first interface set corresponding to the target access request is screened out from the plurality of interface sets according to the request information carried in the target access request.
[0101] Optionally, in an embodiment of the present application, the target account information may be, but is not limited to, obtained from an information controller deployed in a server, and the information controller may include, but is not limited to, an IP controller, a resource controller, a user controller, a lock controller, and the like. The IP controller, when an attacker attacks, will call a large number of requests in a short period of time. In this controller, IP request volume detection and IP restriction are added. According to the rules, for example, if 100 requests are initiated from this IP in one minute, the IP will be locked and no longer receive requests for processing the IP. In this way, the attacker's continued large-scale requests will be directly returned, and the API request will be quickly terminated and resources will be released. The resource controller manages the number of connections that each module of the software business can carry under the premise of ensuring the service, so the number of connections that each module can carry must be limited. The API number limit is imposed on the detailed business module to achieve the control of the number of fine business requests, which can reduce the probability of over-limit. The lock controller, the business processed by some requests has a file lock, and only one request is allowed to obtain the lock at a time, and other requests will be waiting for the lock. For these requests, the request frequency will be limited in the lock controller. If it is not controlled, a large number of requests will be piled up waiting for processing, which will seriously occupy API resources. The user controller can count the number of APIs used by each user and restrict them. If it is considered a high-risk user, the current user's API access can be prohibited. If it is a medium-risk user, the number of API accesses per unit time can be reduced. Risk-free users can make normal requests. The user risk can be assessed and specified by the super administrator when creating. The above controllers are simple examples. More controllers can be added for restrictions to achieve security control and control of API over-limit risks. After the API request passes through these controllers, the processing results will be summarized as 0 and 1. 0 represents failure and 1 represents passing. For example, if the execution result of the current four controllers is 1111, it means that the controller restriction has been passed and it can be handled by the business module. If the execution result is not 1111, it means that at least one controller determines that the current API request does not meet the requirements and needs to be prohibited from continuing access. Through this judgment, APIs that do not meet the conditions will be quickly rejected and will not enter the business logic, which greatly reduces the waiting time and increases access security.
[0102] As an optional embodiment, determining the response authority of the target access request on the server according to the target account information includes:
[0103] Matching each of the target account information in the plurality of target account information with a corresponding target response condition, wherein the plurality of target account information is used to characterize the request initiation situation of the target account from multiple dimensions;
[0104] In the case that each target account information matches the corresponding target response condition, it is determined that the server is allowed to respond to the target access request.
[0105] As an optional implementation, Figure 3 Schematic diagram of the framework of the method for allocating access interfaces according to an embodiment of the present application. Figure 3 As shown, the server is accessed by accounts with different account attributes. The embodiment of the present application is to maintain the account of the server running status (corresponding to the web end below) and the account using the function of the server (corresponding to the third-party platform below). The solution provided by the present application involves:
[0106] (I) Coordination controller, the third-party platform API (access interface) call restrictions and web-side call restrictions are combined into the overall API restrictions. The coordination controller includes the following functions:
[0107] 1. Differentiate and process the source of API requests:
[0108] Different login credentials will be generated according to different login methods (hereinafter referred to as token). When a token is generated, it will be marked. For example, a number at the beginning indicates a web request, and a letter at the beginning indicates a third-party platform request. The coordination controller can distinguish the source of the request based on the token.
[0109] 2. API idle resource coordination:
[0110] By default, 50% of the API connections are used by the web side, and the other 50% are used by the third-party platform. For example, if the API connection limit is 1,000, then the web side and the third-party platform each have 500 connections. When the usage limit is reached, the coordination controller can reject or add subsequent requests to the pending queue according to software requirements. The coordination controller coordinates idle resources and reallocates idle resources by setting thresholds. The thresholds include idle thresholds, request idle resource thresholds, and reclaim idle resource thresholds. If the idle threshold is not exceeded, it means that the current resources are idle, and the API connection resources can be released for use by the third-party platform or the web side. The request idle resource threshold means that if this threshold is reached, the idle resources will be requested. The reclaim idle resource threshold means that if the web side releases the idle API connections to the third-party platform, then when the number of web side request connections reaches the reclaim idle resource threshold, a prompt to reclaim idle resources will be issued. For example, the idle threshold for the number of web connections is set to 80%, the idle resource request threshold is set to 90%, the idle resource recovery threshold is set to 90%, and the idle flag web_free_flag is set. If the number of web connections does not exceed 80% within ten minutes, it is considered that the number of web connections is idle, and web_free_flag is set to true. If the number of subsequent web-side request connections exceeds 80%, web_free_flag will be set to false. If the number of third-party client api connections surges and exceeds 90%, web_free_flag will be checked. If the value of web_free_flag is found to be true, the idle api resources on the web will be requested, and 10% of the api resources on the web will be used by the third-party platform. This is the allocation rule for idle resources. The following is the situation where idle resources are reclaimed. At this time, if a large number of requests appear on the web side, exceeding 90% of the current number of connections, the third-party platform controller will be informed that resources need to be reclaimed. After receiving the request, the third-party platform controller will no longer use the released API connections until it drops to the default allocated API connection number standard. The web side will continue to use the API connection number resources released by the third-party platform controller, thus reclaiming the released idle resources.
[0111] (ii) When the request passes the coordination controller, the controller judgment will be performed in parallel. IP controller, when the attacker attacks, a large number of requests will be called in a short period of time. In this controller, IP request volume detection and IP restriction are added. According to the rules, for example, if 100 requests are initiated from this IP in one minute, the IP will be locked and no longer receive requests for processing from this IP. In this way, the attacker's continued large-scale requests will be directly returned, and the API request will be quickly terminated and resources will be released. 3. Resource controller, the number of connections that each module of the management software business can carry while ensuring the service is different, so the number of connections that each module can carry must be limited. Limiting the number of APIs for detailed business modules can achieve control of the number of fine business requests and reduce the probability of over-limit. Lock controller, some requests process business with file locks, and only one request is allowed to obtain the lock at a time, and other requests will be waiting for the lock. For these requests, the request frequency will be limited in the lock controller. If it is not controlled, a large number of requests will be piled up waiting to be processed, which will seriously occupy API resources. The user controller can count the number of APIs used by each user and restrict them. If it is considered a high-risk user, the current user's API access can be prohibited. If it is a medium-risk user, the number of API accesses per unit time can be reduced. Risk-free users can make normal requests. The user risk can be assessed and specified by the super administrator when creating. The above controllers are simple examples. More controllers can be added for restrictions to achieve security control and control of API over-limit risks. After the API request passes through these controllers, the processing results will be summarized as 0 and 1. 0 represents failure and 1 represents passing. For example, if the execution result of the current four controllers is 1111, it means that the controller restriction has been passed and it can be handled by the business module. If the execution result is not 1111, it means that at least one controller determines that the current API request does not meet the requirements and needs to be prohibited from continuing access. Through this judgment, APIs that do not meet the conditions will be quickly rejected and will not enter the business logic, which greatly reduces the waiting time and increases access security.
[0112] Figure 4 FIG. 1 is a schematic diagram of an idle resource coordination processing process of the access interface allocation method according to an embodiment of the present application. Figure 4As shown, api_count (total number of api limits), web_count (number of api limits on the web side), third_count (number of api limits requested by third-party platforms), the default settings are web_count = api_count*50%, third_count = api_count*50%, each accounting for half. web_free_flag (whether there are idle resources on the web side, true means yes, false means no), the web_free_flag setting logic is that if the number of web-side connections has not exceeded the threshold (web-side idle threshold, set to 80%) within ten minutes, it is considered that there are idle resources on the web side, and web_free_flag can be set to true. If the number of web-side api connections exceeds 80% within ten minutes, web_free_flag will be set to false. The following is the logic of idle resource request. At this time, web_free_flag is true and third_free_flag is false (there is no idle resource on the third-party platform when the request surges, and the idle resource flag is set to false). The number of requests from the third-party platform to access storage surges and exceeds the threshold for requesting idle resources (when the third-party platform controller requests exceed the threshold for requesting idle resources, the threshold can be set to third_count*90%). At this time, the web controller will be checked to see if web_free_flag is true. If it is true, it means that there are idle resources for the web-side API request, which can be released to the third-party platform controller for use. The coordination controller will do the following:
[0113] (1) Set web_free_send_flag (web-side idle API resource release flag, true means that the idle resources are released to the third-party platform controller) to true, indicating that the idle resources have been released;
[0114] (2) Set web_count = web_count * 90% = api_count * 50% * 90% to reduce the web controller connection limit by 10%, and allocate the reduced portion to the third-party platform controller;
[0115] (3) Set third_count = third_count * 110% = api_count * 50% * 110%. The third-party platform controller obtains the resources released by the web-side controller and increases its own API connection limit by 10%;
[0116] (4) At this time, the flags web_free_flag = true, web_free_send_flag = true, third_free_flag = false, web_count = web_count*90% = api_count*50%*90%, third_count = third_cound*110% = api_count*50%*110%. The controller allows the release of resources only when it is in an idle state.
[0117] The following is the logic for actively releasing idle resources. The third-party platform controller detects that the number of requests has dropped and remains below 80% of the original connection limit for ten minutes, that is, api_count*50%*80%. At this time, the coordination controller will do the following:
[0118] (1) Set third_free_flag to true, indicating that there are idle resources in the current third-party controller;
[0119] (2) Release the third-party platform controller resources, third_count = api_count * 50%, and restore to the original API limit;
[0120] (3) The web controller restores the api limit, web_count = api_count * 50%, web_free_send_flag = false, restores the web connection limit back to the original, and changes the idle resource release flag to false. At this point, the idle resources have been actively released.
[0121] The following is the passive release of idle resources. The reason for the passive release is the surge in web-side requests. At this time, the released resources need to be recovered. The processing logic of the collaborative controller is that the surge in web-side requests exceeds the idle resource threshold, and a request to recover idle resources is initiated. After the third-party platform controller receives the request, if the current number of API connections does not exceed api_count*50%, it will directly release resources to the web-side controller. If the current number of connections exceeds api_count*50%, it will temporarily stop receiving requests until the current number of third-party platform controller API connections drops to api_count*50%. After reaching this number of connections, the following operations will be performed:
[0122] (1) Set third_count = api_count * 50% to release the total number of connections of the third-party platform controller and return it to the web controller;
[0123] (2) Modify web_count = api_count * 50%, web_free_send_flag = false, restore the web connection limit back to the original, and change the idle resource release flag to false.
[0124] At this time, idle resources are recovered through passive request.
[0125] Figure 5 Schematic diagram of an API overlimit processing process according to the method for allocating access interfaces in an embodiment of the present application. Figure 5 As shown, the number of api requests will be counted after they arrive at the controller. If the limit of the web controller api access number is reached, it needs to be processed. There are two processing methods: request waiting and request rejection. Request waiting is to add the over-limit requests to the queue. When the web controller has available resources (the current total number of api connections is less than web_count), the request will be taken out of the queue according to the first-in-first-out principle for processing. Request rejection, over-limit requests are directly rejected, and error codes such as server busy are returned to the user. In addition, the combination of the two, request waiting cannot add pending requests to the queue indefinitely. For example, the queue length can only be set to 100. If the pending requests have reached 100, subsequent requests entering the web access controller will be directly rejected.
[0126] IP controller, resource controller, user controller, locked API controller, these four controllers are judged in parallel. Figure 6 is a schematic diagram of the controller parallel processing process in the access interface allocation method according to an embodiment of the present application, such as Figure 6As shown in the figure, when the request passes the coordination controller, the controller judgment will be performed in parallel. IP controller, when the attacker attacks, a large number of requests will be called in a short period of time. In this controller, IP request volume detection and IP restriction are added. According to the rules, for example, if 100 requests are initiated from this IP in one minute, the IP will be locked and no longer receive requests for processing from this IP. In this way, the attacker's continued large-scale requests will be directly returned, and the API request will be quickly terminated and resources will be released. Resource controller, the number of connections that each module of the management software business can carry is different under the premise of ensuring service, so the number of connections that each module can carry must be limited. Limiting the number of APIs for detailed business modules can achieve control of the number of fine business requests and reduce the probability of over-limit. Locked API controller, some requests process businesses with file locks. Only one request is allowed to obtain the lock at a time, and other requests will be in a waiting state for the lock. For these requests, the request frequency will be limited in the locked API controller. If it is not controlled, a large number of requests will be piled up waiting to be processed, which will seriously occupy API resources. The user controller can count the number of APIs used by each user and restrict them. If it is considered a high-risk user, the current user's API access can be prohibited. If it is a medium-risk user, the number of API accesses per unit time can be reduced. Users without risk can make normal requests. The user risk can be assessed and specified by the super administrator when creating. The above controllers are simple examples. More controllers can be added for restrictions to achieve security control and control of API over-limit risks. After the API request passes through these controllers, the processing results will be summarized as 0 and 1. 0 represents failure and 1 represents passing. For example, if the execution result of the current four controllers is 1111, it means that the controller limit has been passed and it can be handed over to the business module for processing. If the execution result is not 1111, it means that at least one controller determines that the current API request does not meet the requirements and needs to be prohibited from continuing to access. Through this judgment, APIs that do not meet the conditions will be quickly rejected and will not enter the business logic, which greatly reduces the waiting time and increases access security.
[0127] Through the above scheme, API access restriction optimization is achieved by integrating API diversion, API idle resource coordination, API over-limit waiting and rejection, and multi-controller restrictions, ensuring that when a large number of access requests arrive, the management software is available and the calls of the third-party platform are available, improving the availability of the software, and increasing the security of the software. That is, the scheme given in this application diverts the API by coordinating the controller, coordinates the allocation of idle resources, and waits and rejects over-limit requests, intercepts attackers through multi-controller joint debugging, pre-processes and rejects requests that do not meet the conditions, diverts, restricts and optimizes the API, distinguishes the source of requests, coordinates idle resources, and conducts multi-controller joint debugging to jointly ensure the availability of the software under high concurrency and improve the security of the software.
[0128] Through the above embodiments, the present application performs diversion, restriction and optimization on the API, distinguishes the request sources, coordinates idle resources, and coordinates multiple controllers to jointly ensure the availability of the software under high concurrency and improve the security of the software.
[0129] This application uses a coordinating controller to divert APIs, coordinate the allocation of idle resources, and wait and reject over-limit requests. Through multi-controller joint debugging, attackers are intercepted, and requests that do not meet the conditions are rejected in advance, thereby improving the availability and security of the software.
[0130] This application optimizes the solutions for these problems, with the following highlights: 1. Diverting APIs, coordinating the allocation of idle resources, and waiting and rejecting over-limit requests through the coordination controller; 2. Joint debugging of multiple controllers to intercept attackers and pre-process and reject requests that do not meet the conditions.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0132] In this embodiment, a device for allocating access interfaces is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0133] Figure 7 is a structural block diagram of an access interface allocation device according to an embodiment of the present application, such as Figure 7 As shown, a plurality of access interfaces for accessing the server are deployed on the server, and the plurality of access interfaces are divided into a plurality of interface sets according to the account attributes of the account allowed to access the server, and the device is applied to the server, and the device includes:
[0134] A receiving module 702, configured to receive a target access request to the server;
[0135] A first screening module 704, configured to screen out a first interface set corresponding to the target access request from the plurality of interface sets according to request information carried by the target access request, wherein the request information is used to indicate an account attribute of an account that initiates the target access request;
[0136] A first detection module 706, configured to detect a relationship between a response capability of the first interface set to an access request and a predetermined response threshold;
[0137] The calling module 708 is used to call the access interface in an idle state from other interface sets to supplement the first interface set to obtain a second interface set when it is detected that the response capability of the first interface set to the access request is less than the predetermined response threshold, wherein the other interface set is an interface set included in the plurality of interface sets except the first interface set;
[0138] The allocation module 710 is configured to allocate a target access interface to the target access request from the access interfaces in the second interface set that are in a space state.
[0139] Through the above steps, by classifying the multiple access interfaces on the server according to the account attributes of the account accessing the server, the multiple access interfaces can be divided into interface sets corresponding to each account attribute. Therefore, the target access request sent by the account with the account attribute can select an access interface from the corresponding first interface set for response. When selecting the access interface, the relationship between the response capability of the first interface set to the access request and the predetermined response threshold is detected, and when the response capability of the first interface set to the access request is less than the predetermined threshold, other interface sets in the multiple interface sets are borrowed to supplement the first interface set, and then the spatial access interface is selected for the target access request from the interface set after the spatial interface is supplemented, so as to achieve load balancing between the interface sets. Therefore, the technical problem of low allocation efficiency of the access interface of the server in the related technology can be solved, so as to achieve the effect of improving the allocation efficiency of the server interface.
[0140] As an optional implementation, the calling module includes:
[0141] A screening unit, configured to screen out, from other interface sets, a third interface set whose response capability to the access request is greater than or equal to the predetermined response threshold;
[0142] The extraction unit is used to extract the access interface in the idle state from the third interface set and add it to the first interface set to obtain the second interface set.
[0143] As an optional implementation, the calling module further includes:
[0144] A detection unit, used for detecting a target ratio of the access interface in the other interface set that is in an idle state to the corresponding other interface set;
[0145] The first determining unit is configured to determine the other interface set as the third interface set when it is determined that the target ratio is greater than or equal to a first threshold.
[0146] As an optional implementation, the first screening module includes:
[0147] a second determining unit, configured to determine a target account attribute indicated by the target account identifier, wherein the request information includes the target account identifier;
[0148] The third determining unit is configured to determine the interface set corresponding to the target account attribute from the plurality of interface sets as the first interface set.
[0149] As an optional implementation manner, the access interface allocation device further includes:
[0150] A second detection module, configured to detect first status information of a fourth interface set, wherein the first status information is used to indicate an occupation status of access interfaces included in the fourth interface set, wherein the fourth interface set is an interface set obtained by adding the access interfaces in an idle state from the other interface sets to the first interface set;
[0151] A third detection module, configured to detect a first access interface in the second interface set that is in an end-of-occupancy state when the first state information indicates that the response capability of the fourth interface set to an access request is less than a target response capability;
[0152] The first returning module is used to return the first access interface to the fourth interface set.
[0153] As an optional implementation manner, the access interface allocation device further includes:
[0154] a fourth detection module, configured to detect second status information of the second interface set, wherein the second status information is used to indicate an occupation status of an access interface included in the second interface set;
[0155] an extraction module, configured to extract a target number of second access interfaces from the access interfaces in the second interface set that are in an idle state, when the second state information is used to indicate that the proportion of the access interfaces in the second interface set that are in an idle state is greater than a target idle threshold, wherein the target number is equal to the number of the access interfaces retrieved from the other interface sets;
[0156] The second returning module is used to return the second access interface to the other interface set.
[0157] As an optional implementation manner, the access interface allocation device further includes:
[0158] An acquisition module, used to acquire target account information of a target account that initiates the target access request, wherein the target account information is used to indicate the request initiation status of the target account in a time period before the current moment;
[0159] A determination module, configured to determine the response authority of the target access request on the server according to the target account information;
[0160] A second screening module is used for screening out the first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request when the response authority indicates that the server is allowed to respond to the target access request.
[0161] As an optional implementation manner, the determining module includes:
[0162] a matching unit, configured to match each of the target account information in the plurality of target account information with a corresponding target response condition, wherein the plurality of target account information is used to characterize the request initiation situation of the target account from multiple dimensions;
[0163] The fourth determining unit is used to determine that the server is allowed to respond to the target access request when each target account information matches the corresponding target response condition.
[0164] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0165] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0166] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0167] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0168] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0169] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0170] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0171] An embodiment of the present application also provides a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0172] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0173] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0174] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for allocating an access interface, characterized in that: A plurality of access interfaces for accessing the server are deployed on the server, and the plurality of access interfaces are divided into a plurality of interface sets according to account attributes of accounts allowed to access the server. The method is applied to the server, and includes: receiving a target access request to the server; Filtering a first interface set corresponding to the target access request from the plurality of interface sets according to request information carried by the target access request, wherein the request information is used to indicate an account attribute of an account that initiates the target access request; Detecting a relationship between a response capability of the first interface set to an access request and a predetermined response threshold; In the case where it is detected that the response capability of the first interface set to the access request is less than the predetermined response threshold, the access interface in an idle state is retrieved from other interface sets to supplement the first interface set, so as to obtain a second interface set, wherein the other interface set is an interface set included in the plurality of interface sets except the first interface set; A target access interface is allocated for the target access request from the access interfaces in the second interface set that are in a space state.
2. The method according to claim 1, characterized in that The step of retrieving the access interface in an idle state from other interface sets and adding it to the first interface set to obtain the second interface set includes: Filtering out a third interface set from other interface sets, whose response capability to the access request is greater than or equal to the predetermined response threshold; The access interfaces in idle state are extracted from the third interface set and added to the first interface set to obtain the second interface set.
3. The method according to claim 2, characterized in that The step of selecting a third interface set whose response capability to the access request is greater than or equal to the predetermined response threshold from other interface sets includes: Detecting a target ratio of the access interfaces in the other interface set that are in an idle state to the corresponding other interface set; When it is determined that the target ratio is greater than or equal to the first threshold, the other interface set is determined as the third interface set.
4. The method according to claim 1, characterized in that: The step of selecting a first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request includes: Determining a target account attribute indicated by a target account identifier, wherein the request information includes the target account identifier; The interface set corresponding to the target account attribute among the multiple interface sets is determined as the first interface set.
5. The method according to claim 1, characterized in that After allocating a target access interface for the target access request from the access interfaces in the second interface set that are in a space state, the method further includes: Detecting first status information of a fourth interface set, wherein the first status information is used to indicate the occupation status of access interfaces included in the fourth interface set, wherein the fourth interface set is an interface set obtained by adding the access interfaces in an idle state from the other interface sets to the first interface set; In a case where the first state information is used to indicate that the response capability of the fourth interface set to the access request is less than the target response capability, detecting a first access interface in the second interface set that is in an end-of-occupancy state; Return the first access interface to the fourth interface set.
6. The method according to claim 1, characterized in that After allocating a target access interface for the target access request from the access interfaces in the second interface set that are in a space state, the method further includes: Detecting second status information of the second interface set, wherein the second status information is used to indicate an occupation status of an access interface included in the second interface set; When the second state information is used to indicate that the proportion of the access interfaces in the second interface set that are in an idle state is greater than a target idle threshold, extracting a target number of second access interfaces from the access interfaces in the second interface set that are in an idle state, wherein the target number is equal to the number of the access interfaces retrieved from the other interface sets; Return the second access interface to the other interface set.
7. The method according to claim 1, characterized in that Before selecting a first interface set corresponding to the target access request from the plurality of interface sets according to the request information carried by the target access request, the method further includes: Acquire target account information of a target account that initiates the target access request, wherein the target account information is used to indicate the request initiation status of the target account in a time period before the current moment; Determining the response authority of the target access request on the server according to the target account information; In a case where the response authority indicates that the server is allowed to respond to the target access request, the first interface set corresponding to the target access request is screened out from the plurality of interface sets according to the request information carried in the target access request.
8. The method according to claim 7, characterized in that The determining, according to the target account information, the response authority of the target access request on the server includes: Matching each of the target account information in the plurality of target account information with a corresponding target response condition, wherein the plurality of target account information is used to characterize the request initiation situation of the target account from multiple dimensions; In the case that each target account information matches the corresponding target response condition, it is determined that the server is allowed to respond to the target access request.
9. A device for allocating an access interface, characterized in that: A plurality of access interfaces for accessing the server are deployed on the server, and the plurality of access interfaces are divided into a plurality of interface sets according to account attributes of accounts allowed to access the server. The device is applied to the server, and includes: A receiving module, used for receiving a target access request to the server; A first screening module, configured to screen out a first interface set corresponding to the target access request from the plurality of interface sets according to request information carried by the target access request, wherein the request information is used to indicate an account attribute of an account that initiates the target access request; A first detection module, used to detect the relationship between the response capability of the first interface set to the access request and a predetermined response threshold; A calling module, configured to call the access interface in an idle state from other interface sets to supplement the first interface set, so as to obtain a second interface set, when detecting that the response capability of the first interface set to the access request is less than the predetermined response threshold, wherein the other interface set is an interface set included in the plurality of interface sets except the first interface set; An allocation module is used to allocate a target access interface for the target access request from the access interfaces in the second interface set that are in a space state.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 8 when executed by a processor.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 8 are implemented.
