Movatterモバイル変換


[0]ホーム

URL:


CN109787908A - Server current-limiting method, system, computer equipment and storage medium - Google Patents

Server current-limiting method, system, computer equipment and storage medium
Download PDF

Info

Publication number
CN109787908A
CN109787908ACN201811528667.3ACN201811528667ACN109787908ACN 109787908 ACN109787908 ACN 109787908ACN 201811528667 ACN201811528667 ACN 201811528667ACN 109787908 ACN109787908 ACN 109787908A
Authority
CN
China
Prior art keywords
digital subscriber
current
configuration information
intelligent terminal
current limliting
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.)
Granted
Application number
CN201811528667.3A
Other languages
Chinese (zh)
Other versions
CN109787908B (en
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co LtdfiledCriticalPing An Puhui Enterprise Management Co Ltd
Priority to CN201811528667.3ApriorityCriticalpatent/CN109787908B/en
Publication of CN109787908ApublicationCriticalpatent/CN109787908A/en
Application grantedgrantedCritical
Publication of CN109787908BpublicationCriticalpatent/CN109787908B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

The present invention relates to flow shunt field, disclosing a kind of server current-limiting method, system, computer equipment and storage medium, method includes: the access request with digital subscriber mark for receiving intelligent terminal and sending;When current limiting switch is opened, current limliting configuration information is obtained from server buffer;Judge that the digital subscriber identifies whether to match with the current limliting configuration information;If the digital subscriber mark is matched with the current limliting configuration information, data information corresponding with the access request is sent to the intelligent terminal.The digital subscriber mark that the present invention includes using the access request that simple current limliting configuration information sends intelligent terminal judges, can quickly judge whether intelligent terminal is the intelligent terminal being allowed to, and then determine whether that intelligent terminal sends data information corresponding with access request, reduce occupancy server resource, while realizing the purpose of current limliting.

Description

Server current-limiting method, system, computer equipment and storage medium
Technical field
The present invention relates to flow shunt field more particularly to it is a kind of based on digital subscriber mark server current-limiting method,System, computer equipment and storage medium.
Background technique
Existing server system often meets with the case where high concurrent.Delay machine occurs for server in order to prevent, needs pairA large amount of access request carries out current limliting.
Existing current-limiting method such as token bucket algorithm, token bucket algorithm etc., be by the access request of current limliting it is random, this just leadsWhen having caused the upper operation of some users also normal, but having clicked next step, cause due to by system current limliting in next stepRequest be rejected, seriously affect the user experience of the user.
There are also a kind of current-limiting method, using Redis (Redis be being write using ANSI C an of open source,Support network, it is memory-based also can the log type of persistence, key value database, and provide the application programming of multilingualInterface) caching in made marks to listed user to guarantee that listed user can effectively be mentioned in this way with continuous accessHigh user experience.But this mode is there is also serious defect, due to excessively reliance server resource, such as needs to arrangeRedis distributed caching, and vast resources can be consumed, considerably increase the input cost of server.
Summary of the invention
Based on this, the present invention provide it is a kind of based on digital subscriber mark server current-limiting method, system, computer equipmentAnd storage medium, to solve the problems, such as that current current-limiting method excessively occupies server resource.
A kind of server current-limiting method based on digital subscriber mark, comprising:
The access request with digital subscriber mark of intelligent terminal transmission is received, the digital subscriber mark is based on loginIn the user account of the intelligent terminal user information and generate;
When current limiting switch is opened, current limliting configuration information is obtained from server buffer, the current limiting switch is for controllingThe flowing of access of server-side processed;
Judge that the digital subscriber identifies whether to match with the current limliting configuration information;
If the digital subscriber mark is matched with the current limliting configuration information, sent and the visit to the intelligent terminalAsk request corresponding data information.
A kind of server current limiting system based on digital subscriber mark, comprising:
Request module is received, for receiving the access request with digital subscriber mark of intelligent terminal transmission, the numberUser information of the word user identifier based on the user account for logging in the intelligent terminal and generate;
Configuration information module is obtained, for current limliting being obtained from server buffer and matching confidence when current limiting switch is openedBreath, the current limiting switch are used to control the flowing of access of server-side;
Judgment module, for judging that the digital subscriber identifies whether to match with the current limliting configuration information;
Data module is sent, if matching for digital subscriber mark with the current limliting configuration information, to the intelligenceIt can terminal transmission data information corresponding with the access request.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processingThe computer program run on device, the processor is realized when executing the computer program to be identified as above-mentioned based on digital subscriberServer current-limiting method the step of.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meterIt is realized when calculation machine program is executed by processor such as the step of the above-mentioned server current-limiting method based on digital subscriber mark.
Above-mentioned server current-limiting method, system, computer equipment and storage medium based on digital subscriber mark, whereinThe access request with digital subscriber mark sent by reception intelligent terminal, the digital subscriber mark are based on logging in instituteIt states the user information of the user account of intelligent terminal and generates;When current limiting switch is opened, obtains and limit from server bufferStream configuration information, the current limiting switch are used to control the flowing of access of server-side;Judge that the digital subscriber identifies whether and instituteState the matching of current limliting configuration information;If the digital subscriber mark is matched with the current limliting configuration information, to the intelligent terminalSend data information corresponding with the access request.What the present invention sent intelligent terminal using simple current limliting configuration informationThe digital subscriber mark that access request includes is judged can quickly judge whether intelligent terminal is the intelligently end being allowed toEnd, and then determine whether that intelligent terminal sends data information corresponding with access request, reduce occupancy server resource, togetherThe purpose of Shi Shixian current limliting.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present inventionAttached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the inventionExample, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawingsObtain other attached drawings.
Fig. 1 is the application environment signal of the server current-limiting method based on digital subscriber mark in one embodiment of the inventionFigure;
Fig. 2 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 3 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 4 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 5 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 6 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 7 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 8 is a flow diagram of the server current-limiting method based on digital subscriber mark in one embodiment of the invention;
Fig. 9 is a structural schematic diagram of the server current limiting system based on digital subscriber mark in one embodiment of the invention;
Figure 10 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, completeSite preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hairEmbodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative effortsExample, shall fall within the protection scope of the present invention.
Server current-limiting method provided in an embodiment of the present invention based on digital subscriber mark, can be applicable to answering such as Fig. 1With in environment, wherein intelligent terminal is communicated by network with server-side.Wherein, intelligent terminal is including but not limited to variousPersonal computer, laptop, smart phone, tablet computer and portable wearable device.Server-side can be with independentThe server cluster of server either multiple servers composition is realized.Method provided in this embodiment can be applied to cloud serviceOn device.Cloud Server refers to providing the network server of network service for user, it is possible to provide be simple and efficient, securely and reliably, placeReason ability can elastic telescopic calculating service.Method provided in this embodiment can be used for solving the high concurrent feelings of Cloud Server experienceCurrent limliting problem under scape.
In one embodiment, as shown in Fig. 2, a kind of server current-limiting method based on digital subscriber mark is provided, with thisMethod is illustrated for applying the server-side in Fig. 1, is included the following steps:
S10, the access request with digital subscriber mark that intelligent terminal is sent is received, the digital subscriber mark is based onIt logs in the user information of the user account of the intelligent terminal and generates.
In the present embodiment, intelligent terminal can be smart phone, tablet computer, desktop computer or other can networkTerminal device.Intelligent terminal can be logged in user account, can also have no user account login.Digital subscriber mark is based onIt logs in the user information of the user account of the intelligent terminal and generates.User information is to log in the user of the intelligent terminalThe relevant information of account, can be the access information of the user account, be also possible to the configuration information of the user account.User's accountIt number refers to issuing the application program of access request or the login account of the page.It is asked for example, issuing access in certain Bank applicationIt asks, then user account refers to the login account of the Bank application;Access request is issued on a certain search and webpage, then user's accountNumber refer to providing the login account of the website of the search and webpage.It is worth noting that, being counted if user account is made of numberWord user identifier can be identical as user account.For example, an intelligent terminal is smart phone, user account is phone number,Such as 135XXXXXXXX (herein, X represents any one number in 0-9), digital subscriber mark can be all135XXXXXXXX.Access request can based on the intelligent terminal webpage or application end be sent to server.In another realityIt applies in example, digital subscriber mark can be updated by the specified period.
S20, when current limiting switch is opened, obtain current limliting configuration information from server buffer, the current limiting switch is usedIn the flowing of access of control server-side.
In the present embodiment, current limiting switch is used for when the access request number that server receives is greater than default access thresholds,The access request received is shunted.For example, default access thresholds are 10000, when access request number is 50000, visitIt asks that number of request is greater than default access thresholds, opens current limiting switch;When access request number is 6000, access request number is less than defaultAccess thresholds close current limiting switch.When current limiting switch is opened, server obtains current limliting from server buffer and matches confidenceBreath.Caching refers to the buffer area (referred to as Cache) of data exchange, is that a kind of Web content that will need frequently to access is stored inFrom user compared in close, the faster system of access speed, to improve the technology of access to content speed.Server buffer herein can be withRefer to the high speed storing space on cache server, memory or disk.Current limliting configuration information is stored in server buffer, can be by fingerFixed cycle is updated.When current limiting switch is closed, server-side sends data corresponding with access request to intelligent terminalInformation.
Current limliting configuration information is instructed including one or more logic judgment, and the instruction of each logic judgment is used to judgement and visitsIt asks and identifies whether to meet the current limliting configuration information by the digital subscriber of the intelligent terminal of server (namely digital subscriber identifies whetherMatched with current limliting configuration information), and then determine whether the intelligent terminal access server.If the number of intelligent terminal is usedFamily mark meets all logic judgment instructions in current limliting configuration information, then server responds the access request of the intelligent terminalAnd data information corresponding with the access request is sent to the intelligent terminal;If the digital subscriber mark of intelligent terminal is unsatisfactory for patrollingDecision instruction is collected, then server then returns to refusal information to intelligent terminal.
S30, judge that the digital subscriber identifies whether to match with the current limliting configuration information.
In the present embodiment, current limliting configuration information includes one or more logic judgment instruction.Digital subscriber identifiesField of the one or more for differentiation.If the logic judgment that the field in digital subscriber mark meets in current limliting configuration information refers toThe requirement of order, then digital subscriber mark is matched with current limliting configuration information.If the field in digital subscriber mark does not meet current limlitingThe requirement of logic judgment instruction in configuration information, then digital subscriber mark is mismatched with current limliting configuration information.For example, current limlitingIt is 0 that configuration information, which requires the last one digit number of digital subscriber mark, if last position that the digital subscriber in access request identifiesNumber is 0, then the digital subscriber mark of the access request is matched with current limliting configuration information;If the digital subscriber in access request identifiesLast one digit number be 5, then the access request digital subscriber mark with current limliting configuration information mismatch.
If S40, the digital subscriber mark are matched with the current limliting configuration information, to intelligent terminal transmission and instituteState the corresponding data information of access request.
In the present embodiment, is matched when the digital subscriber of intelligent terminal is identified with current limliting configuration information, then allow intelligent terminalConnection is established with server, then sends data information corresponding with access request from server to intelligent terminal.Here, numberIt is believed that breath includes but is not limited to page info or downloading file.
In step S10-S40, the access request with digital subscriber mark that intelligent terminal is sent is received, the number is usedFamily identifies the user information based on the user account for logging in the intelligent terminal and generates, to obtain for judging whether to intelligenceEnergy terminal carries out the digital subscriber mark of current limliting.When current limiting switch is opened, current limliting is obtained from server buffer and matches confidenceBreath, the current limiting switch are used to control the flowing of access of server-side, to obtain the current limliting configuration for handling digital subscriber markInformation.Judge that the digital subscriber identifies whether to match with the current limliting configuration information, is determined whether in a manner of simple matchCurrent limliting is carried out to intelligent terminal.If the digital subscriber mark is matched with the current limliting configuration information, to the intelligent terminalData information corresponding with the access request is sent, to realize the current-limiting function of server, matches the intelligence of current limliting configuration informationEnergy terminal is available to arrive its requested data information.The present embodiment sends out intelligent terminal using simple current limliting configuration informationThe digital subscriber mark that the access request sent includes is judged can quickly judge whether intelligent terminal is the intelligence being allowed toTerminal, and then determine whether that intelligent terminal sends data information corresponding with access request, reduce occupancy server resource,The purpose of current limliting is realized simultaneously.
Optionally, referring to figure 3., before step S10, further includes:
S101, the digital subscriber mark is generated according to the access of intelligent terminal record by the specified period;
S102, digital subscriber mark is sent to the intelligent terminal.
In the present embodiment, the digital subscriber mark of intelligent terminal, which can be periodically (to update every the specified period primary), to be updated's.Server generates new digital subscriber mark, and is sent to intelligent terminal, replaces original digital subscriber mark.In this way, intelligenceEnergy terminal needs to carry replaced digital subscriber mark when sending access request to server.Here, the specified period canTaking human as setting, two weeks, one month or three months can be.It can be set and be updated in the idle stage, such as morning four5 points, the digital subscriber mark of intelligent terminal is generated, reduces server in the load of peak period.
Wherein, digital subscriber identifies settable multiple and different fields, these fields can be divided into two classes, and one kind is static wordSection, another kind of is dynamic field.Static fields according to the machine code of intelligent terminal or can log in the use of the intelligent terminalFamily account generates.Dynamic field can be recorded according to the access of user and be generated.Here, digital subscriber mark can be and haveThe number of multiple numerical digits, field indicate the wherein number of some numerical digit or a few a numerical digits.For example, can distribute the first field withThe use duration of user is associated.It can define four kinds and use duration, such as: " frequently using ", the number of the first corresponding fieldValue is 00;" being commonly used ", the numerical value of the first corresponding field are 01;" less use ", the first corresponding fieldNumerical value be 10;" from being not used ", the numerical value of the first corresponding field is 11.
If intelligent terminal is recorded without available access, the access based on blank is recorded as the intelligent terminal and generates number useFamily mark.For example, intelligent terminal A, when accessing server, no first access record then first sends to service and does not include numberThen the access request of user identifier returns to the digital subscriber mark of intelligent terminal A from server to intelligent terminal A.Intelligence is eventuallyEnd A digital subscriber mark can be 0110000111111111, wherein first eight bits be it is associated with the mark of intelligent terminal A,Eight are then to be recorded by the access of blank and generated afterwards.Likewise, if intelligent terminal B when accessing server, also without firstAccess record, then its digital subscriber generated mark can be 0110001011111111, wherein first eight bits are and intelligent terminalThe mark of B is associated, and latter eight are then to be recorded by the access of blank and generated.
In step S101-S102, the digital subscriber is generated according to the access of intelligent terminal record by the specified periodMark, to regularly update the digital subscriber mark of intelligent terminal.Digital subscriber mark is sent to the intelligent terminal, withIntelligent terminal is set to carry new digital subscriber identification access server-side.
Optionally, before reference Fig. 4, step S20, further includes:
S201, the access record for obtaining the intelligent terminal;
User's alive data in S202, statistics the access record, determines intelligence eventually according to user's alive dataEnliven grade in end;
S203, when generating digital subscriber mark, set the specific field that the digital subscriber identifies to and instituteIt states and enlivens the corresponding number of grade.
Access record can refer to the log recording generated when intelligent terminal accesses server.Access record may include operationUsers' alive data such as duration, number of clicks.In some applications for being related to commodity purchasing or business handling or webpage, userAlive data may include commodity purchasing result or business handling result.
Intelligent terminal is divided into according to user's alive data and different enlivens grade.The designated word that digital subscriber is identifiedSection with enliven grade and be associated with, and determine number corresponding to specific field according to grade is enlivened.For example, enlivening grade can be divided intoIt is especially preferential, preferential and common, respectively correspond 01,02,03, then intelligent terminal enliven grade be it is especially preferential when, generate shouldWhen the digital subscriber mark of intelligent terminal, 01 is set by specific field;Intelligent terminal enliven grade be it is preferential when, generate shouldWhen the digital subscriber mark of intelligent terminal, 02 is set by specific field;Intelligent terminal enliven grade be it is common when, generate shouldWhen the digital subscriber mark of intelligent terminal, 03 is set by specific field.
In step S201-S203, the access record of the intelligent terminal is obtained, is visited with obtaining for evaluating the intelligent terminalAsk the record data of the frequency.User's alive data in the access record is counted, intelligence is determined according to user's alive dataEnergy terminal enlivens grade, is divided into multiple grades to enliven grade for all intelligent terminals, distinguishes the important of intelligent terminalDegree.When generating digital subscriber mark, by the specific field that the digital subscriber identifies be set as with it is described active etc.The corresponding number of grade, so that associated, the server-side reading that enlivens grade of the specific field of digital subscriber mark and intelligent terminalWhat digital subscriber mark can determine intelligent terminal enlivens grade.
Optionally, referring to Fig. 5, the current limliting configuration information includes that the instruction of the first logic judgment and the second logic judgment refer toIt enables;
First logic judgment instructs
Whether S2001, the first specific field for judging the digital subscriber mark are the first designation number;
If the first specific field of S2002, the digital subscriber mark is the first designation number, determine that the number is usedFamily mark is matched with the current limliting configuration information;
Second logic judgment instructs
If the first specific field of S2003, the digital subscriber mark is not the first designation number, judge that the number is usedWhether the second specific field of family mark is the second designation number;
If the second specific field of S2004, the digital subscriber mark is the second designation number, determine that the number is usedFamily mark is matched with the current limliting configuration information.
In the present embodiment, current limliting configuration information may include two logic judgment instructions, and respectively the first logic judgment refers toIt enables and the second logic judgment instructs.The instruction of each logic judgment is for judging the corresponding specific field in digital subscriber markNo is corresponding designation number.For example, the instruction of the first logic judgment is corresponding with the first specific field in digital subscriber mark, useIn judging whether the first specific field is the first designation number;The instruction of second logic judgment refers to second in digital subscriber markIt is corresponding to determine field;For judging whether the second specific field is the second designation number.First designation number may include one orMultiple numbers, e.g., the first designation number can be { 1 }, be also possible to { 1,2 }.Likewise, the second designation number may include oneA or multiple numbers, e.g., the second designation number can be { 3 }, be also possible to { 1,3 }.First specific field and the second designated wordDifferent location of the section in digital subscriber mark, e.g., the total bit of digital subscriber mark are 18, and the first specific field is specifiedIt is 11~12;Second specific field is appointed as 13~14.It is specified corresponding to first designation number and the second designation numberField is different, thus, the first designation number can be identical with the second designation number, be also possible to difference.
Specifically, the first designation number can correspond to the gender of intelligent terminal user in the instruction of the first logic judgment.Such asThe gender of intelligent terminal user is male, and corresponding set of number, such as { 1,2,3,4,5 }, the gender of intelligent terminal user isFemale, corresponding set of number, such as { 6,7,8,9,0 }.
The second logic judgment instruction in, can conversion rate of products and user based on intelligent terminal operation duration ratioIntelligent terminal is divided into multiple conversion grades, corresponding second designation number of each conversion grade by value.For example, conversion gradeIt may include height, in, it is low, it is that high corresponding set of number can be set to 00~19 with conversion grade, with conversion grade isCorresponding set of number can be set to 20~49, be that low corresponding set of number can be set to 50~99 with conversion grade.
In a statistical data, the male to female ratio of intelligent terminal user is 3:1.The conversion grade ratio of male user are as follows:Height, 10%;In, 30%;It is low, 60%.The conversion grade ratio of female user are as follows: it is high, 30%;In, 20%;It is low, 50%.Then may be usedTo calculate optimal distributing strategy, the allocation proportion of men and women user and different conversion grades are determined.Maximum current limliting ratio is 50%,Current limliting configuration information may be configured as:
Whether the first specific field for judging digital subscriber mark is one in { 6,7,8,9,0 };
If the first specific field of digital subscriber mark is one in { 6,7,8,9,0 }, then sent out to the intelligent terminalSend data information corresponding with the access request;
If the first specific field of digital subscriber mark is not any one in { 6,7,8,9,0 }, then digital use is judgedWhether the second specific field of family mark is one in 00-29;
If the second specific field of digital subscriber mark is one in 00-29, to intelligent terminal transmission and instituteState the corresponding data information of access request;
If the second specific field of digital subscriber mark is not one in 00-29, refused to intelligent terminal transmissionExhausted information.
In the above-described embodiments, the shunt ratio of female user is 25%, and the shunt ratio of male user is 22.5%, twoThe sum of person is 47.5%, the maximum current limliting ratio less than 50%.Thus by the setting of above-mentioned current limliting configuration information, meet current limlitingThe requirement of ratio 15%.
Optionally, as shown in fig. 6, described obtain current limliting configuration information from server buffer, comprising:
S204, current time is obtained;
S205, the current limliting configuration information with the current time matches is obtained from server buffer.
In some cases, above-mentioned statistical data is to count to obtain based on different periods.For example, in 18:00-19:59:, the male to female ratio of intelligent terminal user is 3:1;In 20:00-22:59, the male to female ratio of intelligent terminal user is 1:1;?22:00-23:59, the male to female ratio of intelligent terminal user are 1:2.Then can each period access statistical data generate notSame current limliting configuration information.It is needing to obtain the current limliting configuration information with current time matches using current limliting configuration information.ExampleSuch as, current time is 12 noon, then obtains the current limliting configuration information of this period of 12:00-13:59.
Optionally, as shown in fig. 7, before step S20, further includes:
The current access request number of S206, at preset timed intervals interval acquiring and default access thresholds.
Prefixed time interval can be set according to actual needs, such as can be 10 seconds, 30 seconds, 60 seconds.Access is askedNumber is asked to refer to that client is initiated to establish the quantity of connection request to server-side.Performance shadow of the default access thresholds by server-sideIt rings, the maximum number of connections of server-side can not be greater than.Default access thresholds can be set according to actual needs.
S207, current limliting ratio is determined according to the access request number and default access thresholds;
S208, the current limliting configuration information is generated according to the current limliting ratio.
In the present embodiment, current limliting configuration information can be generated according to current limliting ratio.Current limliting ratio may include at two kindsReason mode.The first processing mode calculates estimated current limliting ratio according to access request number and default access thresholds, then again reallyFixed limit stream configuration information.For example, access request number is 10000, presetting access thresholds is 5000, then current limliting ratio setting is50%.In one embodiment, digital subscriber is identified as phone number, can be according to the tail number of phone number in conjunction with current limliting ratioDetermine current limliting configuration information, such as current limliting 10%, current limliting configuration information can be (.*2), then the intelligent terminal that tail number is 2 is to clothesThe access request of business device is allowed to, and tail number is that the intelligent terminal of other numbers is rejected the access request of server.SecondProcessing mode is that the current limliting ratio of different field is determined according to access request number and default access thresholds.For example, access request numberIt is 10000, presetting access thresholds is 5000, and the digital subscriber mark of intelligent terminal includes two fields, one of field listShow that the priority level of intelligent terminal, another field indicate random number, wherein priority level is divided into priority 10%, regular grade90%, then the intelligent terminal that can first distribute priority is addressable intelligent terminal, and actual quantity 2000 is visited remainingThe intelligent terminal share 3000 asked distributes to regular grade intelligent terminal, can take the remainder the field for indicating random number to 8, remainder is0-2 then allows to access, remainder 3-7, then denied access.
In step S206-S208, the current access request number of interval acquiring and default access thresholds at preset timed intervals, can andWhen obtain current access request number.Current limliting ratio is determined according to the access request number and default access thresholds, flexibly to adjustWhole current limliting ratio.The current limliting configuration information is generated according to the current limliting ratio, reasonably to distribute current flow.Due to limitStream configuration information is to be shunted according to digital subscriber mark to intelligent terminal, if sending the intelligent terminal sum of access requestExcessively, it is understood that there may be the intelligent terminal quantity after current limliting is greater than the maximum number of connections of server, needs to regenerate current limliting at this timeConfiguration information.For example, original current limliting configuration information allows 20% intelligent terminal to access, but when the access of intelligent terminal is totalWhen number doubles, need to be automatically regulated to be current limliting configuration information allows 10% intelligent terminal to access, and just can guarantee serverThe high flow capacity that will not be happened suddenly washes away, while guaranteeing that the intelligent terminal being allowed to normally accesses server during current limliting.
Optionally, as shown in figure 8, step S30 includes:
S301, judge number on the specific field of digital subscriber mark whether with set in the current limliting configuration informationThe numerical value for any one digital element in digital collection set is equal;
If the number being arranged in the number and the current limliting configuration information on the specific field of S302, the digital subscriber markThe numerical value of any one digital element in word set is equal, it is determined that the digital subscriber mark and the current limliting configuration informationMatching.
In the present embodiment, the digital collection that is arranged in specific field and current limliting configuration information can according to step S201 orMethod in S202 determines.This step is regarded as the logic judgment instruction of a materialization in current limliting configuration information.For example, intelligenceCan the number on the digital subscriber mark specific field of terminal C be 01, the digital collection being arranged in current limliting configuration information be 01,02,03,04,05,06,07 }, then it is believed that the digital subscriber mark of intelligent terminal C is matched with current limliting configuration information;If intelligence is eventuallyHolding the number on the digital subscriber mark specific field of C is 23, then it is believed that the digital subscriber mark of intelligent terminal C is matched with current limlitingConfidence breath mismatches.
In step S301-S302, judge number on the specific field of digital subscriber mark whether with the current limlitingThe numerical value for any one digital element in digital collection being arranged in configuration information is equal, determines number with simple logic judgmentWhether word user identifier matches with current limliting configuration information, and the server resource of consumption is small.If the digital subscriber mark is specifiedNumber in field is equal with the numerical value of any one digital element in the digital collection being arranged in the current limliting configuration information,It then determines that the digital subscriber mark is matched with the current limliting configuration information, to complete the logic judgment process, and determines numberUser identifier is matched with current limliting configuration information.
Optionally, after step S40, further includes:
If S41, the digital subscriber mark are not matched with the current limliting configuration information, refused to intelligent terminal transmissionExhausted information.
In the present embodiment, when digital subscriber mark and the current limliting configuration information of intelligent terminal mismatch, then intelligent terminal is notConnection is established with server, then sends refusal information from server to intelligent terminal.The particular content for refusing information can rootSet according to actual demand, such as be may be configured as: system upgrade please try again later.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each processExecution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limitIt is fixed.
In one embodiment, a kind of server current limiting system based on digital subscriber mark, the server current limliting system are providedSystem is corresponded with the server current-limiting method based on digital subscriber mark in above-described embodiment.As shown in figure 9, should be based on numberThe server current limiting system of user identifier includes receiving request module, obtain configuration information module, judgment module and sending dataModule.Detailed description are as follows for each functional module:
Request module 10 is received, it is described for receiving the access request with digital subscriber mark of intelligent terminal transmissionDigital subscriber identifies the user information based on the user account for logging in the intelligent terminal and generates;
Configuration information module 20 is obtained, for obtaining current limliting configuration from server buffer when current limiting switch is openedInformation, the current limiting switch are used to control the flowing of access of server-side;
Judgment module 30, for judging that the digital subscriber identifies whether to match with the current limliting configuration information;
Data module 40 is sent, if matching for digital subscriber mark with the current limliting configuration information, Xiang SuoshuIntelligent terminal sends data information corresponding with the access request.
Optionally, server current limiting system further include:
Identifier generation module, for generating the digital subscriber according to the access of intelligent terminal record by the specified periodMark;
Sending module is identified, for digital subscriber mark to be sent to the intelligent terminal.
Optionally, the identifier generation module includes:
Recording unit is obtained, the access for obtaining the intelligent terminal records;
Stage unit is sentenced for counting user's alive data in the access record according to user's alive dataThat determines intelligent terminal enlivens grade;
Mark unit is generated, the designated word for when generating digital subscriber mark, the digital subscriber to be identifiedSection is set as enlivening the corresponding number of grade with described.
Optionally, the current limliting configuration information includes the instruction of the first logic judgment and the instruction of the second logic judgment;
First logic judgment instructs
Whether the first specific field for judging the digital subscriber mark is the first designation number;
If the first specific field of the digital subscriber mark is the first designation number, the digital subscriber mark is determinedIt is matched with the current limliting configuration information;
Second logic judgment instructs
If the first specific field of the digital subscriber mark is not the first designation number, the digital subscriber mark is judgedThe second specific field whether be the second designation number;
If the second specific field of the digital subscriber mark is the second designation number, the digital subscriber mark is determinedIt is matched with the current limliting configuration information.
Optionally, obtaining configuration information module 20 includes:
Acquisition time unit, for obtaining current time;
Configuration information unit is obtained, matches confidence with the current limliting of the current time matches for obtaining from server bufferBreath.
Optionally, configuration information module 20 is obtained further include:
Access counting unit is obtained, for interval acquiring current access request number and default access thresholds at preset timed intervals;
Current limliting proportional unit is determined, for determining current limliting ratio according to the access request number and default access thresholds;
Configuration information generation unit, for generating the current limliting configuration information according to the current limliting ratio.
Optionally, judgment module 30 includes:
Digital judgement unit, the number on specific field for judging digital subscriber mark whether with the current limlitingThe numerical value for any one digital element in digital collection being arranged in configuration information is equal;
Matching unit is determined, if the number on the specific field of digital subscriber mark matches confidence with the current limlitingThe numerical value for any one digital element in digital collection being arranged in breath is equal, it is determined that digital subscriber mark with it is describedThe matching of current limliting configuration information.
Optionally, judgment module 30 includes:
Refuse unit, if for the digital subscriber mark specific field on number not with the current limliting configuration informationMatching then sends refusal information to the intelligent terminal.
Specific restriction about the server current limiting system identified based on digital subscriber may refer to above for being based onThe restriction of the server current-limiting method of digital subscriber mark, details are not described herein.The above-mentioned server based on digital subscriber markModules in current limiting system can be realized fully or partially through software, hardware and combinations thereof.Above-mentioned each module can be hardPart form is embedded in or independently of in the processor in computer equipment, can also be stored in computer equipment in a software formMemory in, execute the corresponding operation of above modules in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junctionComposition can be as shown in Figure 10.The computer equipment include by system bus connect processor, memory, network interface andDatabase.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipmentInclude non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and dataLibrary.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculatingThe database of machine equipment is used to store the data that the server current-limiting method based on digital subscriber mark is related to.The computer is setStandby network interface is used to communicate with external terminal by network connection.To realize when the computer program is executed by processorA kind of server current-limiting method based on digital subscriber mark.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memoryAnd the computer program that can be run on a processor, processor perform the steps of when executing computer program
The access request with digital subscriber mark of intelligent terminal transmission is received, the digital subscriber mark is based on loginIn the user account of the intelligent terminal user information and generate;
When current limiting switch is opened, current limliting configuration information is obtained from server buffer, the current limiting switch is for controllingThe flowing of access of server-side processed;
Judge that the digital subscriber identifies whether to match with the current limliting configuration information;
If the digital subscriber mark is matched with the current limliting configuration information, sent and the visit to the intelligent terminalAsk request corresponding data information.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculatedMachine program performs the steps of when being executed by processor
The access request with digital subscriber mark of intelligent terminal transmission is received, the digital subscriber mark is based on loginIn the user account of the intelligent terminal user information and generate;
When current limiting switch is opened, current limliting configuration information is obtained from server buffer, the current limiting switch is for controllingThe flowing of access of server-side processed;
Judge that the digital subscriber identifies whether to match with the current limliting configuration information;
If the digital subscriber mark is matched with the current limliting configuration information, sent and the visit to the intelligent terminalAsk request corresponding data information.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be withRelevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computerIn read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,To any reference of memory, storage, database or other media used in each embodiment provided herein,Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may includeRandom access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancingType SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each functionCan unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by differentFunctional unit, module are completed, i.e., the internal structure of the system is divided into different functional unit or module, more than completingThe all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned realityApplying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned eachTechnical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modifiedOr replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should allIt is included within protection scope of the present invention.

Claims (10)

CN201811528667.3A2018-12-132018-12-13Server current limiting method, system, computer equipment and storage mediumActiveCN109787908B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811528667.3ACN109787908B (en)2018-12-132018-12-13Server current limiting method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811528667.3ACN109787908B (en)2018-12-132018-12-13Server current limiting method, system, computer equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN109787908Atrue CN109787908A (en)2019-05-21
CN109787908B CN109787908B (en)2023-04-07

Family

ID=66495935

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811528667.3AActiveCN109787908B (en)2018-12-132018-12-13Server current limiting method, system, computer equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN109787908B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110276182A (en)*2019-06-102019-09-24必成汇(成都)科技有限公司The implementation method of API distribution current limliting
CN110417672A (en)*2019-08-012019-11-05北京三快在线科技有限公司Current-limiting method and device
CN110417888A (en)*2019-07-302019-11-05中国工商银行股份有限公司Flow control methods, volume control device and electronic equipment
CN110753131A (en)*2019-11-042020-02-04网易(杭州)网络有限公司Microservice distributed current limiting method and device, storage medium and electronic equipment
CN111835823A (en)*2020-05-282020-10-27福建天泉教育科技有限公司Access current limiting method and terminal
CN112217736A (en)*2020-10-122021-01-12广州欢网科技有限责任公司Shunting method and device for intelligent terminal to acquire server resources
CN112612618A (en)*2020-12-302021-04-06深圳我家云网络科技有限公司Interface current limiting method and device, computer equipment and storage medium
CN112769960A (en)*2021-03-092021-05-07厦门市公安局Active flow control method and system based on Nginx server
CN112804160A (en)*2021-01-262021-05-14北京嘀嘀无限科技发展有限公司Current limiting method, device, equipment, medium and product based on application program
CN113067868A (en)*2021-03-182021-07-02中国平安财产保险股份有限公司Method, device and computer equipment for maintaining long connection
CN113220767A (en)*2021-05-282021-08-06中国工商银行股份有限公司Database connection management method and device
CN113242245A (en)*2021-05-122021-08-10上海绚显科技有限公司TCP message flow limiting method, device, server and storage medium
CN114666272A (en)*2022-03-112022-06-24平安国际智慧城市科技股份有限公司Current limiting processing method, device, equipment and storage medium
CN115396375A (en)*2022-08-172022-11-25支付宝(杭州)信息技术有限公司Service processing method, device and equipment
CN116132365A (en)*2023-02-232023-05-16四川神州行网约车服务有限公司 Application program current limiting method, device, computer equipment and storage medium
CN118646800A (en)*2024-08-122024-09-13深圳市智慧城市科技发展集团有限公司 Access request processing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106357549A (en)*2016-11-022017-01-25郑州云海信息技术有限公司Method, device, system and load balancer for high-concurrency shunting in cluster deployment
CN106375472A (en)*2016-09-292017-02-01北京三快在线科技有限公司Access request processing method and apparatus, and server
CN107508860A (en)*2017-07-212017-12-22深圳市金立通信设备有限公司One kind service current-limiting method, server and terminal
CN107896210A (en)*2017-11-142018-04-10北京知道创宇信息技术有限公司Safety protecting method, device, server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106375472A (en)*2016-09-292017-02-01北京三快在线科技有限公司Access request processing method and apparatus, and server
CN106357549A (en)*2016-11-022017-01-25郑州云海信息技术有限公司Method, device, system and load balancer for high-concurrency shunting in cluster deployment
CN107508860A (en)*2017-07-212017-12-22深圳市金立通信设备有限公司One kind service current-limiting method, server and terminal
CN107896210A (en)*2017-11-142018-04-10北京知道创宇信息技术有限公司Safety protecting method, device, server and storage medium

Cited By (24)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110276182A (en)*2019-06-102019-09-24必成汇(成都)科技有限公司The implementation method of API distribution current limliting
CN110417888A (en)*2019-07-302019-11-05中国工商银行股份有限公司Flow control methods, volume control device and electronic equipment
CN110417672B (en)*2019-08-012021-08-13北京三快在线科技有限公司Current limiting method and device
CN110417672A (en)*2019-08-012019-11-05北京三快在线科技有限公司Current-limiting method and device
CN110753131A (en)*2019-11-042020-02-04网易(杭州)网络有限公司Microservice distributed current limiting method and device, storage medium and electronic equipment
CN111835823A (en)*2020-05-282020-10-27福建天泉教育科技有限公司Access current limiting method and terminal
CN111835823B (en)*2020-05-282023-03-24福建天泉教育科技有限公司Access current limiting method and terminal
CN112217736A (en)*2020-10-122021-01-12广州欢网科技有限责任公司Shunting method and device for intelligent terminal to acquire server resources
CN112612618A (en)*2020-12-302021-04-06深圳我家云网络科技有限公司Interface current limiting method and device, computer equipment and storage medium
CN112804160B (en)*2021-01-262023-06-06北京嘀嘀无限科技发展有限公司Application program-based current limiting method, device, equipment, medium and product
CN112804160A (en)*2021-01-262021-05-14北京嘀嘀无限科技发展有限公司Current limiting method, device, equipment, medium and product based on application program
CN112769960A (en)*2021-03-092021-05-07厦门市公安局Active flow control method and system based on Nginx server
CN113067868B (en)*2021-03-182023-03-31中国平安财产保险股份有限公司Method, device and computer equipment for maintaining long connection
CN113067868A (en)*2021-03-182021-07-02中国平安财产保险股份有限公司Method, device and computer equipment for maintaining long connection
CN113242245A (en)*2021-05-122021-08-10上海绚显科技有限公司TCP message flow limiting method, device, server and storage medium
CN113220767B (en)*2021-05-282024-12-06中国工商银行股份有限公司 Database connection management method and device
CN113220767A (en)*2021-05-282021-08-06中国工商银行股份有限公司Database connection management method and device
CN114666272A (en)*2022-03-112022-06-24平安国际智慧城市科技股份有限公司Current limiting processing method, device, equipment and storage medium
CN114666272B (en)*2022-03-112023-06-16深圳平安智慧医健科技有限公司Current limiting processing method, device, equipment and storage medium
CN115396375A (en)*2022-08-172022-11-25支付宝(杭州)信息技术有限公司Service processing method, device and equipment
CN115396375B (en)*2022-08-172024-02-27支付宝(杭州)信息技术有限公司Service processing method, device and equipment
CN116132365A (en)*2023-02-232023-05-16四川神州行网约车服务有限公司 Application program current limiting method, device, computer equipment and storage medium
CN118646800A (en)*2024-08-122024-09-13深圳市智慧城市科技发展集团有限公司 Access request processing method, device and storage medium
CN118646800B (en)*2024-08-122024-11-01深圳市智慧城市科技发展集团有限公司 Access request processing method, device and storage medium

Also Published As

Publication numberPublication date
CN109787908B (en)2023-04-07

Similar Documents

PublicationPublication DateTitle
CN109787908A (en)Server current-limiting method, system, computer equipment and storage medium
US10999216B2 (en)Resource allocation and provisioning in a multi-tier edge-cloud virtualization environment
CN109194584A (en)A kind of flux monitoring method, device, computer equipment and storage medium
CN110166282B (en)Resource allocation method, device, computer equipment and storage medium
CA2884796C (en)Automated profiling of resource usage
CN113179222A (en)Current-limiting control method, device and equipment for hotspot data and storage medium
CN112689007B (en) Resource allocation method, device, computer equipment and storage medium
CN107567696A (en)The automatic extension of resource instances group in computing cluster
US10284660B1 (en)Data flow tokens to trace execution of services in a service provider network
Taft et al.P-store: An elastic database system with predictive provisioning
CN106407207A (en)Real-time added data updating method and apparatus
CN109766349A (en)The anti-weighing method of task, device, computer equipment and storage medium
CN110602227B (en)Intelligent contract management method and related device
CN110007978A (en)A kind of method, device and equipment preloading the page
CN110019199A (en)Data storage, querying method, device, equipment, computer readable storage medium
CN106407191B (en)Data processing method and server
CN109543891A (en)Method for building up, equipment and the computer readable storage medium of capacity prediction model
CN111585798B (en)Network resource parameter configuration method, device and computer readable storage medium
CN107566535A (en)Adaptive load balancing strategy based on user concurrent access timing planning in a kind of web map service
CN112767027A (en)Cloud cost prediction method and system based on service perception
CN113360455A (en)Data processing method, device, equipment and medium of super-fusion system
CN101833585A (en)Database server operation control system, method and device
CN110659296B (en)Storage method, device, equipment and computer readable medium
Zeng et al.Argus: A Multi-tenancy NoSQL store with workload-aware resource reservation
CN109246216B (en)Access request processing method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp