CN113872876A - Request limiting method and device, electronic equipment and computer readable storage medium - Google Patents

Request limiting method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113872876A
CN113872876A CN202111114059.XA CN202111114059A CN113872876A CN 113872876 A CN113872876 A CN 113872876A CN 202111114059 A CN202111114059 A CN 202111114059A CN 113872876 A CN113872876 A CN 113872876A
Authority
CN
China
Prior art keywords
access request
request
network node
distribution network
content distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111114059.XA
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Leiniao Network Media Co ltd
Original Assignee
Shenzhen Leiniao Network Media Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Leiniao Network Media Co ltd filed Critical Shenzhen Leiniao Network Media Co ltd
Priority to CN202111114059.XA priority Critical patent/CN113872876A/en
Publication of CN113872876A publication Critical patent/CN113872876A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/20Traffic policing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a request limiting method, a request limiting device, electronic equipment and a computer readable storage medium; in the embodiment of the application, the access request amount of the page is obtained first. And then when the access request quantity meets the preset current limiting condition, determining the current limiting value of the server according to the access request quantity. And finally, the content distribution network node is used for limiting the user requests which exceed the flow limiting value and are initiated aiming at the page, so that the user requests which exceed the flow limiting value and are initiated aiming at the page cannot reach the server, and the server cannot be down.

Description

Request limiting method and device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a request restriction method and apparatus, an electronic device, and a computer-readable storage medium.
Background
E-commerce companies typically organize second kill promotional programs in order to improve the company's awareness and appeal to customers. The e-commerce company will store the stock of the second kill commodity in the database before the second kill promotion event begins. After the second killing promotion activity starts, when the second killing commodity inventory requested by the user reaches the upper limit of the second killing commodity inventory in the database, the server intercepts the request of the user.
However, at present, the requests of the users all reach the server directly, and in the process of killing the sales promotion activities in seconds, the request quantity of the users is increased greatly in a short time, so that the request quantity of the users reaching the server in a short time is large, and the server is down.
Disclosure of Invention
The embodiment of the invention provides a request limiting method, a request limiting device, electronic equipment and a computer readable storage medium, which can solve the technical problem that a server is down due to the fact that the request quantity of users reaching the server is large in a short time.
A request limiting method is applied to a server and comprises the following steps:
acquiring the access request quantity of a page;
when the access request quantity meets a preset current limiting condition, determining a current limiting value of the server according to the access request quantity;
and limiting the user request initiated aiming at the page and exceeding the flow limiting value by utilizing the content distribution network node.
Optionally, the limiting, by the content distribution network node, the user request initiated for the page that exceeds the current limit value includes:
and sending the flow limit value to a content distribution network node so that the content distribution network node limits the user request initiated by the page and exceeding the flow limit value.
Optionally, the determining, when the access request amount satisfies a preset current limit condition, a current limit value of the server according to the access request amount includes:
when the access request amount is larger than a threshold value, determining a first time of a first access request in the access request amount and a second time of a last access request in the access request amount;
determining a difference between the first time and the second time;
and if the difference is smaller than or equal to a preset time value, determining the flow limit value of the server according to the access request quantity.
Optionally, when the access request amount satisfies a preset current limit condition, after determining a current limit value of the server according to the access request amount, the method further includes:
acquiring performance parameters of each content distribution network node;
determining a sub-restriction value corresponding to each content distribution network node according to each performance parameter and the restriction value;
correspondingly, the restricting, by the content delivery network node, the user request initiated for the page that exceeds the current limit value includes:
and limiting the user request initiated by the page and exceeding the sub-restriction value corresponding to the content distribution network node by using the content distribution network node.
Optionally, the determining, when the access request amount satisfies a preset current limit condition, a current limit value of the server according to the access request amount includes:
when the access request quantity meets a preset current limiting condition, acquiring a preset mapping table;
and searching the flow limiting value of the server corresponding to the access request amount from the preset mapping table.
Optionally, after determining the flow limit value of the server according to the access request amount when the access request amount satisfies a preset flow limit condition, the method further includes:
sending the flow limit value to a content distribution network node so that the content distribution network node forwards a target user request initiated for the page within the flow limit value to the server;
receiving the target user request;
determining the target number in the target user request;
and if the target quantity is less than or equal to the inventory quantity, deducting the inventory quantity based on the target quantity, and executing virtual resource transfer operation.
Another request limiting method applied to a content distribution network node includes:
acquiring a user request quantity;
and when the user request quantity exceeds the flow limit value, limiting the original user request exceeding the flow limit value in the user request quantity.
Accordingly, an embodiment of the present invention provides a request restriction apparatus, including:
the acquisition module is used for acquiring the access request quantity of the page;
a determining module, configured to determine a flow limiting value of the server according to the access request amount when the access request amount satisfies a preset flow limiting condition;
and the limiting module is used for limiting the user request initiated by the page and exceeding the flow limiting value by utilizing the content distribution network node.
In addition, an electronic device according to an embodiment of the present invention includes a processor and a memory, where the memory stores a computer program, and the processor is configured to run the computer program in the memory to implement the request restriction method according to the embodiment of the present invention.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to perform any one of the steps in the request restriction method provided in the embodiment of the present invention.
In the embodiment of the application, the access request amount of the page is obtained first. And then when the access request quantity meets the preset current limiting condition, determining the current limiting value of the server according to the access request quantity. And finally, the content distribution network node is used for limiting the user requests which exceed the flow limiting value and are initiated aiming at the page, so that the user requests which exceed the flow limiting value and are initiated aiming at the page cannot reach the server, and the server cannot be down.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a request limiting method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a method for determining a sub-throttling value corresponding to a content distribution network node according to an embodiment of the present invention;
fig. 3 is a schematic view of an application scenario of a request restriction method according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating another request restriction method according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a request restriction apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another request restriction apparatus provided in an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a request limiting method, a request limiting device and a computer readable storage medium. Wherein the request restriction means may be integrated in the electronic device, which may be a server.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, big data and an artificial intelligence platform.
The client may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart watch, a smart device, and the like. For the specific type of the client, the user may set the client according to actual conditions, which is not limited herein.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The request limiting method provided in the embodiments of the present application is described in detail below.
As shown in fig. 1, the specific flow of the request restriction method is as follows:
s101, obtaining the access request quantity of the page.
In some promotional activities (a promotional activity refers to an activity of robbing a preset object at a specified time, the object may refer to a commodity or may refer to a red envelope). Therefore, when the user enters the page corresponding to the promotion activity, the server can obtain the access request amount of the page corresponding to the promotion activity.
It should be understood that the client may obtain the access request amount of the page in real time and then periodically send the page access request amount to the server, so that the server may obtain the access request amount of the page. Alternatively, the Content Delivery Network (CDN) may obtain the access request amount of the page in real time, and then periodically send the page access request amount to the server, so that the server may obtain the access request amount of the page. For the way of obtaining the access request amount of the page by the server, the user may select the access request amount according to the actual situation, and the application is not specifically limited herein.
The access request amount of the page refers to the number of users entering the page corresponding to the promotion activity in a preset time period before the promotion activity starts, namely the number of users waiting for promotion. For example, if the promotional activity start time is 10 minutes at A hour, the access request amount for a page may refer to the number of users who entered the page corresponding to the promotional activity from A hour to 9 minutes and 59 seconds at A hour.
And S102, when the access request quantity meets the preset flow limiting condition, determining the flow limiting value of the server according to the access request quantity.
After the server acquires the access request quantity, whether the access request quantity meets the preset current limiting condition can be determined. When the access request quantity meets the preset flow limiting condition, the number of people waiting for participating in the promotion activity is larger, which means that the number of people about to participate in the promotion activity is larger. Therefore, at this time, the traffic limit value of the server can be determined according to the access request amount.
The process of determining the flow limit value of the server according to the access request amount may be: and substituting the access request quantity into a preset formula by the server for calculation so as to obtain the flow limiting value of the server. Alternatively, the following may be used: and the server searches the flow limiting value of the server corresponding to the access request amount from a preset mapping table. For the specific manner of determining the flow limit value of the server according to the access request amount, the user may select according to the actual situation, and this embodiment is not limited herein.
The preset current limiting condition may be set by a user according to an actual situation, for example, in this embodiment, the preset current limiting condition is that the access request amount in a preset time interval is greater than a time threshold or a change rate of the access request amount is greater than a preset value. The present application is not specifically limited herein.
S103, limiting the user request initiated by the page exceeding the flow limiting value by utilizing the content distribution network node.
After obtaining the current limit value, the server may send the current limit value directly to the content distribution network node. The content distribution network node thus receives the restriction value. Or, the server may also generate a preset instruction according to the current limiting value, and send the preset instruction to the content distribution network node, and the content distribution network node analyzes the preset instruction, so as to obtain the current limiting value.
It should be noted that the server may send the restriction value to each content distribution network node on average, for example, if the restriction value is 1000, and there are 10 content distribution network nodes, the sub-restriction value corresponding to each content distribution network node is 100.
Alternatively, the server may determine the sub-restriction value corresponding to the content distribution network node according to the performance parameter of the content distribution network node.
The content distribution network node, after obtaining the current limit value, will initiate a user request for the page when the start time of the promotional program is reached. When the user request initiated for the page exceeds the current limit value, the content distribution network node will limit the user requests that exceed the current limit value.
Wherein, when the promotion activity is the activity of preempting the goods, the user request may be a purchase request initiated by the user for the page. Alternatively, when the promotional activity is a red envelope robbing, the user request may also be a red envelope robbing request initiated by the user for the page.
The limitation refers to that the content distribution network node intercepts the user request for finding the current limiting value, so that the server cannot receive the user request exceeding the current limiting value, and further cannot receive a large number of user requests in a short time.
The content distribution network nodes refer to node servers distributed in different areas, when a user initiates a request at a client, the request is sent to the content distribution network node closest to the client, and if the content distribution network node has a resource corresponding to the request, the resource corresponding to the request is returned to the client, so that the user can quickly acquire the resource corresponding to the request.
As can be seen from the above, in the embodiment of the present application, the access request amount of the page is obtained first. And then when the access request quantity meets the preset current limiting condition, determining the current limiting value of the server according to the access request quantity. And finally, the content distribution network node is used for limiting the user requests which exceed the flow limiting value and are initiated aiming at the page, so that the user requests which exceed the flow limiting value and are initiated aiming at the page cannot reach the server, and the server cannot be down.
In some embodiments, the specific process of restricting the user request for page initiation that exceeds the current limit value by the content distribution network node may be: and the server sends the flow limiting value to the content distribution network node, and the content distribution network node limits the user request initiated by the page and exceeding the flow limiting value after receiving the flow limiting value.
Because the performance of each content distribution network node is different, the flow limiting values corresponding to different content distribution network nodes can be different. Therefore, in some possible implementation manners, after determining the throttling value of the server, the server may obtain the performance parameter of each content distribution network node, and then determine the sub-throttling value corresponding to each content distribution network node according to each performance parameter and the throttling value. And finally, when the user request initiated aiming at the page exceeds the sub-restriction value corresponding to the content distribution network node, limiting the user request exceeding the sub-restriction value by using the content distribution network node.
The sum of the sub-restriction values corresponding to each content distribution network node is equal to the restriction value of the server. Therefore, after each content distribution network node intercepts the user request exceeding the sub-restriction value corresponding to the content distribution network node, the user request exceeding the restriction value can not reach the server finally.
For example, referring to fig. 2, the restriction value is 100, there are 4 content distribution network nodes, the number of sub-restriction values corresponding to the content distribution network node 1 is determined to be 30 according to the performance parameter of the content distribution network node 1, the number of sub-restriction values corresponding to the content distribution network node 2 is determined to be 10 according to the performance parameter of the content distribution network node 2, the number of sub-restriction values corresponding to the content distribution network node 3 is determined to be 20 according to the performance parameter of the content distribution network node 3, and the number of sub-restriction values corresponding to the content distribution network node 4 is determined to be 40 according to the performance parameter of the content distribution network node 4.
The content distribution network node 1 restricts the 31 st user request by a user request within 30. The content distribution network node 2 limits the 11 th user request by a user request within 10. The content distribution network node 3 limits the 21 st user request by a user request within 20. The content distribution network node 4 limits the 41 st user request by user requests within 40 so that user requests exceeding the restriction value 100, i.e. 101 st user requests, do not reach the server.
The performance parameters of the content distribution network node include, but are not limited to, a utilization rate of a Central Processing Unit (CPU) of the content distribution network node, a bandwidth of the content distribution network node, and the like.
After the content distribution network node receives the flow limit value, when a user initiates a user request for a page, the content distribution network node forwards a target user request initiated for the page within the flow limit value to a server, and the server receives the user request. The server then determines the target number in the target user request. If the target number is less than or equal to the inventory amount, the inventory amount is decremented based on the target number, and a virtual resource transfer operation is performed.
The target number is the number of objects corresponding to the promotion desired by the user. For example, when the sales promotion activity is a first-time commodity purchasing activity, the object corresponding to the sales promotion activity is a commodity, and the target quantity may be the quantity of commodities purchased by the user. When the promotion activity is a red envelope robbing activity, the object corresponding to the promotion activity is a red envelope, and the target quantity can be the amount of money randomly matched for the user request when the user initiates the user request at the client.
Virtual resources refer to monetary assets that exist in electronic form, such as money that a user spends on a credit card or a payment instrument. The virtual resource transfer operation refers to transferring money from the user's account to the merchant's account or the third party platform's account, or transferring money from the merchant's account or the third party platform's account to the user's account.
In addition, the server can also return the relevant result information to the client. For example, when a user requests that the flow limit value be exceeded, information that the promotional program has ended may be returned to the client. And when the user request is within the flow limit value, if the target quantity is greater than the inventory quantity, returning the information that the promotion activity is finished to the client, and if the target quantity is less than or equal to the inventory quantity, returning the information that the promotion activity is successfully robbed to the client.
In other embodiments, when the access request amount satisfies the preset current limit condition, determining a current limit value of the server according to the access request amount includes: when the number of access requests is greater than the threshold, a first time of a first one of the number of access requests and a second time of a last one of the number of access requests are determined. A difference between the first time and the second time is determined. And if the difference is smaller than or equal to the preset time value, determining the flow limit value of the server according to the access request quantity.
For example, the threshold is 1000, and when the access request amount is 1001, a first time of a first access request of the 1001 access requests and a last access request of the 1001 access requests, that is, a second time of the 1001 access request, are determined, and then the first time and the second time are subtracted to obtain a difference. And if the difference value is less than or equal to the preset time value, determining the flow limit value of the server according to the access request quantity.
The first time refers to the time when the server receives the first access request, and the second time refers to the time when the server receives the last access request.
In other embodiments, the server may preset a mapping table between the access request amount and the current limiting value, and then obtain the preset mapping table when the access request amount satisfies the preset current limiting condition. And finally, searching the flow limiting value of the server corresponding to the access request amount from a preset mapping table. Optionally, the process of searching the flow limiting value of the server corresponding to the access request amount from the preset mapping table may be:
and comparing the access request quantity with the preset request quantity in the preset mapping table, finding out the preset request quantity which is the same as the access request quantity, and searching for the flow limiting value corresponding to the preset request quantity which is the same as the access request quantity.
Alternatively, the following may be used: and searching a target request quantity interval corresponding to the access request quantity in a preset mapping table, and then finding out a flow limit value corresponding to the target request quantity interval, namely at the moment, storing the request quantity interval and the flow limit value in the preset mapping table correspondingly.
Referring to fig. 3(M and N are integers and greater than 1. content distribution network nodes 1-N represent content distribution network nodes 1 to N, and there are N total content distribution network nodes, and similarly, clients 1-M represent clients 1 to M, and there are M total clients), a specific application scenario of the request restriction method provided in the embodiment of the present application is described below.
10 minutes before the second commodity killing activity starts, when a user clicks a link of the second commodity killing activity, a client generates an access request of a page of the second commodity killing activity according to the link and sends the access request to a content distribution network node, the content distribution network returns relevant information of the page of the second commodity activity to the client, the client accordingly enters the page of the second commodity killing activity, and the content distribution network node acquires the number of the users entering the page, namely the access request amount of the page in real time and periodically sends the access request amount of the page to a server. The server judges whether the access request amount is greater than 100, if the access request amount is greater than 100, the first time of the first access request and the second time of the last access request in the access request amount are determined, and if the difference value of the first time and the second time is less than or equal to 1 minute, the flow limiting value corresponding to the access request amount is searched from a preset mapping table.
The method comprises the steps of obtaining performance parameters of each content distribution network node, determining a sub-restriction value corresponding to each content distribution network node according to the performance parameters and the restriction values of each content distribution network node, and sending the sub-restriction value corresponding to each content distribution network node.
When the activity of killing commodities in seconds starts, a user initiates a commodity purchasing request on the page through the client, the content distribution network node forwards the commodity purchasing request within the sub-flow limit value to the server, the server checks the quantity of the commodity purchasing request within the sub-flow limit value, if the quantity is less than or equal to the inventory quantity, the inventory quantity is deducted, money corresponding to the commodity purchasing request in the account of the user is transferred to the account of the third-party platform, a message of successful purchasing is returned to the content distribution network node, and the content distribution network node returns the message of successful purchasing to the client.
And the content distribution network node intercepts the commodity purchasing request exceeding the sub-restricted flow value and returns the information of the end of the second commodity killing activity to the client.
Another method for requesting restriction provided by the present application is described in detail below.
Referring to fig. 4, the request limiting method is applied to a content distribution network node, and the specific flow is as follows:
s401, obtaining the user request quantity.
The user request amount is the number of user requests initiated by the user for the page. When a user initiates a user request on a page of a promotion activity, a client sends the user request to a content distribution network node, and the content distribution network node counts the received user request, so that the user request amount is obtained.
S402, when the user request quantity exceeds the flow limit value, limiting the original user request exceeding the flow limit value in the user request quantity.
The restriction value may be a pre-stored value in the content distribution network node. The user can directly set on the content distribution network node, and the content distribution network node stores the content. Or, the server may set in real time according to the access request amount of the page, and then send the set flow limiting value to the content distribution network node, and the content distribution network node stores the flow limiting value.
After the content distribution network node obtains the user request quantity, if the user request quantity exceeds the flow limit value, limiting the original user request which exceeds the flow limit value in the user request quantity, and forwarding the user request which is within the flow limit value in the user request quantity to the server.
In this embodiment, the content network node stores a flow limit value, and when the user request amount exceeds the flow limit value, the original user request for finding the flow limit value in the user request amount is limited, so that the original user request exceeding the flow limit value does not reach the server, and the server does not receive a large number of user requests in a short time, thereby preventing the server from being down.
For other realizations of the request limiting method in this embodiment, reference may be made to the request limiting method in the foregoing embodiment, and this implementation is not described herein again.
In order to better implement the above method, an embodiment of the present invention further provides a request limiting apparatus, which may be integrated in an electronic device, such as a server.
For example, as shown in fig. 5, the request limiting means may include:
the obtaining module 501 is configured to obtain an access request amount of a page.
A determining module 502, configured to determine a flow limiting value of the server according to the access request amount when the access request amount meets a preset flow limiting condition.
A limiting module 503, configured to limit, by the content distribution network node, the user request initiated for the page that exceeds the current limit value.
Optionally, the limiting module 503 is specifically configured to perform:
and sending the flow limit value to the content distribution network node so that the content distribution network node limits the user request which exceeds the flow limit value and is initiated by aiming at the page.
Optionally, the determining module 502 is specifically configured to execute:
when the access request amount is larger than the threshold value, determining a first time of a first access request in the access request amount and a second time of a last access request in the access request amount;
determining a difference between the first time and the second time;
and if the difference is smaller than or equal to the preset time value, determining the flow limit value of the server according to the access request quantity.
Optionally, the request limiting device further includes:
and the parameter acquisition module is used for acquiring the performance parameters of each content distribution network node and determining the sub-restriction value corresponding to each content distribution network node according to each performance parameter and the restriction value.
Accordingly, the limiting module 503 is specifically configured to perform:
and limiting the user request initiated by the page, which exceeds the sub-flow limiting value corresponding to the content distribution network node, by using the content distribution network node.
Optionally, the determining module 502 is specifically configured to execute:
when the access request quantity meets a preset current limiting condition, acquiring a preset mapping table;
and searching the flow limiting value of the server corresponding to the access request amount from a preset mapping table.
Optionally, the request limiting device further includes:
and the forwarding module is used for sending the flow limit value to the content distribution network node so that the content distribution network node forwards the target user request initiated aiming at the page within the flow limit value to the server.
And the receiving module is used for receiving the target user request.
And the quantity determining module is used for determining the target quantity in the target user request.
And the deduction module is used for deducting the inventory based on the target quantity and executing the virtual resource transfer operation if the target quantity is less than or equal to the inventory.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation manners and corresponding beneficial effects of the above modules may refer to the foregoing method embodiments, which are not described herein again.
In order to better implement the above method, an embodiment of the present invention further provides another request limiting apparatus, which may be integrated in a content distribution network node, and referring to fig. 6, the request limiting apparatus includes:
the obtaining module 601 is configured to obtain a user request amount.
And a limiting module 602, configured to limit the original user request that exceeds the current limit value in the user request amount when the user request amount exceeds the current limit value.
In specific implementation, the above modules may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and specific implementation manners and corresponding beneficial effects of the above modules may refer to the foregoing method embodiments, which are not described herein again.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, which shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as a processor 701 of one or more processing cores, memory 702 of one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 7 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 701 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by operating or executing computer programs and/or modules stored in the memory 702 and calling data stored in the memory 702, thereby performing overall monitoring of the electronic device. Optionally, processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 701.
The memory 702 may be used to store computer programs and modules, and the processor 701 may execute various functional applications and data processing by operating the computer programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
The electronic device further includes a power source 703 for supplying power to each component, and preferably, the power source 703 may be logically connected to the processor 701 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply 703 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may also include an input unit 704, and the input unit 704 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 701 in the electronic device loads an executable file corresponding to one or more processes of the computer program into the memory 702 according to the following instructions, and the processor 701 executes the computer program stored in the memory 702, so as to implement various functions, such as:
acquiring the access request quantity of a page;
when the access request quantity meets the preset current limiting condition, determining a current limiting value of the server according to the access request quantity;
the content distribution network node is utilized to limit user requests for page initiation that exceed the flow limit value.
The specific implementation of the above operations and the corresponding beneficial effects can be referred to the foregoing embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the request restriction methods provided by the embodiment of the present invention. For example, the computer program may perform the steps of:
acquiring the access request quantity of a page;
when the access request quantity meets the preset current limiting condition, determining a current limiting value of the server according to the access request quantity;
the content distribution network node is utilized to limit user requests for page initiation that exceed the flow limit value.
The specific implementation of the above operations and the corresponding beneficial effects can be referred to the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the computer-readable storage medium can execute the steps in any information classification method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any request restriction method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described again here.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the request restriction method.
The above detailed description is provided for a request limiting method, apparatus and computer readable storage medium according to the embodiments of the present invention, and the principle and implementation of the present invention are described herein by applying specific examples, and the above description of the embodiments is only used to help understanding the method and core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A request limiting method is applied to a server and comprises the following steps:
acquiring the access request quantity of a page;
when the access request quantity meets a preset current limiting condition, determining a current limiting value of the server according to the access request quantity;
restricting, with a content distribution network node, user requests originating for the page that exceed the flow limit value.
2. The request limiting method of claim 1, wherein the limiting, with the content distribution network node, the page-initiated user request that exceeds the current limit value comprises:
and sending the flow limit value to a content distribution network node so that the content distribution network node limits the user request initiated by the page, which exceeds the flow limit value.
3. The request limiting method according to claim 1, wherein the determining a flow limiting value of the server according to the access request amount when the access request amount satisfies a preset flow limiting condition comprises:
when the access request amount is larger than a threshold value, determining a first time of a first access request in the access request amount and a second time of a last access request in the access request amount;
determining a difference between the first time and the second time;
and if the difference is smaller than or equal to a preset time value, determining a flow limiting value of the server according to the access request quantity.
4. The request limiting method according to claim 1, further comprising, after determining a flow limiting value of the server according to the access request amount when the access request amount satisfies a preset flow limiting condition:
acquiring performance parameters of each content distribution network node;
determining a sub-restriction value corresponding to each content distribution network node according to each performance parameter and the restriction value;
accordingly, the restricting, with the content delivery network node, the user request initiated for the page that exceeds the current limit value comprises:
and utilizing the content distribution network node to limit the user request initiated by the page and exceeding the sub-restriction value corresponding to the content distribution network node.
5. The request limiting method according to claim 1, wherein the determining a flow limiting value of the server according to the access request amount when the access request amount satisfies a preset flow limiting condition comprises:
when the access request quantity meets a preset current limiting condition, acquiring a preset mapping table;
and searching the flow limiting value of the server corresponding to the access request amount from the preset mapping table.
6. The method according to claim 1, further comprising, after determining the flow limiting value of the server according to the access request amount when the access request amount satisfies a preset flow limiting condition:
sending the current limit value to a content distribution network node so that the content distribution network node forwards a target user request initiated for the page within the current limit value to the server;
receiving the target user request;
determining a target number in the target user request;
and if the target quantity is less than or equal to the inventory quantity, deducting the inventory quantity based on the target quantity, and executing virtual resource transfer operation.
7. A request restriction method applied to a content distribution network node, comprising:
acquiring a user request quantity;
and when the user request quantity exceeds a flow limit value, limiting the original user request exceeding the flow limit value in the user request quantity.
8. A request restriction apparatus, comprising:
the acquisition module is used for acquiring the access request quantity of the page;
the determining module is used for determining a flow limiting value of the server according to the access request quantity when the access request quantity meets a preset flow limiting condition;
and the limiting module is used for limiting the user request initiated aiming at the page and exceeding the flow limiting value by utilizing a content distribution network node.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program in the memory to perform the request restriction method of any one of claims 1 to 6 or the request restriction method of claim 7.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being adapted to be loaded by a processor for performing the request restriction method of any one of claims 1 to 6, or the request restriction method of claim 7.
CN202111114059.XA 2021-09-23 2021-09-23 Request limiting method and device, electronic equipment and computer readable storage medium Pending CN113872876A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111114059.XA CN113872876A (en) 2021-09-23 2021-09-23 Request limiting method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111114059.XA CN113872876A (en) 2021-09-23 2021-09-23 Request limiting method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113872876A true CN113872876A (en) 2021-12-31

Family

ID=78993498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111114059.XA Pending CN113872876A (en) 2021-09-23 2021-09-23 Request limiting method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113872876A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107733972A (en) * 2017-08-28 2018-02-23 阿里巴巴集团控股有限公司 A kind of short linking analytic method, device and equipment
CN110148034A (en) * 2019-04-24 2019-08-20 珠海市珠澳跨境工业区好易通科技有限公司 A kind of excellent device and method of online shopping system architecture
CN110401720A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 Information processing method, device, system, application server and medium
US20200112622A1 (en) * 2018-10-03 2020-04-09 Twitter, Inc. Client Software Back Off
CN111030936A (en) * 2019-11-18 2020-04-17 腾讯云计算(北京)有限责任公司 Current-limiting control method and device for network access and computer-readable storage medium
CN111262791A (en) * 2020-01-08 2020-06-09 江苏满运软件科技有限公司 Flow control method and device, electronic equipment and storage medium
CN112953945A (en) * 2021-02-24 2021-06-11 中国工商银行股份有限公司 Access request processing method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107733972A (en) * 2017-08-28 2018-02-23 阿里巴巴集团控股有限公司 A kind of short linking analytic method, device and equipment
US20200112622A1 (en) * 2018-10-03 2020-04-09 Twitter, Inc. Client Software Back Off
CN110148034A (en) * 2019-04-24 2019-08-20 珠海市珠澳跨境工业区好易通科技有限公司 A kind of excellent device and method of online shopping system architecture
CN110401720A (en) * 2019-07-31 2019-11-01 中国工商银行股份有限公司 Information processing method, device, system, application server and medium
CN111030936A (en) * 2019-11-18 2020-04-17 腾讯云计算(北京)有限责任公司 Current-limiting control method and device for network access and computer-readable storage medium
CN111262791A (en) * 2020-01-08 2020-06-09 江苏满运软件科技有限公司 Flow control method and device, electronic equipment and storage medium
CN112953945A (en) * 2021-02-24 2021-06-11 中国工商银行股份有限公司 Access request processing method and system

Similar Documents

Publication Publication Date Title
CN108494703B (en) Access frequency control method, device and storage medium
US8719131B1 (en) Allocating financial risk and reward in a multi-tenant environment
CN108111554B (en) Control method and device for access queue
US20220343398A1 (en) Order management methods, system, terminal and electronic device based on multi-person ordering
Das et al. A QoS and profit aware cloud confederation model for IaaS service providers
CN108112038B (en) Method and device for controlling access flow
CN108492109B (en) Electronic device, dynamic code request processing method and storage medium
CN111930786A (en) Resource acquisition request processing system, method and device
CN115277577A (en) Data processing method, data processing device, computer equipment and computer readable storage medium
Badshah et al. Optimising infrastructure as a service provider revenue through customer satisfaction and efficient resource provisioning in cloud computing
CN108874836B (en) Method and device for transferring electronic ticket
CN114070847B (en) Method, device, equipment and storage medium for limiting current of server
CN111866062B (en) Credible negotiation method and device for cloud service transaction
CN114331446B (en) Method, device, equipment and medium for realizing out-of-chain service of block chain
CN111210256A (en) Resource allocation method and device, server and storage medium
JP7059160B2 (en) Providing equipment, providing method and providing program
CN113872876A (en) Request limiting method and device, electronic equipment and computer readable storage medium
US20150058068A1 (en) Methods and systems for managing suppliers and flow of goods on an ecommerce platform
US20130191265A1 (en) Cloud-based system for performing online trading
US20210334401A1 (en) Methods and systems for privacy protection verification
CN111523898A (en) Verification method for digital asset management system
JP7443419B2 (en) Information processing device, information processing method, and information processing program
US10269056B2 (en) Request processing system, request processing method, program, and information storage medium
CN115470289A (en) Risk data processing method, device and system
CN117909033A (en) Resource processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination