CN109246229A - A kind of method and apparatus of distribution resource acquisition request - Google Patents

A kind of method and apparatus of distribution resource acquisition request Download PDF

Info

Publication number
CN109246229A
CN109246229A CN201811141742.0A CN201811141742A CN109246229A CN 109246229 A CN109246229 A CN 109246229A CN 201811141742 A CN201811141742 A CN 201811141742A CN 109246229 A CN109246229 A CN 109246229A
Authority
CN
China
Prior art keywords
resource
target service
hot
target
acquisition request
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
CN201811141742.0A
Other languages
Chinese (zh)
Other versions
CN109246229B (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.)
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 CN201811141742.0A priority Critical patent/CN109246229B/en
Publication of CN109246229A publication Critical patent/CN109246229A/en
Application granted granted Critical
Publication of CN109246229B publication Critical patent/CN109246229B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • 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/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The invention discloses a kind of method and apparatus of distribution resource acquisition request, belong to technical field of data transmission.The described method includes: receiving the resource acquisition request of target service resource, the Resource Properties of the target service resource are determined;When the Resource Properties are static non-hot resource, according to the identification information of the target service resource in background service system selection target cache server;When the Resource Properties are dynamic resource or Static Hot Node resource, according to the real time load situation selection target cache server of cache servers all in the background service system;The resource acquisition request of the target service resource is sent to the target cache server.Using the present invention, the resource hit rate of cache resources not only can be improved, but also can overload to avoid cache server.

Description

A kind of method and apparatus of distribution resource acquisition request
Technical field
The present invention relates to technical field of data transmission, in particular to a kind of method and apparatus of distribution resource acquisition request.
Background technique
With continually developing for Internet technology, cloud calculation service is also fast-developing therewith.The backstage of cloud calculation service takes It is can wrap in business system containing the cache server for being largely used to storage service resource, when user terminal is needed from background service system When obtaining service resources in system, these cache servers can provide the download service of corresponding service resources for user terminal.
It is typically provided with dispatch server in above-mentioned background service system, which can receive user terminal The resource acquisition request being submitted in background service system, and resource acquisition request is supplied to the buffer service selected Device, so that the cache server responds resource acquisition request.When selecting cache server, dispatch server generally may be used In all available cache servers of background service system, to select a present load minimum based on load balancing principle Cache server, or one current residual of selection loads the highest cache server of amount.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
The resource acquisition request of same service resources may reach different cache servers, on the one hand, not stored to have The cache server of service resources needs that corresponding service resources first are being locally configured, and extends request response time, another party Face, a service resources need to be stored in more cache servers simultaneously, resource substantially redundancy, occupancy in background service system A large amount of memory space.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides it is a kind of distribution resource acquisition request method and Device.The technical solution is as follows:
In a first aspect, providing a kind of method of distribution resource acquisition request, which comprises
The resource acquisition request for receiving target service resource, determines the Resource Properties of the target service resource;
When the Resource Properties are static non-hot resource, according to the identification information of the target service resource on backstage Selection target cache server in service system;
When the Resource Properties are dynamic resource or Static Hot Node resource, according to all slow in the background service system Deposit the real time load situation selection target cache server of server;
The resource acquisition request of the target service resource is sent to the target cache server.
Optionally, the Resource Properties of the determination target service resource, comprising:
According to the suffix of the URL of the target service resource of resource acquisition request carrying, the target industry is determined The Resource Properties for resource of being engaged in are dynamic resource or static resource;
According to the receive number and default heat of the resource acquisition request of the target service resource in default history duration Point threshold value determines that the Resource Properties of the target service resource are hot point resource or non-hot resource.
Optionally, the reception time of basis resource acquisition request of the target service resource in default history duration Several and default hot pixel threshold determines that the Resource Properties of the target service resource are hot point resource or non-hot resource, comprising:
Determine objective time interval belonging to current time and the preset number historical period before the objective time interval;
It calculates in the objective time interval and all historical periods, the resource acquisition request of the target service resource Total receive number;
If total receive number is greater than default hot pixel threshold, it is determined that the Resource Properties of the target service resource are Otherwise hot point resource determines that the Resource Properties of the target service resource are non-hot resource.
Optionally, the Resource Properties of the determination target service resource is after hot point resources, further includes:
The accounting for the hot point resource determined in default statistics duration before obtaining current time;
If the accounting is greater than or equal to default hot spot ratio, in the corresponding resource acquisition of each hot point resource Receive number minimum value is determined in the receive number of request;
If the receive number that the resource acquisition of the target service resource is requested is less than the receive number minimum value, The Resource Properties of the target service resource are determined as non-hot resource.
Optionally, described when the Resource Properties are static non-hot resource, according to the mark of the target service resource Know information selection target cache server in background service system, comprising:
When the Resource Properties are static non-hot resource, using the URL of the target service resource as key value, base In consistency hash algorithm in background service system selection target cache server.
Optionally, described when the Resource Properties are dynamic resource or Static Hot Node resource, according to the background service The real time load situation selection target cache server of all cache servers in system, comprising:
When the Resource Properties are dynamic resource or Static Hot Node resource, selected in the background service system remaining Load amount arranges forward multiple cache servers from high to low;
Judge to ask in the multiple cache server with the presence or absence of the resource acquisition for having received the target service resource The alternative cache server asked;
If it is, selecting the alternative cache server for target cache server, the remaining load is otherwise selected The highest cache server of amount is target cache server.
Optionally, the method also includes:
If the receive number of the resource acquisition request of the target service resource is greater than default burst in preset duration Threshold value, and the data volume of the target service resource is greater than preset data threshold value, the then residual negative into the background service system It carries amount and arranges the configuring request that forward multiple cache servers send the target service resource from high to low.
Second aspect, provides a kind of device of distribution resource acquisition request, and described device includes:
Determining module, the resource acquisition for receiving target service resource are requested, and determine the money of the target service resource Source attribute;
Selecting module is used for when the Resource Properties are static non-hot resource, according to the target service resource Identification information selection target cache server in background service system, when the Resource Properties are dynamic resource or Static Hot Node When resource, according to the real time load situation selection target cache server of cache servers all in the background service system;
Sending module, for the resource acquisition request of the target service resource to be sent to the target cache service Device.
Optionally, the determining module, is specifically used for:
According to the suffix of the URL of the target service resource of resource acquisition request carrying, the target industry is determined The Resource Properties for resource of being engaged in are dynamic resource or static resource;
According to the receive number and default heat of the resource acquisition request of the target service resource in default history duration Point threshold value determines that the Resource Properties of the target service resource are hot point resource or non-hot resource.
Optionally, the determining module, is specifically used for:
Determine objective time interval belonging to current time and the preset number historical period before the objective time interval;;
It calculates in the objective time interval and all historical periods, the resource acquisition request of the target service resource Total receive number;
If total receive number is greater than default hot pixel threshold, it is determined that the Resource Properties of the target service resource are Otherwise hot point resource determines that the Resource Properties of the target service resource are non-hot resource.
Optionally, the determining module, is also used to:
The accounting for the hot point resource determined in default statistics duration before obtaining current time;
If the accounting is greater than or equal to default hot spot ratio, in the corresponding resource acquisition of each hot point resource Receive number minimum value is determined in the receive number of request;
If the receive number that the resource acquisition of the target service resource is requested is less than the receive number minimum value, The Resource Properties of the target service resource are determined as non-hot resource.
Optionally, the selecting module, is specifically used for:
When the Resource Properties are static non-hot resource, using the URL of the target service resource as key value, base In consistency hash algorithm in background service system selection target cache server.
Optionally, the selecting module, is specifically used for:
When the Resource Properties are dynamic resource or Static Hot Node resource, selected in the background service system remaining Load amount arranges forward multiple cache servers from high to low;
Judge to ask in the multiple cache server with the presence or absence of the resource acquisition for having received the target service resource The alternative cache server asked;
If it is, selecting the alternative cache server for target cache server, the remaining load is otherwise selected The highest cache server of amount is target cache server.
Optionally, described device further includes configuration module, is used for:
If the receive number of the resource acquisition request of the target service resource is greater than default burst in preset duration Threshold value, and the data volume of the target service resource is greater than preset data threshold value, the then residual negative into the background service system It carries amount and arranges the configuring request that forward multiple cache servers send the target service resource from high to low.
The third aspect, provides a kind of dispatch server, and the dispatch server includes processor and memory, described to deposit Be stored at least one instruction, at least one section of program, code set or instruction set in reservoir, at least one instruction, it is described extremely Few one section of program, the code set or instruction set are loaded by the processor and are executed to realize distribution as described in relation to the first aspect The method of resource acquisition request.
Fourth aspect provides a kind of computer readable storage medium, at least one finger is stored in the storage medium Enable, at least one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or The method that instruction set is loaded by processor and executed to realize distribution resource acquisition request as described in relation to the first aspect.
Technical solution provided in an embodiment of the present invention has the benefit that
In the embodiment of the present invention, the resource acquisition request of target service resource is received, determines the resource of target service resource Attribute;When Resource Properties are static non-hot resource, according to the identification information of target service resource in background service system Selection target cache server;When Resource Properties are dynamic resource or Static Hot Node resource, according to institute in background service system There is the real time load situation selection target cache server of cache server;The resource acquisition of target service resource is requested to send To target cache server.In this way, for static non-hot resource, resource acquisition can be requested guidance to having stored corresponding money The cache server in source so as to improve the resource hit rate of cache resources, while can be reduced request response time, And it is not necessarily to carry out repeating storage in other cache servers, saves memory space, and dynamic resource and hot spot are provided Resource acquisition can be requested guidance to loading lower cache server by source, so as to realize more cache servers it Between load balancing, avoid part cache server overload.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of network frame schematic diagram of background service system provided in an embodiment of the present invention;
Fig. 2 is a kind of method flow diagram of distribution resource acquisition request provided in an embodiment of the present invention;
Fig. 3 is a kind of apparatus structure schematic diagram of distribution resource acquisition request provided in an embodiment of the present invention;
Fig. 4 is a kind of apparatus structure schematic diagram of distribution resource acquisition request provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of dispatch server provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
The embodiment of the invention provides a kind of methods of distribution resource acquisition request, after the executing subject of this method can be The dispatch server of platform service system, background service system include at least a dispatch server and Duo Tai cache server, tool Volume grid frame can be as shown in Figure 1, wherein dispatch server can receive the resource acquisition request of all user terminals, so Afterwards based on local pre-set Requests dispatching strategies designed, selection is for responding in all cache servers of background service system The cache server of resource acquisition request.Cache server can be based on being stored in advance after receiving resource acquisition request Service resources or the service resources of provisional configuration fed back.Above-mentioned dispatch server may include processor, storage Device, transceiver, processor can be used for carrying out executing the processing of distribution resource acquisition request in following processes, and memory can be used The data of the data and generation that are needed in storage treatment process, such as receive number, the receiving time of resource acquisition request, Transceiver can be used for sending and receiving the related data in treatment process, such as receive or send resource acquisition request.
Below in conjunction with specific embodiment, process flow shown in Fig. 2 is described in detail, content can be as Under:
Step 201, the resource acquisition request for receiving target service resource, determines the Resource Properties of target service resource.
In an implementation, user can request a certain business to provide by user terminal to the background service system of cloud calculation service Source (by taking target service resource as an example), the dispatch server of background service system can receive the target industry that user terminal is sent The resource acquisition request for resource of being engaged in, can determine the Resource Properties of target service resource later.Herein, target service resource is determined Resource Properties can include at least determine target service resource belong to dynamic resource or static resource, determine target service provide Source belongs to hot point resource or non-hot resource.
Optionally, static resource and dynamic resource are distinguished in step 201 and judges that specific handle of hot point resource can be with It is as follows: according to the suffix of the URL of the target service resource of resource acquisition request carrying, to determine the Resource Properties of target service resource For dynamic resource or static resource;According to the reception time of the resource acquisition request of target service resource in default history duration Several and default hot pixel threshold determines that the Resource Properties of target service resource are hot point resource or non-hot resource.
In an implementation, dispatch server can first extract money during determining the Resource Properties of target service resource Then the URL of the target service resource carried in the acquisition request of source judges the resource of target service resource according to the suffix of URL Attribute be dynamic resource or static resource, specifically, when URL suffix be " .php ", " .aspx ", " .asp ", " .jsp ", It, can be true when the character strings such as " .do ", " .dwr ", " .cgi ", " .fcgi ", " .action ", " .ashx ", " .axd ", " .json " Determining Resource Properties is dynamic resource, and Resource Properties are then static resource in other situations.Later, dispatch server is available In default history duration (in 10 minutes such as preceding) the resource acquisition request of target service resource receive number, then by receive number It is compared with default hot pixel threshold, and then can be determined the Resource Properties of target service resource for hot spot money according to comparison result Source or non-hot resource.Under normal circumstances, it is then hot point resource that receive number, which is greater than default hot pixel threshold, and receive number is little In default hot pixel threshold be then non-hot resource.
Optionally, when counting the receive number of resource acquisition request, the concept of period can be introduced, to reduce statistics Workload, correspondingly, the processing of above-mentioned identification hot point resource and non-hot resource can be such that mesh belonging to determining current time Mark the preset number historical period before period and objective time interval;It calculates in objective time interval and all historical periods, target industry Total receive number of the resource acquisition request for resource of being engaged in;If total receive number is greater than default hot pixel threshold, it is determined that target industry The Resource Properties for resource of being engaged in are hot point resource, otherwise determine that the Resource Properties of target service resource are non-hot resource.
In an implementation, the receive number for counting resource acquisition request can be arranged in technical staff at dispatch server Period so that dispatch server at times counts receive number, for example, segment length 10 minutes when can set one, Dispatch server can with the receive number in statistics primary this 10 minutes 10 minutes, then by the period to the receive number of statistics into Row storage.By taking the resource acquisition of target service resource request as an example, dispatch server can be obtained the resource of target service resource The starting point for first period for taking the receiving time for the first time of request to request as the resource acquisition, the then segment length when preset The receive number of the resource acquisition request of target service resource in degree statistics and storing time intervals.In this way, dispatch server is receiving To target service resource resource acquisition request when, before can determining objective time interval belonging to current time and objective time interval Preset number historical period.It is appreciated that reference time and single period of the number of historical period by judgement hot point resource Duration determine, if judged to need to refer to receive number in a hour, each period when it is 10 minutes a length of, then can be with The number of determining historical period can be 5 (considering objective time interval) or 6 (not considering objective time interval).Later, scheduling clothes The receive number of the resource acquisition request of the target service resource counted in the business available stored all historical periods of device, The receive number for determining the resource acquisition request of target service resource in objective time interval simultaneously, so that these receive numbers are added Obtain total receive number.If total receive is greater than default hot pixel threshold, dispatch server if, can determine target service resource Resource Properties are hot point resource, otherwise can determine that the Resource Properties of target service resource are non-hot resource.
Optionally, in order to guarantee the resource hit rate of background service system, the quantity of hot point resource can be carried out certain Control, correspondingly, there may also be following processing: obtaining current time after being determined that target service resource is hot point resource The accounting for the hot point resource determined in preceding default statistics duration;If accounting is greater than or equal to default hot spot ratio, Receive number minimum value is determined in the receive number of the corresponding resource acquisition request of each hot point resource;If target service resource Resource acquisition request receive number be less than receive number minimum value, then the Resource Properties of target service resource are determined as non- Hot point resource.
In an implementation, dispatch server can first obtain current time after determining that target service resource is hot point resource The quantity for the hot point resource determined in preceding default statistics duration and the quantity of non-hot resource, so as to obtain default system The accounting of hot point resource in timing is long.If the accounting is more than or equal to default hot spot ratio, show default hot pixel threshold Possibility is arranged lower, and the hot point resource determined is excessive, and the resource hit rate of background service system will decline to a great extent, so Can receive number minimum value further be determined in the receive number of the corresponding resource acquisition request of above-mentioned each hot point resource, The receive number of the resource acquisition request of target service resource and the size relation of the receive number minimum value are judged again.If mesh The receive number for marking the resource acquisition request of service resources is smaller, it is believed that the temperature of target service resource is relative to having determined that The temperature of hot point resource out is lower, so the Resource Properties of target service resource can be redefined as non-hot resource.
Step 202, when Resource Properties are static non-hot resource, according to the identification information of target service resource on backstage Selection target cache server in service system.
In an implementation, if it is determined that the Resource Properties for going out target service resource are static non-hot resource, dispatch server The identification information that target service resource can then be extracted, then according to the identification information of target service resource in background service system Middle selection target cache server.Identification information herein can be the URL of target service resource, be also possible to target service money The resource name in source can also be that background service system is the unique identification number etc. of target service resource allocation.It is appreciated that by It is substantially stationary constant in the identification information of service resources, it, can will be static non-so select cache server based on identification information The resource acquisition request of hot point resource is distributed to same cache server, improves the service resources stored in background service system Hit rate.
Optionally, for static non-hot resource, the mode of selection target cache server can be specific as follows: working as resource When attribute is static non-hot resource, using the URL of target service resource as key value, based on consistency hash algorithm on backstage Selection target cache server in service system.
In an implementation, after dispatch server has determined target service resource for static non-hot resource, available target Target is calculated using consistency hash algorithm then using the URL of target service resource as key value in the URL of service resources The corresponding hash value of service resources, and then can be according to hash value selection target cache server in background service system.
Step 203, when Resource Properties are dynamic resource or Static Hot Node resource, according to all slow in background service system Deposit the real time load situation selection target cache server of server.
In an implementation, if it is determined that the Resource Properties of the target service resource gone out are that dynamic resource or Static Hot Node provide Source, dispatch server then in available background service system all cache servers real time load situation, then according to institute There is the real time load situation selection target cache server of cache server.It is readily apparent that, in order to realize load balancing, selection Target cache server should be that present load is lower or the higher cache server of remaining load amount.It is appreciated that by It can not be cached in advance in dynamic resource, so load balancing principle can be followed when selecting cache server, and due to The request amount of Static Hot Node resource is larger, then can be when selecting cache server to avoid part cache server from overloading Follow load balancing principle.
Optionally, when selecting cache server according to real time load situation, resource life can also be taken into account to a certain extent Middle rate, correspondingly, the processing of step 203 specifically can be such that when Resource Properties are dynamic resource or Static Hot Node resource, Remaining load amount is selected to arrange forward multiple cache servers from high to low in background service system;Judge multiple caching clothes With the presence or absence of the alternative cache server for the resource acquisition request for having received target service resources in business device;If it is, choosing Selecting alternative cache server is target cache server, otherwise selects the highest cache server of remaining load amount slow for target Deposit server.
In an implementation, dispatch server is determining that the Resource Properties of target service resource are dynamic resource or are static After non-hot resource, the real time load situation of all cache servers in available background service system then will be all slow Server is deposited to be arranged according to the sequence of remaining load amount from high to low.Later, dispatch server can choose arrangement and lean on Preceding multiple cache servers, then judging, which whether there is in the multiple cache servers selected, had received target service resources Resource acquisition request alternative cache server.Delay if it is present the alternative cache server can be determined as target Server is deposited, if it does not exist, then can choose the highest cache server of remaining load amount is target cache server.Value It obtains one to be mentioned that, the forward cache server of preset number arrangement can be selected by selecting cache server, can also be selected Remaining load amount is greater than all cache servers of predetermined threshold, can also select the caching clothes for arranging forward designated ratio Business device.
Step 204, the resource acquisition request of target service resource is sent to target cache server.
In an implementation, dispatch server is determining the Resource Properties of target service resource, and has pointedly selected mesh After marking cache server, dispatch server can request the resource acquisition of target service resource to be sent to target cache service Device.If target cache server is previously stored with target service resource, directly the target service being locally stored can be provided Source feeds back to user terminal, if not stored, target service resource temporarily can be locally configured, then will be with the target postponed Service resources feed back to user terminal.Configuration herein can be downloads from the source station of target service resource, is also possible to from it Target service resource is replicated at its cache server, can also be that notification technique personnel manually load target service resource etc..
Optionally, hot point resource biggish for some data volumes, can shift to an earlier date and be configured in cache server, with Request feedback time is reduced, corresponding processing can be such that if the resource acquisition of target service resource is asked in preset duration The receive number asked is greater than default burst threshold, and the data volume of target service resource is greater than preset data threshold value, then to backstage Remaining load amount arranges the configuration that forward multiple cache servers send target service resource from high to low in service system Request.
In an implementation, dispatch server, can be to resource while the resource acquisition request for receiving target service resource The receive number of acquisition request is recorded, can be with if the receive number in preset duration is greater than default burst threshold The data volume of target service resource is detected, it, can be in background service system if its data volume is greater than preset data threshold value All cache servers are arranged by the sequence of remaining load amount from high to low, and the multiple buffer services forward to arrangement Device sends the configuring request of target service resource, target service resource is configured in multiple cache servers in advance, thus this A little cache servers no longer need to provisional configuration target service resource after receiving corresponding resource acquisition request.
In the embodiment of the present invention, the resource acquisition request of target service resource is received, determines the resource of target service resource Attribute;When Resource Properties are static non-hot resource, according to the identification information of target service resource in background service system Selection target cache server;When Resource Properties are dynamic resource or Static Hot Node resource, according to institute in background service system There is the real time load situation selection target cache server of cache server;The resource acquisition of target service resource is requested to send To target cache server.In this way, for static non-hot resource, resource acquisition can be requested guidance to having stored corresponding money The cache server in source so as to improve the resource hit rate of cache resources, while can be reduced request response time, And it is not necessarily to carry out repeating storage in other cache servers, saves memory space, and dynamic resource and hot spot are provided Resource acquisition can be requested guidance to loading lower cache server by source, so as to realize more cache servers it Between load balancing, avoid part cache server overload.
Based on the same technical idea, the embodiment of the invention also provides a kind of devices of distribution resource acquisition request, such as Shown in Fig. 3, described device includes:
Determining module 301, the resource acquisition for receiving target service resource are requested, and determine the target service resource Resource Properties;
Selecting module 302 is used for when the Resource Properties are static non-hot resource, according to the target service resource Identification information in background service system selection target cache server, when the Resource Properties be dynamic resource or static heat When point resource, according to the real time load situation selection target buffer service of cache servers all in the background service system Device;
Sending module 303 takes for the resource acquisition request of the target service resource to be sent to the target cache Business device.
Optionally, the determining module 301, is specifically used for:
According to the suffix of the URL of the target service resource of resource acquisition request carrying, the target industry is determined The Resource Properties for resource of being engaged in are dynamic resource or static resource;
According to the receive number and default heat of the resource acquisition request of the target service resource in default history duration Point threshold value determines that the Resource Properties of the target service resource are hot point resource or non-hot resource.
Optionally, the determining module 301, is specifically used for:
Determine objective time interval belonging to current time and the preset number historical period before the objective time interval;;
It calculates in the objective time interval and all historical periods, the resource acquisition request of the target service resource Total receive number;
If total receive number is greater than default hot pixel threshold, it is determined that the Resource Properties of the target service resource are Otherwise hot point resource determines that the Resource Properties of the target service resource are non-hot resource.
Optionally, the determining module 301, is also used to:
The accounting for the hot point resource determined in default statistics duration before obtaining current time;
If the accounting is greater than or equal to default hot spot ratio, in the corresponding resource acquisition of each hot point resource Receive number minimum value is determined in the receive number of request;
If the receive number that the resource acquisition of the target service resource is requested is less than the receive number minimum value, The Resource Properties of the target service resource are determined as non-hot resource.
Optionally, the selecting module 302, is specifically used for:
When the Resource Properties are static non-hot resource, using the URL of the target service resource as key value, base In consistency hash algorithm in background service system selection target cache server.
Optionally, the selecting module 302, is specifically used for:
When the Resource Properties are dynamic resource or Static Hot Node resource, selected in the background service system remaining Load amount arranges forward multiple cache servers from high to low;
Judge to ask in the multiple cache server with the presence or absence of the resource acquisition for having received the target service resource The alternative cache server asked;
If it is, selecting the alternative cache server for target cache server, the remaining load is otherwise selected The highest cache server of amount is target cache server.
Optionally, it as shown in figure 4, described device further includes configuration module 304, is used for:
If the receive number of the resource acquisition request of the target service resource is greater than default burst in preset duration Threshold value, and the data volume of the target service resource is greater than preset data threshold value, the then residual negative into the background service system It carries amount and arranges the configuring request that forward multiple cache servers send the target service resource from high to low.
In the embodiment of the present invention, the resource acquisition request of target service resource is received, determines the resource of target service resource Attribute;When Resource Properties are static non-hot resource, according to the identification information of target service resource in background service system Selection target cache server;When Resource Properties are dynamic resource or Static Hot Node resource, according to institute in background service system There is the real time load situation selection target cache server of cache server;The resource acquisition of target service resource is requested to send To target cache server.In this way, for static non-hot resource, resource acquisition can be requested guidance to having stored corresponding money The cache server in source so as to improve the resource hit rate of cache resources, while can be reduced request response time, And it is not necessarily to carry out repeating storage in other cache servers, saves memory space, and dynamic resource and hot spot are provided Resource acquisition can be requested guidance to loading lower cache server by source, so as to realize more cache servers it Between load balancing, avoid part cache server overload.
It should be understood that the device of distribution resource acquisition request provided by the above embodiment is in distribution resource acquisition request When, only the example of the division of the above functional modules, in practical application, it can according to need and divide above-mentioned function With being completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, to complete above description All or part of function.In addition, device and the distribution resource acquisition of distribution resource acquisition request provided by the above embodiment The embodiment of the method for request belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Fig. 5 is the structural schematic diagram of dispatch server provided in an embodiment of the present invention.The dispatch server 500 can be because of configuration Or performance is different and generate bigger difference, may include one or more central processing units 522 (for example, one or More than one processor) and memory 532, the storage medium of one or more storage application programs 542 or data 544 530 (such as one or more mass memory units).Wherein, memory 532 and storage medium 530 can be of short duration storage Or persistent storage.The program for being stored in storage medium 530 may include one or more modules (diagram does not mark), each Module may include to the series of instructions operation in dispatch server 500.Further, central processing unit 522 can be set It is set to and is communicated with storage medium 530, the series of instructions operation in storage medium 530 is executed on dispatch server 500.
Dispatch server 500 can also include one or more power supplys 529, one or more are wired or wireless Network interface 550, one or more input/output interfaces 558, one or more keyboards 556, and/or, one or More than one operating system 541, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD etc..
Dispatch server 500 may include have memory and one perhaps more than one program one of them or More than one program is stored in memory, and be configured to be executed by one or more than one processor it is one or More than one program includes the instruction for carrying out above-mentioned distribution resource acquisition request.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (16)

1. a kind of method of distribution resource acquisition request, which is characterized in that the described method includes:
The resource acquisition request for receiving target service resource, determines the Resource Properties of the target service resource;
When the Resource Properties are static non-hot resource, according to the identification information of the target service resource in background service Selection target cache server in system;
When the Resource Properties are dynamic resource or Static Hot Node resource, taken according to cachings all in the background service system The real time load situation selection target cache server of business device;
The resource acquisition request of the target service resource is sent to the target cache server.
2. the method according to claim 1, wherein the Resource Properties of the determination target service resource, Include:
According to the suffix of the URL of the target service resource of resource acquisition request carrying, the target service money is determined The Resource Properties in source are dynamic resource or static resource;
According to the receive number of the resource acquisition request of the target service resource and default hot spot threshold in default history duration Value determines that the Resource Properties of the target service resource are hot point resource or non-hot resource.
3. according to the method described in claim 2, it is characterized in that, basis target service in default history duration The receive number of the resource acquisition request of resource and default hot pixel threshold, determine the Resource Properties of the target service resource for heat Point resource or non-hot resource, comprising:
Determine objective time interval belonging to current time and the preset number historical period before the objective time interval;
It calculates in the objective time interval and all historical periods, the resource acquisition request of the target service resource always connects Receive number;
If total receive number is greater than default hot pixel threshold, it is determined that the Resource Properties of the target service resource are hot spot Otherwise resource determines that the Resource Properties of the target service resource are non-hot resource.
4. according to the method described in claim 2, it is characterized in that, the Resource Properties of the determination target service resource are After hot point resource, further includes:
The accounting for the hot point resource determined in default statistics duration before obtaining current time;
If the accounting is greater than or equal to default hot spot ratio, in the corresponding resource acquisition request of each hot point resource Receive number in determine receive number minimum value;
If the receive number that the resource acquisition of the target service resource is requested is less than the receive number minimum value, by institute The Resource Properties for stating target service resource are determined as non-hot resource.
5. the method according to claim 1, wherein described when the Resource Properties are static non-hot resource When, according to the identification information of the target service resource in background service system selection target cache server, comprising:
When the Resource Properties are static non-hot resource, using the URL of the target service resource as key value, it is based on one Cause property hash algorithm selection target cache server in background service system.
6. the method according to claim 1, wherein described when the Resource Properties are dynamic resource or static heat When point resource, according to the real time load situation selection target buffer service of cache servers all in the background service system Device, comprising:
When the Resource Properties are dynamic resource or Static Hot Node resource, remaining load is selected in the background service system Amount arranges forward multiple cache servers from high to low;
Judge in the multiple cache server with the presence or absence of the resource acquisition request for having received the target service resource Alternative cache server;
If it is, selecting the alternative cache server for target cache server, the remaining load amount is otherwise selected Highest cache server is target cache server.
7. the method according to claim 1, wherein the method also includes:
If the receive number of the resource acquisition request of the target service resource is greater than default burst threshold in preset duration, And the data volume of the target service resource is greater than preset data threshold value, then the remaining load amount into the background service system The configuring request that forward multiple cache servers send the target service resource is arranged from high to low.
8. a kind of device of distribution resource acquisition request, which is characterized in that described device includes:
Determining module, the resource acquisition for receiving target service resource are requested, and determine the resource category of the target service resource Property;
Selecting module is used for when the Resource Properties are static non-hot resource, according to the mark of the target service resource Information selection target cache server in background service system, when the Resource Properties are dynamic resource or Static Hot Node resource When, according to the real time load situation selection target cache server of cache servers all in the background service system;
Sending module, for the resource acquisition request of the target service resource to be sent to the target cache server.
9. device according to claim 8, which is characterized in that the determining module is specifically used for:
According to the suffix of the URL of the target service resource of resource acquisition request carrying, the target service money is determined The Resource Properties in source are dynamic resource or static resource;
According to the receive number of the resource acquisition request of the target service resource and default hot spot threshold in default history duration Value determines that the Resource Properties of the target service resource are hot point resource or non-hot resource.
10. device according to claim 9, which is characterized in that the determining module is specifically used for:
Determine objective time interval belonging to current time and the preset number historical period before the objective time interval;
It calculates in the objective time interval and all historical periods, the resource acquisition request of the target service resource always connects Receive number;
If total receive number is greater than default hot pixel threshold, it is determined that the Resource Properties of the target service resource are hot spot Otherwise resource determines that the Resource Properties of the target service resource are non-hot resource.
11. device according to claim 9, which is characterized in that the determining module is also used to:
The accounting for the hot point resource determined in default statistics duration before obtaining current time;
If the accounting is greater than or equal to default hot spot ratio, in the corresponding resource acquisition request of each hot point resource Receive number in determine receive number minimum value;
If the receive number that the resource acquisition of the target service resource is requested is less than the receive number minimum value, by institute The Resource Properties for stating target service resource are determined as non-hot resource.
12. device according to claim 8, which is characterized in that the selecting module is specifically used for:
When the Resource Properties are static non-hot resource, using the URL of the target service resource as key value, it is based on one Cause property hash algorithm selection target cache server in background service system.
13. device according to claim 8, which is characterized in that the selecting module is specifically used for:
When the Resource Properties are dynamic resource or Static Hot Node resource, remaining load is selected in the background service system Amount arranges forward multiple cache servers from high to low;
Judge in the multiple cache server with the presence or absence of the resource acquisition request for having received the target service resource Alternative cache server;
If it is, selecting the alternative cache server for target cache server, the remaining load amount is otherwise selected Highest cache server is target cache server.
14. device according to claim 8, which is characterized in that described device further includes configuration module, is used for:
If the receive number of the resource acquisition request of the target service resource is greater than default burst threshold in preset duration, And the data volume of the target service resource is greater than preset data threshold value, then the remaining load amount into the background service system The configuring request that forward multiple cache servers send the target service resource is arranged from high to low.
15. a kind of dispatch server, which is characterized in that the dispatch server includes processor and memory, the memory In be stored at least one instruction, at least one section of program, code set or instruction set, at least one instruction, described at least one Duan Chengxu, the code set or instruction set are loaded by the processor and are executed to realize as described in claim 1 to 7 is any Distribute the method for resource acquisition request.
16. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium Few one section of program, code set or instruction set, at least one instruction, at least one section of program, the code set or the instruction The method that collection is loaded by processor and executed to realize the distribution resource acquisition request as described in claim 1 to 7 is any.
CN201811141742.0A 2018-09-28 2018-09-28 Method and device for distributing resource acquisition request Active CN109246229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811141742.0A CN109246229B (en) 2018-09-28 2018-09-28 Method and device for distributing resource acquisition request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811141742.0A CN109246229B (en) 2018-09-28 2018-09-28 Method and device for distributing resource acquisition request

Publications (2)

Publication Number Publication Date
CN109246229A true CN109246229A (en) 2019-01-18
CN109246229B CN109246229B (en) 2021-08-27

Family

ID=65054054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811141742.0A Active CN109246229B (en) 2018-09-28 2018-09-28 Method and device for distributing resource acquisition request

Country Status (1)

Country Link
CN (1) CN109246229B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049130A (en) * 2019-04-22 2019-07-23 北京邮电大学 A kind of service arrangement and method for scheduling task and device based on edge calculations
CN110149394A (en) * 2019-05-20 2019-08-20 典基网络科技(上海)有限公司 Dispatching method, device and the storage medium of system resource
CN110290196A (en) * 2019-06-20 2019-09-27 网宿科技股份有限公司 A kind of content distribution method and device
CN110866198A (en) * 2019-09-27 2020-03-06 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium
CN111131841A (en) * 2020-02-24 2020-05-08 北京达佳互联信息技术有限公司 Live indirect access method and device, electronic equipment and storage medium
CN111371866A (en) * 2020-02-26 2020-07-03 厦门网宿有限公司 Method and device for processing service request
CN112003922A (en) * 2020-08-18 2020-11-27 杭州指令集智能科技有限公司 Data transmission method and device
CN112019451A (en) * 2019-05-29 2020-12-01 中国移动通信集团安徽有限公司 Bandwidth allocation method, debugging network element, local cache server and computing equipment
CN112740642A (en) * 2020-08-31 2021-04-30 华为技术有限公司 Communication method and multi-access edge computing server
CN112764948A (en) * 2021-01-22 2021-05-07 土巴兔集团股份有限公司 Data transmission method, data transmission device, computer device, and storage medium
CN112953985A (en) * 2019-12-10 2021-06-11 贵州白山云科技股份有限公司 Request data processing method, device, medium and system
CN112953984A (en) * 2019-12-10 2021-06-11 贵州白山云科技股份有限公司 Data processing method, device, medium and system
CN113452753A (en) * 2021-05-21 2021-09-28 北京奇艺世纪科技有限公司 Data distribution method, device, equipment and storage medium
CN114629919A (en) * 2022-03-31 2022-06-14 北京百度网讯科技有限公司 Resource acquisition method, device, equipment and storage medium
CN114640700A (en) * 2020-11-30 2022-06-17 腾讯科技(深圳)有限公司 Calling frequency control method and device
CN114666319A (en) * 2022-03-02 2022-06-24 北京百度网讯科技有限公司 Data downloading method and device, electronic equipment and readable storage medium
CN114760361A (en) * 2022-04-25 2022-07-15 中国平安人寿保险股份有限公司 Service request distribution method, system, device and storage medium
CN116708455A (en) * 2023-02-03 2023-09-05 天翼云科技有限公司 Resource acquisition method and device, readable storage medium and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668046A (en) * 2009-10-13 2010-03-10 成都市华为赛门铁克科技有限公司 Resource caching method, resource obtaining method, device and system thereof
CN103051706A (en) * 2012-12-19 2013-04-17 新浪网技术(中国)有限公司 Dynamic webpage request processing system and method for dynamic website
CN104539724A (en) * 2015-01-14 2015-04-22 浪潮(北京)电子信息产业有限公司 Information processing method and system
EP2894827A1 (en) * 2013-12-06 2015-07-15 Huawei Technologies Co., Ltd. Method, apparatus, and system for managing migration of virtual machine
CN106649150A (en) * 2016-12-26 2017-05-10 锐捷网络股份有限公司 Cache management method and device
US10009439B1 (en) * 2013-12-05 2018-06-26 Instart Logic, Inc. Cache preloading
CN108322495A (en) * 2017-01-18 2018-07-24 阿里巴巴集团控股有限公司 Processing method, the device and system of resource access request
CN108347460A (en) * 2017-01-25 2018-07-31 华为技术有限公司 resource access method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668046A (en) * 2009-10-13 2010-03-10 成都市华为赛门铁克科技有限公司 Resource caching method, resource obtaining method, device and system thereof
CN103051706A (en) * 2012-12-19 2013-04-17 新浪网技术(中国)有限公司 Dynamic webpage request processing system and method for dynamic website
US10009439B1 (en) * 2013-12-05 2018-06-26 Instart Logic, Inc. Cache preloading
EP2894827A1 (en) * 2013-12-06 2015-07-15 Huawei Technologies Co., Ltd. Method, apparatus, and system for managing migration of virtual machine
CN104539724A (en) * 2015-01-14 2015-04-22 浪潮(北京)电子信息产业有限公司 Information processing method and system
CN106649150A (en) * 2016-12-26 2017-05-10 锐捷网络股份有限公司 Cache management method and device
CN108322495A (en) * 2017-01-18 2018-07-24 阿里巴巴集团控股有限公司 Processing method, the device and system of resource access request
CN108347460A (en) * 2017-01-25 2018-07-31 华为技术有限公司 resource access method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JUNHUAI LI,YILE WANG,JING ZHANG: ""Research of Web QoS Control Model Based on Dynamic Resource Reallocation Scheme"", 《2008 INTERNATIONAL SYMPOSIUM ON INFORMATION SCIENCE AND ENGINEERING》 *
舒畅: ""改进视频点播负载能力的模型与算法研究"", 《中国博士学位论文全文数据库 信息科技辑》 *

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049130A (en) * 2019-04-22 2019-07-23 北京邮电大学 A kind of service arrangement and method for scheduling task and device based on edge calculations
CN110149394A (en) * 2019-05-20 2019-08-20 典基网络科技(上海)有限公司 Dispatching method, device and the storage medium of system resource
CN112019451B (en) * 2019-05-29 2023-11-21 中国移动通信集团安徽有限公司 Bandwidth allocation method, debugging network element, local cache server and computing device
CN112019451A (en) * 2019-05-29 2020-12-01 中国移动通信集团安徽有限公司 Bandwidth allocation method, debugging network element, local cache server and computing equipment
CN110290196A (en) * 2019-06-20 2019-09-27 网宿科技股份有限公司 A kind of content distribution method and device
CN110290196B (en) * 2019-06-20 2021-08-27 网宿科技股份有限公司 Content distribution method and device
CN110866198A (en) * 2019-09-27 2020-03-06 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium
CN110866198B (en) * 2019-09-27 2022-10-28 上海硬通网络科技有限公司 Static resource caching method, system, device, computer equipment and storage medium
CN112953985B (en) * 2019-12-10 2023-04-07 贵州白山云科技股份有限公司 Request data processing method, device, medium and system
CN112953985A (en) * 2019-12-10 2021-06-11 贵州白山云科技股份有限公司 Request data processing method, device, medium and system
CN112953984A (en) * 2019-12-10 2021-06-11 贵州白山云科技股份有限公司 Data processing method, device, medium and system
CN111131841A (en) * 2020-02-24 2020-05-08 北京达佳互联信息技术有限公司 Live indirect access method and device, electronic equipment and storage medium
CN111371866A (en) * 2020-02-26 2020-07-03 厦门网宿有限公司 Method and device for processing service request
CN112003922A (en) * 2020-08-18 2020-11-27 杭州指令集智能科技有限公司 Data transmission method and device
CN112740642A (en) * 2020-08-31 2021-04-30 华为技术有限公司 Communication method and multi-access edge computing server
CN112740642B (en) * 2020-08-31 2022-05-17 华为技术有限公司 Communication method and multi-access edge computing server
CN114640700A (en) * 2020-11-30 2022-06-17 腾讯科技(深圳)有限公司 Calling frequency control method and device
CN114640700B (en) * 2020-11-30 2023-04-07 腾讯科技(深圳)有限公司 Calling frequency control method and device
CN112764948A (en) * 2021-01-22 2021-05-07 土巴兔集团股份有限公司 Data transmission method, data transmission device, computer device, and storage medium
CN113452753A (en) * 2021-05-21 2021-09-28 北京奇艺世纪科技有限公司 Data distribution method, device, equipment and storage medium
CN114666319A (en) * 2022-03-02 2022-06-24 北京百度网讯科技有限公司 Data downloading method and device, electronic equipment and readable storage medium
CN114666319B (en) * 2022-03-02 2024-03-22 北京百度网讯科技有限公司 Data downloading method, device, electronic equipment and readable storage medium
CN114629919A (en) * 2022-03-31 2022-06-14 北京百度网讯科技有限公司 Resource acquisition method, device, equipment and storage medium
CN114760361A (en) * 2022-04-25 2022-07-15 中国平安人寿保险股份有限公司 Service request distribution method, system, device and storage medium
CN114760361B (en) * 2022-04-25 2023-09-15 中国平安人寿保险股份有限公司 Service request distribution method, system, equipment and storage medium
CN116708455A (en) * 2023-02-03 2023-09-05 天翼云科技有限公司 Resource acquisition method and device, readable storage medium and electronic equipment
CN116708455B (en) * 2023-02-03 2024-01-05 天翼云科技有限公司 Resource acquisition method and device, readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109246229B (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN109246229A (en) A kind of method and apparatus of distribution resource acquisition request
CN112162865B (en) Scheduling method and device of server and server
CN110795203B (en) Resource scheduling method, device, system and computing equipment
CN109076026B (en) System and method for latency-based queuing
US20200104170A1 (en) Systems and methods for scheduling tasks
CN104243405B (en) A kind of request processing method, apparatus and system
CN104702625B (en) Access request dispatching method and device in a kind of CDN network
CN104834722A (en) CDN (Content Delivery Network)-based content management system
CN102394931B (en) Cloud-based user visit request scheduling method
CN105159782A (en) Cloud host based method and apparatus for allocating resources to orders
CN109981744B (en) Data distribution method and device, storage medium and electronic equipment
CN106161485B (en) A kind of resource regulating method of infrastructure service cluster, device and system
CN107819797B (en) Access request processing method and device
CN103607424B (en) Server connection method and server system
CN104994156A (en) Load balancing method and system for cluster
CN110336848B (en) Scheduling method, scheduling system and scheduling equipment for access request
CN107819825A (en) A kind of service scheduling method, device and electronic equipment
CN110213349A (en) A kind of HTTP dispatching method and device
CN113411404A (en) File downloading method, device, server and storage medium
CN110417910A (en) Sending method, device, server and the storage medium of notification message
CN107566535B (en) Self-adaptive load balancing method based on concurrent access timing sequence rule of Web map service
CN106411971B (en) Load adjusting method and device
CN109688171B (en) Cache space scheduling method, device and system
CN114936089A (en) Resource scheduling method, system, device and storage medium
CN110891077A (en) CDN node detection 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
GR01 Patent grant
GR01 Patent grant