CN111786908A - Traffic scheduling method and device based on IP address and storage medium - Google Patents

Traffic scheduling method and device based on IP address and storage medium Download PDF

Info

Publication number
CN111786908A
CN111786908A CN201910273221.9A CN201910273221A CN111786908A CN 111786908 A CN111786908 A CN 111786908A CN 201910273221 A CN201910273221 A CN 201910273221A CN 111786908 A CN111786908 A CN 111786908A
Authority
CN
China
Prior art keywords
scheduling
address
playing
information
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910273221.9A
Other languages
Chinese (zh)
Inventor
邓铮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201910273221.9A priority Critical patent/CN111786908A/en
Publication of CN111786908A publication Critical patent/CN111786908A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/80Actions related to the user profile or the type of traffic
    • H04L47/805QOS or priority aware

Abstract

The invention provides a flow scheduling method based on an IP address, wherein the format of the IP address comprises four separated data segments, and the flow scheduling method comprises the following steps: responding to a traffic scheduling request, and acquiring a request IP address contained in the traffic scheduling request; inquiring a conversion code corresponding to the request IP address from a code library, wherein the code library stores a plurality of conversion codes, and each conversion code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments; acquiring regional information and operator information contained in the conversion code; and selecting a scheduling node for traffic scheduling according to the region information and the operator information.

Description

Traffic scheduling method and device based on IP address and storage medium
Technical Field
The present invention relates to the field of traffic scheduling technologies, and in particular, to a traffic scheduling method and apparatus based on an IP address, and a computer-readable storage medium.
Background
At present, when a video website performs traffic scheduling processing, it mainly relies on determining corresponding regional information and operator information according to a visiting IP of a client, for example, a chinese mobile operator in beijing, and then schedules the corresponding regional information and operator information to a CDN node related to the operator to provide subsequent services. Therefore, the traffic scheduling processing mainly needs to solve two key technologies, namely, accurately determining regional information and operator information, and selecting a proper CDN scheduling node.
In the aspect of determining regional information and operator information, the traditional traffic scheduling scheme mainly relies on an IP record information database purchased by a website or relies on historical IP record information accumulated by the traditional traffic scheduling scheme to acquire corresponding regional information and operator information. In practical use, the above-mentioned regional information and operator information obtained by means of purchased databases or experience accumulation often have storage accuracy problems, so that many IP records have errors in querying regional information and operator information. Secondly, since the IP record of the operator often changes over time, for example, a new IP segment is put into use, or an old IP segment changes the regional information and the operator information, it cannot be guaranteed that the obtained regional information and the operator information are correct by simply relying on the purchased database or history. And thirdly, the quantity of databases related to IP records of the client is often huge, and the databases cannot be stored in a memory. When a plurality of clients access the database massively and concurrently, the response of obtaining the IP address related information by accessing the database is very slow, which causes system performance bottleneck and reduces user experience.
In the aspect of selecting the CDN scheduling nodes, a traditional method is to set a scheduling policy with a fixed rule based on an IP database, and the fixed scheduling policy is very lack of flexibility in actual use, and cannot configure an optimal scheme, so that data congestion on one part of the CDN scheduling nodes is likely to occur, and a phenomenon of resource waste is caused by another part of the CDN scheduling nodes being idle. In addition, the existing traffic scheduling scheme lacks a timely feedback mechanism, and cannot perform real-time comprehensive evaluation on the scheduling capability of each CDN scheduling node.
Therefore, how to provide an accurate, fast and real-time traffic scheduling optimization scheme becomes a technical problem to be urgently solved by the technical personnel in the field.
Disclosure of Invention
The present invention is directed to a method, an apparatus, and a computer-readable storage medium for traffic scheduling based on IP addresses, so as to solve the above problems in the prior art.
In order to achieve the above object, the present invention provides a traffic scheduling method based on an IP address, where the format of the IP address includes four separate data segments, and the traffic scheduling method includes the following steps:
responding to a traffic scheduling request, and acquiring a request IP address contained in the traffic scheduling request;
inquiring a conversion code corresponding to the request IP address from a code library, wherein the code library stores a plurality of conversion codes, and each conversion code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments;
acquiring regional information and operator information contained in the conversion code;
and selecting a scheduling node for traffic scheduling according to the region information and the operator information.
According to the traffic scheduling method based on the IP address provided by the present invention, the step of selecting a scheduling node for traffic scheduling according to the region information and the operator information includes:
acquiring available scheduling nodes according to the region information and the operator information;
and determining a target scheduling node from the available scheduling nodes according to the historical playing records.
According to the traffic scheduling method based on the IP address, the step of determining the target scheduling node from the available scheduling nodes according to the history playing record comprises the following steps:
calculating a current failure score for each of the available scheduling nodes;
selecting an available scheduling node with the lowest current fault score as a target scheduling node, and performing traffic scheduling through the target scheduling node;
and receiving a history playing record reported by a client when the target scheduling node performs traffic scheduling, wherein the client is an initiator of the traffic scheduling request.
According to the traffic scheduling method based on the IP address, the calculating the current failure score of each available scheduling node comprises the following steps:
acquiring one or a combination of the following parameters according to the historical play record: first playing time, playing pause number, playing failure number, updating score time interval and historical miss score; wherein the first playing time represents the time from the sending of the traffic scheduling request by the playing client to the beginning of playing; the playing pause number represents the number of times of pause of the playing client in the playing process; the playing failure number represents the times that the playing client cannot play; the historical miss score represents a last miss score of the target scheduling node;
and calculating the current failure score of each available scheduling node according to the acquired parameters or parameter combinations.
According to the traffic scheduling method based on the IP address, the current failure score of each candidate scheduling node is calculated according to the acquired parameters or parameter combinations, and the method comprises the following steps: the current miss score is determined by the following calculation:
Figure BDA0002019086080000031
in the above formula, TfpRepresenting the first cast time, NlagRepresenting the number of playing blocks, NerrRepresenting the number of failed plays, TgapRepresenting the update score interval, SipcRepresenting a historical failure score.
According to the traffic scheduling method based on the IP address, the step of determining the target scheduling node from the available scheduling nodes according to the history playing record comprises the following steps:
when determining that no historical play record exists, performing play test on the available scheduling node without the historical play record;
calculating the current miss score of the available scheduling node without the historical play record according to the play test record;
and selecting the available scheduling node with the lowest error score as a target scheduling node, and performing traffic scheduling through the target scheduling node.
According to the traffic scheduling method based on the IP address provided by the invention, the step of inquiring the conversion code corresponding to the request IP address from the code library comprises the following steps:
acquiring the first three data segments in the request IP address, and calculating the offset of the request IP address according to the first three data segments;
and searching the conversion code corresponding to the offset.
According to the traffic scheduling method based on the IP address provided by the present invention, the step of acquiring the regional information and the operator information included in the transcoding includes:
obtaining values of different digits in the transform code to determine the region information and the operator information;
wherein, the C section is coded into a 16-bit binary number, and the meaning represented by the 16-bit binary number from high to low is as follows:
position 1 represents the country; the 2 nd-3 rd combination represents the domestic region; the 4 th-6 th bit combination represents the province; the 7-8 bit combination represents the intra-provincial region; positions 9-11 represent cities; positions 12-13 represent county; bits 14-16 represent the specific operator code.
In order to achieve the above object, the present invention further provides an IP address-based traffic scheduling apparatus, including:
the device comprises an IP address acquisition module, a flow scheduling module and a flow management module, wherein the IP address acquisition module is used for responding to a flow scheduling request and acquiring a request IP address contained in the flow scheduling request;
the conversion code query module is suitable for querying a conversion code corresponding to the request IP address from a code library, wherein the code library stores a plurality of conversion codes, and each conversion code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments;
the information acquisition module is suitable for acquiring the regional information and the operator information contained in the conversion code;
and the traffic scheduling module is suitable for selecting a scheduling node to perform traffic scheduling according to the region information and the operator information.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
The invention provides a flow scheduling method, a flow scheduling device and a computer readable storage medium based on an IP address, and provides a scheme which can accurately acquire region information and operator information and select a high-performance scheduling node in real time. The invention generates different conversion codes according to the first three data segments of the IP address, each conversion code comprises detailed regional information and operator information, and the accurate regional information and operator information corresponding to the IP address can be obtained by corresponding the IP address of the client to the conversion code. In the aspect of selecting the scheduling nodes according to the operator information, the history playing records calculate the fault scores of all available scheduling nodes, and the scheduling node with the lowest fault score is selected as the target scheduling node, so that the traffic scheduling is performed. The invention further adds a feedback reporting mechanism to feed back the history record of the video played by the client under the scheduling of the target scheduling node to the scheduling system, thereby accurately evaluating the service effect of the scheduling node in real time.
Drawings
Fig. 1 is a flowchart of a first embodiment of a traffic scheduling method according to the present invention;
fig. 2 is a schematic diagram of program modules of a first embodiment of a traffic scheduling apparatus according to the present invention;
fig. 3 is a schematic diagram of a traffic scheduling module in a first embodiment of the traffic scheduling apparatus according to the present invention;
fig. 4 is a flowchart of a second embodiment of a traffic scheduling method according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a flow scheduling method, a flow scheduling device and a computer readable storage medium based on an IP address, and provides a scheme which can accurately acquire region information and operator information and select a high-performance scheduling node in real time. The invention generates different conversion codes according to the first three data segments of the IP address, each conversion code comprises detailed regional information and operator information, and the accurate regional information and operator information corresponding to the IP address can be obtained by corresponding the IP address of the client to the conversion code. In the aspect of selecting the scheduling nodes according to the operator information, the history playing records calculate the fault scores of all available scheduling nodes, and the scheduling node with the lowest fault score is selected as the target scheduling node, so that the traffic scheduling is performed. The invention further adds a feedback reporting mechanism to feed back the history record of the video played by the client under the scheduling of the target scheduling node to the scheduling system, thereby accurately evaluating the service effect of the scheduling node in real time.
Example one
Fig. 1 is a flowchart illustrating a traffic scheduling method according to a first embodiment of the present invention. The embodiment provides a traffic scheduling method based on an IP address, which specifically includes the following steps:
and S1, responding to the traffic scheduling request, and acquiring the request IP address contained in the traffic scheduling request.
The traffic scheduling request in the present invention is applicable to all request commands related to traffic scheduling, such as a video traffic scheduling request sent by a client, where the video traffic scheduling request may be sent in the form of a DNS message, for example. In general, a source IP address and a destination IP address in a scheduling request, where the source IP address refers to an IP address corresponding to a client that sends a traffic scheduling request, and the destination IP address refers to an IP address corresponding to a server that stores data such as a video file. In this step, a request IP address corresponding to a sender of the scheduling request needs to be obtained from the traffic scheduling request, so that a suitable CDN scheduling node is selected in the subsequent steps according to the IP address.
S2, inquiring a conversion code corresponding to the request IP address from a code library, wherein the code library stores a plurality of conversion codes, and each conversion code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments.
The purpose of this step is to establish a corresponding translation code for each IP address based on the acquired request IP address, and further acquire region information and operator information corresponding to the request IP address through the translation code.
The transcoding in the present invention is structured data that contains accurate regional information and operator information. Structured data is relative to unstructured data and refers to data that can be represented in a database two-dimensional logical table. In the prior art, the information advantages corresponding to the IP records can be recorded as unstructured data such as 'the internet bar for benefiting internet at the junction of Huangpu district, Huaihai road and Beijing road', the corresponding data volume is large, and batch storage and query are not convenient. Based on the above, the transform coding in the invention uses the structured data to describe the regional information and the operator information, which is beneficial to reducing the storage space and facilitating the quick query.
The transcoding in the present invention is stored in a coding library, which is preferably stored in memory to further increase the speed of the query. The code library comprises a plurality of conversion codes, each conversion code corresponds to an IP address class and describes the region information and the operator information corresponding to the IP address class. The IP address class in the present invention refers to a group of IP addresses with the same data combination of the first three data segments. The transform coding is further described in detail below.
The existing internet is operated on the basis of the IPv4 protocol, and the address space format defined by IPv4 is composed of four data segments separated by periods, each of which does not exceed 255 at maximum, and can be generally expressed in the form of a.b.c.d. According to the operator allocation rule, under the condition that the data segment A and the data segment B are the same, the IP addresses containing all the values in the data segment C are basically allocated to the same operator, so that the invention can cover all the operator information only by considering the data combination of the first three data segments of the IP addresses.
Since each data segment has only 255 values, the number of all IP addresses covering the first three data segments is 256 × 256 × 256 — 16777216, and it is assumed that each IP address occupies two bytes to describe the region information and the operator information, and only 32M storage space is needed. The invention describes different regional information and operator information through different conversion codes, and the conversion codes are recorded in the coding library and do not exceed 32M at most, so that the whole coding library can be stored in the memory. When the corresponding regional information and the operator information of a certain IP need to be inquired, the regional information and the operator information can be directly obtained in the memory through constant time, and compared with the traditional mode of inquiring an IP database, the efficiency can be improved by more than tens of times.
The present invention connects each IP address and its corresponding translation code by an offset. The offset may be obtained by algebraic operation of the first three data segments of the IP address, for example, by calculation of the formula (a × 256 × 256+ B × 256+ C) × 2, where A, B and C correspond to the first three data segments of the IP address, respectively. Through the above calculation, each IP address can obtain an offset, and the offset is associated with the corresponding translation code, so that the corresponding relationship between each IP address and the translation code can be obtained.
And S3, acquiring the region information and the operator information contained in the conversion code.
This step describes how to obtain the region information and the operator information from the transcoding. According to the encoding rule of the present invention, different bits in the transform coding represent different information, and assuming that the transform coding is a 16-bit binary number, the bits from high to low are respectively 1 st bit to 16 th bit, the following provisions are made according to the specific embodiment of the present invention:
position 1 represents the country; the 2 nd-3 rd combination represents the domestic region; the 4 th-6 th bit combination represents the province; the 7-8 bit combination represents the intra-provincial region; positions 9-11 represent cities; positions 12-13 represent county; bits 14-16 represent the specific operator code.
Based on the code regulation, when the region information and the operator information need to be acquired, the corresponding digits in the conversion code only need to be extracted one by one to obtain the information. Specifically, the extraction of the related digits can be performed by bitwise and calculation, please refer to table one:
watch 1
Operation method Meaning of operation
Transcoding&0xF000 Whether or not foreign IP
Transcoding&0xFC00 Get IP province
Transcoding&0xFFE0 Deriving IP cities
Transcoding&0x7 Deriving IP operators
And S4, selecting a scheduling node to perform traffic scheduling according to the region information and the operator information.
On the basis of the known regional information and the operator information, the method and the system carry out traffic scheduling by selecting the scheduling node.
The traffic scheduling referred to in the present invention is performed based on a content delivery network CDN. In short, the CDN caches content required by a user at different locations in the network, that is, different CDN scheduling nodes, redirects an access request sent by the user to the most appropriate CDN scheduling node, and obtains the required content from the CDN scheduling node, thereby improving the response speed of a website to the user request and improving the network service quality.
For how to select the CDN scheduling node, the method comprises the following steps:
and S41, acquiring the available scheduling nodes according to the region information and the operator information.
According to the regional information and the operator information, all CDN nodes arranged in the region by the operator can be obtained, and all CDN nodes form the available scheduling node. On the basis, the invention further selects a target scheduling node with optimal performance from the available scheduling nodes.
And S42, determining a target scheduling node from the available scheduling nodes according to the historical playing records.
Different from the scheduling strategy of setting a fixed rule in the prior art, the method for selecting the target scheduling node from the available scheduling nodes is not fixed and invariable. Specifically, the fault score of each available scheduling node is obtained through the history playing record, and the node with the minimum fault score is selected as the target scheduling node.
The historical playing records refer to playing records which are performed by a client terminal through flow scheduling of an available CDN scheduling node, and each historical playing record is associated with the CDN scheduling node used by the historical playing record. The invention obtains one or the combination of the following parameters from the history play record: first playing time, playing pause number, playing failure number, updating score time interval and historical miss score; wherein the first playing time represents the time from the sending of the traffic scheduling request by the playing client to the beginning of playing; the playing pause number represents the number of times of pause of the playing client in the playing process; the playing failure number represents the times that the playing client cannot play; the historical miss score represents a last miss score of the target scheduling node.
Further, the present invention calculates the current miss score of each candidate scheduling node according to the obtained parameter or parameter combination, which is determined by the following calculation formula:
Figure BDA0002019086080000101
in the above formula, TfpRepresents the first broadcast time; n is a radical oflagRepresenting the playing pause number; n is a radical oferrRepresenting the number of playing failures; t isgapRepresents an update score interval; sipcThe representative history miss score is the miss score of the last playing time calculated according to the history playing record.
It should be noted that, for an available scheduling node that is not used, a history play record corresponding to the available scheduling node cannot be obtained. In this case, the following steps need to be performed to obtain a miss score:
(1) performing a play test on the available scheduling node without the history play record, for example, playing a test video at the client by using the available scheduling node without the history play record, and recording the play record of the client to the test video;
(2) acquiring parameters such as first playing time, playing pause number, playing failure number, updating score time interval, historical error score and the like from the playing record of the test video, wherein the values of the updating score time interval and the historical error score are zero because no historical playing record exists;
(3) and calculating the current miss score for the available scheduling nodes without the historical play records according to the play test records.
And finally, selecting the available scheduling node with the lowest fault score as a target scheduling node according to the current fault score obtained by calculation, and performing traffic scheduling through the target scheduling node.
S43: and receiving a history playing record reported by a client when the target scheduling node performs traffic scheduling, wherein the client is an initiator of the traffic scheduling request.
The step is further added with a feedback reporting mechanism, so that each playing record is used as a parameter when the target scheduling node is selected next time, the latest playing record is used as a basis when the miss score is calculated each time, and the real-time performance and the accuracy of the target scheduling node selection are ensured.
Continuing to refer to fig. 2, a traffic scheduling apparatus based on IP address is shown, in this embodiment, the traffic scheduling apparatus 10 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the traffic scheduling method. The program module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable than the program itself for describing the execution process of the traffic scheduling device 10 in the storage medium. The following description will specifically describe the functions of the program modules of the present embodiment:
an IP address obtaining module 11, adapted to respond to a traffic scheduling request, and obtain a request IP address included in the traffic scheduling request;
a translation code query module 12, adapted to query a translation code corresponding to the requested IP address from a code library, where the code library stores a plurality of translation codes, and each translation code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments;
an information obtaining module 13, adapted to obtain region information and operator information included in the transcoding;
and the traffic scheduling module 14 is adapted to select a scheduling node for traffic scheduling according to the region information and the operator information.
Further, referring to fig. 3, the traffic scheduling module 14 includes:
an available node obtaining submodule 141, adapted to obtain an available scheduling node according to the region information and the operator information;
and a target node determining submodule 142, adapted to determine a target scheduling node from the available scheduling nodes according to the history play record.
Further, the target node determination submodule 142 includes:
a failure score calculating unit 1421, adapted to calculate a current failure score of each of the available scheduling nodes;
a target node selecting unit 1422, adapted to select an available scheduling node with the lowest current failure score as a target scheduling node, and perform traffic scheduling by using the target scheduling node;
the reporting unit 1423 is adapted to receive a history play record of traffic scheduling performed by the target scheduling node, where the history play record is reported by a client, and the client is an initiator of the traffic scheduling request.
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing the traffic scheduling apparatus 10, and when being executed by a processor, the traffic scheduling method of the first embodiment is implemented.
Example two
Referring to fig. 4, a flowchart of a second embodiment of the traffic scheduling method of the present invention includes the following steps:
s001, receiving a client request, wherein the client request is a flow scheduling request for playing a video, and the flow scheduling request comprises a request IP address of the client;
s002, converting the request IP address into a conversion code;
s003, calculating and inquiring the regional information and the operator information corresponding to the request IP address according to the conversion code;
s004: selecting a plurality of candidate service nodes according to the region information and the operator information;
s005, judging whether each candidate service node has a fault score; if yes, go to step S007; if not, go to step S006;
s006, detecting the candidate service node, namely acquiring a historical playing record of the candidate service node by playing a test video;
s007: according to the fault scores, a plurality of candidate service nodes are ranked from low to high, and the candidate service node with the top rank is selected for traffic scheduling;
s008: receiving reported data of a client, wherein the reported data is a historical play record when the client carries out flow scheduling through a selected service node;
and S009, updating and calculating the failure score of the candidate service node according to the historical playing records.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example" or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A traffic scheduling method based on an IP address, wherein the format of the IP address includes four separate data segments, and the traffic scheduling method includes the following steps:
responding to a traffic scheduling request, and acquiring a request IP address contained in the traffic scheduling request;
inquiring a conversion code corresponding to the request IP address from a code library, wherein the code library stores a plurality of conversion codes, and each conversion code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments;
acquiring regional information and operator information contained in the conversion code;
and selecting a scheduling node for traffic scheduling according to the region information and the operator information.
2. The IP address-based traffic scheduling method of claim 1, wherein the step of selecting a scheduling node for traffic scheduling according to the region information and the operator information comprises:
acquiring available scheduling nodes according to the region information and the operator information;
and determining a target scheduling node from the available scheduling nodes according to the historical playing records.
3. The IP address based traffic scheduling method of claim 2, wherein the step of determining a target scheduling node from the available scheduling nodes according to the history play record comprises:
calculating a current failure score for each of the available scheduling nodes;
selecting an available scheduling node with the lowest current fault score as a target scheduling node, and performing traffic scheduling through the target scheduling node;
and receiving a history playing record reported by a client when the target scheduling node performs traffic scheduling, wherein the client is an initiator of the traffic scheduling request.
4. The method according to claim 3, wherein said calculating a current failure score of each of said available scheduling nodes comprises:
acquiring one or a combination of the following parameters according to the historical play record: first playing time, playing pause number, playing failure number, updating score time interval and historical miss score; wherein the first playing time represents the time from the sending of the traffic scheduling request by the playing client to the beginning of playing; the playing pause number represents the number of times of pause of the playing client in the playing process; the playing failure number represents the times that the playing client cannot play; the historical miss score represents a last miss score of the target scheduling node;
and calculating the current failure score of each available scheduling node according to the acquired parameters or parameter combinations.
5. The method according to claim 4, wherein said calculating a current failure score of each of said candidate scheduling nodes according to the obtained parameters or parameter combinations comprises: the current miss score is determined by the following calculation:
Figure FDA0002019086070000021
in the above formula, TfpRepresenting the first cast time, NlagRepresenting the number of playing blocks, NerrRepresenting the number of failed plays, TgapRepresenting the update score interval, SipcRepresenting a historical failure score.
6. The IP address based traffic scheduling method of claim 2, wherein the step of determining a target scheduling node from the available scheduling nodes according to the history play record comprises:
when determining that no historical play record exists, performing play test on the available scheduling node without the historical play record;
calculating the current miss score of the available scheduling node without the historical play record according to the play test record;
and selecting the available scheduling node with the lowest error score as a target scheduling node, and performing traffic scheduling through the target scheduling node.
7. The IP address-based traffic scheduling method according to claim 1, wherein the step of querying the transcoding corresponding to the requested IP address from the coding library comprises:
acquiring the first three data segments in the request IP address, and calculating the offset of the request IP address according to the first three data segments;
and searching the conversion code corresponding to the offset.
8. The IP address-based traffic scheduling method according to claim 1, wherein the step of obtaining the regional information and the operator information included in the transcoding includes:
obtaining values of different digits in the transform code to determine the region information and the operator information;
wherein, the C section is coded into a 16-bit binary number, and the meaning represented by the 16-bit binary number from high to low is as follows:
position 1 represents the country; the 2 nd-3 rd combination represents the domestic region; the 4 th-6 th bit combination represents the province; the 7-8 bit combination represents the intra-provincial region; positions 9-11 represent cities; positions 12-13 represent county; bits 14-16 represent the specific operator code.
9. An IP address-based traffic scheduling apparatus, comprising:
the device comprises an IP address acquisition module, a flow scheduling module and a flow management module, wherein the IP address acquisition module is used for responding to a flow scheduling request and acquiring a request IP address contained in the flow scheduling request;
the conversion code query module is suitable for querying a conversion code corresponding to the request IP address from a code library, wherein the code library stores a plurality of conversion codes, and each conversion code corresponds to an IP address class; the conversion code is structured data containing regional information and operator information, and the IP address class represents the IP address with the same data combination of the first three data segments;
the information acquisition module is suitable for acquiring the regional information and the operator information contained in the conversion code;
and the traffic scheduling module is suitable for selecting a scheduling node to perform traffic scheduling according to the region information and the operator information.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN201910273221.9A 2019-04-04 2019-04-04 Traffic scheduling method and device based on IP address and storage medium Pending CN111786908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910273221.9A CN111786908A (en) 2019-04-04 2019-04-04 Traffic scheduling method and device based on IP address and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910273221.9A CN111786908A (en) 2019-04-04 2019-04-04 Traffic scheduling method and device based on IP address and storage medium

Publications (1)

Publication Number Publication Date
CN111786908A true CN111786908A (en) 2020-10-16

Family

ID=72755429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910273221.9A Pending CN111786908A (en) 2019-04-04 2019-04-04 Traffic scheduling method and device based on IP address and storage medium

Country Status (1)

Country Link
CN (1) CN111786908A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168341A (en) * 2014-08-15 2014-11-26 北京百度网讯科技有限公司 IP address locating method and CDN dispatching method and device
CN106817356A (en) * 2015-12-01 2017-06-09 北京中投视讯文化传媒股份有限公司 A kind of method and device of video playback flow Real-Time Scheduling
CN107277150A (en) * 2017-06-28 2017-10-20 湖南科创信息技术股份有限公司 CDN intelligent dispatching methods and system
US20180026938A1 (en) * 2016-07-21 2018-01-25 Alibaba Group Holding Limited Detection and scheduling method, device, and node of content delivery network
CN109167850A (en) * 2018-09-13 2019-01-08 杭州安恒信息技术股份有限公司 A kind of method, apparatus and storage medium of determining CDN service operator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104168341A (en) * 2014-08-15 2014-11-26 北京百度网讯科技有限公司 IP address locating method and CDN dispatching method and device
CN106817356A (en) * 2015-12-01 2017-06-09 北京中投视讯文化传媒股份有限公司 A kind of method and device of video playback flow Real-Time Scheduling
US20180026938A1 (en) * 2016-07-21 2018-01-25 Alibaba Group Holding Limited Detection and scheduling method, device, and node of content delivery network
CN107277150A (en) * 2017-06-28 2017-10-20 湖南科创信息技术股份有限公司 CDN intelligent dispatching methods and system
CN109167850A (en) * 2018-09-13 2019-01-08 杭州安恒信息技术股份有限公司 A kind of method, apparatus and storage medium of determining CDN service operator

Similar Documents

Publication Publication Date Title
US8510448B2 (en) Service provider registration by a content broker
CN107395683B (en) Method for selecting return path and server
US9740708B2 (en) Systems and methods for distance and performance based load balancing
CN110830564B (en) CDN scheduling method, device, system and computer readable storage medium
CN113497817B (en) Traffic scheduling method and device, edge node of CDN (content delivery network) and server
US20240031453A1 (en) Systems and methods for processing requests for content of a content distribution network
US10404649B2 (en) Content delivery optimization using adaptive and dynamic DNS
US10616314B1 (en) Dynamic source routing for data transfer
US11805093B2 (en) Systems and methods for processing requests for content of a content distribution network
US8799518B2 (en) Process for selecting an authoritative name server
US11416166B2 (en) Distributed function processing with estimate-based scheduler
CN103312733A (en) Method and device for information processing
CN112153160A (en) Access request processing method and device and electronic equipment
US11323412B2 (en) DNS rendezvous localization
CN108322495B (en) Method, device and system for processing resource access request
CN114024973A (en) Resource scheduling method, device, server and system for live cloud transcoding
CN111786908A (en) Traffic scheduling method and device based on IP address and storage medium
CN109618187A (en) A kind of acquisition methods and device of video data
CN113411364B (en) Resource acquisition method and device and server
CN115086331A (en) Cloud equipment scheduling method, device and system, electronic equipment and storage medium
CN114500285B (en) Bandwidth scheduling method and device
CN112203155B (en) Stream taking method, system and equipment
US11579915B2 (en) Computing node identifier-based request allocation
CN117938807A (en) Method, device and system for carrying out portrayal on local DNS (Domain name System) for CDN (content delivery network)
CN117750049A (en) Push stream address scheduling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20201016

WD01 Invention patent application deemed withdrawn after publication