Traffic control method, device, equipment and system for service providing system

By introducing the importance tag of call requests in the service provision system and performing traffic control, the problem that no important call requests occupy important call request opportunities in the prior art is solved, and the user experience is improved.

CN114579211BActive Publication Date: 2025-03-11ALIBABA (CHINA) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210158346.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-21
Publication Date
2025-03-11
Estimated Expiration
2042-02-21

AI Technical Summary

Technical Problem

In the prior art, since there are many unimportant call requests to call a certain interface first, the important call requests to call the interface later are denied.

Method used

By logging in with the user login account, the terminal sends a call request for the target interface to the server, and the request parameters include a first tag for representing the importance of the call request. The server obtains the number of times the first tag and the number of times that have been called under the flow control account corresponding to the login account. If the threshold is not reached, the call request will be processed and the result will be returned.

Benefits of technology

The traffic control of call requests of different degrees of importance for the same level control account is realized, avoiding the opportunity of more unimportant call requests to occupy important call requests, and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579211B_ABST
    Figure CN114579211B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a flow control method, device, equipment and system for a service providing system. The method includes: receiving a call request for a target interface sent by a terminal, the call request is sent by the terminal to a server in response to a user's input operation when the user logs in using a login account, the parameters of the call request include a first tag, the first tag is used to characterize the importance of the call request, obtaining the number threshold corresponding to the first tag under the flow control account corresponding to the login account, and the number of calls to the target interface based on the first tag by the flow control account in the current unit time, if the number of calls does not reach the number threshold, executing the processing corresponding to the call request, and returning the corresponding processing result to the terminal. The present application can avoid the problem that an important call request that calls the interface later is rejected due to a large number of unimportant call requests calling a certain interface first, which is conducive to improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a flow control method, device, equipment and system for a service providing system. Background Art

[0002] Currently, users can use the services provided by service providers by calling interfaces provided by service providers.

[0003] Usually, the service provider can perform flow control on the user's calls to the same interface. Specifically, a user can be limited to calling a certain interface N times per minute. If the user has called the interface N times in a minute, the service provider will reject the user's call request for the interface in that minute.

[0004] However, when the above method is adopted, there may be a problem that a certain interface is called first by a large number of unimportant calling requests, resulting in the rejection of important calling requests that call the interface later. Summary of the invention

[0005] The embodiments of the present application provide a flow control method, device, equipment and system for a service providing system, which are used to solve the problem in the prior art that a large number of unimportant call requests call a certain interface first, resulting in the rejection of important call requests that call the interface later.

[0006] In a first aspect, an embodiment of the present application provides a flow control method of a service providing system, the system comprising a terminal and a server, the method being executed by the server, comprising:

[0007] receiving a call request for a target interface sent by the terminal, wherein the call request is sent by the terminal to the server in response to an input operation of the user when the user logs in using a login account, and the parameters of the call request include a first tag, and the first tag is used to represent the importance of the call request;

[0008] Obtaining a threshold value of the number of times corresponding to the first tag under the flow control account corresponding to the login account, and the number of times the flow control account has called the target interface based on the first tag within a current unit time;

[0009] If the number of calls does not reach the number threshold, a process corresponding to the call request is executed, and a corresponding process result is returned to the terminal.

[0010] In a second aspect, an embodiment of the present application provides a flow control method of a service providing system, the system comprising a terminal and a server, the method being executed by the terminal, comprising:

[0011] When a user logs in using a login account, obtaining the user's input operation;

[0012] In response to the input operation, a call request for a target interface is sent to the server, wherein parameters of the call request include a first tag, and the first tag is used to characterize the importance of the call request.

[0013] In a third aspect, an embodiment of the present application provides a flow control method of a service providing system, comprising:

[0014] When a user logs in using a login account, the terminal obtains an input operation of the user;

[0015] The terminal sends a call request for a target interface to a server in response to the input operation, wherein a parameter of the call request includes a first tag, and the first tag is used to characterize the importance of the call request.

[0016] The server obtains a threshold value of the number of times corresponding to the first tag under the flow control account corresponding to the login account, and the number of times the flow control account has called the target interface based on the first tag within a current unit time;

[0017] If the number of calls does not reach the number threshold, the server performs processing corresponding to the call request and returns a corresponding processing result to the terminal.

[0018] In a fourth aspect, an embodiment of the present application provides a flow control device of a service providing system, comprising:

[0019] a receiving module, configured to receive a call request for a target interface sent by the terminal, wherein the call request is sent by the terminal to the server in response to an input operation of the user when the user logs in using a login account, and the parameters of the call request include a first tag, and the first tag is used to characterize the importance of the call request;

[0020] An acquisition module, used to acquire a threshold value of the number of times corresponding to the first tag under the flow control account corresponding to the login account, and the number of times the flow control account has called the target interface based on the first tag within a current unit time;

[0021] An execution module is used to execute processing corresponding to the calling request if the number of calls has not reached the number threshold, and return the corresponding processing result to the terminal.

[0022] In a fifth aspect, an embodiment of the present application provides a flow control device of a service providing system, comprising:

[0023] An acquisition module, used to acquire the input operation of the user when the user logs in using a login account;

[0024] The sending module is used to send a call request for a target interface to the server in response to the input operation, wherein the parameters of the call request include a first tag, and the first tag is used to characterize the importance of the call request.

[0025] In a sixth aspect, an embodiment of the present application provides a server, comprising: a memory, and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement a method as described in any one of the first aspects.

[0026] In the seventh aspect, an embodiment of the present application provides a terminal, comprising: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement a method as described in any one of the second aspects.

[0027] In an eighth aspect, an embodiment of the present application provides a service providing system, comprising a server and a terminal, wherein the server is used to execute any method in the first aspect, and the terminal is used to execute any method in the second aspect.

[0028] In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method as described in any one of the first aspects is implemented.

[0029] In a tenth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method as described in any one of the second aspects is implemented.

[0030] An embodiment of the present application further provides a computer program, which, when executed by a computer, is used to implement the method as described in any one of the first aspects.

[0031] An embodiment of the present application further provides a computer program, which, when executed by a computer, is used to implement the method as described in any one of the second aspects.

[0032] In an embodiment of the present application, the terminal can respond to the user's input operation when the user logs in using a login account, and send a call request for the target interface and the parameters include a first label for characterizing the importance to the server. The server can obtain the number threshold corresponding to the first label under the flow control account corresponding to the login account, and the number of calls to the interface based on the first label by the flow control account in the current unit time. If the number of calls does not reach the number threshold, the processing corresponding to the call request is executed, and the corresponding processing result is returned to the terminal, so that the flow control of call requests of different importance for the same flow control account can be performed separately. Since more unimportant call requests call a certain interface first, they will not occupy the call opportunity of the important call requests. Therefore, it can avoid the problem that more unimportant call requests call a certain interface first, resulting in the rejection of important call requests that call the interface later, which is beneficial to improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A schematic diagram of the structure of the service providing system provided in the embodiment of the present application;

[0035] Figure 2 A flow chart of a flow control method of a service providing system provided in an embodiment of the present application;

[0036] Figure 3 A schematic diagram of performing flow control on call requests of the same interface based on different tags for the same flow control object provided in an embodiment of the present application;

[0037] Figure 4 A flow control method for a service providing system provided in another embodiment of the present application;

[0038] Figure 5 A flow control method for a service providing system provided in another embodiment of the present application;

[0039] Figure 6 A schematic diagram of the structure of a flow control device of a service providing system provided in an embodiment of the present application;

[0040] Figure 7 A schematic diagram of the structure of a server provided in an embodiment of the present application;

[0041] Figure 8 A schematic diagram of the structure of a flow control device of a service providing system provided in another embodiment of the present application;

[0042] Fig. 9 A schematic diagram of the structure of a terminal provided in one embodiment of the present application. DETAILED DESCRIPTION

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

[0044] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "said", and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two, but does not exclude the inclusion of at least one.

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

[0046] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0047] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a product or system. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the product or system including the elements.

[0048] In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0049] Figure 1 A schematic diagram of the structure of the service providing system provided in the embodiment of the present application, such as Figure 1 As shown, the service providing system may include a server 11 of a service provider for providing services and a terminal 12 of a user for using the services provided by the service provider.

[0050] The server 11 can provide services to the outside in the form of an interface. One interface can be used to provide a service to the outside. The same interface can be used to provide services to different users. Users can also be called users. One user corresponds to one login account. The server 11 can include any form of data processing server such as a cloud server and a distributed server. The functions provided by the server 11 may include, for example, query functions, storage functions, and computing functions.

[0051] The terminal 12 may send a call request for the target interface to the server 12 in response to the user's operation. The terminal 12 may be, for example, a mobile phone, a tablet computer, a personal computer, a wearable device, etc. The server 11 may also perform processing corresponding to the call request and return a corresponding processing result to the terminal 12, so as to provide the terminal 12 with a service corresponding to the interface.

[0052] Usually, the server 11 can limit a user to call a certain interface N times per minute at most. If the number of calls to the interface by the user reaches N times within a minute, the server 11 will reject the user's call request to the interface within the minute. However, in actual applications, the importance of call requests for the same interface at different times may be different, so there may be a problem that more unimportant call requests call a certain interface first, resulting in the rejection of important call requests that call the interface later.

[0053] In order to solve the technical problem in the prior art that an important call request that calls the interface later is rejected due to a large number of unimportant call requests calling a certain interface first, in an embodiment of the present application, the terminal can respond to the user's input operation when the user logs in using the login account, and send a call request for the target interface and the parameter includes a first label for characterizing the importance to the server. The server can obtain the number threshold corresponding to the first label under the flow control account corresponding to the login account, and the number of calls to the interface based on the first label by the flow control account in the current unit time. If the number of calls does not reach the number threshold, the processing corresponding to the call request is executed, and the corresponding processing result is returned to the terminal, so that the flow control of call requests of different importance for the same flow control account can be performed separately. Since a large number of unimportant call requests call a certain interface first, they will not occupy the call opportunity that should belong to the important call request. Therefore, it can avoid the problem that an important call request that calls the interface later is rejected due to a large number of unimportant call requests calling a certain interface first, which is beneficial to improving the user experience.

[0054] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0055] Figure 2 This is a flow chart of a flow control method of a service providing system provided in an embodiment of the present application. Figure 2 As shown, the method of this embodiment may include:

[0056] Step 21, when the user logs in using the login account, the terminal obtains the user's input operation;

[0057] Step 22: the terminal sends a call request for a target interface to a server in response to the input operation, wherein parameters of the call request include a first tag, and the first tag is used to characterize the importance of the call request.

[0058] Step 23, the server obtains the number threshold corresponding to the first tag under the flow control account corresponding to the login account, and the number of calls to the target interface by the flow control account based on the first tag within the current unit time;

[0059] Step 24: If the number of calls does not reach the number threshold, execute processing corresponding to the call request and return the corresponding processing result to the terminal.

[0060] Exemplarily, the login account used by the user to log in can be an independent login account, or can be a sub-account subordinate to the main account. Among them, an independent login account can refer to a login account that has no subordinate relationship with other login accounts. In actual applications, the number of sub-accounts subordinate to the same main account can be multiple, and the multiple sub-accounts can be created by the same main account. For example, a company unit can correspond to the same main account, and multiple departments under the company unit can each have their own sub-accounts, and the sub-accounts of multiple departments are sub-accounts subordinate to the same main account.

[0061] In the embodiment of the present application, the login account used by the user to log in has a corresponding flow control account, and one login account used by the user to log in can correspond to one flow control account. Among them, the flow control account is the login account that needs to call the interface and needs to perform flow control. Exemplarily, when the login account used by the user to log in can be an independent login account, the corresponding flow control account can be the login account used by the user to log in; when the login account used by the user to log in is a sub-account subordinate to the main account, the corresponding flow control account can be the main account subordinate to the login account used by the user to log in.

[0062] When the user logs in using the login account, the terminal can obtain the user's input operation. The user's input operation can be any operation that can trigger the terminal to send a call request to the server, such as a viewing operation and a settlement operation.

[0063] In response to the user's input operation, the terminal may send a call request for the target interface to the server. It should be noted that the number of call requests sent by the terminal to the server triggered by the same input operation may be one or more. When the number of call requests triggered by the input operation is multiple, each of the multiple call requests may be used to request to call an interface, and the importance of the multiple call requests may be the same or different.

[0064] In an embodiment of the present application, the parameters of the call request sent by the terminal to the server include a tag (referred to as the first tag) used to characterize the importance of the call request. The first tag included in a call request may be one of multiple tags corresponding to the flow control account corresponding to the login account used by the user to log in. Different tags in the multiple tags may be used to represent different importance levels. The multiple tags may be, for example, Tag1, Tag2, Tag3, ... and Tagn. Of course, in addition to the first tag, the parameters of the call request may also include other parameter values, which are not limited in the present application.

[0065] In one embodiment, the sum of the number thresholds corresponding to the multiple tags and the target interface may be less than or equal to the total number threshold allowed for the flow control account to call the target interface within a unit time. Thus, flow control can be implemented for the total number of times the flow control account calls the interface. For example, assuming that under a certain flow control account, the number threshold corresponding to Tag1 is Frqua1, the number threshold corresponding to Tag2 is Frqua2, ..., and the number threshold corresponding to Tagn is Frquan, then the sum may not exceed the total number threshold Frqu allowed for the flow control account to call the interface within a unit time, that is, Frqua1+Frqua2+...+Frquan≤Frqu.

[0066] Assume that the importance of Tag1 to Tagn is Tag1<Tag2<……<Tagn, and in the current unit time, the call request with tag Tag1 arrives first, and the call requests with tags Tag2 and Tagn arrive later, then Figure 3 As shown, although more call requests with the tag Tag1 are received first in the current time window, the server will reject the call request with the tag Tag1 for the target interface in the unit time after the number of calls to the target interface by the call request with the tag Tag1 reaches the number threshold corresponding to Tag1 (i.e., Frqua1) in the current unit time. For the call request with the tag Tag2 received after the current unit time, since the number of calls to the target interface by the call request with the tag Tag2 has not reached the number threshold corresponding to Tag2 (i.e., Frqua2) in the current unit time, the server can also perform the corresponding processing for the call request with the tag Tag2 and return the corresponding processing result to the terminal. Similarly, for the call request with the tag Tagn received after the current unit time, since the number of calls to the target interface by the call request with the tag Tagn has not reached the number threshold corresponding to Tagn (i.e., Frquan) in the current unit time, the server can also perform the corresponding processing for the call request with the tag Tagn and return the corresponding processing result to the terminal. It can be seen that by adopting the method provided in the embodiment of the present application, since more unimportant call requests call a certain interface first, they will not occupy the calling opportunity of the important call requests. Therefore, it can avoid the problem that because more unimportant call requests call a certain interface first, the important call requests that call the interface later are rejected.

[0067] It should be noted that for different flow control accounts, their corresponding labels may be partially the same, may be completely the same, or may be completely different.

[0068] The terminal can determine the importance of the call request based on the information related to the call request. Optionally, the importance of the call request can be related to the login account used by the user to log in. Based on this, in one embodiment, the login account used by the user to log in is a sub-account subordinate to the main account, and the number of sub-accounts subordinate to the main account is multiple, and each of the multiple sub-accounts corresponds to a label; the method provided in this embodiment may also include: using the label corresponding to the login account used by the user to log in as the first label. Among them, the multiple labels corresponding to the multiple sub-accounts are the multiple labels corresponding to the flow control object, and the flow control object is the flow control object corresponding to the login account used by the user to log in.

[0069] Or, optionally, the importance of the call request may be related to the data processing flow that triggers the sending of the call request. Based on this, in one embodiment, the call request is sent in a data processing flow among multiple data processing flows, and each of the multiple data processing flows corresponds to a label; the method provided in this embodiment may also include: using the label corresponding to the data processing flow that triggers the sending of the call request as the first label. Among them, the multiple labels corresponding to the multiple data processing flows are the multiple labels corresponding to the flow control object, and the flow control object is the flow control object corresponding to the login account used by the user to log in.

[0070] After receiving the call request sent by the terminal, the server can obtain the number threshold corresponding to the first label under the flow control account corresponding to the login account, and the number of calls to the target interface based on the first label by the flow control account in the current unit time. It should be noted that the time unit for flow control by the server can be flexibly implemented as needed. For example, the time unit can be minutes. In this case, the current unit time can be the current minute.

[0071] Among them, the number threshold corresponding to the first label under the flow control account refers to the number threshold that the flow control account is allowed to call the target interface based on the first label within a unit time, wherein the time length of the unit time is equal to the time length of the aforementioned current unit time, for example, both are 1 minute.

[0072] In the embodiment of the present application, the number of calls is counted by distinguishing flow control accounts and labels, and the same flow control account can have multiple number of calls. The number of calls of different interfaces based on different labels by the flow control account can be counted as shown in the following Table 1.

[0073] Table 1

[0074] Label interface Number of calls Tag1 Interfacex N11 times Tag2 Interfacex N21 times …… Interfacex …… Tags Interfacex Nn1 times Tag1 Interface N12 times Tag2 Interface N22 times …… Interface …… Tags Interface Nn2 times …… …… ……

[0075] For example, the number of times the flow control account has called interface y based on Tag1 can be obtained by querying Table 1, which is N12 times. It should be noted that Table 1 takes different tables for storing the number of calls corresponding to different flow control accounts as an example. It can be understood that in other embodiments, different flow control accounts can also correspond to the same table. In this case, a field about the flow control account can be added to Table 1.

[0076] After obtaining the sum of the number threshold and the number of calls, the server may determine, for example, whether the number of calls has reached the number threshold. Alternatively, for example, the server may determine whether the number of calls is less than the number threshold. If the number of calls is less than the number threshold, it may indicate that the number of calls has not yet reached the number threshold.

[0077] Exemplarily, the number threshold corresponding to the first tag under the flow control account can be determined by the server by querying the corresponding relationship. Based on this, in one embodiment, the aforementioned acquisition of the number threshold corresponding to the first tag under the flow control account corresponding to the login account can include: based on the correspondence between multiple tags and the number threshold under the flow control account, determining the number threshold corresponding to the first tag under the flow control account. Among them, the correspondence between multiple tags and the number threshold under the flow control account can be shown in the following Table 2, for example.

[0078] Table 2

[0079] Label Number of times threshold Tag1 C11 times Tag2 C21 times …… …… Tags Cn1 times

[0080] Assuming that the first tag is Tag1, the number threshold corresponding to the first tag under the flow control account can be determined to be C11 times according to Table 1. It should be noted that the correspondence between the tags and the number thresholds for different interfaces under the same flow control account can be the same or different. When they are different, the number threshold corresponding to the first tag can specifically be the number threshold corresponding to the first tag + target interface.

[0081] Optionally, the correspondence between multiple labels and the number threshold under the flow control account can be configured by the user, which is conducive to improving flexibility. Based on this, in one embodiment, the method provided in this embodiment may also include: the terminal obtains the flow control configuration information input by the user, and sends the flow control configuration information to the server, and the server can obtain the correspondence between multiple labels and the number threshold under the flow control account according to the flow control configuration information sent by the receiving terminal. Exemplarily, the flow control configuration information can indicate the number threshold corresponding to each label in the multiple labels, or, exemplary, the flow control configuration information can indicate the percentage corresponding to each label in the multiple labels, and the product of the percentage corresponding to a certain label and the total number threshold is the number threshold corresponding to the label.

[0082] If the number of calls has not reached the threshold, it can mean that the number of calls made by the flow control account to the target interface based on the first tag within the current unit time has not reached the upper limit, so the flow control account can continue to be allowed to call the target interface based on the first tag within the current time window. Thus, the server can perform processing corresponding to the call request and return the corresponding processing result to the terminal. It should be noted that the implementation method of the server performing processing corresponding to the call request can refer to the specific description in the relevant technology, which will not be repeated here.

[0083] If the number of calls reaches the threshold, it may indicate that the number of calls to the target interface by the flow control account based on the first tag within the current unit time has not reached the upper limit. Optionally, when the number of calls to the target interface by the flow control account based on the first tag within the current unit time has not reached the upper limit, the server may also reject the flow control account from calling the target interface based on the first tag within the current time window. Exemplarily, the server may not perform processing corresponding to the call request and return an error code to the terminal.

[0084] Or optionally, when the number of calls to the target interface based on the first tag by the flow control account within the current unit time has not reached the upper limit, the call opportunity corresponding to the tag with lower importance can be occupied. Based on this, in one embodiment, the method provided by the embodiment of the present application may also include: if the number of calls reaches the number threshold, it can be determined whether there is a second tag among the multiple tags corresponding to the flow control account, the importance represented by the second tag is lower than the importance represented by the first tag, and the number of calls to the target interface based on the second tag by the flow control account within the current unit time has not reached the number threshold corresponding to the second tag and the target interface under the flow control account; if it exists, the processing corresponding to the call request can be executed, the corresponding processing result can be returned to the terminal, and the number of calls to the target interface based on the second tag by the flow control account within the current unit time is updated. Furthermore, if it does not exist, the flow control account can be denied to call the target interface based on the first tag.

[0085] In an embodiment of the present application, the terminal can respond to the user's input operation when the user logs in using a login account, and send a call request for the target interface and the parameters include a first label for characterizing the importance to the server. The server can obtain the number threshold corresponding to the first label under the flow control account corresponding to the login account, and the number of calls to the interface based on the first label by the flow control account in the current unit time. If the number of calls does not reach the number threshold, the processing corresponding to the call request is executed, and the corresponding processing result is returned to the terminal, so that the flow control of call requests of different importance for the same flow control account can be performed separately. Since more unimportant call requests call a certain interface first, they will not occupy the call opportunity of the important call requests. Therefore, it can avoid the problem that more unimportant call requests call a certain interface first, resulting in the rejection of important call requests that call the interface later, which is beneficial to improving the user experience.

[0086] Figure 4 Another embodiment of the present application provides a flow control method for a service providing system. The method provided in this embodiment can be performed by Figure 1 The server 11 in the embodiment executes, Figure 4 As shown, the method provided in this embodiment may include:

[0087] Step 41, receiving a call request for a target interface sent by the terminal, wherein the call request is sent by the terminal to the server in response to an input operation of the user when the user logs in using a login account, and the parameters of the call request include a first tag, and the first tag is used to represent the importance of the call request;

[0088] Step 42, obtaining a threshold value of the number of times corresponding to the first tag under the flow control account corresponding to the login account, and the number of times the flow control account has called the target interface based on the first tag within a current unit time;

[0089] Step 43: If the number of calls does not reach the number threshold, execute processing corresponding to the call request and return the corresponding processing result to the terminal.

[0090] In one embodiment, the flow control account corresponds to multiple labels, and the sum of the number thresholds corresponding to the multiple labels and the target interface is less than or equal to the total number threshold allowed for the flow control account to call the target interface within a unit time.

[0091] In one embodiment, the method provided in this embodiment further includes:

[0092] If the number of calls reaches the number threshold, determine whether there is a second tag among the multiple tags corresponding to the flow control account, the importance represented by the second tag is lower than the importance represented by the first tag, and the number of calls of the flow control account to call the target interface based on the second tag within the current unit time does not reach the number threshold corresponding to the second tag and the target interface under the flow control account;

[0093] If it exists, execute the processing corresponding to the calling request, return the corresponding processing result to the terminal, and update the number of times the flow control account has called the target interface based on the second tag within the current unit time.

[0094] In one embodiment, obtaining the number threshold corresponding to the first label under the flow control account corresponding to the login account includes: determining the number threshold corresponding to the first label under the flow control account based on the correspondence between multiple labels and the number threshold under the flow control account.

[0095] In one embodiment, the method provided in this embodiment further includes: receiving flow control configuration information sent by the terminal, and obtaining the corresponding relationship according to the flow control configuration information.

[0096] It should be noted that for the specific implementation of the server, please refer to Figure 2 The specific description of the illustrated embodiments will not be repeated here.

[0097] The flow control method provided in this embodiment receives a call request for a target interface sent by a terminal. The call request is sent by the terminal to a server in response to a user input operation when the user logs in using a login account. The parameters of the call request include a first label, and a number threshold corresponding to the first label under the flow control account corresponding to the login account and the number of calls to the target interface by the flow control account based on the first label within the current unit time are obtained. If the number of calls does not reach the number threshold, the processing corresponding to the call request is executed, and the corresponding processing result is returned to the terminal, so that the flow control of call requests of different importance for the same flow control account can be performed separately. Since more unimportant call requests call a certain interface first, they will not occupy the call opportunity of the important call requests. Therefore, it can avoid the problem that more unimportant call requests call a certain interface first, resulting in the rejection of important call requests that call the interface later, which is beneficial to improving the user experience.

[0098] Figure 5 A flow control method for a service providing system provided by another embodiment of the present application can be performed by Figure 1 Terminal 12 in the execution, such as Figure 5As shown, the method provided in this embodiment may include:

[0099] Step 51, when a user logs in using a login account, obtaining the user's input operation;

[0100] Step 52: In response to the input operation, a call request for the target interface is sent to the server, wherein the parameters of the call request include a first tag, and the first tag is used to characterize the importance of the call request.

[0101] In one embodiment, the login account is a sub-account subordinate to the main account, there are multiple sub-accounts subordinate to the main account, and each of the multiple sub-accounts corresponds to a label;

[0102] The method provided in this embodiment also includes: using the tag corresponding to the login account used by the user to log in as the first tag.

[0103] In one embodiment, the call request is sent in a data processing flow among multiple data processing flows, and each data processing flow among the multiple data processing flows corresponds to a tag;

[0104] The method provided in this embodiment also includes: using a tag corresponding to the data processing flow that triggers sending the call request as the first tag.

[0105] In one embodiment, the method provided in this embodiment further includes: acquiring flow control configuration information input by the user, and sending the flow control configuration information to the server.

[0106] It should be noted that for the specific implementation of the terminal, please refer to Figure 2 The specific description of the illustrated embodiments will not be repeated here.

[0107] The flow control method provided in this embodiment obtains the user's input operation when the user logs in using a login account, and sends a call request for the target interface to the server in response to the input operation. The parameters of the call request include a first label, so that the server can perform flow control for call requests of different importance for the same flow control account separately.

[0108] Figure 6 A schematic diagram of a flow control device for a service providing system according to an embodiment of the present application; see attached Figure 6 As shown, this embodiment provides a device that can execute Figure 4 The method provided in the embodiment shown, specifically, the device may include:

[0109] The receiving module 61 is used to receive a call request for a target interface sent by the terminal, wherein the call request is sent by the terminal to the server in response to an input operation of the user when the user logs in using a login account, and the parameters of the call request include a first tag, and the first tag is used to represent the importance of the call request;

[0110] An acquisition module 62 is used to acquire a threshold value of the number of times corresponding to the first tag under the flow control account corresponding to the login account, and the number of times the flow control account has called the target interface based on the first tag within a current unit time;

[0111] The execution module 63 is used to execute the processing corresponding to the calling request if the number of calls has not reached the number threshold, and return the corresponding processing result to the terminal.

[0112] In one embodiment, the flow control account corresponds to multiple labels, and the sum of the number thresholds corresponding to the multiple labels and the target interface is less than or equal to the total number threshold allowed for the flow control account to call the target interface within a unit time.

[0113] In one embodiment, the execution module 63 is further configured to:

[0114] If the number of calls reaches the number threshold, determine whether there is a second tag among the multiple tags corresponding to the flow control account, the importance represented by the second tag is lower than the importance represented by the first tag, and the number of calls of the flow control account to call the target interface based on the second tag within the current unit time does not reach the number threshold corresponding to the second tag and the target interface under the flow control account;

[0115] If it exists, execute the processing corresponding to the calling request, return the corresponding processing result to the terminal, and update the number of times the flow control account has called the target interface based on the second tag within the current unit time.

[0116] In one embodiment, the acquisition module 62 is used to obtain the number threshold corresponding to the first label under the flow control account corresponding to the login account, including: determining the number threshold corresponding to the first label under the flow control account based on the correspondence between multiple labels and the number threshold under the flow control account.

[0117] In one embodiment, the receiving module 61 is further used to receive flow control configuration information sent by the terminal; the device also includes a configuration module, which is used to obtain the corresponding relationship according to the flow control configuration information.

[0118] Figure 6 The device shown can perform Figure 4 The method provided in the embodiment shown in the figure, for the part not described in detail in this embodiment, please refer to Figure 4 The implementation process and technical effects of this technical solution refer to Figure 4 The description in the illustrated embodiment will not be repeated here.

[0119] In one possible implementation, Figure 6 The structure of the device shown can be implemented as a server. Figure 7 As shown, the server may include: a processor 71 and a memory 72. The memory 72 is used to store the information that supports the server to execute the above Figure 4 In the method provided by the illustrated embodiment, the processor 71 is configured to execute a program stored in the memory 72 .

[0120] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 71, the following steps can be implemented:

[0121] receiving a call request for a target interface sent by the terminal, wherein the call request is sent by the terminal to the server in response to an input operation of the user when the user logs in using a login account, and the parameters of the call request include a first tag, and the first tag is used to represent the importance of the call request;

[0122] Obtaining a threshold value of the number of times corresponding to the first tag under the flow control account corresponding to the login account, and the number of times the flow control account has called the target interface based on the first tag within a current unit time;

[0123] If the number of calls does not reach the number threshold, a process corresponding to the call request is executed, and a corresponding process result is returned to the terminal.

[0124] Optionally, the processor 71 is further configured to execute the aforementioned Figure 4 All or part of the steps in the illustrated embodiments.

[0125] The server structure may also include a communication interface 73 for the server to communicate with other devices or communication networks.

[0126] Figure 8 A schematic diagram of a flow control device for a service providing system according to another embodiment of the present application; see attached Figure 8 As shown, this embodiment provides a device that can perform the above Figure 5 The method provided in the embodiment shown, specifically, the device may include:

[0127] An acquisition module 81 is used to acquire the input operation of the user when the user logs in using a login account;

[0128] The sending module 82 is used to send a call request for a target interface to the server in response to the input operation, wherein the parameters of the call request include a first tag, and the first tag is used to represent the importance of the call request.

[0129] In one embodiment, the login account is a sub-account subordinate to the main account, there are multiple sub-accounts subordinate to the main account, and each of the multiple sub-accounts corresponds to a label;

[0130] The sending module 82 is further configured to use the tag corresponding to the login account used by the user to log in as the first tag.

[0131] In one embodiment, the call request is sent in a data processing flow among multiple data processing flows, and each data processing flow among the multiple data processing flows corresponds to a tag;

[0132] The sending module 82 is further configured to use the tag corresponding to the data processing flow that triggers sending the call request as the first tag.

[0133] In one embodiment, the acquisition module 81 is further used to acquire the flow control configuration information input by the user, and the sending module 82 is further used to send the flow control configuration information to the server.

[0134] Figure 8 The device shown can perform Figure 5 The method provided in the embodiment shown in the figure, for the part not described in detail in this embodiment, please refer to Figure 5 The implementation process and technical effects of this technical solution refer to Figure 5 The description in the illustrated embodiment will not be repeated here.

[0135] In one possible implementation, Figure 8 The structure of the device shown can be implemented as a terminal. Fig. 9 As shown, the terminal may include: a processor 91 and a memory 92. The memory 92 is used to store the support terminal to execute the above Figure 5 In the method provided by the illustrated embodiment, the processor 91 is configured to execute a program stored in the memory 92 .

[0136] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 91, the following steps can be implemented:

[0137] When a user logs in using a login account, obtaining the user's input operation;

[0138] In response to the input operation, a call request for a target interface is sent to the server, wherein parameters of the call request include a first tag, and the first tag is used to characterize the importance of the call request.

[0139] Optionally, the processor 91 is further configured to execute the aforementioned Figure 5 All or part of the steps in the illustrated embodiments.

[0140] The structure of the terminal may also include a communication interface 93 for the terminal to communicate with other devices or a communication network.

[0141] In addition, the embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the following is achieved: Figure 4 The method provided by the illustrated embodiment.

[0142] The present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the following is achieved: Figure 5 The method provided by the illustrated embodiment.

[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative labor.

[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable device to generate a machine, so that the instructions executed by the processor of the computer or other programmable device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0147] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0148] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0149] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0150] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, linked lists, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A flow control method for a service providing system, the system comprising a terminal, another terminal and a server, the method being executed by the server, characterized in that: The login account used by the user of the one terminal and the user of the other terminal is the same account, and the same account includes the same independent login account or a sub-account subordinate to the same main account. The same account corresponds to multiple tags, and different tags are used to represent different importance levels, including: receiving a call request for a target interface sent by the terminal to the server in response to an input operation of a user when the user logs in using a login account, wherein a parameter of the call request includes a tag among the multiple tags; Obtaining a threshold of the number of times the same account calls the target interface corresponding to the tag, and the number of times the same account has called the target interface based on the tag within a current unit time; If the number of calls has reached the number threshold of the tag, reject the call request; receiving another call request for the target interface sent by the other terminal to the server in response to a user input operation when the user logs in using a login account, wherein a parameter of the other call request includes another tag among the multiple tags; Obtaining a threshold of the number of times the same account has called the target interface corresponding to the other tag, and the number of times the same account has called the target interface based on the other tag within the current unit time; If the number of calls does not reach the number threshold of the other tag, a process corresponding to the other call request is executed, and a corresponding process result is returned to the other terminal.

2. The method according to claim 1, characterized in that The sum of the number thresholds corresponding to the multiple tags and the target interface is less than or equal to the total number threshold allowed for the same account to call the target interface within a unit time.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: If the number of calls reaches the number threshold of the other tag, determine whether there is another tag among the multiple tags corresponding to the same account, the importance represented by the another tag is lower than the importance represented by the other tag, and the number of calls of the target interface by the same account based on the another tag in the current unit time does not reach the number threshold corresponding to the another tag and the target interface under the same account; If it exists, execute the processing corresponding to the other calling request, return the corresponding processing result to the other terminal, and update the number of times the same account has called the target interface based on the other tag within the current unit time.

4. The method according to claim 1 or 2, characterized in that: The obtaining of the threshold number of times the same account corresponds to the other tag for the target interface includes: determining the threshold number of times the same account corresponds to the other tag for the target interface based on the correspondence between multiple tags and the threshold number of times for the same account for the target interface.

5. The method according to claim 4, characterized in that The method further comprises: Receive the flow control configuration information sent by the other terminal, and obtain the corresponding relationship according to the flow control configuration information.

6. A flow control method for a service providing system, the system comprising a terminal, another terminal and a server, the method being executed by the other terminal, characterized in that: The login account used by the user of the one terminal and the user of the other terminal is the same account, and the same account includes the same independent login account or a sub-account subordinate to the same main account. The same account corresponds to multiple tags, and different tags are used to represent different importance levels, including: When a user logs in using a login account, obtaining the user's input operation; In response to the input operation, another call request for the target interface is sent to the server, and the parameters of the another call request include another tag among the multiple tags, so that the server obtains the number threshold of the number of times the same account calls the target interface corresponding to the another tag, and the number of times the same account has called the target interface based on the another tag within the current unit time. If the number of calls does not reach the number threshold of the another tag, the processing corresponding to the another call request is performed, and the corresponding processing result is returned to the other terminal; the server also receives a call request sent to the server by the terminal in response to the user's input operation when the user logs in using the login account, and the parameters of the call request include a tag among the multiple tags, obtain the number threshold of the number of times the same account calls the target interface corresponding to the one tag, and the number of times the same account has called the target interface based on the one tag within the current unit time. If the number of calls has reached the number threshold of the one tag, the call request is rejected.

7. The method according to claim 6, characterized in that Each of the multiple sub-accounts belonging to the main account corresponds to a label; the method also includes: using the label corresponding to the login account used by the user to log in as the other label.

8. The method according to claim 6, characterized in that The another call request is sent in a data processing flow among multiple data processing flows, and each data processing flow among the multiple data processing flows corresponds to a tag; The method further includes: using a tag corresponding to a data processing flow that triggers sending the other call request as the other tag.

9. The method according to any one of claims 6 to 8, characterized in that: The method further includes: acquiring flow control configuration information input by the user, and sending the flow control configuration information to the server.

10. A flow control method for a service providing system, characterized in that: The system includes a terminal, another terminal and a server. The login accounts used by users of the terminal and the other terminal are the same account. The same account includes the same independent login account or a sub-account subordinate to the same main account. The same account corresponds to multiple tags, and different tags are used to represent different importance levels, including: The terminal obtains the input operation of the user when the user logs in using the login account; The terminal sends a call request for a target interface to the server in response to the input operation, wherein a parameter of the call request includes a tag among the multiple tags; The server obtains a threshold of the number of times the same account calls the target interface corresponding to the tag, and the number of times the same account has called the target interface based on the tag within a current unit time; If the number of calls has reached the number threshold of the tag, reject the call request; The other terminal obtains the input operation of the user when the user logs in using the login account; The other terminal sends another call request for the target interface to the server in response to the input operation, wherein a parameter of the other call request includes another tag among the multiple tags; The server obtains a threshold of the number of times the same account has called the target interface corresponding to the other tag, and the number of times the same account has called the target interface based on the other tag within the current unit time; If the number of calls does not reach the number threshold of the other tag, the server performs processing corresponding to the other call request and returns a corresponding processing result to the other terminal.

11. A server, characterized in that: include: A memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of claims 1 to 5.

12. A terminal, characterized in that: include: A memory, a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method as described in any one of claims 6 to 9.

13. A service providing system, characterized in that: The method comprises a server and a terminal, wherein the server is used to execute the method according to any one of claims 1 to 5, and the terminal is used to execute the method according to any one of claims 6 to 9.

14. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Access request control method and device, electronic equipment and readable storage medium

    CN110535777A