CN110535853B - Video request scheduling method, device, server and storage medium - Google Patents

Video request scheduling method, device, server and storage medium Download PDF

Info

Publication number
CN110535853B
CN110535853B CN201910804126.7A CN201910804126A CN110535853B CN 110535853 B CN110535853 B CN 110535853B CN 201910804126 A CN201910804126 A CN 201910804126A CN 110535853 B CN110535853 B CN 110535853B
Authority
CN
China
Prior art keywords
idc
weight
video
scheduling
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.)
Active
Application number
CN201910804126.7A
Other languages
Chinese (zh)
Other versions
CN110535853A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910804126.7A priority Critical patent/CN110535853B/en
Publication of CN110535853A publication Critical patent/CN110535853A/en
Application granted granted Critical
Publication of CN110535853B publication Critical patent/CN110535853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • 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
    • H04L67/1004Server selection for load balancing
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention provides a video request scheduling method, a video request scheduling device, a server and a storage medium, wherein the video request scheduling method comprises the following steps: a scheduling server receives a video scheduling request aiming at a target video sent by client equipment; acquiring a first weight of each IDC; acquiring a second weight of each IDC; obtaining the scheduling weight of each IDC based on the first weight and the second weight of each IDC; acquiring the number of processed video requests of each IDC at the current moment; determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in each IDC as a target IDC; acquiring a video server with a target video stored in a target IDC as a target video server; and the identification information of the target video server is returned to the client equipment, so that the client equipment sends a video request aiming at the target video to the target video server according to the identification information, and the rationality of IDC resource utilization is improved.

Description

Video request scheduling method, device, server and storage medium
Technical Field
The present invention relates to the technical field of a video Content Delivery Network (CDN), and in particular, to a method, an apparatus, a server, and a storage medium for scheduling a video request.
Background
A video Content Delivery Network (CDN) deploys a large number of video servers in different areas to provide video services for users nearby. When a large number of users request video content, a scheduler needs to decide how to select a suitable server from hundreds of video servers to provide video services for the users, and video request scheduling refers to selecting a suitable IDC from a plurality of Data Center rooms (IDCs) and distributing a video request to a video server in the selected IDC.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a conventional video content distribution network system, which includes: client device 100, scheduling server 110, IDC120, and video servers in IDC 120. The existing video request scheduling method comprises the following steps: according to the difference of the exit bandwidths of the IDCs 120, different weight ratios are set for the IDCs 120, when the client device 100 sends a video scheduling request for a target video to the scheduling server 110, the scheduling server 110 selects the IDC with the smallest ratio of the number of processed requests at the current time to the weight values in the IDCs 120, determines the target video server storing the target video from the IDC, and returns the identification information of the target video server to the client device 100, so that the client device 100 sends the video request for the target video to the target video server.
The scheduling process mainly starts from the view point of the number of the video requests, the video requests are distributed to the IDCs with the minimum ratio of the number of the processed requests to the weight value, the weight value is determined only according to the resources such as IDC outlet bandwidth, and the conditions of other resources in the IDCs are not considered, so that the problem of unreasonable resource utilization exists.
Disclosure of Invention
The embodiment of the invention aims to provide a video request scheduling method, a video request scheduling device, a video request scheduling server and a storage medium, so as to improve the rationality of IDC resource utilization. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for scheduling a video request, including:
receiving a video scheduling request aiming at a target video sent by client equipment;
acquiring a first weight of each IDC, wherein the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, the ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio;
acquiring a second weight of each IDC, wherein the second weight is determined according to the storage resource information of each IDC, and the ratio of the second weight of each IDC to the storage resource of each IDC is a second preset ratio for each IDC;
obtaining a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight is increased when the first weight or the second weight is increased;
acquiring the number of processed video requests of each IDC at the current moment;
determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in the IDCs as a target IDC;
acquiring a video server in which the target video is stored in the target IDC as a target video server;
and returning the identification information of the target video server to the client device, so that the client device sends a video request aiming at the target video to the target video server according to the identification information.
Further, before the step of obtaining the second weight of each IDC, the method further includes:
acquiring the category of the target video determined based on the historical popularity information of the video, wherein the category of the video comprises: the historical popularity information represents the frequency of video requests in a specified historical time period;
judging whether the category of the target video is a cold video;
the step of obtaining the second weight of each IDC includes:
and if the type of the target video is the cold video, acquiring a second weight of each IDC.
Further, after the determining whether the category of the target video is a cold video, the method further includes:
and if the type of the target video is a non-cold video, determining that the second weights of the IDCs are all equal.
Further, before the step of obtaining the scheduling weight of each IDC based on the first weight and the second weight of each IDC, the method further includes:
acquiring a third weight of each IDC, wherein the third weight is determined according to the data processing capability of each IDC, and the ratio of the third weight of each IDC to the data processing capability of each IDC is a third preset ratio;
the step of obtaining the scheduling weight of each IDC based on the first weight and the second weight of each IDC includes:
and obtaining a scheduling weight of each IDC based on the first weight, the second weight and the third weight of each IDC, so that when any one of the first weight, the second weight and the third weight is increased, the scheduling weight is increased.
Further, the video scheduling request includes type information of the client device;
prior to the step of obtaining the third weight for each IDC, the method further comprises:
judging whether the type of the client equipment is a television end or not;
the step of obtaining the third weight of each IDC includes:
and if the type of the client equipment is a television terminal, acquiring a third weight of each IDC.
Further, after the determining whether the type of the client device is a television terminal, the method further includes:
and if the type of the client equipment is not the television end, determining that the third weights of the IDCs are all equal.
Further, the step of obtaining the first weight of each IDC includes: determining a first weight of each IDC according to a proportional relation between bandwidth resources of each IDC and the first preset ratio;
the obtaining the second weight of each IDC includes: determining a second weight of each IDC according to the proportional relation between the storage resources of each IDC and the second preset ratio;
the step of obtaining the third weight of each IDC includes: and determining a third weight of each IDC according to the proportional relation among the data processing capacities of the IDCs and the third preset ratio.
In a second aspect, an embodiment of the present invention provides a video request scheduling method, which is applied to a video content distribution network system, where the system includes: the system comprises a scheduling server, client equipment and a plurality of data center machine rooms IDC, wherein each IDC comprises a plurality of video servers; the method comprises the following steps:
the client equipment sends a video scheduling request aiming at a target video to the scheduling server;
the scheduling server acquires a first weight of each IDC, the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, the ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio;
the scheduling server acquires a second weight of each IDC, the second weight is determined according to the storage resource information of each IDC, and for each IDC, the ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio;
the scheduling server obtains a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight is increased when the first weight or the second weight is increased;
the scheduling server acquires the number of the processed video requests of the IDCs at the current moment;
the scheduling server determines the IDC with the minimum ratio of the number of the processed video requests at the current moment in the IDCs to the scheduling weight as a target IDC;
the scheduling server obtains a video server in the target IDC, wherein the target video is stored in the video server, and the video server is used as a target video server;
and the scheduling server returns the identification information of the target video server to the client equipment so that the client equipment sends a video request aiming at the target video to the target video server according to the identification information.
Further, the video content distribution network system further includes: a central control server;
before the step of the scheduling server obtaining the second weight of each IDC, the method further includes:
the scheduling server acquires the category of the target video determined based on the historical popularity information of the video from the central control server, wherein the category of the video comprises: the historical popularity information represents the frequency of video requests in a specified historical time period;
the scheduling server judges whether the category of the target video is a cold video;
the step of the scheduling server obtaining the second weight of each IDC includes:
and if the type of the target video is the cold video, the scheduling server acquires a second weight of each IDC.
In a third aspect, an embodiment of the present invention provides a video request scheduling apparatus, including:
the video scheduling request receiving module is used for receiving a video scheduling request aiming at a target video, which is sent by client equipment;
a first weight obtaining module, configured to obtain a first weight of each IDC, where the first weight is determined according to bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio;
a second weight obtaining module, configured to obtain a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio;
a scheduling weight determining module, configured to obtain a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that when the first weight or the second weight is increased, the scheduling weight is increased;
the video request quantity acquisition module is used for acquiring the quantity of the video requests processed by the IDCs at the current moment;
a target IDC determining module, configured to determine an IDC with a smallest ratio between the number of processed video requests at the current time and the scheduling weight among the IDCs as a target IDC;
a target video server obtaining module, configured to obtain a video server in the target IDC, where the target video is stored, as a target video server;
and the identification information returning module is used for returning the identification information of the target video server to the client equipment so that the client equipment sends a video request aiming at the target video to the target video server according to the identification information.
Further, the apparatus further includes: the device comprises a target video category acquisition module and a first judgment module;
the target video category obtaining module is configured to obtain a category of the target video determined based on historical popularity information of the video before obtaining the second weight of each IDC, where the category of the video includes: the historical popularity information represents the frequency of video requests in a specified historical time period;
the first judging module is used for judging whether the category of the target video is a cold video or not;
the second weight obtaining module is specifically configured to obtain a second weight of each IDC if the type of the target video is a cold video.
Further, the apparatus further includes: a second weight determination module;
and the second weight determining module is configured to determine that the second weights of the IDCs are all equal if the type of the target video is a non-cold video after the determination of whether the type of the target video is a cold video.
Further, the apparatus further includes: a third weight obtaining module;
the third weight obtaining module is configured to obtain a third weight of each IDC before the scheduling weight of each IDC is obtained based on the first weight and the second weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of each IDC to the data processing capability of the IDC is a third preset ratio;
the scheduling weight determining module is specifically configured to obtain the scheduling weight of each IDC based on the first weight, the second weight, and the third weight of each IDC, so that when any one of the first weight, the second weight, and the third weight is increased, the scheduling weight is increased.
Further, the video scheduling request includes type information of the client device;
the device, still include: a second judgment module;
the second judging module is configured to judge whether the type of the client device is a television side before the third weight of each IDC is obtained;
the third weight obtaining module is specifically configured to obtain a third weight of each IDC if the type of the client device is a television terminal.
Further, the apparatus further includes: a third weight determination module;
and the third weight determining module is configured to determine that the third weights of the IDCs are all equal if the type of the client device is not a tv end after the determination of whether the type of the client device is the tv end.
Further, the first weight obtaining module is specifically configured to determine a first weight of each IDC according to a proportional relationship between bandwidth resources of each IDC and the first preset ratio;
the second weight obtaining module is specifically configured to determine a second weight of each IDC according to a proportional relationship between storage resources of each IDC and the second preset ratio;
the third weight obtaining module is specifically configured to determine a third weight of each IDC according to a proportional relationship between data processing capabilities of each IDC and the third preset ratio.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of any video request scheduling method when executing the program stored in the memory.
In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute any one of the video request scheduling methods described above.
In a sixth aspect, embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to execute any one of the video request scheduling methods described above.
The embodiment of the invention provides a video request scheduling method, a video request scheduling device, a server and a storage medium, wherein the scheduling server receives a video scheduling request aiming at a target video, which is sent by a client; acquiring a first weight and a second weight of each IDC; obtaining the scheduling weight of each IDC based on the first weight and the second weight of each IDC; acquiring the number of processed video requests of each IDC at the current moment; determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in each IDC as a target IDC; acquiring a video server with a target video stored in a target IDC as a target video server; and returning the identification information of the target video server to the client so that the client sends a video request aiming at the target video to the target video server according to the identification information.
In the embodiment of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to not only bandwidth resource information of each IDC, but also bandwidth resource information of each IDC and storage resource information of each IDC, and when the bandwidth resource or the storage resource increases, the scheduling weight increases, and further determines an IDC with the smallest ratio of the number of processed video requests at the current time to the scheduling weight in each IDC as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC and the storage resources and bandwidth resources of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic structural diagram of a conventional video content distribution network system;
fig. 2 is a schematic flowchart of a video request scheduling method according to an embodiment of the present invention;
fig. 3 is another schematic flow chart of a video request scheduling method according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a video request scheduling method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of a video request scheduling method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of a video request scheduling method according to an embodiment of the present invention;
fig. 7 is a schematic flowchart of a video request scheduling method according to an embodiment of the present invention;
fig. 8 is a schematic flowchart of a video request scheduling method according to an embodiment of the present invention;
fig. 9 is an interaction flowchart of a specific example of a video request scheduling method according to an embodiment of the present invention.
Fig. 10 is a schematic structural diagram of a video request scheduling apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to improve the rationality of IDC resource utilization, the embodiment of the invention provides a video request scheduling method, a video request scheduling device, a server and a storage medium.
Referring to fig. 2, fig. 2 is a schematic flow chart of a video request scheduling method according to an embodiment of the present invention, which specifically includes the following steps:
step 201, receiving a video scheduling request for a target video sent by a client device.
Specifically, due to the difference in video quality and format, a plurality of video files may exist for the same video content, and each video file is generally divided into a plurality of video segments, so that a video scheduling request sent by a client device may be for a specific target video segment. Here, the specific form of the target video to which the video scheduling request is directed is not limited.
Step 202, obtaining a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Specifically, the first weight is a weight representing IDC bandwidth resources, and when the first weight is determined, the first weight may be determined according to pre-stored initial bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the initial bandwidth resource of the IDC is a certain preset ratio; the first weight of the IDC is determined according to the current available bandwidth resource information of the IDC, and for each IDC, the ratio of the first weight of the IDC to the bandwidth resource of the IDC is a preset ratio. The current available bandwidth resource information of each IDC may be obtained by the following method:
the method comprises the steps of obtaining the total amount of video data sent by various video servers of the IDCs in a certain small time period before the current time according to access logs of the video servers in the IDCs, determining the ratio of the total amount of the video data sent by the IDCs to the small time period as the information of the used bandwidth resources of the IDCs at the current time, and taking the difference value of the initial bandwidth resource information of the IDCs and the information of the used bandwidth resources of the IDCs at the current time as the information of the current available bandwidth resources of the IDCs.
Step 203, obtaining a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio.
When the storage space of the video server is small, the locally stored video data may be limited, and the locally stored video data is generally video data requested a large number of times within a certain time period in history. If the video data requested by the client device is requested less frequently or has not been requested in the historical time period, at this time, the video server needs to delete a part of the video data in the local disk to store the video data requested by the client device and acquired from other video servers, and if the video data requested less frequently or have not been requested frequently in the historical time period is scheduled to the video server with a smaller storage space, the load of the video server is increased.
Therefore, in the process of calculating the scheduling weight of each IDC, a second weight representing the weight of the storage resource can be introduced, and the video request is preferentially scheduled to the IDC with larger storage resource on the premise of considering the number of the processed video requests and the bandwidth resource, so that the rationality of IDC resource utilization can be improved.
Specifically, when the second weight is determined, the second weight may be determined according to pre-stored initial storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio.
And 204, obtaining the scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight is increased when the first weight or the second weight is increased.
Step 205, acquiring the number of processed video requests of each IDC at the current moment.
The method for acquiring the number of processed video requests of each IDC at the current time may be: and counting the total number of the video requests processed by all the video servers in each IDC at the current moment according to the access log of the video servers in each IDC, and taking the total number as the number of the video requests processed by each IDC at the current moment.
And step 206, determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in each IDC as the target IDC.
For example, for X, Y and three IDCs Z, the scheduling weights are 1, 2, and 3 in turn, and the number of video requests processed by each IDC at the current time is: 40. 100, and 210, at this time, since the ratio of the number of processed video requests to the scheduling weight of X is the minimum, 40, X is determined as the target IDC.
And step 207, acquiring a video server with the target video stored in the target IDC as the target video server.
Specifically, the target video server storing the target video can be determined from the target IDC according to the identification information of the target video. For example, the identification information of the target video may be a unique identifier (URI) determined according to the content, format, quality, and the like of the target video segment, and generally, when video data is stored, hash conversion may be performed on the URI of each video segment and the address information of each video server in the IDC to obtain a hash value of each video segment URI and a hash value of each video server address information, and for a certain specified video segment, a video server whose address information hash value is closest to the hash value of the specified video segment URI is determined from each video server, and then the specified video segment is stored in the video server.
Step 208, returning the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
The video request scheduling method in the above embodiment may be applied to a scheduling server in the video content distribution network system shown in fig. 1.
As can be seen from the foregoing embodiments, in the embodiments of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to not only bandwidth resource information of each IDC, but also bandwidth resource information of each IDC and storage resource information of each IDC, and when bandwidth resources or storage resources are increased, the scheduling weight is increased, and an IDC with the smallest ratio of the number of video requests processed at the current time to the scheduling weight in each IDC is determined as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC and the storage resources and bandwidth resources of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Referring to fig. 3, fig. 3 is another schematic flow chart of a video request scheduling method according to an embodiment of the present invention, which specifically includes the following steps:
step 301, receiving a video scheduling request for a target video sent by a client device.
Step 302, obtaining a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 303, obtaining a category of a target video determined based on historical popularity information of the video, where the category of the video includes: cold video and non-cold video, and the historical popularity information is information representing how often videos are requested within a specified historical period of time.
Step 304, judging whether the category of the target video is a cold video. If yes, go to step 305, otherwise go to step 306.
Step 305, obtaining a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio. Thereafter, step 307 is performed.
Step 306, determining that the second weights of the IDCs are all equal.
Step 307, obtaining a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight increases when the first weight or the second weight increases.
And 308, acquiring the number of the processed video requests of each IDC at the current moment.
Step 309, determining the IDC with the minimum ratio of the number of processed video requests at the current time to the scheduling weight in each IDC as the target IDC.
And step 310, obtaining a video server with the target video stored in the target IDC as the target video server.
Step 311, returning the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
Steps 307 to 311 are the same as steps 204 to 208, and are not described herein again.
As can be seen from the foregoing embodiments, in the embodiments of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to not only bandwidth resource information of each IDC, but also bandwidth resource information of each IDC and storage resource information of each IDC, and when bandwidth resources or storage resources are increased, the scheduling weight is increased, and an IDC with the smallest ratio of the number of video requests processed at the current time to the scheduling weight in each IDC is determined as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC and the storage resources and bandwidth resources of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of another video request scheduling method according to an embodiment of the present invention, which specifically includes the following steps:
step 401, receiving a video scheduling request for a target video sent by a client device.
Step 402, obtaining a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 403, obtaining a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio.
Step 404, obtaining a third weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of the IDC to the data processing capability of the IDC is a third preset ratio.
Specifically, the third weight of each IDC may be determined according to a proportional relationship between data processing capabilities of each IDC, for example, a proportional value of a computational resource of each IDC, and a third preset ratio.
Step 405, obtaining a scheduling weight of each IDC based on the first weight, the second weight, and the third weight of each IDC, such that when any one of the first weight, the second weight, and the third weight is increased, the scheduling weight is increased.
Step 406, obtaining the number of processed video requests of each IDC at the current time.
Step 407, the IDC with the minimum ratio of the number of processed video requests at the current time to the scheduling weight in each IDC is determined as the target IDC.
And step 408, acquiring a video server with the target video stored in the target IDC as the target video server.
Step 409, returning the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
As can be seen from the embodiment shown in fig. 4, in the embodiment of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to bandwidth resource information of each IDC, storage resource information of each IDC, and data processing capability of each IDC, and when the bandwidth resource or the storage resource increases, the scheduling weight increases, and further determines an IDC with the smallest ratio of the number of processed video requests in each IDC to the scheduling weight as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC, the storage resources, bandwidth resources and data processing capacity of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Referring to fig. 5, fig. 5 is a schematic flowchart of another video request scheduling method according to an embodiment of the present invention, which specifically includes the following steps:
step 501, receiving a video scheduling request for a target video sent by a client device.
The video scheduling request comprises type information of the client device.
For video requests sent by different types of client devices, the formats of video data returned by the video server are different, and therefore, the processing flows of the video server are also different. For example, for a video request sent by a television, video data returned by a video server should be video data in a TS format, after receiving the video request sent by the television, the video server needs to first determine whether the requested video data is already stored locally, if so, the video data is directly returned, if not, it needs to query whether video data in an F4V format corresponding to the video data in the TS format exists locally, and if so, the video data in the F4V format needs to be transcoded into video data in the TS format and then returned to the client device, so that the occupancy rate on computing resources of the video server is increased.
Therefore, the video scheduling request for the target video sent by the client device may further include type information of the client device, for example, the type of the client device is a television side, or a non-television side, so that the scheduling server performs reasonable request scheduling according to the type of the client device.
Step 502, obtaining a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 503, obtaining a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio.
Step 504, determine whether the type of the client device is a tv. If yes, go to step 505, otherwise go to step 506.
Step 505, obtaining a third weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of the IDC to the data processing capability of the IDC is a third preset ratio. Thereafter, step 507 is performed.
As described in step 501, when the type of the client device is a tv end, the video server may need to perform transcoding operation for a video request sent by the tv end, and then the occupancy rate of the computational resource of the video server may be increased, so that a third weight representing the size of the computational resource of each IDC may be introduced into each IDC scheduling weight, and the video request is preferentially scheduled to an IDC with stronger data processing capability, so as to improve the rationality of IDC computational resource utilization.
The data processing capability can be characterized by configuration parameters such as the number of central processing units of each IDC video server.
Step 506, determining that the third weights of the IDCs are all equal.
Step 507, obtaining a scheduling weight of each IDC based on the first weight, the second weight and the third weight of each IDC, so that the scheduling weight increases when any one of the first weight, the second weight and the third weight increases.
And step 508, acquiring the number of the processed video requests of each IDC at the current moment.
In step 509, the IDC with the minimum ratio of the number of processed video requests to the scheduling weight in each IDC is determined as the target IDC.
And step 510, obtaining a video server with the target video stored in the target IDC as the target video server.
Step 511, returning the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
As can be seen from the embodiment shown in fig. 5, in the embodiment of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to bandwidth resource information of each IDC, storage resource information of each IDC, and data processing capability of each IDC, and when bandwidth resources or storage resources are increased, the scheduling weight is increased, and further, an IDC with the smallest ratio of the number of processed video requests in each IDC to the scheduling weight is determined as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC, the storage resources, bandwidth resources and data processing capacity of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Referring to fig. 6, fig. 6 is a schematic flowchart of another video request scheduling method according to an embodiment of the present invention, which specifically includes the following steps:
step 601, receiving a video scheduling request for a target video sent by a client device.
Step 602, obtaining a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 603, obtaining a category of a target video determined based on historical popularity information of the video, wherein the category of the video comprises: cold video and non-cold video, and the historical popularity information is information representing how often videos are requested within a specified historical period of time.
Step 604, determine whether the category of the target video is a cold video. If yes, go to step 605, otherwise go to step 606.
Step 605, obtaining a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio. Thereafter, step 607 is performed.
Step 606, determining that the second weights of the IDCs are all equal.
Step 607, obtaining a third weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of the IDC to the data processing capability of the IDC is a third preset ratio.
Step 608, obtaining a scheduling weight of each IDC based on the first weight, the second weight, and the third weight of each IDC, so that the scheduling weight increases when any one of the first weight, the second weight, and the third weight increases.
And step 609, acquiring the number of the processed video requests of each IDC at the current moment.
And step 610, determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in each IDC as the target IDC.
Step 611, obtain the video server with the target video stored in the target IDC as the target video server.
Step 612, returning the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
As can be seen from the embodiment shown in fig. 6, in the embodiment of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to bandwidth resource information of each IDC, storage resource information of each IDC, and data processing capability of each IDC, and when bandwidth resources or storage resources are increased, the scheduling weight is increased, and further, an IDC with the smallest ratio of the number of processed video requests in each IDC to the scheduling weight is determined as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC, the storage resources, bandwidth resources and data processing capacity of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Referring to fig. 7, fig. 7 is a schematic flowchart of another video request scheduling method according to an embodiment of the present invention, which specifically includes the following steps:
step 701, receiving a video scheduling request for a target video sent by a client device.
The video scheduling request comprises type information of the client device.
Step 702, obtaining a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 703, obtaining a category of a target video determined based on the historical popularity information of the video, where the category of the video includes: cold video and non-cold video, and the historical popularity information is information representing how often videos are requested within a specified historical period of time.
Step 704, determine whether the category of the target video is a cold video. If yes, go to step 705, otherwise go to step 706.
Step 705, obtaining a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio. Thereafter, step 707 is executed.
Step 706, determining that the second weights of the IDCs are all equal.
Step 707, determine whether the type of the client device is a tv. If yes, go to step 708, otherwise go to step 709.
Step 708, obtaining a third weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of the IDC to the data processing capability of the IDC is a third preset ratio. Thereafter, step 710 is performed.
Step 709, determining that the third weights of the IDCs are all equal.
Step 710, obtaining a scheduling weight of each IDC based on the first weight, the second weight, and the third weight of each IDC, such that when any one of the first weight, the second weight, and the third weight is increased, the scheduling weight is increased.
Step 711, obtaining the number of processed video requests of each IDC at the current time.
And step 712, determining the IDC with the minimum ratio of the number of processed video requests at the current time to the scheduling weight in each IDC as the target IDC.
And 713, acquiring a video server with the target video stored in the target IDC as the target video server.
Step 714, returning the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
As can be seen from the embodiment shown in fig. 7, in the embodiment of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to bandwidth resource information of each IDC, storage resource information of each IDC, and data processing capability of each IDC, and when bandwidth resources or storage resources are increased, the scheduling weight is increased, and further, an IDC with the smallest ratio of the number of processed video requests in each IDC to the scheduling weight is determined as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC, the storage resources, bandwidth resources and data processing capacity of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
The video request scheduling method in the embodiments shown in fig. 2 to fig. 7 can be applied to a scheduling server in the video content distribution network system shown in fig. 1.
Further, a central control server may be added to the video content distribution network system shown in fig. 1, referring to fig. 8, fig. 8 is a schematic flow chart of the video request scheduling method applied to the video content distribution network system according to the embodiment of the present invention, where the system includes: the system comprises a scheduling server, a central control server, client equipment and a plurality of data center machine rooms IDCs (Internet data centers), wherein each IDC comprises a plurality of video servers, and the method specifically comprises the following steps:
in step 801, a client device sends a video scheduling request for a target video to a scheduling server.
Step 802, the scheduling server obtains a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 803, the scheduling server obtains the category of the target video determined based on the historical popularity information of the video from the central server, and the category of the video includes: cold video and non-cold video, and the historical popularity information is information representing how often videos are requested within a specified historical period of time.
In step 804, the scheduling server determines whether the type of the target video is a cold video, and if so, executes step 805.
And if the type of the target video is the non-cold video, determining that the second weights of the IDCs are equal, namely setting the second weights of the IDCs to a certain preset value. Thereafter, step 805 is performed.
Step 805, the scheduling server obtains a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio.
In step 806, the scheduling server obtains a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight increases when the first weight or the second weight increases.
In step 807, the scheduling server obtains the number of processed video requests of each IDC at the current time.
Step 808, the scheduling server determines the IDC with the minimum ratio of the number of processed video requests at the current time to the scheduling weight among the IDCs as the target IDC.
And step 809, the scheduling server obtains the video server with the target video stored in the target IDC as the target video server.
Step 810, the scheduling server returns the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
As can be seen from the embodiment shown in fig. 8, in the embodiment of the present invention, when receiving a video scheduling request sent by a client, a scheduling server determines a scheduling weight of each IDC according to not only bandwidth resource information of each IDC, but also bandwidth resource information of each IDC and storage resource information of each IDC, and when bandwidth resources or storage resources are increased, the scheduling weight is increased, and an IDC with the smallest ratio of the number of video requests processed at the current time to the scheduling weight in each IDC is determined as a target IDC, that is: in the scheduling process, the number of processed video requests of each IDC and the storage resources and bandwidth resources of each IDC are considered at the same time, so that the rationality of IDC resource utilization is improved.
Referring to fig. 9, in order to embody a detailed interaction flow among each device in a video content distribution network system with a central control server added, fig. 9 is a specific example interaction flow chart of a video request scheduling method provided by an embodiment of the present invention, and the specific steps include:
in step 900, the central control server periodically sends video classification information, which is determined in advance according to historical popularity information based on videos, to the scheduling server.
Wherein the categories of videos include: cold videos and non-cold videos.
Historical popularity information is information that characterizes how often video is requested within a specified historical period of time.
In this step, the process of determining the historical popularity information of the video may include the following steps:
acquiring the total number of video requests corresponding to each video in a preset historical time period from a plurality of video servers;
and determining the historical popularity of the videos according to the size sequence of the total number of the video requests corresponding to the videos.
Specifically, videos whose historical popularity exceeds a certain popularity threshold may be determined as non-cold videos, and videos whose historical popularity is lower than or equal to the popularity threshold may be determined as cold videos.
In step 901, a client device sends a video scheduling request of a target video to a scheduling server.
For video requests sent by different types of client devices, the formats of video data returned by the video server are different, and therefore, the processing flows of the video server are also different. The video scheduling request for the target video sent by the client device may further include type information of the client device, for example, the type of the client device is a television side or a non-television side, so that the scheduling server performs reasonable request scheduling according to the type of the client device.
Step 902, the scheduling server obtains a first weight of each IDC, where the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio.
Step 903, the scheduling server determines the category of the target video according to the video classification information. When the category of the target video is the cold video, executing step 904; when the category of the target video is a non-cold video, step 905 is performed.
Step 904, the scheduling server obtains a second weight of each IDC, the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio. Thereafter, step 906 is performed.
Step 905, the scheduling server sets the second weight of each IDC to a first preset value.
Step 906, the scheduling server determines whether the type of the client device is a television. If yes, go to step 907, otherwise go to step 908.
Step 907, the scheduling server obtains a third weight of each IDC, where the third weight is determined according to the calculation resource information of each IDC, and for each IDC, a ratio of the third weight of the IDC to the data processing capability of the IDC is a third preset ratio. Thereafter, step 909 is executed.
Step 908, the scheduling server sets the third weight of each IDC to a second preset value.
In step 909, the scheduling server determines the product of the first weight of each IDC, the second weight of each IDC, and the third weight of each IDC as the scheduling weight of each IDC.
Step 910, the scheduling server obtains the number of processed video requests of each IDC at the current time.
Step 911, the scheduling server determines the IDC with the minimum ratio of the number of processed video requests at the current time to the scheduling weight among the IDCs as the target IDC.
In step 912, the scheduling server obtains the video server with the target video stored in the target IDC as the target video server.
Step 913, the scheduling server returns the identification information of the target video server to the client device.
In step 914, the client device sends a video request for the target video to the target video server according to the identification information.
In the embodiment of the present invention shown in fig. 9, when the scheduling server receives a video scheduling request sent by a client and determines the scheduling weight of each IDC, bandwidth resource information, storage resource information, and data processing capability of each IDC are considered at the same time, so that when any one of the bandwidth resource, the storage resource, and the data processing capability is increased, the scheduling weight is increased, and the IDC having the smallest ratio of the number of video requests processed at the current time to the scheduling weight in each IDC is determined as a target IDC, so that the client device sends a video request for a target video to the target video server storing the target video. Therefore, the rationality of IDC resource utilization is further improved.
For ease of understanding, the video request scheduling method shown in fig. 9 is explained below by way of example:
in step 900, the central server may periodically obtain a historical viewing record for a certain historical time period (e.g., three days, one week, etc.) from the video server of each IDC, where the historical viewing record includes user identification information, a video URI requested by the user, and video downloading speed, etc.
And the central control server determines the historical popularity information of each video watched by each user in the time period according to the historical watching records, sorts the videos according to the sequence of the historical popularity from small to large, determines the top N-bit videos as cold videos, and sends the video name list of the top N-bit videos as video classification information to the scheduling server.
Specifically, the historical popularity information of each video may be determined as follows: the total number of video requests corresponding to each video can be determined, and then the total number is determined as the historical popularity of each video, and the more the total number of video requests is, the higher the historical popularity of the video is.
In steps 901 to 902, the client device sends a video scheduling request including client device type information to the scheduling server, and the scheduling server obtains a first weight representing bandwidth resource information of each IDC, for example, for X, Y and three IDCs Z, bandwidth resources are in turn: 100G, 80G, and 50G, the first weight of X may be: 10, the first weight of Y may be: 8, the first weight of Z may be: 5.
in steps 903 to 909, the scheduling server determines the category of the target video from the video name list of the top N-bit video received from the central server. Assume that the target video is a cold video, and the storage space of X, Y and Z is in turn: 240T, and 120T, the obtained X, Y and Z have two weights: 2. 2 and 1, assume that the type of the client device is tv, and the numbers of central processing units X, Y and Z are: 240. 160 and 120, the two weights obtained at X, Y and Z are: 6. 4 and 3, therefore, the scheduling weights of the IDCs can be determined as follows: 10 x 2 x 6, 8 x 2 x 4 and 5 x 1 x 3, namely: 180. 64 and 15.
In steps 910 to 914, it is assumed that the numbers of video requests that have been processed respectively at current time X, Y and Z are: 10. 11 and 12, since the ratio of the number of processed video requests of X to the scheduling weight is minimum, X can be determined as a target IDC, and then the video server in which the target video is stored in X is determined as a target video server, thereby completing the video request scheduling.
Based on the same inventive concept, according to the video request scheduling method provided by the foregoing embodiment of the present invention, correspondingly, an embodiment of the present invention further provides a video request scheduling apparatus, a schematic structural diagram of the apparatus is shown in fig. 10, and the apparatus includes:
a video scheduling request receiving module 1001, configured to receive a video scheduling request for a target video sent by a client device;
a first weight obtaining module 1002, configured to obtain a first weight of each IDC, where the first weight is determined according to bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio;
a second weight obtaining module 1003, configured to obtain a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio;
a scheduling weight determining module 1004, configured to obtain a scheduling weight of each IDC by using a preset algorithm based on the first weight and the second weight of each IDC, so that the scheduling weight increases when the first weight or the second weight increases;
a video request number obtaining module 1005, configured to obtain the number of video requests processed by each IDC at the current time;
a target IDC determining module 1006, configured to determine, as a target IDC, an IDC at which a ratio between the number of processed video requests at a current time and the scheduling weight is smallest in each IDC;
a target video server obtaining module 1007, configured to obtain a video server in which a target video is stored in the target IDC, and use the video server as the target video server;
an identification information returning module 1008, configured to return the identification information of the target video server to the client device, so that the client device sends a video request for the target video to the target video server according to the identification information.
Further, the apparatus further comprises:
the device comprises a target video category acquisition module and a first judgment module;
a target video category obtaining module, configured to obtain a category of a target video determined based on historical popularity information of the video before obtaining the second weight of each IDC, where the category of the video includes: the historical popularity information represents the frequency of video requests in a specified historical time period;
the first judgment module is used for judging whether the category of the target video is a cold video or not;
the second weight obtaining module 1003 is specifically configured to obtain a second weight of each IDC, if the type of the target video is a cold video.
Further, the apparatus further comprises: a second weight determination module;
and the second weight determining module is used for determining that the second weights of the IDCs are all equal if the type of the target video is the non-cold video after judging whether the type of the target video is the cold video.
Further, the apparatus further comprises:
a third weight obtaining module;
a third weight obtaining module, configured to obtain a third weight of each IDC before obtaining a scheduling weight of each IDC based on the first weight and the second weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of the IDC to the data processing capability of the IDC is a third preset ratio;
the scheduling weight determining module 1004 is specifically configured to obtain a scheduling weight of each IDC based on the first weight, the second weight, and the third weight of each IDC, so that the scheduling weight increases when any one of the first weight, the second weight, and the third weight increases.
Further, the video scheduling request includes type information of the client device;
the device, still include: a second judgment module;
the second judging module is used for judging whether the type of the client equipment is a television terminal or not before acquiring the third weight of each IDC;
and the third weight obtaining module is specifically configured to obtain a third weight of each IDC if the type of the client device is a television terminal.
Further, the apparatus further comprises: a third weight determination module;
and the third weight determining module is used for determining that the third weights of the IDCs are equal if the type of the client equipment is not the television end after judging whether the type of the client equipment is the television end.
Further, the first weight obtaining module is specifically configured to determine a first weight of each IDC according to a proportional relationship between bandwidth resources of each IDC and a first preset ratio;
a second weight obtaining module 1003, configured to determine a second weight of each IDC according to a proportional relationship between storage resources of each IDC and a second preset ratio;
and the third weight acquisition module is specifically used for determining the third weight of each IDC according to the proportional relation between the data processing capabilities of each IDC and a third preset ratio.
The embodiment of the present invention further provides a server, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102 and the memory 1103 complete mutual communication through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the following steps when executing the program stored in the memory 1103:
receiving a video scheduling request aiming at a target video sent by client equipment;
acquiring a first weight of each IDC, wherein the first weight is determined according to the bandwidth resource information of each IDC, and the ratio of the first weight of each IDC to the bandwidth resource of each IDC is a first preset ratio;
acquiring a second weight of each IDC, wherein the second weight is determined according to the storage resource information of each IDC, and the ratio of the second weight of each IDC to the storage resource of each IDC is a second preset ratio for each IDC;
obtaining a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight is increased when the first weight or the second weight is increased;
acquiring the number of processed video requests of each IDC at the current moment;
determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in each IDC as a target IDC;
acquiring a video server with a target video stored in a target IDC as a target video server;
and returning the identification information of the target video server to the client equipment so that the client equipment sends a video request aiming at the target video to the target video server according to the identification information.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment of the present invention, a computer-readable storage medium is further provided, which has instructions stored therein, and when the instructions are executed on a computer, the instructions cause the computer to execute the video request scheduling method described in any of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the video request scheduling method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the server and the storage medium embodiments, since they are basically similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (18)

1. A method for scheduling video requests, comprising:
receiving a video scheduling request aiming at a target video sent by client equipment;
acquiring a first weight of each IDC, wherein the first weight is determined according to the bandwidth resource information of each IDC, and the ratio of the first weight of each IDC to the bandwidth resource of each IDC is a first preset ratio;
acquiring a second weight of each IDC, wherein the second weight is determined according to the storage resource information of each IDC, and the ratio of the second weight of each IDC to the storage resource of each IDC is a second preset ratio for each IDC;
obtaining a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight is increased when the first weight or the second weight is increased;
acquiring the number of processed video requests of each IDC at the current moment;
determining the IDC with the minimum ratio of the number of processed video requests at the current moment to the scheduling weight in the IDCs as a target IDC;
acquiring a video server in which the target video is stored in the target IDC as a target video server;
and returning the identification information of the target video server to the client device, so that the client device sends a video request aiming at the target video to the target video server according to the identification information.
2. The method according to claim 1, wherein prior to the step of obtaining the second weight for each IDC, the method further comprises:
determining the category of the target video based on the historical popularity information of the video, wherein the category of the video comprises: the historical popularity information represents the frequency of video requests in a specified historical time period;
judging whether the category of the target video is a cold video;
the step of obtaining the second weight of each IDC includes:
and if the type of the target video is the cold video, acquiring a second weight of each IDC.
3. The method of claim 2, wherein after said determining whether the category of the target video is a cold video, the method further comprises:
and if the type of the target video is a non-cold video, determining that the second weights of the IDCs are all equal.
4. A method according to any of claims 1-3, wherein prior to the step of deriving the scheduling weight for each IDC based on the first weight and the second weight for each IDC, the method further comprises:
acquiring a third weight of each IDC, wherein the third weight is determined according to the data processing capability of each IDC, and the ratio of the third weight of each IDC to the data processing capability of each IDC is a third preset ratio;
the step of obtaining the scheduling weight of each IDC based on the first weight and the second weight of each IDC includes:
and obtaining a scheduling weight of each IDC based on the first weight, the second weight and the third weight of each IDC, so that when any one of the first weight, the second weight and the third weight is increased, the scheduling weight is increased.
5. The method of claim 4, wherein the video scheduling request includes type information of the client device;
prior to the step of obtaining the third weight for each IDC, the method further comprises:
judging whether the type of the client equipment is a television end or not;
the step of obtaining the third weight of each IDC includes:
and if the type of the client equipment is a television terminal, acquiring a third weight of each IDC.
6. The method of claim 5, wherein after the determining whether the type of the client device is television, the method further comprises:
and if the type of the client equipment is not the television end, determining that the third weights of the IDCs are all equal.
7. The method of claim 5,
the step of obtaining the first weight of each IDC includes: determining a first weight of each IDC according to a proportional relation between bandwidth resources of each IDC and the first preset ratio;
the obtaining the second weight of each IDC includes: determining a second weight of each IDC according to the proportional relation between the storage resources of each IDC and the second preset ratio;
the step of obtaining the third weight of each IDC includes: and determining a third weight of each IDC according to the proportional relation among the data processing capacities of the IDCs and the third preset ratio.
8. A video request scheduling method is applied to a video content distribution network system, and the video content distribution network system comprises: the system comprises a scheduling server, client equipment and a plurality of data center machine rooms IDC, wherein each IDC comprises a plurality of video servers; the method comprises the following steps:
the client equipment sends a video scheduling request aiming at a target video to the scheduling server;
the scheduling server acquires a first weight of each IDC, the first weight is determined according to the bandwidth resource information of each IDC, and for each IDC, the ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio;
the scheduling server acquires a second weight of each IDC, the second weight is determined according to the storage resource information of each IDC, and for each IDC, the ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio;
the scheduling server obtains a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that the scheduling weight is increased when the first weight or the second weight is increased;
the scheduling server acquires the number of the processed video requests of the IDCs at the current moment;
the scheduling server determines the IDC with the minimum ratio of the number of the processed video requests at the current moment in the IDCs to the scheduling weight as a target IDC;
the scheduling server obtains a video server in the target IDC, wherein the target video is stored in the video server, and the video server is used as a target video server;
and the scheduling server returns the identification information of the target video server to the client equipment so that the client equipment sends a video request aiming at the target video to the target video server according to the identification information.
9. The method according to claim 8, wherein the video content distribution network system further comprises: a central control server;
before the step of the scheduling server obtaining the second weight of each IDC, the method further includes:
the scheduling server acquires the category of the target video determined based on the historical popularity information of the video from the central control server, wherein the category of the video comprises: the historical popularity information represents the frequency of video requests in a specified historical time period;
the scheduling server judges whether the category of the target video is a cold video;
the step of the scheduling server obtaining the second weight of each IDC includes:
and if the type of the target video is the cold video, the scheduling server acquires a second weight of each IDC.
10. A video request scheduling apparatus, comprising:
the video scheduling request receiving module is used for receiving a video scheduling request aiming at a target video, which is sent by client equipment;
a first weight obtaining module, configured to obtain a first weight of each IDC, where the first weight is determined according to bandwidth resource information of each IDC, and for each IDC, a ratio of the first weight of the IDC to the bandwidth resource of the IDC is a first preset ratio;
a second weight obtaining module, configured to obtain a second weight of each IDC, where the second weight is determined according to the storage resource information of each IDC, and for each IDC, a ratio of the second weight of the IDC to the storage resource of the IDC is a second preset ratio;
a scheduling weight determining module, configured to obtain a scheduling weight of each IDC based on the first weight and the second weight of each IDC, so that when the first weight or the second weight is increased, the scheduling weight is increased;
the video request quantity acquisition module is used for acquiring the quantity of the video requests processed by the IDCs at the current moment;
a target IDC determining module, configured to determine an IDC with a smallest ratio between the number of processed video requests at the current time and the scheduling weight among the IDCs as a target IDC;
a target video server obtaining module, configured to obtain a video server in the target IDC, where the target video is stored, as a target video server;
and the identification information returning module is used for returning the identification information of the target video server to the client equipment so that the client equipment sends a video request aiming at the target video to the target video server according to the identification information.
11. The apparatus of claim 10, further comprising: the device comprises a target video category acquisition module and a first judgment module;
the target video category obtaining module is configured to obtain a category of the target video determined based on historical popularity information of the video before obtaining the second weight of each IDC, where the category of the video includes: the historical popularity information represents the frequency of video requests in a specified historical time period;
the first judging module is used for judging whether the category of the target video is a cold video or not;
the second weight obtaining module is specifically configured to obtain a second weight of each IDC if the type of the target video is a cold video.
12. The apparatus of claim 11, further comprising: a second weight determination module;
and the second weight determining module is configured to determine that the second weights of the IDCs are all equal if the type of the target video is a non-cold video after the determination of whether the type of the target video is a cold video.
13. The apparatus of any of claims 10-12, further comprising: a third weight obtaining module;
the third weight obtaining module is configured to obtain a third weight of each IDC before the scheduling weight of each IDC is obtained based on the first weight and the second weight of each IDC, where the third weight is determined according to the data processing capability of each IDC, and for each IDC, a ratio of the third weight of each IDC to the data processing capability of the IDC is a third preset ratio;
the scheduling weight determining module is specifically configured to obtain the scheduling weight of each IDC based on the first weight, the second weight, and the third weight of each IDC, so that when any one of the first weight, the second weight, and the third weight is increased, the scheduling weight is increased.
14. The apparatus according to claim 13, wherein the video scheduling request includes type information of the client device;
the device, still include: a second judgment module;
the second judging module is configured to judge whether the type of the client device is a television side before the third weight of each IDC is obtained;
the third weight obtaining module is specifically configured to obtain a third weight of each IDC if the type of the client device is a television terminal.
15. The apparatus of claim 14, further comprising: a third weight determination module;
and the third weight determining module is configured to determine that the third weights of the IDCs are all equal if the type of the client device is not a tv end after the determination of whether the type of the client device is the tv end.
16. The apparatus of claim 15,
the first weight obtaining module is specifically configured to determine a first weight of each IDC according to a proportional relationship between bandwidth resources of each IDC and the first preset ratio;
the second weight obtaining module is specifically configured to determine a second weight of each IDC according to a proportional relationship between storage resources of each IDC and the second preset ratio;
the third weight obtaining module is specifically configured to determine a third weight of each IDC according to a proportional relationship between data processing capabilities of each IDC and the third preset ratio.
17. A server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
18. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN201910804126.7A 2019-08-28 2019-08-28 Video request scheduling method, device, server and storage medium Active CN110535853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910804126.7A CN110535853B (en) 2019-08-28 2019-08-28 Video request scheduling method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910804126.7A CN110535853B (en) 2019-08-28 2019-08-28 Video request scheduling method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN110535853A CN110535853A (en) 2019-12-03
CN110535853B true CN110535853B (en) 2021-06-22

Family

ID=68665010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910804126.7A Active CN110535853B (en) 2019-08-28 2019-08-28 Video request scheduling method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN110535853B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111556135A (en) * 2020-04-26 2020-08-18 北京奇艺世纪科技有限公司 Request scheduling method, system and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394441A (en) * 2014-11-27 2015-03-04 北京奇艺世纪科技有限公司 Video content distribution scheduling method, device and system
CN104685894A (en) * 2012-10-26 2015-06-03 英特尔公司 Multimedia adaptation based on video orientation
CN107846614A (en) * 2017-10-19 2018-03-27 北京奇艺世纪科技有限公司 A kind of video flow dispatching method, device, electronic equipment and storage medium
CN108174286A (en) * 2017-12-27 2018-06-15 北京奇艺世纪科技有限公司 A kind of processing method and processing device of video code flow
CN108282668A (en) * 2018-01-26 2018-07-13 北京奇艺世纪科技有限公司 A kind of acquisition methods and system of video
CN109981795A (en) * 2019-04-09 2019-07-05 北京奇艺世纪科技有限公司 Resource request dispatching method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9596281B2 (en) * 2014-03-18 2017-03-14 Qualcomm Incorporated Transport accelerator implementing request manager and connection manager functionality

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104685894A (en) * 2012-10-26 2015-06-03 英特尔公司 Multimedia adaptation based on video orientation
CN104394441A (en) * 2014-11-27 2015-03-04 北京奇艺世纪科技有限公司 Video content distribution scheduling method, device and system
CN107846614A (en) * 2017-10-19 2018-03-27 北京奇艺世纪科技有限公司 A kind of video flow dispatching method, device, electronic equipment and storage medium
CN108174286A (en) * 2017-12-27 2018-06-15 北京奇艺世纪科技有限公司 A kind of processing method and processing device of video code flow
CN108282668A (en) * 2018-01-26 2018-07-13 北京奇艺世纪科技有限公司 A kind of acquisition methods and system of video
CN109981795A (en) * 2019-04-09 2019-07-05 北京奇艺世纪科技有限公司 Resource request dispatching method and device

Also Published As

Publication number Publication date
CN110535853A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
CN108881448B (en) API request processing method and device
CN110460879B (en) Video request scheduling method, device, server and storage medium
US10164860B2 (en) Modified content delivery based on network conditions
CN110661879B (en) Node scheduling method, device and system, scheduling server and terminal equipment
US20140165119A1 (en) Offline download method, multimedia file download method and system thereof
CN110012217B (en) Method and device for determining acquisition resolution and electronic equipment
CN110620828A (en) File pushing method, system, device, electronic equipment and medium
CN113343088A (en) Data processing method, system, device, equipment and storage medium
CN113467910B (en) Overload protection scheduling method based on service level
CN108156257B (en) Information pushing method and device
CN110677684B (en) Video processing method, video access method, distributed storage method and distributed video access system
CN110830565A (en) Resource downloading method, device, system, electronic equipment and storage medium
CN108282668B (en) Video acquisition method and system
CN111753239B (en) Resource distribution method and device, electronic equipment and storage medium
WO2023116219A1 (en) Cdn node distribution method and apparatus, electronic device, medium and program product
CN114153581A (en) Data processing method, data processing device, computer equipment and storage medium
CN110099292B (en) Data center node determination method and device and electronic equipment
CN110035128B (en) Live broadcast scheduling method and device, live broadcast system and storage medium
CN110535853B (en) Video request scheduling method, device, server and storage medium
CN108600147B (en) Downloading speed prediction method and device
CN110611937B (en) Data distribution method and device, edge data center and readable storage medium
CN112653736B (en) Parallel source returning method and device and electronic equipment
CN117459536A (en) Resource distribution method, cloud server, device, electronic equipment and storage medium
CN111031350A (en) Transcoding resource scheduling method, electronic device and computer readable storage medium
CN110691143B (en) File pushing method and device, electronic equipment and medium

Legal Events

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