CN109327506A - A kind of resource allocation methods, device and readable storage medium storing program for executing - Google Patents

A kind of resource allocation methods, device and readable storage medium storing program for executing Download PDF

Info

Publication number
CN109327506A
CN109327506A CN201811038784.1A CN201811038784A CN109327506A CN 109327506 A CN109327506 A CN 109327506A CN 201811038784 A CN201811038784 A CN 201811038784A CN 109327506 A CN109327506 A CN 109327506A
Authority
CN
China
Prior art keywords
resource
resource allocation
request
user information
server
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
CN201811038784.1A
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201811038784.1A priority Critical patent/CN109327506A/en
Publication of CN109327506A publication Critical patent/CN109327506A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present embodiments relate to field of communication technology, a kind of resource allocation methods, device and readable storage medium storing program for executing are disclosed.In the present invention, resource allocation methods comprise determining that present mode after attack mode, to judge in the user information stored in database with the presence or absence of the user information in first resource request;It include the identification information of user information and the server requested access in first resource request;If it is determined that in the presence of, according to first resource request in user information and the identification information of server that requests access to, determine first resource allocation result, and first resource allocation result is transmitted to the terminal for sending first resource request;Otherwise, distribution resource is not requested for first resource.In embodiment of the present invention, resource allocation device can refuse part resource request, reduce the inquiry pressure of inquiry unit, to reduce inquiry unit since queries crosses the probability of crash, improve user experience under attack mode.

Description

A kind of resource allocation methods, device and readable storage medium storing program for executing
Technical field
The present embodiments relate to field of communication technology, in particular to a kind of resource allocation methods, device and readable storage Medium.
Background technique
Network attack on current internet is increasingly frequent, and attack form is also increasingly various, for example, Challenging black hole (Challenge Collapsar, CC) attack, the attack request the server that crushes using a large amount of, lead to entire server delay machine It can not service.Content distributing network (Content Delivery Network, CDN) accepts the acceleration business of Internet subscribers, Also it is faced with the risk attacked.CDN needs guarantee to resist a large amount of attack under the premise of client source station does not collapse, therefore, There is high requirement to the scheduling system anti-attack ability of CDN.Currently, the scheduling system of CDN mainly uses open source software and tune Degree tool.Under CDN scene, open source software combination scheduling tool makes hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) level response.The request of open source software reception user, and reception scheduling tool are true according to the request The information of the fixed CDN node server for being scheduled to user is combined into response contents according to the information of CDN node server and returns To user.Wherein, the status code in response contents can be 302 or 200.
However, it is found by the inventors that at least there are the following problems in the prior art: scheduling tool holds very much when queries is excessive Easily collapse, causes entirely to dispatch system crash, seriously affects business on the resource request of user and the line of client.
Summary of the invention
Embodiment of the present invention is designed to provide a kind of resource allocation methods, device and readable storage medium storing program for executing, so that Resource allocation device can refuse part resource request, the inquiry pressure of inquiry unit be reduced, to reduce under attack mode Inquiry unit improves user experience since queries crosses the probability of crash.
In order to solve the above technical problems, embodiments of the present invention provide a kind of resource allocation methods, including following step It is rapid: to determine present mode after attack mode, to judge to request in the user information stored in database with the presence or absence of first resource In user information;It include the identification information of user information and the server requested access in first resource request;If it is determined that depositing , according to first resource request in user information and the identification information of server that requests access to, determine that first resource distributes As a result, and first resource allocation result to be transmitted to the terminal for sending first resource request;It otherwise, is not first resource request point With resource.
Embodiments of the present invention additionally provide a kind of resource allocation device, comprising: judgment module and processing module;Judgement Module after attack mode, judges in the user information stored in database for determining present mode with the presence or absence of first resource User information in request;It include the identification information of user information and the server requested access in first resource request;Processing Module be used for judgment module determine in the user information stored in database there are first resource request in user information after, According to first resource request in user information and the identification information of server that requests access to, determine first resource distribution knot Fruit, and first resource allocation result is transmitted to the terminal for sending first resource request;It determines in database and deposits in judgment module There is no after the user information in first resource request in the user information of storage, distribution resource is not requested for first resource.
Embodiments of the present invention additionally provide a kind of resource allocation device, comprising: at least one processor;And with The memory of at least one processor communication connection;And, wherein memory is stored with and can be executed by least one processor Instruction, instruction is executed by least one processor, so that at least one processor is able to carry out as above embodiment refers to Resource allocation methods.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, calculate The resource allocation methods that above embodiment refers to are realized when machine program is executed by processor.
In terms of existing technologies, resource allocation device judges present mode to embodiment of the present invention, if really Surely it is attack mode, illustrates that scheduling system may be under attack, needs the resource request distribution money selectively for receipt of subsequent Source, in order to avoid scheduling system crash.If in the user information stored in database, there are the user informations in resource request, say The bright terminal for sending the resource request is not the terminal launched a offensive, and resource allocation device is the terminal distribution resource.If number According in the user information stored in library, there is no the user information in resource request, illustrate that the terminal for sending the resource request can It can be the terminal launched a offensive, be not the terminal distribution resource.Resource allocation device is selectively resource request distribution resource, Reduce the number that inquiry unit query resource requests corresponding resource, the inquiry pressure of inquiry unit is reduced, to reduce Inquiry unit improves user experience since queries crosses the probability of crash.
In addition, being also stored with pair of user information, the identification information of server and resource allocation result three in database It should be related to;According to first resource request in user information and the identification information of server that requests access to, determine first resource Allocation result specifically includes: according to the identification information and resource allocation result three of the user information, server stored in database The corresponding relationship of person, inquiry first resource request corresponding resource allocation result;According to query result, determine that first resource distributes As a result.In the realization, resource allocation device can be according to the corresponding relationship stored in own database, to send resource request Terminal distribution resource further reduces the pressure of inquiry unit.
In addition, determining first resource allocation result according to query result, specifically including: if it is determined that query result instruction is looked into It askes successfully, according to the resource allocation result in query result, determines first resource allocation result;If it is determined that query result instruction is looked into Failure is ask, first resource request is transmitted to inquiry unit;Receive the first resource for the first resource request that inquiry unit returns Allocation result;Wherein, inquiry unit is according to the user information and the mark of the server requested access in first resource request Know information, determine and returns to first resource allocation result.It is not stored with resource request phase in resource allocation device in the realization It is the resource for sending the terminal distribution of the resource request by inquiry unit in the case where the corresponding relationship answered, so that scheduling system Effective service can be provided for user.
In addition, according to first resource request in user information and the identification information of server that requests access to, determine the One resource allocation result, specifically includes: first resource request is transmitted to inquiry unit;Wherein, inquiry unit is according to the first money The identification information of user information and the server requested access in the request of source, determines and returns to first resource allocation result;It connects Receive first resource allocation result.
In addition, before determining present mode for attack mode, resource allocation methods further include: if it is determined that preset time is long Received resource request quantity reaches threshold value in spending, and present mode is switched to attack mode.In the realization, according to resource request Quantity automatic switchover mode, improve the intelligence of scheduling system.
In addition, the user information stored in database is according to the user in Secondary resource received under nonaggressive model request Information determines.
In addition, the identification information of the user information stored in database, server and the correspondence of resource allocation result three The Secondary resource allocation result that relationship is requested according to Secondary resource received under nonaggressive model and inquiry unit returns is true It is fixed;Wherein, Secondary resource allocation result be inquiry unit according to Secondary resource request in user information and the clothes that request access to The resource allocation result that the identification information of business device determines.
In addition, resource allocation methods are applied to content distributing network CDN, first resource request is hypertext transfer protocol Http request, the identification information of the server requested access to are the domain name of the server requested access to, and user information is internet Protocol IP address, first resource allocation result are according to the money for sending the IP address for the terminal that first resource is requested and requesting access to The IP address for the CDN node server that the domain name in source determines.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the flow chart of the resource allocation methods of first embodiment of the invention;
Fig. 2 is the flow chart of the resource allocation methods of second embodiment of the invention;
Fig. 3 is that the interaction between the resource allocation device, inquiry unit and each terminal of second embodiment of the invention is closed The schematic diagram of system;
Fig. 4 is the flow chart of the resource allocation methods of third embodiment of the invention;
Fig. 5 is the structural schematic diagram of the resource allocation device of third embodiment of the invention;
Fig. 6 is the structural schematic diagram of the resource allocation device of four embodiment of the invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
It should be noted that the resource allocation methods that embodiment of the present invention is related to can be applied to CDN network, WWW In the scheduling systems of networks such as (World Wide Web, WEB).The resource allocation device and inquiry that embodiment of the present invention refers to Device can be different equipment, is also possible to be provided simultaneously with the function of execution resource allocation methods and one of query function sets Standby (server as dispatched system).Resource request can be http request, be also possible to Hypertext Transfer Protocol Secure (Hyper Text Transfer Protocol over Secure Socket Layer, https) request.In resource request User information can be the address Internet protocol (Internet Protocol, IP), be also possible to other indicate send the money The information of the identity of the terminal of source request.When the resource allocation methods are applied to CDN network, resource allocation result is according to hair The IP for the CDN node server that the domain name of the IP address for the terminal for sending first resource to request and the resource requested access to determines Location.When the resource allocation methods are applied to WWW, resource allocation result is the IP address of the server of WWW.The present invention Embodiment in, dispatch system by taking the scheduling system of CDN network as an example, resource request by taking http request as an example, dispatch system Type for other scheduling systems and/or resource request is that the implementation procedure of other kinds of resource allocation methods can refer to Embodiments of the present invention.
The first embodiment of the present invention is related to a kind of resource allocation methods, are applied to resource allocation device.Such as Fig. 1 institute Show, the resource allocation methods the following steps are included:
Step 101: determining present mode to judge to whether there is in the user information stored in database after attack mode User information in first resource request.
Specifically, including the identification information of user information and the server requested access to, resource in first resource request Distributor executes step if it is determined that there are the user information in first resource request in the user information stored in database 102, otherwise, execute step 103.
In the specific implementation, user information is stored in database profession in the form of a list, so that resource allocation device is to storage User information be managed and inquire.
The mode of resource allocation device includes attack mode and nonaggressive model, and resource allocation device can be asked according to resource The modes such as quantity, received instruction are sought, any mode in both of which is switched to.Below to above two switching mode into Row explanation:
Mode 1: resource allocation device judges whether received resource request quantity reaches threshold value in predetermined time period, if Determine that received resource request quantity reaches threshold value in predetermined time period, is switched to attack mode for present mode.Due to CC The characteristics of attack is the server of the system of dispatching of being crushed using a large amount of requests, and resource allocation device can be according to resource request quantity Judge whether under attack.It will be understood by those skilled in the art that predetermined time period and threshold value can according to actual needs into Row setting, present embodiment is with no restriction.
Mode 2: resource allocation device judges whether to receive the instruction of instruction switching present mode, however, it is determined that is, from working as Preceding pattern switching is to another mode.For example, the present mode of resource allocation device is nonaggressive model, then receiving After the instruction for indicating switching present mode, attack mode is switched to.
It should be noted that it will be understood by those skilled in the art that in practical application, according to actual scene and can want gram The attack type of clothes, the trigger condition of setting switching present mode, the switching mode of present embodiment not unrestricted model.
It should be noted that being stored it will be understood by those skilled in the art that can obtain in database in several ways User information.For example, resource allocation device is true according to the user information in Secondary resource received under nonaggressive model request Determine the user information stored in database.Resource allocation device by Secondary resource received under nonaggressive model request in user Information is written in database.For another example, the user information stored in database is the pre-stored use for having confirmed that safe terminal Family information.
Step 102: according to first resource request in user information and the identification information of server that requests access to, determine First resource allocation result, and first resource allocation result is transmitted to the terminal for sending first resource request.Terminate to flow later Journey.
Specifically, if, there are the user information in resource request, illustrating to send out in the user information stored in database The terminal for giving the resource request is not the terminal launched a offensive, and resource allocation device is the terminal distribution resource.
It should be noted that the identification information of the server requested access to can be uniform resource locator (Uniform Resource Locator, URL), it is also possible to other information.
Step 103: not requesting distribution resource for first resource.
Specifically, if there is no the user information in resource request, explanations in the user information stored in database The terminal for sending the resource request may be the terminal launched a offensive, and resource allocation device is not the terminal distribution resource.Specifically In realization, the first resource request in user information not stored in the database for user information, resource allocation request can Not respond thereto, error code (such as 403) can also be sent to the terminal for sending first resource request.
Resource allocation device in scheduling system is such as equipped with the server of a certain open source software, primarily serves offer friendship The effect of mutual interface, inquiry unit are such as equipped with the server of scheduling tool, then need to provide accurate inquiry, so that inquiry Device needs to read more multifile, assumes responsibility for more calculating logics, consumes the performances such as more machine CPU and memory.Therefore, When the system of scheduling is under attack, inquiry unit is often easier to collapse.In present embodiment, under attack mode, resource point The resource request received with device docking is detected, and the information of a part of resource request is only transmitted to inquiry unit, inquiry dress The inquiry times set are under control, and reduce the probability of inquiry unit collapse.
It is noted that being requested for undesirable first resource, resource is not distributed for it, that is, do not need to inquire The corresponding resource of the resource request, reduces the inquiry times of inquiry unit, the inquiry pressure of inquiry unit is reduced, to drop Low inquiry unit improves user experience since queries crosses the probability of crash.
It should be noted that the above is only limit for example, not constituting to technical solution of the present invention.
Compared with prior art, the resource allocation methods provided in present embodiment, resource allocation device is to present mode Judged, however, it is determined that be attack mode, illustrate that scheduling system may be under attack, need the money selectively for receipt of subsequent Source request distribution resource, in order to avoid scheduling system crash.If there are in resource request in the user information stored in database User information illustrates that the terminal for sending the resource request is not the terminal launched a offensive, and resource allocation device is the terminal distribution Resource.If in the user information stored in database, there is no the user information in resource request, illustrating that sending the resource asks The terminal asked may be the terminal launched a offensive, and be not the terminal distribution resource.Resource allocation device is selectively resource and asks Distribution resource is sought, the number that inquiry unit query resource requests corresponding resource is reduced, reduces the inquiry pressure of inquiry unit Power improves user experience to reduce inquiry unit since queries crosses the probability of crash.
Second embodiment of the present invention is related to a kind of resource allocation methods, and present embodiment is big to first embodiment The further refinement caused, specifically illustrates step 102.
Specifically, as shown in Fig. 2, in the present embodiment, including step 201 is to step 205, wherein step 201, Step 205 is roughly the same with step 101, the step 103 in embodiment respectively, and details are not described herein again.It is main below to introduce not Same place:
Step 201: determining present mode to judge to whether there is in the user information stored in database after attack mode User information in first resource request.
Specifically, resource allocation device is if it is determined that there are in first resource request in the user information stored in database User information, execute step 202, otherwise, execute step 205.
Step 202: identification information and resource allocation result three according to the user information, server stored in database Corresponding relationship, inquiry first resource requests corresponding resource allocation result.
Specifically, being also stored with user information, the identification information of server and money in the database of resource allocation device The corresponding relationship of source allocation result three.
In the specific implementation, identification information and the resource allocation result three of the user information stored in database, server Corresponding relationship requested according to Secondary resource received under nonaggressive model and inquiry unit return Secondary resource distribution knot Fruit determines.Wherein, Secondary resource allocation result be inquiry unit according to Secondary resource request in user information and request access to Server identification information determine resource allocation result.
It is noted that resource allocation device can be according to the corresponding relationship stored in own database, for terminal point With resource, the pressure of inquiry unit is further reduced.
Step 203: according to query result, determining first resource allocation result.
Specifically, inquiring knot if resource allocation device inquires first resource and requests corresponding resource allocation result Fruit indicates successful inquiring.In this case, resource allocation device determines first resource according to the resource allocation result in query result Allocation result.If resource allocation device does not inquire first resource and requests corresponding resource allocation result, query result instruction Inquiry failure.In this case, first resource request is transmitted to inquiry unit by resource allocation device, receive what inquiry unit returned The first resource allocation result of first resource request.Wherein, inquiry unit according to first resource request in user information and ask The identification information of the Website server of access is sought, determine and returns to first resource allocation result.
It is noted that the not stored corresponding relationship corresponding with first resource request in resource allocation device, by looking into Asking device is the terminal distribution resource for sending the resource request, and scheduling system is enabled to provide effective service for user.
Step 204: first resource allocation result is transmitted to the terminal for sending first resource request.Terminate process later.
Step 205: not requesting distribution resource for first resource.
Resource allocation methods are described above, are exemplified below: it is assumed that resource allocation device, inquiry For interactive relation between device and each terminal as shown in figure 3, in Fig. 3, resource allocation device is the clothes for being equipped with open source software Business device, inquiry unit is the server for being equipped with scheduling tool, and open source software and scheduling tool are installed on same server.Terminal A (IP:6.6.6.6) initiates a http request to scheduling system, and open source software determines that present mode is nonaggressive model, to tune Degree tool initiates inquiry, i.e., by http request that terminal A is sent IP:6.6.6.6 and URL be sent to scheduling tool.Scheduling After tool receives the query task of open source software, according to the URL that the IP of terminal A and Terminal A requests access, determine most suitable CDN node server, and using the IP address of the CDN node server as resource allocation result, return to open source software.Open source After software receives the resource allocation result of scheduling tool, by resource allocation result, terminal A IP:6.6.6.6 and request access to URL is written in cache database, and resource allocation result is sent to terminal A.It, may when resource request quantity reaches threshold value There are attack, present mode is switched to attack mode by open source software.Under attack mode, asked if terminal A initiates http again It asks, after open source software receives the http request of terminal A, query caching database determines the IP:6.6.6.6 in http request Whether in cache database, if open source software is this request visit of 6.6.6.6 and terminal A according to IP in cache database The URL asked, searches resource allocation result in cache database.If corresponding resource allocation knot is not present in cache database The IP and this URL requested access to of terminal A in the http request of this initiation of terminal A are sent to tune by fruit, open source software Degree tool.The IP and this URL requested access to of terminal A in the scheduling tool http request that this is initiated according to terminal A, really Determine this resource allocation result, and is sent to open source software.The resource allocation result is sent to terminal A by open source software.If Under attack mode, attacker 1 initiates http request, and open source software query caching database determines that the IP of attacker 1 is not being cached In database, denied access, response 403.
It should be noted that the above is only limit for example, not constituting to technical solution of the present invention.
Compared with prior art, the resource allocation device provided in present embodiment judges present mode, if really Surely it is attack mode, illustrates that scheduling system may be under attack, needs the resource request distribution money selectively for receipt of subsequent Source, in order to avoid scheduling system crash.If in the user information stored in database, there are the user informations in resource request, say The bright terminal for sending the resource request is not the terminal launched a offensive, and resource allocation device is the terminal distribution resource.If number According in the user information stored in library, there is no the user information in resource request, illustrate that the terminal for sending the resource request can It can be the terminal launched a offensive, be not the terminal distribution resource.And resource request distribution is selectively by resource allocation device Resource, reduce the number that inquiry unit query resource requests corresponding resource, reduce the inquiry pressure of inquiry unit, from And inquiry unit is reduced since queries crosses the probability of crash, improve user experience.In addition to this, resource allocation device It can be further reduced according to the corresponding relationship stored in own database for the terminal distribution resource for sending resource request The pressure of inquiry unit.
Third embodiment of the present invention is related to a kind of resource allocation methods, and present embodiment is to first embodiment Further refinement, specifically illustrates step 102.
Specifically, as shown in figure 4, in the present embodiment, including step 301 is to step 304, wherein step 301, Step 304 is roughly the same with step 101, the step 103 in embodiment respectively, and details are not described herein again.It is main below to introduce not Same place:
Step 301: determining present mode to judge to whether there is in the user information stored in database after attack mode User information in first resource request.
Specifically, resource allocation device is if it is determined that there are in first resource request in the user information stored in database User information, execute step 302, otherwise, execute step 304.
Step 302: first resource request is transmitted to inquiry unit.
Specifically, inquiry unit according to first resource request in user information and the mark of server that requests access to Information determines and returns to first resource allocation result.
It should be noted that inquiry unit according to first resource request in user information and the server that requests access to Identification information, determines and the method for returning to first resource allocation result can be with reference to the associated description in second embodiment, this Place repeats no more.
Step 303: receiving first resource allocation result, first resource allocation result is transmitted to and sends first resource request Terminal.Terminate process later.
Step 304: not requesting distribution resource for first resource.
Compared with prior art, the resource allocation methods provided in present embodiment, resource allocation device is to present mode Judged, however, it is determined that be attack mode, illustrate that scheduling system may be under attack, need the money selectively for receipt of subsequent Source request distribution resource, in order to avoid scheduling system crash.If there are in resource request in the user information stored in database User information illustrates that the terminal for sending the resource request is not the terminal launched a offensive, and resource allocation device is the terminal distribution Resource.If in the user information stored in database, there is no the user information in resource request, illustrating that sending the resource asks The terminal asked may be the terminal launched a offensive, and be not the terminal distribution resource.Resource allocation device is selectively resource and asks The resource for asking distribution reduces the number that inquiry unit query resource requests corresponding resource, reduces the inquiry of inquiry unit Pressure improves user experience to reduce inquiry unit since queries crosses the probability of crash.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed Core design with process is all in the protection scope of the patent.
Four embodiment of the invention is related to a kind of resource allocation device, as shown in Figure 5, comprising: judgment module 401 and place Manage module 402.Judgment module 401 after attack mode, judges the user information stored in database for determining present mode In with the presence or absence of first resource request in user information.It wherein, include user information and requesting access in first resource request Server identification information.Processing module 402 is used to determine in the user information stored in database in judgment module 401 and deposit After the user information in first resource request, according to first resource request in user information and the server that requests access to Identification information determines first resource allocation result, and first resource allocation result is transmitted to the end for sending first resource request End;After judgment module determines the user information being not present in first resource request in the user information stored in database, no Distribution resource is requested for first resource.
It is not difficult to find that present embodiment is system embodiment corresponding with first embodiment, present embodiment can be with First embodiment is worked in coordination implementation.The relevant technical details mentioned in first embodiment still have in the present embodiment Effect, in order to reduce repetition, which is not described herein again.Correspondingly, the relevant technical details mentioned in present embodiment are also applicable in In first embodiment.
It is noted that each module involved in present embodiment is logic module, and in practical applications, one A logic unit can be a physical unit, be also possible to a part of a physical unit, can also be with multiple physics lists The combination of member is realized.In addition, in order to protrude innovative part of the invention, it will not be with solution institute of the present invention in present embodiment The technical issues of proposition, the less close unit of relationship introduced, but this does not indicate that there is no other single in present embodiment Member.
Fifth embodiment of the invention is related to a kind of resource allocation device, as shown in fig. 6, including at least one processor 501;And the memory 502 with the communication connection of at least one processor 501;And, wherein memory 502 is stored with can quilt The instruction that at least one processor 501 executes, instruction is executed by least one processor 501, so that at least one processor 501 It is able to carry out the resource allocation methods referred to such as above embodiment.
The resource allocation device includes: one or more processors 501 and memory 502, with a processor in Fig. 6 For 501.Processor 501, memory 502 can be connected by bus or other modes, to be connected as by bus in Fig. 6 Example.Memory 502 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software program, non- Volatile computer executable program and module, as database is stored in memory 502 in the application embodiment.Place Non-volatile software program, instruction and the module that reason device 501 is stored in memory 502 by operation, thereby executing equipment Various function application and data processing, that is, realize above-mentioned resource allocation methods.
Memory 502 may include storing program area and storage data area, wherein storing program area can store operation system Application program required for system, at least one function;It storage data area can the Save option list etc..In addition, memory 502 can be with It can also include nonvolatile memory, for example, at least disk memory, a flash memory including high-speed random access memory Device or other non-volatile solid state memory parts.In some embodiments, it includes relative to processing that memory 502 is optional The remotely located memory of device 501, these remote memories can pass through network connection to external equipment.The example of above-mentioned network Including but not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module is stored in memory 502, when being executed by one or more processor 501, is held Resource allocation methods in the above-mentioned any means embodiment of row.
The said goods can be performed the application embodiment provided by method, have the corresponding functional module of execution method and Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the application embodiment.
Sixth embodiment of the invention is related to a kind of computer readable storage medium, is stored with computer program.Computer Above method embodiment is realized when program is executed by processor.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are to make It obtains an equipment (can be single-chip microcontroller, chip etc.) or processor (processor) executes side described in each embodiment of the application The all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (11)

1. a kind of resource allocation methods characterized by comprising
Present mode is determined after attack mode, to judge to request in the user information stored in database with the presence or absence of first resource In user information;It include the identification information of user information and the server requested access in the first resource request;
If it is determined that in the presence of, according to the user information in first resource request and the identification information of server requested access to, It determines first resource allocation result, and the first resource allocation result is transmitted to the end for sending the first resource request End;Otherwise, distribution resource is not requested for the first resource.
2. resource allocation methods according to claim 1, which is characterized in that be also stored with user's letter in the database The corresponding relationship of breath, the identification information of server and resource allocation result three;
The identification information of the user information and the server requested access to according in first resource request, determines first Resource allocation result specifically includes:
It is closed according to the identification information of the user information, server stored in the database and the corresponding of resource allocation result three System inquires the first resource and requests corresponding resource allocation result;
According to query result, the first resource allocation result is determined.
3. resource allocation methods according to claim 2, which is characterized in that it is described according to query result, determine described One resource allocation result, specifically includes:
If it is determined that the query result indicates successful inquiring, according to the resource allocation result in the query result, determine described in First resource allocation result;
If it is determined that the query result instruction inquiry failure, is transmitted to inquiry unit for first resource request;Described in reception The first resource allocation result for the first resource request that inquiry unit returns;Wherein, the inquiry unit is according to described The identification information of user information and the server requested access in one resource request determines and returns to the first resource distribution As a result.
4. resource allocation methods according to claim 1, which is characterized in that described according in first resource request The identification information of user information and the server requested access to determines first resource allocation result, specifically includes:
First resource request is transmitted to inquiry unit;Wherein, the inquiry unit is according in first resource request User information and the identification information of server that requests access to, determine and simultaneously return to the first resource allocation result;
Receive the first resource allocation result.
5. resource allocation methods according to any one of claim 1 to 4, which is characterized in that determining that present mode is Before attack mode, the resource allocation methods further include:
If it is determined that received resource request quantity reaches threshold value in predetermined time period, present mode is switched to the attack mould Formula.
6. resource allocation methods according to any one of claim 1 to 4, which is characterized in that stored in the database User information according to Secondary resource received under nonaggressive model request in user information determine.
7. resource allocation methods according to claim 2, which is characterized in that the user letter stored in the database Breath, the identification information of server and the corresponding relationship of resource allocation result three are according to Secondary resource received under nonaggressive model The Secondary resource allocation result that request and inquiry unit return determines;Wherein, the Secondary resource allocation result is described looks into Ask the resource that device is determined according to the identification information of user information and the server requested access in Secondary resource request Allocation result.
8. resource allocation methods according to any one of claim 1 to 4, which is characterized in that the resource allocation methods Applied to content distributing network CDN, first resource request is hypertext transfer protocol http request, described to request access to The identification information of server is the domain name of the server requested access to, and the user information is internet protocol address, The first resource allocation result is according to the IP address of the terminal for sending first resource request and described to request access to The IP address for the CDN node server that the domain name of resource determines.
9. a kind of resource allocation device characterized by comprising judgment module and processing module;
After the judgment module is for determining that present mode is attack mode, judge in the user information stored in database whether There are the user informations in first resource request;The server for including user information in the first resource request and requesting access to Identification information;
The processing module is used to determine that there are the first moneys in the user information stored in the database in the judgment module After user information in the request of source, according to the mark of user information and the server requested access in first resource request Information determines first resource allocation result, and the first resource allocation result is transmitted to and sends the first resource request Terminal;It is used to determine in the user information stored in the database that there is no in first resource request in the judgment module User information after, be not the first resource request distribution resource.
10. a kind of resource allocation device characterized by comprising at least one processor;And
The memory being connect at least one described processor communication;And, wherein the memory be stored with can by it is described extremely The instruction that a few processor executes, described instruction are executed by least one described processor, so that at least one described processing Device is able to carry out resource allocation methods as claimed in any one of claims 1 to 8.
11. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located Reason device realizes resource allocation methods described in any item of the claim 1 to 8 when executing.
CN201811038784.1A 2018-09-06 2018-09-06 A kind of resource allocation methods, device and readable storage medium storing program for executing Pending CN109327506A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811038784.1A CN109327506A (en) 2018-09-06 2018-09-06 A kind of resource allocation methods, device and readable storage medium storing program for executing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811038784.1A CN109327506A (en) 2018-09-06 2018-09-06 A kind of resource allocation methods, device and readable storage medium storing program for executing

Publications (1)

Publication Number Publication Date
CN109327506A true CN109327506A (en) 2019-02-12

Family

ID=65264799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811038784.1A Pending CN109327506A (en) 2018-09-06 2018-09-06 A kind of resource allocation methods, device and readable storage medium storing program for executing

Country Status (1)

Country Link
CN (1) CN109327506A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636104A (en) * 2019-08-07 2019-12-31 咪咕视讯科技有限公司 Resource request method, electronic device and storage medium
CN111429091A (en) * 2020-03-19 2020-07-17 北京字节跳动网络技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN112270492A (en) * 2020-11-12 2021-01-26 北京百家科技集团有限公司 Resource allocation method, device, computer equipment and storage medium
CN112751974A (en) * 2020-12-29 2021-05-04 上海异势信息科技有限公司 Intelligent acceleration speed limiting method, system, medium and equipment for mobile app client

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494550A (en) * 2008-01-21 2009-07-29 阿尔卡泰尔卢森特公司 Resource arbitration in a converged multi-media environment
CN103347030A (en) * 2013-07-23 2013-10-09 熔点网讯(北京)科技有限公司 Network sharing method
CN103618758A (en) * 2013-10-31 2014-03-05 新浪网技术(中国)有限公司 Web server and system resource access control method thereof
CN104427005A (en) * 2013-08-20 2015-03-18 阿里巴巴集团控股有限公司 Method and system for realizing accurate request scheduling on content delivery network
CN104917779A (en) * 2015-06-26 2015-09-16 北京奇虎科技有限公司 Protection method of CC attack based on cloud, device thereof and system thereof
CN106162639A (en) * 2015-11-25 2016-11-23 北京邮电大学 SDN wireless network management platform based on Floodlight and authentication method
WO2017096840A1 (en) * 2015-12-07 2017-06-15 乐视控股(北京)有限公司 Method and device for detecting hotlinking
CN107819888A (en) * 2016-09-14 2018-03-20 华为技术有限公司 A kind of method, apparatus and network element for distributing relay address

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494550A (en) * 2008-01-21 2009-07-29 阿尔卡泰尔卢森特公司 Resource arbitration in a converged multi-media environment
CN103347030A (en) * 2013-07-23 2013-10-09 熔点网讯(北京)科技有限公司 Network sharing method
CN104427005A (en) * 2013-08-20 2015-03-18 阿里巴巴集团控股有限公司 Method and system for realizing accurate request scheduling on content delivery network
CN103618758A (en) * 2013-10-31 2014-03-05 新浪网技术(中国)有限公司 Web server and system resource access control method thereof
CN104917779A (en) * 2015-06-26 2015-09-16 北京奇虎科技有限公司 Protection method of CC attack based on cloud, device thereof and system thereof
CN106162639A (en) * 2015-11-25 2016-11-23 北京邮电大学 SDN wireless network management platform based on Floodlight and authentication method
WO2017096840A1 (en) * 2015-12-07 2017-06-15 乐视控股(北京)有限公司 Method and device for detecting hotlinking
CN107819888A (en) * 2016-09-14 2018-03-20 华为技术有限公司 A kind of method, apparatus and network element for distributing relay address

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636104A (en) * 2019-08-07 2019-12-31 咪咕视讯科技有限公司 Resource request method, electronic device and storage medium
CN111429091A (en) * 2020-03-19 2020-07-17 北京字节跳动网络技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN112270492A (en) * 2020-11-12 2021-01-26 北京百家科技集团有限公司 Resource allocation method, device, computer equipment and storage medium
CN112751974A (en) * 2020-12-29 2021-05-04 上海异势信息科技有限公司 Intelligent acceleration speed limiting method, system, medium and equipment for mobile app client

Similar Documents

Publication Publication Date Title
CN108595207B (en) Gray scale publishing method, rule engine, system, terminal and storage medium
CN109327506A (en) A kind of resource allocation methods, device and readable storage medium storing program for executing
CN1949774B (en) Method and apparatus for managing web application program conversation
CN109995859A (en) A kind of dispatching method, dispatch server and computer readable storage medium
CN103780679B (en) Long delay remote invocation method based on http protocol
CN110489417A (en) A kind of data processing method and relevant device
CN109067930A (en) Domain name cut-in method, domain name analytic method, server, terminal and storage medium
CN104639650B (en) A kind of fine granularity distributed interface access control method and device
CN108509523A (en) Structuring processing method, equipment and the readable storage medium storing program for executing of block chain data
CN101662483A (en) Cache system for cloud computing system and method thereof
CN112311788A (en) Access control method, device, server and medium
US11922059B2 (en) Method and device for distributed data storage
CN108829838A (en) A kind of account information batch processing method and server
CN112651001A (en) Access request authentication method, device, equipment and readable storage medium
CN109309728A (en) A kind of data processing method and relevant apparatus
CN108429785A (en) A kind of generation method, reptile recognition methods and the device of reptile identification encryption string
CN109062717B (en) Data caching method, data caching system, data caching disaster tolerance method, data caching disaster tolerance system and data caching system
CN100382493C (en) System and method for realizing service
CN103428171A (en) Session processing method, application server and system
CN109783499A (en) A kind of data cache method, device and server
CN112866346B (en) Data distribution method and device based on block chain
CN110865845B (en) Method for improving interface access efficiency and storage medium
CN113472781A (en) Service acquisition method, server and computer readable storage medium
CN110489694A (en) For handling the method and system of high concurrent request
CN110311789A (en) Data safe transmission method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190212