WO2018153345A1 - 一种基于会话迁移的调度方法及服务器 - Google Patents

一种基于会话迁移的调度方法及服务器 Download PDF

Info

Publication number
WO2018153345A1
WO2018153345A1 PCT/CN2018/076975 CN2018076975W WO2018153345A1 WO 2018153345 A1 WO2018153345 A1 WO 2018153345A1 CN 2018076975 W CN2018076975 W CN 2018076975W WO 2018153345 A1 WO2018153345 A1 WO 2018153345A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
media server
target
server
candidate
Prior art date
Application number
PCT/CN2018/076975
Other languages
English (en)
French (fr)
Inventor
杨金文
姜立科
顾小军
卢志航
曹阳
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP18757467.8A priority Critical patent/EP3576369B1/en
Publication of WO2018153345A1 publication Critical patent/WO2018153345A1/zh
Priority to US16/545,227 priority patent/US11431765B2/en

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/1066Session management
    • 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/1066Session management
    • H04L65/1083In-session procedures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/64322IP
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • 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/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a session migration based scheduling method and server.
  • the server that is being accessed needs to provide the required content accurately and efficiently.
  • the content delivery network (CDN) service scenario if the content scheduling is inaccurate, the media server (MS) may generate a large number of scenarios that miss the terminal request.
  • the server usually uses the redirection mode or the proxy mode to serve the terminal, but both of the current implementations have various deficiencies.
  • the terminal when the service is performed in the redirection mode, as shown in FIG. 1.a, the terminal initiates a request to the first media server to obtain media content, and after the first request of the terminal reaches the first media server, In the event that a media server misses, the first media server returns a 302 address to the terminal (ie, the link address of the second media server), and the terminal automatically initiates a request to the new second media server. If the second media server has the required content, the second media server sends the content to the terminal; if the second media server does not have the required content, the second media server returns another redirected 302 address or returns a 404 address ( The content does not exist and the communication ends). In this solution, the interaction between the terminal and the server is large, the delay is large, and the terminal is opaque to the perception of the same media content.
  • the terminal When the proxy mode is used for the service, as shown in FIG. 1.b, the terminal initiates a request to the first media server to obtain the media content. If the first media server does not have the required content locally, the first media server sends the second media to the second media. The server acquires the content, the second media server locally hits the content, sends the content to the first media server, and then the first media server forwards the received content to the terminal.
  • the server's serviceable resources need to be consumed, and the total performance of the external service is degraded.
  • redirection and proxy mode for simultaneous services the inherent flaws of the solution are still insurmountable.
  • the embodiment of the present application provides a session migration-based scheduling method, which is used to reduce information interaction between a server and a terminal, between a server and a server, and reduce a delay between the terminal and the server, thereby saving server resources and improving service quality.
  • a first aspect of the present application provides a session migration-based scheduling method, including: a first media server receiving a service request sent by a terminal for acquiring a target content required by the terminal, where the service request includes a destination address, The destination address is an address of the first media server, and the destination address includes a destination internet protocol IP address and a destination hardware MAC address; the first media server queries the database for the server where the target content is located according to the service request.
  • the IP address of the server where the target content is located is the target IP address; the first media server determines the target IP address according to the candidate IP address fed back by the database; if the target IP address and the location If the destination IP address is different, the first media server determines that the first media server misses the target content, and sends the service request to a second media server, where the IP address of the second media server is The target IP address.
  • the service request of the terminal is sent to the second media server, which reduces information interaction between the first media server and the terminal, thereby saving resources of the server and improving service quality.
  • the determining, by the first media server, the target IP address according to the candidate IP address fed back by the database includes: Receiving, by the first media server, a candidate IP address fed back by the database, where the candidate IP address includes at least one IP address; if the at least one candidate IP address includes an IP address of the first media server, the first a media server determines that the IP address of the first media server is the target IP address; if the IP address of the first media server is not included in the at least one candidate IP address, the first media server determines Any one of the candidate IP addresses is the target IP address.
  • the embodiment of the present application refines the process of determining the target IP address by the first media server, and increases the achievability and operability of the embodiment of the present application.
  • the first media server determines that the IP address of the first media server is the After the target IP address, the method further includes: the first media server discarding a candidate IP address that is not determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the first media server determines that any one of the candidate IP addresses is After the target IP address, the method further includes: the first media server discarding a candidate IP address that is not determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the first media server determines that the first media server does not hit the target content, and the service is Sending the request to the second media server includes: the first media server determining that the first media server misses the target content; and the first media server modifying the destination MAC address of the service request to the second media a MAC address of the server; the first media server sends the modified service request to the second media server.
  • the embodiment of the present application refines the specific operation process of the first media server to send a service request, which increases the achievability and operability of the embodiment of the present application.
  • the method further includes: if the target IP address is the same as an IP address of the first media server, the first media server determines that the first media server hits the target content, and sends the target content to The terminal.
  • the embodiment of the present application adds an application scenario in which the first media server hits the target content, and the implementation manner of the embodiment of the present application is added, so that the steps of the embodiment of the present application are more perfect.
  • the second aspect of the embodiment of the present application provides a session migration-based scheduling method, including: a second media server receives a service request sent by a first media server, where the service request is used to acquire a target content required by the terminal, where the service The request includes a destination address, where the destination address includes a destination IP address and a destination MAC address, the destination address is an address of the second media server, and the second media server queries the database for a target IP address according to the service request.
  • the target IP address is an IP address of a server where the target content is located; the second media server determines the target IP address according to a candidate IP address fed back by the database; if the target IP address and the second media If the IP address of the server is the same, the second media server determines that the second media server hits the target content, and sends the target content to the terminal.
  • the second media server receives the service request sent by the first media server, which reduces the delay between the terminal and the second media server, thereby saving resources of the server and improving service quality.
  • the receiving, by the second media server, the service request sent by the first media server includes: receiving, by the second media server a service request sent by the first media server; the second media server modifying the destination IP address of the service request to an IP address of the second media server.
  • the embodiment of the present application refines the specific operation process of the second media server receiving the service request, which increases the achievability and operability of the embodiment of the present application.
  • the determining, by the second media server, the target IP address according to the candidate IP address fed back by the database includes: Receiving, by the second media server, at least one candidate IP address fed back by the database; if the at least one candidate IP address includes an IP address of the second media server, the second media server determines the second media The IP address of the server is the target IP address; if the IP address of the second media server is not included in the at least one candidate IP address, the second media server determines any one of the candidate IP addresses Is the target IP address.
  • the embodiment of the present application refines the process of determining the target IP address by the second media server, and increases the achievability and operability of the embodiment of the present application.
  • the second media server determines that the IP address of the second media server is the After the target IP address, the method further includes: the second media server discarding the candidate IP address that is not determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the second media server determines that any one of the candidate IP addresses is After the target IP address, the method further includes: the second media server discarding a candidate IP address that is not determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the second media server determines that the second media server hits the target content
  • the embodiment of the present application adds a process of processing the target content after the second media server hits the target content, so that the terminal continues to communicate with the first media server, so that the embodiment of the present application is more logical.
  • a third aspect of the embodiments of the present application provides a session migration-based scheduling method, including: acquiring, by a terminal, an IP address of a first media server; and sending, by the terminal, a service request to the first media server, where the service request is used for Obtaining the target content required by the terminal; the terminal receiving the target content sent by the second media server.
  • the service request of the terminal is sent to the first media server, and the target content sent by the second media server is received, thereby reducing information interaction between the server and the terminal and between the server and the server, thereby saving resources of the server.
  • Improve the quality of service is provided to the first media server, and the target content sent by the second media server is received, thereby reducing information interaction between the server and the terminal and between the server and the server, thereby saving resources of the server.
  • the acquiring, by the terminal, the IP address of the first media server includes: the terminal querying the scheduling server for the IP address corresponding to the media server domain name. Address: the terminal receives an IP address of the first media server fed back by the scheduling server.
  • the embodiment of the present application clarifies the process of specifically obtaining the IP address of the first media server, which increases the achievability and integrity of the embodiment of the present application.
  • the method further includes: the terminal Receiving the target content sent by the first media server.
  • the embodiment of the present application provides a process for the terminal to receive the target content, so that the embodiment of the present application is more complete in the steps.
  • a fourth aspect of the embodiments of the present application provides a server, where the server is a first media server, and includes: a receiving unit, configured to receive a service request sent by the terminal, where the service request is used to acquire target content required by the terminal.
  • the service request includes a destination address, where the destination address includes a destination IP address and a destination MAC address, the destination address is an address of the first media server, and a query unit is configured to query a database according to the service request.
  • An IP address where the target IP address is an IP address of a server where the target content is located; a first processing unit, configured to determine the target IP address according to a candidate IP address fed back by the database; and a second processing unit, if The target IP address is different from the IP address of the first media server, and is used to determine that the first media server misses the target content, and send the service request to a second media server, where the second media server
  • the IP address is the target IP address.
  • the service request of the terminal is sent to the second media server, which reduces information interaction between the first media server and the terminal, thereby saving resources of the server and improving service quality.
  • the first processing unit includes: a receiving subunit, configured to receive at least one candidate IP that is fed back by the database And determining, by the first determining subunit, if the at least one candidate IP address includes the IP address of the first media server, determining that the IP address of the first media server is the target IP address; Determining a subunit, if the IP address of the first media server is not included in the at least one candidate IP address, determining that any one of the candidate IP addresses is the target IP address.
  • the embodiment of the present application refines the process of determining the target IP address by the first media server, and increases the achievability and operability of the embodiment of the present application.
  • the first processing unit further includes: a first discarding subunit, configured to discard A candidate IP address determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the first processing unit further includes: a second discarding subunit, configured to discard A candidate IP address determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the second processing unit includes: a third determining subunit, configured to determine that the first media server is not Hiting the target content; modifying a subunit, modifying a destination MAC address of the service request to be a MAC address of the second media server; and sending a subunit, configured to send the modified service request to the second Media server.
  • the embodiment of the present application refines the specific operation process of the first media server to send a service request, which increases the achievability and operability of the embodiment of the present application.
  • the server further includes: a third processing unit, if the target IP address and the first media server The IP address is the same, and is used to determine that the first media server hits the target content, and sends the target content to the terminal.
  • the embodiment of the present application adds an application scenario in which the first media server hits the target content, and the implementation manner of the embodiment of the present application is added, so that the steps of the embodiment of the present application are more perfect.
  • a fifth aspect of the embodiment of the present application provides a server, where the server is a second media server, and includes: a receiving unit, configured to receive a service request sent by a first media server, where the service request is used to acquire a target required by the terminal.
  • the service request includes a destination address, the destination address includes a destination IP address and a destination MAC address, the destination address is an address of the second media server, and a query unit is configured to query the database according to the service request a target IP address, where the target IP address is an IP address of a server where the target content is located; a first processing unit, configured to determine the target IP address according to a candidate IP address fed back by the database; and a second processing unit
  • the target IP address is the same as the IP address of the second media server, and is used to determine that the second media server hits the target content, and sends the target content to the terminal.
  • the second media server receives the service request sent by the first media server, which reduces the delay between the terminal and the second media server, thereby saving resources of the server and improving service quality.
  • the receiving unit includes: a first receiving subunit, configured to receive a service request sent by the first media server; And a first modifying subunit, configured to modify the destination IP address of the service request to an IP address of the second media server.
  • the embodiment of the present application refines the specific operation process of the second media server receiving the service request, which increases the achievability and operability of the embodiment of the present application.
  • the first processing unit includes: a second receiving subunit, configured to receive at least one of the database feedback a first determining sub-unit, if the at least one candidate IP address includes an IP address of the second media server, determining an IP address of the second media server as the target IP address; And determining, by the second determining subunit, if the IP address of the second media server is not included in the at least one candidate IP address, determining that any one of the candidate IP addresses is the target IP address.
  • the embodiment of the present application refines the process of determining the target IP address by the second media server, and increases the achievability and operability of the embodiment of the present application.
  • the first processing unit further includes: a first discarding subunit, configured to discard A candidate IP address determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the first processing unit further includes: a second discarding subunit, configured to discard A candidate IP address determined to be the target IP address.
  • the embodiment of the present application clarifies the processing procedure of the candidate IP address that is not selected, so that the embodiment of the present application is more complete in the steps.
  • the second processing unit includes: a third determining subunit, configured to determine that the second media server hits a target content, a second modification subunit, configured to modify a source IP address of the target content to an IP address of the first media server, where the source IP address is used by the terminal to continue with the first
  • the media server communicates; a sending subunit is configured to send the modified target content to the terminal.
  • the embodiment of the present application adds a process of processing the target content after the second media server hits the target content, so that the terminal continues to communicate with the first media server, so that the embodiment of the present application is more logical.
  • a sixth aspect of the present application provides a terminal, including: an acquiring unit, configured to acquire an IP address of a first media server, and a sending unit, configured to send a service request to the first media server, where the service request is And acquiring the target content required by the terminal; the first receiving unit is configured to receive the target content sent by the second media server.
  • the service request of the terminal is sent to the first media server, and the target content sent by the second media server is received, thereby reducing information interaction between the server and the terminal and between the server and the server, thereby saving resources of the server. Improve the quality of service.
  • the acquiring unit includes: a query subunit, configured to query a scheduling server for an IP address corresponding to a domain name of the media server; And a receiving subunit, configured to receive an IP address of the first media server fed back by the scheduling server.
  • the embodiment of the present application clarifies the process of specifically obtaining the IP address of the first media server, which increases the achievability and integrity of the embodiment of the present application.
  • the terminal further includes: a second receiving unit, configured to receive the Target content.
  • the embodiment of the present application provides a process for the terminal to receive the target content, so that the embodiment of the present application is more complete in the steps.
  • a seventh aspect of embodiments of the present application provides a computer readable storage medium having instructions stored therein that, when executed on a computer, cause the computer to perform the methods described in the above aspects.
  • An eighth aspect of the embodiments of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the methods described in the above aspects.
  • the embodiments of the present application have the following advantages:
  • the first media server receives a service request sent by the terminal, where the service request is used to acquire target content required by the terminal, the service request includes a destination address, and the destination address includes a destination.
  • An internet protocol IP address and a destination hardware MAC address wherein the destination address is an address of the first media server;
  • the first media server queries a database for a target IP address according to the service request, and the target IP address is the The IP address of the server where the target content is located;
  • the first media server determines the target IP address according to the candidate IP address fed back by the database; if the target IP address is different from the IP address of the first media server,
  • the first media server determines that the first media server misses the target content, and sends the service request to a second media server, where the IP address of the second media server is the target IP address.
  • the information interaction between the first media server and the terminal, between the first media server and the second media server is reduced, and the delay between the terminal and the second media server is reduced,
  • Figure 1.a is a schematic diagram of the interaction process between the server and the terminal in the redirection mode
  • Figure 1.b is a schematic diagram of the interaction process between the server and the terminal in the proxy mode
  • Figure 2b is another schematic diagram of the system architecture of the embodiment of the present application.
  • FIG. 3 is a schematic diagram of an embodiment of a session migration based scheduling method according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another embodiment of a session migration based scheduling method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an embodiment of a first media server according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an embodiment of a second media server according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an embodiment of a server in an embodiment of the present application.
  • the embodiment of the present application provides a session migration-based scheduling method, which is used to reduce information interaction between a server and a terminal, between a server and a server, and reduce a delay between the terminal and the server, thereby saving server resources and improving service quality.
  • the embodiment of the present application can be applied to the network architecture shown in Figure 2.a and Figure 2.b.
  • the fragment distribution is stored on different servers.
  • a media content consists of several small fragment files such as 1.ts, 2.ts, 3.ts, and 4.ts, and these small fragment files are distributed and stored on different servers.
  • the terminal wants to request a content.
  • it needs to interact with multiple servers, as shown in step 3 to step 10 in Figure 2.a.
  • multiple media servers have the same fragmented content scenario. For some reason (disk bad sectors, misoperations, etc.), one of the server media fragmentation data is lost.
  • a redirect or proxy mode such as steps 3 to 6 (taking redirection as an example).
  • the session migration-based scheduling method in the embodiment of the present application is implemented. Examples include:
  • the terminal acquires an IP address of the first media server.
  • the terminal queries the scheduling server for the domain name of the media server, and the scheduling server randomly selects a media server according to the domain name input by the terminal, and sends the IP address of the media server to the terminal.
  • a domain name is a symbolic address scheme developed on the basis of an IP address. Each domain name corresponds to a specific IP address.
  • a domain name is a symbol that is familiar to people, such as letters, numbers, characters, words, etc., in a certain way.
  • IP address is a digital identifier, it does not conform to people's daily use habits, and it is difficult to memorize and write when used. When searching for resources, people generally input in the form of domain names.
  • the IP address is represented by a binary number. Each IP address is 32 bits long and consists of four numbers less than 256. The numbers are separated by a dot.
  • the IP address of the scheduling server is 10.0.0.100.
  • the IP address of the IP address is 10.0.0.99.
  • the IP address of the scheduling server and the terminal may be other values, which is not limited herein.
  • the scheduling server receives the target domain name input by the terminal; the scheduling server queries the corresponding IP address according to the target domain name; when multiple IP addresses correspond to the target domain name, the scheduling server randomly selects an IP address, and feeds back the IP address to the terminal. For example, the scheduling server randomly selects the IP address of the first media server to be returned to the terminal according to the target domain name.
  • the IP address of the first media server is 10.0.0.101.
  • the terminal sends a service request to the first media server.
  • the terminal sends a service request to the first media server, where the service request is used to acquire the target content required by the terminal.
  • the service request carries an ID identifier of the target content, and each ID identifier has a one-to-one correspondence with the target content.
  • the ID of the target content required by the terminal is A1.ts
  • the ID identifier may be other forms, such as B1.ts or C1.ts, which is not limited herein.
  • the service request further includes a destination address, where the destination address is used to access the target server.
  • the terminal sends the service to the first media server.
  • the destination address of the request is the address of the first media server.
  • the first media server receives a service request sent by the terminal.
  • the first media server receives a service request sent by the terminal, and the service request is used to acquire the target content required by the terminal.
  • the first media server queries the database for the target IP address according to the service request.
  • the first media server obtains the ID identifier of the target content from the service request, and sends a query request carrying the ID identifier to the database to query the target IP address, where the target IP address is the IP address of the server where the target content of the terminal is located.
  • the first media server obtains the ID identifier A1.ts of the target content from the service request, and sends a query request to the database, where the query request carries the ID identifier A1.ts of the target content, and queries the target corresponding to A1.ts. IP address.
  • the target content has a mapping relationship with the server IP address storing the target content, and the mapping relationship is stored in the database.
  • the database After receiving the query request of the first media server, the database searches for the corresponding server IP address in the mapping relationship between the target content and the server IP address of the storage target content according to the ID identifier of the required target content included in the service request. .
  • the IP address corresponding to the ID identifier in the database may have one candidate IP address, and there may be multiple candidate IP addresses.
  • the ID identifier corresponds to at least one candidate IP address.
  • the first media server receives a candidate IP address sent by the database.
  • the first media server After the database queries the candidate IP address corresponding to the target content and sends the candidate IP address to the first media server, the first media server receives the candidate IP address sent by the database.
  • the first media server determines a target IP address according to the candidate IP address fed back by the database.
  • the first media server Receiving, by the first media server, at least one candidate IP address fed back by the database; if the at least one candidate IP address includes the IP address of the first media server, the first media server determines that the IP address of the first media server is the target IP address; If the IP address of the first media server is not included in a candidate IP address, the first media server determines that any of the candidate IP addresses is the target IP address.
  • the database querying the server where A1.ts is located corresponds to three candidate IP addresses, and the candidate address does not include the IP address of the first media server, three candidates for the server where A1.ts is located
  • the IP addresses 10.0.0.102, 10.0.0.150, and 10.0.0.151 are sent to the first media server, and the first media server randomly selects a candidate IP address as the target IP address.
  • 10.0.0.102 is determined as the target IP address.
  • the IP address 10.0.0.102 is the IP address of the second media server.
  • the database queries the server where the A1.ts server corresponds to three candidate IP addresses, and the candidate address includes the IP address of the first media server
  • the three candidate IP addresses of the server where the target content A1.ts is located are 10.0.0.101, 10.0.0.150. 10.0.0.151 is sent to the first media server. Because the candidate IP address includes the IP address 10.0.0.101 of the first media server, the first media server determines that 10.0.0.101 is the target IP address.
  • the first media server may delete other candidate IP addresses that are not selected, and only retain the target IP address, and the first media server can achieve similar effects by other means, for example, the first The media server can block other candidate IP addresses that are not selected, which is not limited herein.
  • the first media server determines that the first media server misses the target content, sends the service request to the second media server, and the IP address of the second media server is the target. IP address.
  • the first media server determines that the target content does not exist locally, and determines that the first media server misses the target content, and sends the service request to the second media corresponding to the target IP address. server.
  • the first media server includes a session migration module
  • the service request is sent to the second media server by using the session migration module.
  • the session migration module modifies the service request, and modifies the destination MAC address of the service request from the MAC address of the first media server to the MAC address of the second media server.
  • the first media server determines that the first media server hits the target content, and sends the target content to the terminal.
  • the second media server receives the service request sent by the first media server.
  • the second media server receives a service request sent by the first media server, and the service request is used to acquire the target content required by the terminal.
  • the second media server modifies the destination IP address of the service request (ie, the IP address of the first media server 10.0.0.101) to the IP address of the second media server.
  • the address (10.0.0.102) when the modification is completed, the second media server considers that the service request is sent by the terminal to the second media server, that is, the service request is legal.
  • the destination MAC address of the service request is modified on the session migration module of the first media server, and the destination IP address of the service request is performed on the session migration module of the second media server. to modify.
  • the modification of the destination IP address and the destination MAC address may be performed simultaneously on the session migration module of the first media server, and may be selected according to the actual situation, which is not limited herein.
  • the second media server queries the database for the target IP address according to the service request.
  • the second media server obtains the ID identifier of the target content from the service request, and sends a query request carrying the ID identifier to the database to query the target IP address, where the target IP address is the IP address of the server where the target content of the terminal is located.
  • the second media server obtains the ID identifier A1.ts of the target content from the service request, and sends a query request to the database, where the query request carries the ID identifier A1.ts of the target content, and queries the target corresponding to A1.ts. IP address.
  • the target content has a mapping relationship with the server IP address storing the target content, and the mapping relationship is stored in the database.
  • the database After receiving the query request of the second media server, the database searches for the corresponding server IP address in the mapping relationship between the target content and the server IP address of the storage target content according to the ID identifier of the required target content included in the service request. .
  • the IP address corresponding to the ID identifier in the database may have one candidate IP address, and there may be multiple candidate IP addresses.
  • the ID identifier corresponds to at least one candidate IP address.
  • the second media server receives the candidate IP address sent by the database.
  • the second media server Receiving, by the second media server, at least one candidate IP address fed back by the database; if the at least one candidate IP address includes the IP address of the second media server, the second media server determines that the IP address of the second media server is the target IP address; If the IP address of the second media server is not included in a candidate IP address, the second media server determines that any of the candidate IP addresses is the target IP address. If there is a mapping relationship in the second media server, the database preferentially determines the IP address of the second media server as the candidate IP address.
  • the server where A1.ts is located corresponds to three candidate IP addresses, and the candidate address includes the IP address of the second media server
  • the server where the target content A1.ts is located is The three candidate IP addresses 10.0.0.102, 10.0.0.155, 10.0.0.156 are sent to the second media server, because the candidate IP address includes the IP address 10.0.0.102 of the second media server, and the second media server determines that 10.0.0.102 is the target. IP address.
  • the three candidate IP addresses of the server where A1.ts is located are 10.0.0.103, 10.0.0.155, 10.0.
  • the .0.156 is sent to the second media server, and the second media server randomly selects a candidate IP address as the target IP address.
  • 10.0.0.103 is determined as the target IP address.
  • the IP address 10.0.0.103 is the IP address of the third media server.
  • the second media server can delete other candidate IP addresses that are not selected, and only retain the target IP address, and the second media server can achieve similar effects by other means, for example, the second.
  • the media server can block other candidate IP addresses that are not selected, which is not limited herein.
  • the second media server determines that the second media server hits the target content, and sends the target content to the terminal.
  • the second media server determines that the second media server hits the target content; and the second media server modifies the source IP address of the target content to the IP address of the first media server, the source The IP address is used by the terminal to continue to communicate with the first media server; the second media server sends the modified target content to the terminal.
  • the target content required by the terminal has multiple pieces of content, and the pieces are distributed and stored on different servers, for example, the target content required by the terminal includes A1.ts, A2.ts, A3.ts, after the terminal obtains A1.ts, the terminal continues to request the required A2.ts and A3.ts from the first media server, then repeats step 302 to step 311, at which point 2.ts may not be stored in the second
  • the media server there may be a third media server or other media server, but from the perspective of the terminal, the content data is sent from the first media server until the terminal obtains the complete target content.
  • the terminal receives the target content sent by the second media server.
  • the terminal receives the target content sent by the second media server, and the source IP address of the target content is the IP address of the first media server, and the terminal determines that the target content is sent by the first media server according to the source IP address of the target content, and continues to the first The media server requests additional content.
  • the first media server receives the service request for acquiring the target content sent by the terminal, determines that the first media server does not have the required content, and sends the service request to the second media that stores the target content.
  • the server, the second media server sends the content required by the terminal to the terminal, and the embodiment of the present application reduces information interaction between the first media server and the terminal, between the first media server and the second media server, and reduces the terminal and the The delay between the two media servers, thereby saving server resources and improving service quality.
  • the terminal acquires an IP address of the first media server.
  • the terminal queries the scheduling server for the domain name of the media server, and the scheduling server randomly selects a media server according to the domain name input by the terminal, and sends the IP address of the media server to the terminal.
  • a domain name is a symbolic address scheme developed on the basis of an IP address. Each domain name corresponds to a specific IP address.
  • a domain name is a symbol that is familiar to people, such as letters, numbers, characters, words, etc., in a certain way.
  • IP address is a digital identifier, it does not conform to people's daily use habits, and it is difficult to memorize and write when used. When searching for resources, people generally input in the form of domain names.
  • the IP address is represented by a binary number. Each IP address is 32 bits long and consists of four numbers less than 256. The numbers are separated by a dot.
  • the IP address of the scheduling server is 10.0.0.100.
  • the IP address of the IP address is 10.0.0.99.
  • the IP address of the scheduling server and the terminal may be other values, which is not limited herein.
  • the scheduling server receives the target domain name input by the terminal; the scheduling server queries the corresponding IP address according to the target domain name; when multiple IP addresses correspond to the target domain name, the scheduling server randomly selects an IP address, and feeds back the IP address to the terminal. For example, the scheduling server randomly selects the IP address of the first media server to be returned to the terminal according to the target domain name.
  • the IP address of the first media server is 10.0.0.101.
  • the terminal sends a service request to the first media server.
  • the terminal sends a service request to the first media server, where the service request is used to acquire the target content required by the terminal.
  • the service request carries an ID identifier of the target content, and each ID identifier has a one-to-one correspondence with the target content.
  • the ID of the target content required by the terminal is A1.ts
  • the ID identifier may be other forms, such as B1.ts or C1.ts, which is not limited herein.
  • the service request further includes a destination address, where the destination address is used to access the target server.
  • the terminal sends the service to the first media server.
  • the destination address of the request is the address of the first media server.
  • the first media server receives a service request sent by the terminal.
  • the first media server receives a service request sent by the terminal, and the service request is used to acquire the target content required by the terminal.
  • the first media server queries the database for the target IP address according to the target content.
  • the first media server obtains the ID identifier of the target content from the service request, and sends a query request carrying the ID identifier to the database to query the target IP address, where the target IP address is the IP address of the server where the target content of the terminal is located.
  • the first media server obtains the ID identifier A1.ts of the target content from the service request, and sends a query request to the database, where the query request carries the ID identifier A1.ts of the target content, and queries A1.
  • the destination IP address corresponding to ts.
  • the target content has a mapping relationship with the server IP address storing the target content, and the mapping relationship is stored in the database.
  • the database After receiving the query request of the first media server, the database searches for the corresponding server IP address in the mapping relationship between the target content and the server IP address of the storage target content according to the ID identifier of the required target content included in the service request. .
  • the IP address corresponding to the ID identifier in the database may have one candidate IP address, and there may be multiple candidate IP addresses.
  • the ID identifier corresponds to at least one candidate IP address.
  • the first media server receives the candidate IP address sent by the database.
  • the first media server After the database queries the candidate IP address corresponding to the target content and sends the candidate IP address to the first media server, the first media server receives the candidate IP address sent by the database.
  • the first media server determines a target IP address according to the candidate IP address fed back by the database.
  • the first media server Receiving, by the first media server, at least one candidate IP address fed back by the database; if at least one candidate IP address includes an IP address of the first media server, the first media server determines that any candidate IP address different from the first media server is the target The IP address; if at least one candidate IP address does not include the IP address of the first media server, the first media server determines that any of the candidate IP addresses is the target IP address.
  • the database querying the server where A1.ts is located corresponds to three candidate IP addresses, and the candidate address does not include the IP address of the first media server, three candidates for the server where A1.ts is located
  • the IP addresses 10.0.0.102, 10.0.0.150, and 10.0.0.151 are sent to the first media server, and the first media server randomly selects a candidate IP address as the target IP address.
  • 10.0.0.102 is determined as the target IP address.
  • the IP address 10.0.0.102 is the IP address of the second media server.
  • the database queries the server where the A1.ts server corresponds to three candidate IP addresses, and the candidate address includes the IP address of the first media server
  • the three candidate IP addresses of the server where the target content A1.ts is located are 10.0.0.101, 10.0.0.102. 10.0.0.151 is sent to the first media server. Because the candidate IP address includes the IP address 10.0.0.101 of the first media server, the first media server determines that 10.0.0.102 is the target IP address.
  • the first media server may delete other candidate IP addresses that are not selected, and only retain the target IP address, and the first media server can achieve similar effects by other means, for example, the first The media server can block other candidate IP addresses that are not selected, which is not limited herein.
  • the first media server sends the service request to the second media server, where the IP address of the second media server is the target IP address.
  • the first media server determines that the target content does not exist locally or the target content is incomplete, and determines that the first media server misses the target content, and sends the service request to the second media server corresponding to the target IP address.
  • the first media server includes a session migration module
  • the service request is sent to the second media server by using the session migration module.
  • the session migration module modifies the service request, and modifies the destination MAC address of the service request from the MAC address of the first media server to the MAC address of the second media server.
  • the first media server determines that the first media server hits the target content, and sends the target content to the terminal.
  • the second media server receives the service request sent by the first media server.
  • the second media server receives a service request sent by the first media server, and the service request is used to acquire the target content required by the terminal.
  • the second media server modifies the destination IP address of the service request (ie, the IP address of the first media server 10.0.0.101) to the IP address of the second media server.
  • the address (10.0.0.102) when the modification is completed, the second media server considers that the service request is sent by the terminal to the second media server, that is, the service request is legal.
  • the destination MAC address of the service request is modified on the session migration module of the first media server, and the destination IP address of the service request is performed on the session migration module of the second media server. to modify.
  • the modification of the destination IP address and the destination MAC address may be performed simultaneously on the session migration module of the first media server, and may be selected according to the actual situation, which is not limited herein.
  • the second media server determines that the second media server hits the target content, and sends the target content to the terminal.
  • the second media server determines that the second media server hits the target content; the second media server modifies the source IP address of the target content to the IP address of the first media server, and the source IP address is used by the terminal to continue to communicate with the first media server; The second media server sends the modified target content to the terminal.
  • the terminal receives the target content sent by the second media server.
  • the terminal receives the target content sent by the second media server, and the source IP address of the target content is the IP address of the first media server, and the terminal determines that the target content is sent by the first media server according to the source IP address of the target content, and continues to the first The media server requests additional content.
  • the first media server receives the service request for acquiring the target content sent by the terminal, determines that the first media server does not have the required content, and sends the service request to the second media that stores the target content.
  • the server, the second media server sends the content required by the terminal to the terminal, and the embodiment of the present application reduces information interaction between the first media server and the terminal, between the first media server and the second media server, and reduces the terminal and the The delay between the two media servers, thereby saving server resources and improving service quality.
  • an embodiment of the first media server in the embodiment of the present application includes:
  • the receiving unit 501 is configured to receive a service request sent by the terminal, where the service request is used to obtain the target content required by the terminal, and the service request includes a destination address, where the destination address includes a destination IP address and a destination MAC address, and the destination address is an address of the first media server. ;
  • the querying unit 502 is configured to query the database for the target IP address according to the service request, where the target IP address is the IP address of the server where the target content is located;
  • the first processing unit 503 is configured to determine a target IP address according to the candidate IP address fed back by the database;
  • the second processing unit 504 if the target IP address is different from the IP address of the first media server, is used to determine that the first media server misses the target content, and sends the service request to the second media server, and the IP address of the second media server For the target IP address.
  • the first processing unit 503 can include:
  • the receiving subunit 5031 is configured to receive at least one candidate IP address fed back by the database
  • the first determining subunit 5032 if the at least one candidate IP address includes the IP address of the first media server, is used to determine that the IP address of the first media server is the target IP address;
  • the second determining subunit 5033 is configured to determine any one of the candidate IP addresses as the target IP address if the IP address of the first media server is not included in the at least one candidate IP address.
  • the first processing unit 503 may further include:
  • the first discarding subunit 5034 is configured to discard the candidate IP address that is not determined as the target IP address.
  • the first processing unit 503 may further include:
  • the second discarding subunit 5035 is configured to discard the candidate IP address that is not determined as the target IP address.
  • the second processing unit 504 can further include:
  • a third determining subunit 5041 configured to determine that the first media server misses the target content
  • a modifying subunit 5042 configured to modify a destination MAC address of the service request to be a MAC address of the second media server
  • the sending subunit 5043 is configured to send the modified service request to the second media server.
  • the server may further include:
  • the third processing unit 505 is configured to determine that the first media server hits the target content, and sends the target content to the terminal, if the target IP address is the same as the IP address of the first media server.
  • the first media server sends the service request of the terminal to the second media server, which reduces information interaction between the first media server and the terminal, thereby saving server resources and improving service quality.
  • an embodiment of a second media server in this embodiment of the present application includes:
  • the receiving unit 601 is configured to receive a service request sent by the first media server, where the service request is used to obtain the target content required by the terminal, and the service request includes a destination address, where the destination address includes a destination IP address and a destination MAC address, and the destination address is the second media.
  • the query unit 602 is configured to query the database for the target IP address according to the service request, where the target IP address is the IP address of the server where the target content is located;
  • the first processing unit 603 is configured to determine a target IP address according to the candidate IP address fed back by the database;
  • the second processing unit 604 is configured to determine that the second media server hits the target content, and sends the target content to the terminal, if the target IP address is the same as the IP address of the second media server.
  • the receiving unit 601 can include:
  • the first receiving subunit 6011 is configured to receive a service request sent by the first media server.
  • the first modification subunit 6012 is configured to modify the destination IP address of the service request to an IP address of the second media server.
  • the first processing unit 603 can include:
  • the second receiving subunit 6031 is configured to receive at least one candidate IP address fed back by the database
  • the first determining subunit 6032 if the at least one candidate IP address includes the IP address of the second media server, is used to determine that the IP address of the second media server is the target IP address;
  • the second determining sub-unit 6033 is configured to determine any one of the candidate IP addresses as the target IP address if the IP address of the second media server is not included in the at least one candidate IP address.
  • the first processing unit 603 may further include:
  • the first discarding subunit 6034 is configured to discard the candidate IP address that is not determined as the target IP address.
  • the fourth processing unit 508 may further include:
  • the second discarding sub-unit 6035 is configured to discard the candidate IP address that is not determined as the target IP address.
  • the second processing unit 604 may further include:
  • a third determining subunit 6041 configured to determine that the second media server hits the target content
  • a second modification subunit 6042 configured to modify a source IP address of the target content to an IP address of the first media server, where the source IP address is used by the terminal to continue to communicate with the first media server;
  • the sending subunit 6043 is configured to send the modified target content to the terminal.
  • the second media server receives the service request sent by the first media server, which reduces the delay between the terminal and the second media server, thereby saving resources of the server and improving service quality.
  • FIG. 5 to FIG. 6 respectively describe the first media server and the second media server in the embodiment of the present application in detail from the perspective of the modular functional entity.
  • the server in the embodiment of the present application is described in detail below from the perspective of hardware processing.
  • an embodiment of the server in this embodiment of the present application includes:
  • FIG. 7 is a schematic structural diagram of a server provided by an embodiment of the present application.
  • the server 700 may generate a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 701 (for example, One or more processors) and memory 709, one or more storage media 708 that store application 707 or data 706 (eg, one or one storage device in Shanghai).
  • the memory 709 and the storage medium 708 may be short-term storage or persistent storage.
  • the program stored on storage medium 708 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
  • the processor 701 can be configured to communicate with the storage medium 708 to perform a series of instruction operations in the storage medium 708 on the server 700.
  • Server 700 may also include one or more power sources 702, one or more wired or wireless network interfaces 703, one or more input and output interfaces 704, and/or one or more operating systems 705, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 705 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the memory 709 can be used to store software programs and modules, and the processor 701 executes various functional applications and data processing of the server by running software programs and modules stored in the memory 709.
  • the memory 709 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the server (such as audio data, phone book, etc.).
  • memory 709 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the program of the rate transfer adjustment mechanism and the received data stream provided in the embodiment of the present application are stored in the memory 709, and the processor 701 calls from the memory 709 when it is needed.
  • the processor 701 is a control center of the server, and can perform slice scheduling according to a set scheduling method.
  • the processor 701 connects various parts of the entire server using various interfaces and lines, performs various functions of the server by running or executing software programs and/or modules stored in the memory 709, and calling data stored in the memory 709. The data is processed so that the opponent can adjust the transmission rate.
  • the processor 701 includes a session migration function, and saves and restores the tcp connection through the form of a kernel module, which simplifies the kernel module.
  • the kernel module is only responsible for providing an interface or channel for acquiring socket information. Complex logic such as migration control, migration information encapsulation analysis, and information transfer are implemented in the user mode, which increases flexibility and reduces development and maintenance difficulty.
  • the session migration function module includes a tcp migration component that can implement tcp active connections and migrate from one server to another.
  • the tcp migration component consists of two parts, a user-mode lib library and a kernel module.
  • the user state lib library is responsible for encapsulating the application platform interface (API) for the tcp server call; the user state lib library also includes a user mode module handoff svc for providing handoff message passing channels and control management.
  • API application platform interface
  • the kernel modules include: a handoff module and a packet control module.
  • the handoff module is responsible for getting and setting socket information from the kernel.
  • the packet control module is an auxiliary module that registers the network filter hook netfilter hook and is responsible for forwarding packets to the specified server or discarding the packets.
  • the processor 701 can include one or more processing units.
  • the processor 701 is configured to perform step 302 to step 311 in FIG. 3, and details are not described herein again.
  • the processor 701 is configured to perform steps 402 to 409 in FIG. 4, and details are not described herein again.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • wire eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be stored by a computer or a data storage device such as a server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Abstract

本申请实施例公开了一种基于会话迁移的调度方法,用于节省服务器的资源,提高服务质量。本申请实施例方法包括:第一媒体服务器接收终端发送的服务请求,服务请求用于获取终端所需目标内容;第一媒体服务器根据服务请求向数据库查询目标IP地址,目标IP地址为目标内容所在服务器的IP地址;第一媒体服务器根据数据库反馈的候选IP地址确定目标IP地址;若目标IP地址与第一媒体服务器的IP地址不同,则第一媒体服务器确定第一媒体服务器未命中目标内容,将服务请求发送至第二媒体服务器,第二媒体服务器的IP地址为目标IP地址。本申请实施例还提供了一种服务器。本申请实施例能够节省服务器的资源,提高服务质量。

Description

一种基于会话迁移的调度方法及服务器
本申请要求于2017年2月23日提交中国专利局、申请号为201710101630.1、发明名称为“一种基于会话迁移的调度方法及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种基于会话迁移的调度方法及服务器。
背景技术
随着计算机技术和互联网技术的快速发展,用户对于通信服务的体验要求越来越高,当从互联网获取信息时,需要正在访问的服务器能够准确高效的提供所需内容。在内容分发网络(Content Delivery Network,CDN)服务场景下,如果遇到内容调度不准确的情况,媒体服务器(Media Server,MS)可能产生大量的未命中终端请求的场景。这种情况下,服务器通常会采用重定向模式或者代理模式对终端进行服务,但是这两种目前的实现方案均存在各种各样的不足。
现有技术中,当采用重定向模式进行服务时,如图1.a所示,终端向第一媒体服务器发起请求以获取媒体内容,终端的第一次请求到达第一媒体服务器之后,在第一媒体服务器未命中的情况下,第一媒体服务器返回给终端一个302地址(即第二媒体服务器的链接地址),终端自动向新的第二媒体服务器发起请求。若第二媒体服务器有所需内容,则第二媒体服务器将该内容发送给终端;若第二媒体服务器没有所需内容,则第二媒体服务器返回另一个重定向的302地址或者返回404地址(内容不存在,通信结束)。在该方案中,终端和服务器之间的交互多,延迟大,并且终端对同一个媒体内容的感知不透明。
当采用代理模式进行服务时,如图1.b所示,终端向第一媒体服务器发起请求以获取媒体内容,若第一媒体服务器本地不存在所需内容,则第一媒体服务器向第二媒体服务器获取该内容,第二媒体服务器本地命中该内容,将该内容发送给第一媒体服务器,然后第一媒体服务器将接收到的内容转发给终端。在该方案中,需要消耗服务器的可服务资源,对外服务总性能下降。当采用重定向和代理模式同时进行服务时,方案的固有缺陷仍无法克服。
发明内容
本申请实施例提供了一种基于会话迁移的调度方法,用于减少服务器和终端之间、服务器与服务器之间的信息交互,并且降低终端与服务器之间的延迟,从而节省服务器的资源,提高服务质量。
本申请实施例的第一方面提供一种基于会话迁移的调度方法,包括:第一媒体服务器接收终端发送的用于获取所述终端所需目标内容的服务请求,所述服务请求包含目的地址,所述目的地址为所述第一媒体服务器的地址,所述目的地址包括目的互联网协议IP地址 和目的硬件MAC地址;所述第一媒体服务器根据所述服务请求向数据库查询所述目标内容所在服务器的IP地址,所述目标内容所在服务器的IP地址为所述目标IP地址;所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址;若所述目标IP地址与所述目的IP地址不同,则所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器,所述第二媒体服务器的IP地址为所述目标IP地址。本申请实施例中,将终端的服务请求发送至第二媒体服务器,减少了第一媒体服务器和终端之间的信息交互,从而节省服务器的资源,提高了服务质量。
结合本申请实施例的第一方面,在本申请实施例第一方面的第一种实现方式中,所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址包括:所述第一媒体服务器接收所述数据库反馈的候选IP地址,所述候选IP地址包括至少一个IP地址;若所述至少一个候选IP地址中包括所述第一媒体服务器的IP地址,则所述第一媒体服务器确定所述第一媒体服务器的IP地址为所述目标IP地址;若所述至少一个候选IP地址中不包括所述第一媒体服务器的IP地址,则所述第一媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址。本申请实施例细化了第一媒体服务器对目标IP地址的确定过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例第一方面的第一种实现方式,在本申请实施例第一方面的第二种实现方式中,所述第一媒体服务器确定所述第一媒体服务器的IP地址为所述目标IP地址之后,所述方法还包括:所述第一媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例第一方面的第一种实现方式,在本申请实施例第一方面的第三种实现方式中,所述第一媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址之后,所述方法还包括:所述第一媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例的第一方面,在本申请实施例第一方面的第四种实现方式中,所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器包括:所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容;所述第一媒体服务器修改所述服务请求的目的MAC地址为所述第二媒体服务器的MAC地址;所述第一媒体服务器将修改后的服务请求发送至所述第二媒体服务器。本申请实施例细化了第一媒体服务器发送服务请求的具体操作过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例的第一方面,在本申请实施例第一方面的第五种实现方式中,所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址之后,所述方法还包括:若所述目标IP地址与所述第一媒体服务器的IP地址相同,则所述第一媒体服务器确定所述第一媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。本申请实施例追加了第一媒体服务器命中目标内容的应用场景,增加了本申请实施例的实现方式,让本申请实施例步骤更加完善。
本申请实施例第二方面提供了一种基于会话迁移的调度方法,包括:第二媒体服务器接收第一媒体服务器发送的服务请求,所述服务请求用于获取终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的IP地址和目的MAC地址,所述目的地址为所述第二媒体服务器的地址;所述第二媒体服务器根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;所述第二媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址;若所述目标IP地址与所述第二媒体服务器的IP地址相同,则所述第二媒体服务器确定所述第二媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。本申请实施例中,第二媒体服务器接收第一媒体服务器发送的服务请求,降低了终端与第二媒体服务器之间的延迟,从而节省服务器的资源,提高了服务质量。
结合本申请实施例的第二方面,在本申请实施例第二方面的第一种实现方式中,所述第二媒体服务器接收第一媒体服务器发送的服务请求包括:所述第二媒体服务器接收第一媒体服务器发送的服务请求;所述第二媒体服务器将所述服务请求的目的IP地址修改为所述第二媒体服务器的IP地址。本申请实施例细化了第二媒体服务器接收服务请求的具体操作过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例的第二方面,在本申请实施例第二方面的第二种实现方式中,所述第二媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址包括:所述第二媒体服务器接收所述数据库反馈的至少一个候选IP地址;若所述至少一个候选IP地址中包括所述第二媒体服务器的IP地址,则所述第二媒体服务器确定所述第二媒体服务器的IP地址为所述目标IP地址;若所述至少一个候选IP地址中不包括所述第二媒体服务器的IP地址,则所述第二媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址。本申请实施例细化了第二媒体服务器对目标IP地址的确定过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例第二方面的第二种实现方式,在本申请实施例第二方面的第三种实现方式中,所述第二媒体服务器确定所述第二媒体服务器的IP地址为所述目标IP地址之后,所述方法还包括:所述第二媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例第二方面的第二种实现方式,在本申请实施例第二方面的第四种实现方式中,所述第二媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址之后,所述方法还包括:所述第二媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例的第二方面,在本申请实施例第二方面的第五种实现方式中,所述第二媒体服务器确定所述第二媒体服务器命中所述目标内容,将所述目标内容发送至所述终端包括:所述第二媒体服务器确定所述第二媒体服务器命中所述目标内容;所述第二媒体服务器将所述目标内容的源IP地址修改为所述第一媒体服务器的IP地址,所述源IP地址用于所述终端继续与所述第一媒体服务器进行通信;所述第二媒体服务器将修改后的 目标内容发送至所述终端。本申请实施例增加了第二媒体服务器命中目标内容后对目标内容的处理过程,以使得终端继续与第一媒体服务器进行通信,使本申请实施例更加具有逻辑性。
本申请实施例第三方面提供了一种基于会话迁移的调度方法,包括:终端获取第一媒体服务器的IP地址;所述终端向所述第一媒体服务器发送服务请求,所述服务请求用于获取所述终端所需目标内容;所述终端接收第二媒体服务器发送的所述目标内容。本申请实施例中,将终端的服务请求发送至第一媒体服务器,接收第二媒体服务器发送的目标内容,减少了服务器和终端之间、服务器与服务器之间的信息交互,从而节省服务器的资源,提高了服务质量。
结合本申请实施例的第三方面,在本申请实施例第三方面的第一种实现方式中,所述终端获取第一媒体服务器的IP地址包括:终端向调度服务器查询媒体服务器域名对应的IP地址;所述终端接收所述调度服务器反馈的第一媒体服务器的IP地址。本申请实施例明确了具体获取第一媒体服务器的IP地址的过程,增加了本申请实施例的可实现性和完整性。
结合本申请实施例的第三方面,在本申请实施例第三方面的第二种实现方式中,所述终端向所述第一媒体服务器发送服务请求之后,所述方法还包括:所述终端接收所述第一媒体服务器发送的所述目标内容。本申请实施例提供了终端接收目标内容的过程,使本申请实施例在步骤上更完善。
本申请实施例第四方面提供了一种服务器,所述服务器为第一媒体服务器,包括:接收单元,用于接收终端发送的服务请求,所述服务请求用于获取所述终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的IP地址和目的MAC地址,所述目的地址为所述第一媒体服务器的地址;查询单元,用于根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;第一处理单元,用于根据所述数据库反馈的候选IP地址确定所述目标IP地址;第二处理单元,若所述目标IP地址与所述第一媒体服务器的IP地址不同,则用于确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器,所述第二媒体服务器的IP地址为所述目标IP地址。本申请实施例中,将终端的服务请求发送至第二媒体服务器,减少了第一媒体服务器和终端之间的信息交互,从而节省服务器的资源,提高了服务质量。
结合本申请实施例的第四方面,在本申请实施例第四方面的第一种实现方式中,所述第一处理单元包括:接收子单元,用于接收所述数据库反馈的至少一个候选IP地址;第一确定子单元,若所述至少一个候选IP地址中包括所述第一媒体服务器的IP地址,则用于确定所述第一媒体服务器的IP地址为所述目标IP地址;第二确定子单元,若所述至少一个候选IP地址中不包括所述第一媒体服务器的IP地址,则用于确定所述候选IP地址中的任一地址为所述目标IP地址。本申请实施例细化了第一媒体服务器对目标IP地址的确定过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例第四方面的第一种实现方式,在本申请实施例第四方面的第二种实现方式中,所述第一处理单元还包括:第一丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申 请实施例在步骤上更完善。
结合本申请实施例第四方面的第一种实现方式,在本申请实施例第四方面的第三种实现方式中,所述第一处理单元还包括:第二丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例的第四方面,在本申请实施例第四方面的第四种实现方式中,所述第二处理单元包括:第三确定子单元,用于确定所述第一媒体服务器未命中所述目标内容;修改子单元,用于修改所述服务请求的目的MAC地址为所述第二媒体服务器的MAC地址;发送子单元,用于将修改后的服务请求发送至所述第二媒体服务器。本申请实施例细化了第一媒体服务器发送服务请求的具体操作过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例的第四方面,在本申请实施例第四方面的第五种实现方式中,所述服务器还包括:第三处理单元,若所述目标IP地址与所述第一媒体服务器的IP地址相同,则用于确定所述第一媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。本申请实施例追加了第一媒体服务器命中目标内容的应用场景,增加了本申请实施例的实现方式,让本申请实施例步骤更加完善。
本申请实施例第五方面提供了一种服务器,所述服务器为第二媒体服务器,包括:接收单元,用于接收第一媒体服务器发送的服务请求,所述服务请求用于获取终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的IP地址和目的MAC地址,所述目的地址为所述第二媒体服务器的地址;查询单元,用于根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;第一处理单元,用于根据所述数据库反馈的候选IP地址确定所述目标IP地址;第二处理单元,若所述目标IP地址与所述第二媒体服务器的IP地址相同,则用于确定所述第二媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。本申请实施例中,第二媒体服务器接收第一媒体服务器发送的服务请求,降低了终端与第二媒体服务器之间的延迟,从而节省服务器的资源,提高了服务质量。
结合本申请实施例的第五方面,在本申请实施例第五方面的第一种实现方式中,所述接收单元包括:第一接收子单元,用于接收第一媒体服务器发送的服务请求;第一修改子单元,用于将所述服务请求的目的IP地址修改为所述第二媒体服务器的IP地址。本申请实施例细化了第二媒体服务器接收服务请求的具体操作过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例的第五方面,在本申请实施例第五方面的第二种实现方式中,所述第一处理单元包括:第二接收子单元,用于接收所述数据库反馈的至少一个候选IP地址;第一确定子单元,若所述至少一个候选IP地址中包括所述第二媒体服务器的IP地址,则用于确定所述第二媒体服务器的IP地址为所述目标IP地址;第二确定子单元,若所述至少一个候选IP地址中不包括所述第二媒体服务器的IP地址,则用于确定所述候选IP地址中的任一地址为所述目标IP地址。本申请实施例细化了第二媒体服务器对目标IP地址的确定过程,增加了本申请实施例的可实现性和可操作性。
结合本申请实施例第五方面的第二种实现方式,在本申请实施例第五方面的第三种实现方式中,所述第一处理单元还包括:第一丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例第五方面的第二种实现方式,在本申请实施例第五方面的第四种实现方式中,所述第一处理单元还包括:第二丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。本申请实施例明确了对未被选择的候选IP地址的处理过程,使本申请实施例在步骤上更完善。
结合本申请实施例的第五方面,在本申请实施例第五方面的第五种实现方式中,所述第二处理单元包括:第三确定子单元,用于确定所述第二媒体服务器命中所述目标内容;第二修改子单元,用于将所述目标内容的源IP地址修改为所述第一媒体服务器的IP地址,所述源IP地址用于所述终端继续与所述第一媒体服务器进行通信;发送子单元,用于将修改后的目标内容发送至所述终端。本申请实施例增加了第二媒体服务器命中目标内容后对目标内容的处理过程,以使得终端继续与第一媒体服务器进行通信,使本申请实施例更加具有逻辑性。
本申请实施例第六方面提供了一种终端,包括:获取单元,用于获取第一媒体服务器的IP地址;发送单元,用于向所述第一媒体服务器发送服务请求,所述服务请求用于获取所述终端所需目标内容;第一接收单元,用于接收第二媒体服务器发送的所述目标内容。本申请实施例中,将终端的服务请求发送至第一媒体服务器,接收第二媒体服务器发送的目标内容,减少了服务器和终端之间、服务器与服务器之间的信息交互,从而节省服务器的资源,提高了服务质量。
结合本申请实施例的第六方面,在本申请实施例第六方面的第一种实现方式中,所述获取单元包括:查询子单元,用于向调度服务器查询媒体服务器域名对应的IP地址;接收子单元,用于接收所述调度服务器反馈的第一媒体服务器的IP地址。本申请实施例明确了具体获取第一媒体服务器的IP地址的过程,增加了本申请实施例的可实现性和完整性。
结合本申请实施例的第六方面,在本申请实施例第六方面的第二种实现方式中,所述终端还包括:第二接收单元,用于接收所述第一媒体服务器发送的所述目标内容。本申请实施例提供了终端接收目标内容的过程,使本申请实施例在步骤上更完善。
本申请实施例第七方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
本申请实施例第八方面提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:
本申请实施例提供的技术方案中,第一媒体服务器接收终端发送的服务请求,所述服务请求用于获取所述终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的互联网协议IP地址和目的硬件MAC地址,所述目的地址为所述第一媒体服务器的地址;所述第一媒体服务器根据所述服务请求向数据库查询目标IP地址,所述目标IP地址 为所述目标内容所在服务器的IP地址;所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址;若所述目标IP地址与所述第一媒体服务器的IP地址不同,则所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器,所述第二媒体服务器的IP地址为所述目标IP地址。减少了第一媒体服务器和终端之间、第一媒体服务器与第二媒体服务器之间的信息交互,并且降低了终端与第二媒体服务器之间的延迟,从而节省服务器的资源,提高服务质量。
附图说明
图1.a为重定向模式中服务器与终端的交互过程示意图;
图1.b为代理模式中服务器与终端的交互过程示意图;
图2.a为本申请实施例的系统架构的一个示意图;
图2.b为本申请实施例的系统架构的另一示意图;
图3为本申请实施例基于会话迁移的调度方法的一个实施例示意图;
图4为本申请实施例基于会话迁移的调度方法的另一个实施例示意图;
图5为本申请实施例中第一媒体服务器的一个实施例示意图;
图6为本申请实施例中第二媒体服务器的一个实施例示意图;
图7为本申请实施例中服务器的一个实施例示意图。
具体实施方式
本申请实施例提供了一种基于会话迁移的调度方法,用于减少服务器和终端之间、服务器与服务器之间的信息交互,并且降低终端与服务器之间的延迟,从而节省服务器的资源,提高服务质量。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例进行描述。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
本申请实施例可应用于如图2.a和图2.b所示的网络架构,图2.a所示网络架构中,分片分布存储在不同的服务器上。一个媒体内容由1.ts、2.ts、3.ts和4.ts等若干小分片文件组成,而这些若干小分片文件分布式存储在不同的服务器上。此时终端想要请求一个内容,现有方案中需要跟多个服务器进行交互,如图2.a中的步骤3至步骤10。图2.b所示网络架构中,多台媒体服务器有相同分片内容场景下,由于某些原因(磁盘坏道、误操作等等),其中一台服务器媒体分片数据丢失场景。当终端请求的内容在第一媒体服务器上不完整时,需要采用重定向或者代理模式向终端提供服务的时候,比如步骤3至步骤 6(以重定向为例)。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图3,当终端所需内容分片式存储在多个媒体服务器上时,本申请实施例中基于会话迁移的调度方法一个实施例包括:
301、终端获取第一媒体服务器的IP地址。
终端向调度服务器查询媒体服务器的域名,调度服务器根据终端输入的域名随机选择一台媒体服务器,并将该媒体服务器的IP地址发送给终端。域名是在IP地址基础上发展出的一种符号化的地址方案。每一个域名都与一个特定的IP地址对应。域名是由人们熟悉的符号,如字母、数字、字符、文字等按一定方式组成。
需要说明的是,由于IP地址是数字标识,不符合人们日常使用习惯,在使用时难以记忆和书写,人们在搜索资源时,一般以域名形式进行输入。为了保证网络上每台计算机的IP地址的唯一性,用户必须向特定机构申请注册,该机构根据用户单位的网络规模和发展计划,分配IP地址。IP地址用二进制数来表示,每个IP地址长32比特,由4个小于256的数字组成,数字之间用点间隔,例如,本申请实施例中,调度服务器IP地址为10.0.0.100,终端的IP地址为10.0.0.99,调度服务器和终端的IP地址还可以是其他值,具体此处不做限定。
可以理解的是,一个IP地址可以对应多个域名,一个域名也可以对应多个IP地址。调度服务器接收到终端输入的目标域名;调度服务器根据该目标域名查询对应的IP地址;当有多个IP地址与该目标域名对应时,调度服务器随机选择一个IP地址,并将该IP地址反馈给终端。例如,调度服务器根据目标域名随机选择第一媒体服务器的IP地址返回给终端,本申请实施例中,第一媒体服务器的IP地址为10.0.0.101。
302、终端向第一媒体服务器发送服务请求。
终端向第一媒体服务器发送服务请求,该服务请求用于获取终端所需目标内容。该服务请求携带有目标内容的ID标识,每一个ID标识与目标内容一一对应。例如,本申请实施例中,终端所需目标内容的ID标识为A1.ts,ID标识还可以是其他形式,如,B1.ts或C1.ts,具体此处不做限定。
需要说明的是,该服务请求除了包含所请求目标内容的ID标识,还包含有目的地址,该目的地址用于访问目标服务器,例如,本申请实施例中,终端向第一媒体服务器发送的服务请求的目的地址为第一媒体服务器的地址。
303、第一媒体服务器接收终端发送的服务请求。
第一媒体服务器接收终端发送的服务请求,该服务请求用于获取终端所需目标内容。
304、第一媒体服务器根据服务请求向数据库查询目标IP地址。
第一媒体服务器从服务请求中获取到目标内容的ID标识,并向数据库发送携带有该ID标识的查询请求,以查询目标IP地址,目标IP地址为终端所需目标内容所在服务器的IP地址。例如,第一媒体服务器从服务请求中获取到目标内容的ID标识A1.ts,并向数据库发送查询请求,该查询请求中携带有目标内容的ID标识A1.ts,查询A1.ts对应的目标IP地址。
需要说明的是,目标内容与存储目标内容的服务器IP地址具有映射关系,该映射关 系存储在数据库中。当数据库接收到第一媒体服务器的查询请求后,根据该服务请求中包含的所需目标内容的ID标识,在目标内容与存储目标内容的服务器IP地址的映射关系中,查找对应的服务器IP地址。
可以理解的是,数据库中与ID标识对应的IP地址可能存在一个候选IP地址,也可能存在多个候选IP地址,本申请实施例中,ID标识对应至少一个候选IP地址。
305、第一媒体服务器接收数据库发送的候选IP地址。
在数据库查询到目标内容对应的候选IP地址并将候选IP地址发送给第一媒体服务器后,第一媒体服务器接收数据库发送的候选IP地址。
306、第一媒体服务器根据数据库反馈的候选IP地址确定目标IP地址。
第一媒体服务器接收数据库反馈的至少一个候选IP地址;若至少一个候选IP地址中包括第一媒体服务器的IP地址,则第一媒体服务器确定第一媒体服务器的IP地址为目标IP地址;若至少一个候选IP地址中不包括第一媒体服务器的IP地址,则第一媒体服务器确定候选IP地址中的任一地址为目标IP地址。
需要说明的是,本申请实施例中,当数据库查询A1.ts所在服务器对应三个候选IP地址,且候选地址中不包括第一媒体服务器的IP地址时,将A1.ts所在服务器三个候选IP地址10.0.0.102、10.0.0.150、10.0.0.151发送至第一媒体服务器,第一媒体服务器随机选择一个候选IP地址为目标IP地址,本申请实施例中,确定10.0.0.102为目标IP地址。IP地址10.0.0.102为第二媒体服务器的IP地址。
当数据库查询A1.ts所在服务器对应三个候选IP地址,且候选地址中包括第一媒体服务器的IP地址时,将目标内容A1.ts所在服务器的三个候选IP地址10.0.0.101、10.0.0.150、10.0.0.151发送至第一媒体服务器,因候选IP地址中包含第一媒体服务器的IP地址10.0.0.101,第一媒体服务器确定10.0.0.101为目标IP地址。
可以理解的是,当确定目标IP地址后,第一媒体服务器可以删除其他未被选择的候选IP地址,只保留目标IP地址,第一媒体服务器还能够通过其他方式达到类似效果,例如,第一媒体服务器可以屏蔽其他未被选择的候选IP地址,具体此处不做限定。
307、若目标IP地址与第一媒体服务器的IP地址不同,则第一媒体服务器确定第一媒体服务器未命中目标内容,将服务请求发送至第二媒体服务器,第二媒体服务器的IP地址为目标IP地址。
若目标IP地址与第一媒体服务器的IP地址不同,则第一媒体服务器确定本地不存在目标内容,并确定第一媒体服务器未命中目标内容,将服务请求发送至目标IP地址对应的第二媒体服务器。
需要说明的是,第一媒体服务器中包括会话迁移模块,通过会话迁移模块将服务请求发送至第二媒体服务器。在发送服务请求之前,会话迁移模块会对服务请求进行修改,将服务请求的目的MAC地址从第一媒体服务器的MAC地址修改为第二媒体服务器的MAC地址。
可以理解的是,若目标IP地址与第一媒体服务器的IP地址相同,则第一媒体服务器确定第一媒体服务器命中目标内容,将目标内容发送至终端。
308、第二媒体服务器接收第一媒体服务器发送的服务请求。
第二媒体服务器接收第一媒体服务器发送的服务请求,该服务请求用于获取终端所需 目标内容。
需要说明的是,本申请实施例中,第二媒体服务器在接收到服务请求后,将服务请求的目的IP地址(即第一媒体服务器的IP地址10.0.0.101)修改为第二媒体服务器的IP地址(10.0.0.102),当修改完成后,第二媒体服务器就会认为该服务请求是终端发给第二媒体服务器的,即该服务请求合法。
可以理解的是,本申请实施例中,分别在第一媒体服务器的会话迁移模块上对服务请求的目的MAC地址进行修改,并在第二媒体服务器的会话迁移模块上对服务请求的目的IP地址进行修改。对目的IP地址和目的MAC地址的修改还可以在第一媒体服务器的会话迁移模块上同时进行,可以根据实际情况进行选择,具体此处不做限定。
309、第二媒体服务器根据服务请求向数据库查询目标IP地址。
第二媒体服务器从服务请求中获取到目标内容的ID标识,并向数据库发送携带有该ID标识的查询请求,以查询目标IP地址,目标IP地址为终端所需目标内容所在服务器的IP地址。例如,第二媒体服务器从服务请求中获取到目标内容的ID标识A1.ts,并向数据库发送查询请求,该查询请求中携带有目标内容的ID标识A1.ts,查询A1.ts对应的目标IP地址。
需要说明的是,目标内容与存储目标内容的服务器IP地址具有映射关系,该映射关系存储在数据库中。当数据库接收到第二媒体服务器的查询请求后,根据该服务请求中包含的所需目标内容的ID标识,在目标内容与存储目标内容的服务器IP地址的映射关系中,查找对应的服务器IP地址。
可以理解的是,数据库中与ID标识对应的IP地址可能存在一个候选IP地址,也可能存在多个候选IP地址,本申请实施例中,ID标识对应至少一个候选IP地址。
310、第二媒体服务器接收数据库发送的候选IP地址。
第二媒体服务器接收数据库反馈的至少一个候选IP地址;若至少一个候选IP地址中包括第二媒体服务器的IP地址,则第二媒体服务器确定第二媒体服务器的IP地址为目标IP地址;若至少一个候选IP地址中不包括第二媒体服务器的IP地址,则第二媒体服务器确定候选IP地址中的任一地址为目标IP地址。若第二媒体服务器中存在映射关系,则数据库优先将第二媒体服务器的IP地址确定为候选IP地址。
需要说明的是,在本申请实施例中,当数据库查询A1.ts所在服务器对应三个候选IP地址,且候选地址中包括第二媒体服务器的IP地址时,将目标内容A1.ts所在服务器的三个候选IP地址10.0.0.102、10.0.0.155、10.0.0.156发送至第二媒体服务器,因候选IP地址中包含第二媒体服务器的IP地址10.0.0.102,第二媒体服务器确定10.0.0.102为目标IP地址。
当数据库查询A1.ts所在服务器对应三个候选IP地址,且候选地址中不包括第二媒体服务器的IP地址时,将A1.ts所在服务器三个候选IP地址10.0.0.103、10.0.0.155、10.0.0.156发送至第二媒体服务器,第二媒体服务器随机选择一个候选IP地址为目标IP地址,本申请实施例中,确定10.0.0.103为目标IP地址。IP地址10.0.0.103为第三媒体服务器的IP地址。
可以理解的是,当确定目标IP地址后,第二媒体服务器可以删除其他未被选择的候 选IP地址,只保留目标IP地址,第二媒体服务器还能够通过其他方式达到类似效果,例如,第二媒体服务器可以屏蔽其他未被选择的候选IP地址,具体此处不做限定。
311、若目标IP地址与第二媒体服务器的IP地址相同,则第二媒体服务器确定第二媒体服务器命中目标内容,将目标内容发送至终端。
若目标IP地址与第二媒体服务器的IP地址相同,则第二媒体服务器确定第二媒体服务器命中目标内容;第二媒体服务器将目标内容的源IP地址修改为第一媒体服务器的IP地址,源IP地址用于终端继续与第一媒体服务器进行通信;第二媒体服务器将修改后的目标内容发送至终端。
需要说明的是,当终端所需的目标内容有多个分片内容组成,而这些分片内容分布式存储在不同的服务器上,例如,终端所需目标内容包括A1.ts、A2.ts、A3.ts,当终端获取到A1.ts后,终端继续向第一媒体服务器请求所需A2.ts和A3.ts,那么就重复步骤302至步骤311,此刻2.ts可能不是存储在第二媒体服务器上,有可能是第三媒体服务器或者其他的媒体服务器上,但是从终端的视角来说,内容数据都是从第一媒体服务器发过来的,直至终端获取完整的目标内容。
312、终端收到第二媒体服务器发送的目标内容。
终端收到第二媒体服务器发送的目标内容,目标内容的源IP地址是第一媒体服务器的IP地址,终端根据目标内容的源IP地址判断目标内容为第一媒体服务器发送的,继续向第一媒体服务器请求其他内容。
本申请实施例中,第一媒体服务器在接收到终端发送的用于获取目标内容的服务请求,确定第一媒体服务器不存在所需内容,将该服务请求发送至存储有目标内容的第二媒体服务器,第二媒体服务器将终端所需内容发送至终端,本申请实施例减少了第一媒体服务器和终端之间、第一媒体服务器与第二媒体服务器之间的信息交互,并且降低终端与第二媒体服务器之间的延迟,从而节省服务器的资源,提高服务质量。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图4,当终端所需内容同时存储在多个媒体服务器上时,本申请实施例中基于会话迁移的调度方法另一实施例包括:
401、终端获取第一媒体服务器的IP地址。
终端向调度服务器查询媒体服务器的域名,调度服务器根据终端输入的域名随机选择一台媒体服务器,并将该媒体服务器的IP地址发送给终端。域名是在IP地址基础上发展出的一种符号化的地址方案。每一个域名都与一个特定的IP地址对应。域名是由人们熟悉的符号,如字母、数字、字符、文字等按一定方式组成。
需要说明的是,由于IP地址是数字标识,不符合人们日常使用习惯,在使用时难以记忆和书写,人们在搜索资源时,一般以域名形式进行输入。为了保证网络上每台计算机的IP地址的唯一性,用户必须向特定机构申请注册,该机构根据用户单位的网络规模和发展计划,分配IP地址。IP地址用二进制数来表示,每个IP地址长32比特,由4个小于256的数字组成,数字之间用点间隔,例如,本申请实施例中,调度服务器IP地址为10.0.0.100,终端的IP地址为10.0.0.99,调度服务器和终端的IP地址还可以是其他值,具体此处不做限定。
可以理解的是,一个IP地址可以对应多个域名,一个域名也可以对应多个IP地址。调度服务器接收到终端输入的目标域名;调度服务器根据该目标域名查询对应的IP地址;当有多个IP地址与该目标域名对应时,调度服务器随机选择一个IP地址,并将该IP地址反馈给终端。例如,调度服务器根据目标域名随机选择第一媒体服务器的IP地址返回给终端,本申请实施例中,第一媒体服务器的IP地址为10.0.0.101。
402、终端向第一媒体服务器发送服务请求。
终端向第一媒体服务器发送服务请求,该服务请求用于获取终端所需目标内容。该服务请求携带有目标内容的ID标识,每一个ID标识与目标内容一一对应。例如,本申请实施例中,终端所需目标内容的ID标识为A1.ts,ID标识还可以是其他形式,如,B1.ts或C1.ts,具体此处不做限定。
需要说明的是,该服务请求除了包含所请求目标内容的ID标识,还包含有目的地址,该目的地址用于访问目标服务器,例如,本申请实施例中,终端向第一媒体服务器发送的服务请求的目的地址为第一媒体服务器的地址。
403、第一媒体服务器接收终端发送的服务请求。
第一媒体服务器接收终端发送的服务请求,该服务请求用于获取终端所需目标内容。
404、若第一媒体服务器的数据库中不存在目标内容或目标内容不完整,则第一媒体服务器根据目标内容向数据库查询目标IP地址。
第一媒体服务器从服务请求中获取到目标内容的ID标识,并向数据库发送携带有该ID标识的查询请求,以查询目标IP地址,目标IP地址为终端所需目标内容所在服务器的IP地址。本申请实施例中,第一媒体服务器从服务请求中获取到目标内容的ID标识A1.ts,并向数据库发送查询请求,该查询请求中携带有目标内容的ID标识A1.ts,查询A1.ts对应的目标IP地址。
需要说明的是,目标内容与存储目标内容的服务器IP地址具有映射关系,该映射关系存储在数据库中。当数据库接收到第一媒体服务器的查询请求后,根据该服务请求中包含的所需目标内容的ID标识,在目标内容与存储目标内容的服务器IP地址的映射关系中,查找对应的服务器IP地址。
可以理解的是,数据库中与ID标识对应的IP地址可能存在一个候选IP地址,也可能存在多个候选IP地址,本申请实施例中,ID标识对应至少一个候选IP地址。
405、第一媒体服务器接收数据库发送的候选IP地址。
在数据库查询到目标内容对应的候选IP地址并将候选IP地址发送给第一媒体服务器后,第一媒体服务器接收数据库发送的候选IP地址。
406、第一媒体服务器根据数据库反馈的候选IP地址确定目标IP地址。
第一媒体服务器接收数据库反馈的至少一个候选IP地址;若至少一个候选IP地址中包括第一媒体服务器的IP地址,则第一媒体服务器确定不同于第一媒体服务器的任一候选IP地址为目标IP地址;若至少一个候选IP地址中不包括第一媒体服务器的IP地址,则第一媒体服务器确定候选IP地址中的任一地址为目标IP地址。
需要说明的是,本申请实施例中,当数据库查询A1.ts所在服务器对应三个候选IP地址,且候选地址中不包括第一媒体服务器的IP地址时,将A1.ts所在服务器三个候选 IP地址10.0.0.102、10.0.0.150、10.0.0.151发送至第一媒体服务器,第一媒体服务器随机选择一个候选IP地址为目标IP地址,本申请实施例中,确定10.0.0.102为目标IP地址,IP地址10.0.0.102为第二媒体服务器的IP地址。
当数据库查询A1.ts所在服务器对应三个候选IP地址,且候选地址中包括第一媒体服务器的IP地址时,将目标内容A1.ts所在服务器的三个候选IP地址10.0.0.101、10.0.0.102、10.0.0.151发送至第一媒体服务器,因候选IP地址中包含第一媒体服务器的IP地址10.0.0.101,第一媒体服务器确定10.0.0.102为目标IP地址。
可以理解的是,当确定目标IP地址后,第一媒体服务器可以删除其他未被选择的候选IP地址,只保留目标IP地址,第一媒体服务器还能够通过其他方式达到类似效果,例如,第一媒体服务器可以屏蔽其他未被选择的候选IP地址,具体此处不做限定。
407、第一媒体服务器将服务请求发送至第二媒体服务器,第二媒体服务器的IP地址为目标IP地址。
第一媒体服务器确定本地不存在目标内容或目标内容不完整,并确定第一媒体服务器未命中目标内容后,将服务请求发送至目标IP地址对应的第二媒体服务器。
需要说明的是,第一媒体服务器中包括会话迁移模块,通过会话迁移模块将服务请求发送至第二媒体服务器。在发送服务请求之前,会话迁移模块会对服务请求进行修改,将服务请求的目的MAC地址从第一媒体服务器的MAC地址修改为第二媒体服务器的MAC地址。
可以理解的是,若目标IP地址与第一媒体服务器的IP地址相同,则第一媒体服务器确定第一媒体服务器命中目标内容,将目标内容发送至终端。
408、第二媒体服务器接收第一媒体服务器发送的服务请求。
第二媒体服务器接收第一媒体服务器发送的服务请求,该服务请求用于获取终端所需目标内容。
需要说明的是,本申请实施例中,第二媒体服务器在接收到服务请求后,将服务请求的目的IP地址(即第一媒体服务器的IP地址10.0.0.101)修改为第二媒体服务器的IP地址(10.0.0.102),当修改完成后,第二媒体服务器就会认为该服务请求是终端发给第二媒体服务器的,即该服务请求合法。
可以理解的是,本申请实施例中,分别在第一媒体服务器的会话迁移模块上对服务请求的目的MAC地址进行修改,并在第二媒体服务器的会话迁移模块上对服务请求的目的IP地址进行修改。对目的IP地址和目的MAC地址的修改还可以在第一媒体服务器的会话迁移模块上同时进行,可以根据实际情况进行选择,具体此处不做限定。
409、第二媒体服务器确定第二媒体服务器命中目标内容,将目标内容发送至终端。
第二媒体服务器确定第二媒体服务器命中目标内容;第二媒体服务器将目标内容的源IP地址修改为第一媒体服务器的IP地址,源IP地址用于终端继续与第一媒体服务器进行通信;第二媒体服务器将修改后的目标内容发送至终端。
410、终端收到第二媒体服务器发送的目标内容。
终端收到第二媒体服务器发送的目标内容,目标内容的源IP地址是第一媒体服务器的IP地址,终端根据目标内容的源IP地址判断目标内容为第一媒体服务器发送的,继续向第一媒体服务器请求其他内容。
本申请实施例中,第一媒体服务器在接收到终端发送的用于获取目标内容的服务请求,确定第一媒体服务器不存在所需内容,将该服务请求发送至存储有目标内容的第二媒体服务器,第二媒体服务器将终端所需内容发送至终端,本申请实施例减少了第一媒体服务器和终端之间、第一媒体服务器与第二媒体服务器之间的信息交互,并且降低终端与第二媒体服务器之间的延迟,从而节省服务器的资源,提高服务质量。
上面对本申请实施例中基于会话迁移的调度方法进行了描述,下面对本申请实施例中的服务器进行描述,请参阅图5,本申请实施例中第一媒体服务器的一个实施例包括:
接收单元501,用于接收终端发送的服务请求,服务请求用于获取终端所需目标内容,服务请求包含目的地址,目的地址包括目的IP地址和目的MAC地址,目的地址为第一媒体服务器的地址;
查询单元502,用于根据服务请求向数据库查询目标IP地址,目标IP地址为目标内容所在服务器的IP地址;
第一处理单元503,用于根据数据库反馈的候选IP地址确定目标IP地址;
第二处理单元504,若目标IP地址与第一媒体服务器的IP地址不同,则用于确定第一媒体服务器未命中目标内容,将服务请求发送至第二媒体服务器,第二媒体服务器的IP地址为目标IP地址。
可选的,第一处理单元503可包括:
接收子单元5031,用于接收数据库反馈的至少一个候选IP地址;
第一确定子单元5032,若至少一个候选IP地址中包括第一媒体服务器的IP地址,则用于确定第一媒体服务器的IP地址为目标IP地址;
第二确定子单元5033,若至少一个候选IP地址中不包括第一媒体服务器的IP地址,则用于确定候选IP地址中的任一地址为目标IP地址。
可选的,第一处理单元503可进一步包括:
第一丢弃子单元5034,用于丢弃未被确定为目标IP地址的候选IP地址。
可选的,第一处理单元503可进一步包括:
第二丢弃子单元5035,用于丢弃未被确定为目标IP地址的候选IP地址。
可选的,第二处理单元504可进一步包括:
第三确定子单元5041,用于确定第一媒体服务器未命中目标内容;
修改子单元5042,用于修改服务请求的目的MAC地址为第二媒体服务器的MAC地址;
发送子单元5043,用于将修改后的服务请求发送至第二媒体服务器。
可选的,服务器可进一步包括:
第三处理单元505,若目标IP地址与第一媒体服务器的IP地址相同,则用于确定第一媒体服务器命中目标内容,将目标内容发送至终端。
本申请实施例中,第一媒体服务器将终端的服务请求发送至第二媒体服务器,减少了第一媒体服务器和终端之间的信息交互,从而节省服务器的资源,提高了服务质量。
请参阅图6,本申请实施例中第二媒体服务器的一个实施例包括:
接收单元601,用于接收第一媒体服务器发送的服务请求,服务请求用于获取终端所需目标内容,服务请求包含目的地址,目的地址包括目的IP地址和目的MAC地址,目的 地址为第二媒体服务器的地址;
查询单元602,用于根据服务请求向数据库查询目标IP地址,目标IP地址为目标内容所在服务器的IP地址;
第一处理单元603,用于根据数据库反馈的候选IP地址确定目标IP地址;
第二处理单元604,若目标IP地址与第二媒体服务器的IP地址相同,则用于确定第二媒体服务器命中目标内容,将目标内容发送至终端。
可选的,接收单元601可包括:
第一接收子单元6011,用于接收第一媒体服务器发送的服务请求;
第一修改子单元6012,用于将服务请求的目的IP地址修改为第二媒体服务器的IP地址。
可选的,第一处理单元603可包括:
第二接收子单元6031,用于接收数据库反馈的至少一个候选IP地址;
第一确定子单元6032,若至少一个候选IP地址中包括第二媒体服务器的IP地址,则用于确定第二媒体服务器的IP地址为目标IP地址;
第二确定子单元6033,若至少一个候选IP地址中不包括第二媒体服务器的IP地址,则用于确定候选IP地址中的任一地址为目标IP地址。
可选的,第一处理单元603可进一步包括:
第一丢弃子单元6034,用于丢弃未被确定为目标IP地址的候选IP地址。
可选的,第四处理单元508可进一步包括:
第二丢弃子单元6035,用于丢弃未被确定为目标IP地址的候选IP地址。
可选的,第二处理单元604可进一步包括:
第三确定子单元6041,用于确定第二媒体服务器命中目标内容;
第二修改子单元6042,用于将目标内容的源IP地址修改为第一媒体服务器的IP地址,源IP地址用于终端继续与第一媒体服务器进行通信;
发送子单元6043,用于将修改后的目标内容发送至终端。
本申请实施例中,第二媒体服务器接收第一媒体服务器发送的服务请求,降低了终端与第二媒体服务器之间的延迟,从而节省服务器的资源,提高了服务质量。
上面图5至图6从模块化功能实体的角度分别对本申请实施例中的第一媒体服务器和第二媒体服务器进行详细描述,下面从硬件处理的角度对本申请实施例中的服务器进行详细描述。请参阅图7,本申请实施例中服务器一个实施例包括:
图7是本申请实施例提供的一种服务器结构示意图,该服务器700可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(Central processing units,CPU)701(例如,一个或一个以上处理器)和存储器709,一个或一个以上存储应用程序707或数据706的存储介质708(例如一个或一个以上海量存储设备)。其中,存储器709和存储介质708可以是短暂存储或持久存储。存储在存储介质708的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,处理器701可以设置为与存储介质708通信,在服务器700上执行存储介质708中的一系列指令操作。
服务器700还可以包括一个或一个以上电源702,一个或一个以上有线或无线网络接口703,一个或一个以上输入输出接口704,和/或,一个或一个以上操作系统705,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。本领域技术人员可以理解,图7中示出的服务器结构并不构成对服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图7对服务器的各个构成部件进行具体的介绍:
存储器709可用于存储软件程序以及模块,处理器701通过运行存储在存储器709的软件程序以及模块,从而执行服务器的各种功能应用以及数据处理。存储器709可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据服务器的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器709可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。在本申请实施例中提供的速率传输调整机制的程序和接收到的数据流存储在存储器709中,当需要使用时,处理器701从存储器709中调用。
处理器701是服务器的控制中心,可以按照设置的调度方法进行分片调度。处理器701利用各种接口和线路连接整个服务器的各个部分,通过运行或执行存储在存储器709内的软件程序和/或模块,以及调用存储在存储器709内的数据,执行服务器的各种功能和处理数据,从而对手实现对传输速率的调整。
处理器701包括会话迁移功能,通过内核模块的形式实现对tcp连接的保存和恢复,简化了内核模块,内核模块只负责提供获取设置socket信息的接口或通道。把迁移控制、迁移信息封装解析以及信息传递等复杂逻辑都在用户态实现,提高灵活性降低开发维护难度。会话迁移功能模块包括tcp迁移组件,可以实现tcp活动连接,从一个服务器迁移到另外一个服务器。
tcp迁移组件由两部分组成,用户态lib库和内核模块。
用户态lib库负责封装应用平台接口(Application platform interface,API)提供给tcp server调用;用户态lib库还包括一个用户态模块handoff svc,用于提供handoff消息传递通道和控制管理。
内核模块包括:handoff模块和packet control模块。
handoff模块负责从内核获取和设置socket信息。
packet control模块是辅助模块,用于注册网络过滤钩子netfilter hook,负责把报文转发到指定服务器或者丢弃报文。
可选的,处理器701可包括一个或多个处理单元。
在本申请的实施例中,处理器701用于执行图3中的步骤302至步骤311,此处不再赘述。
在本申请的实施例中,处理器701用于执行图4中的步骤402至步骤409,此处不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通 用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (26)

  1. 一种基于会话迁移的调度方法,其特征在于,包括:
    第一媒体服务器接收终端发送的服务请求,所述服务请求用于获取所述终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的互联网协议IP地址和目的硬件MAC地址,所述目的地址为所述第一媒体服务器的地址;
    所述第一媒体服务器根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;
    所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址;
    若所述目标IP地址与所述第一媒体服务器的IP地址不同,则所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器,所述第二媒体服务器的IP地址为所述目标IP地址。
  2. 根据权利要求1所述的调度方法,其特征在于,所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址包括:
    所述第一媒体服务器接收所述数据库反馈的至少一个候选IP地址;
    若所述至少一个候选IP地址中包括所述第一媒体服务器的IP地址,则所述第一媒体服务器确定所述第一媒体服务器的IP地址为所述目标IP地址;
    若所述至少一个候选IP地址中不包括所述第一媒体服务器的IP地址,则所述第一媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址。
  3. 根据权利要求2所述的调度方法,其特征在于,所述第一媒体服务器确定所述第一媒体服务器的IP地址为所述目标IP地址之后,所述方法还包括:
    所述第一媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。
  4. 根据权利要求2所述的调度方法,其特征在于,所述第一媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址之后,所述方法还包括:
    所述第一媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。
  5. 根据权利要求1所述的调度方法,其特征在于,所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器包括:
    所述第一媒体服务器确定所述第一媒体服务器未命中所述目标内容;
    所述第一媒体服务器修改所述服务请求的目的MAC地址为所述第二媒体服务器的MAC地址;
    所述第一媒体服务器将修改后的服务请求发送至所述第二媒体服务器。
  6. 根据权利要求1所述的调度方法,其特征在于,所述第一媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址之后,所述方法还包括:
    若所述目标IP地址与所述第一媒体服务器的IP地址相同,则所述第一媒体服务器确定所述第一媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。
  7. 一种基于会话迁移的调度方法,其特征在于,包括:
    第二媒体服务器接收第一媒体服务器发送的服务请求,所述服务请求用于获取终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的IP地址和目的MAC地址,所述目的地址为所述第二媒体服务器的地址;
    所述第二媒体服务器根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;
    所述第二媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址;
    若所述目标IP地址与所述第二媒体服务器的IP地址相同,则所述第二媒体服务器确定所述第二媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。
  8. 根据权利要求7所述的调度方法,其特征在于,所述第二媒体服务器接收第一媒体服务器发送的服务请求包括:
    所述第二媒体服务器接收第一媒体服务器发送的服务请求;
    所述第二媒体服务器将所述服务请求的目的IP地址修改为所述第二媒体服务器的IP地址。
  9. 根据权利要求7所述的调度方法,其特征在于,所述第二媒体服务器根据所述数据库反馈的候选IP地址确定所述目标IP地址包括:
    所述第二媒体服务器接收所述数据库反馈的至少一个候选IP地址;
    若所述至少一个候选IP地址中包括所述第二媒体服务器的IP地址,则所述第二媒体服务器确定所述第二媒体服务器的IP地址为所述目标IP地址;
    若所述至少一个候选IP地址中不包括所述第二媒体服务器的IP地址,则所述第二媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址。
  10. 根据权利要求9所述的调度方法,其特征在于,所述第二媒体服务器确定所述第二媒体服务器的IP地址为所述目标IP地址之后,所述方法还包括:
    所述第二媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。
  11. 根据权利要求9所述的调度方法,其特征在于,所述第二媒体服务器确定所述候选IP地址中的任一地址为所述目标IP地址之后,所述方法还包括:
    所述第二媒体服务器丢弃未被确定为所述目标IP地址的候选IP地址。
  12. 根据权利要求7所述的调度方法,其特征在于,所述第二媒体服务器确定所述第二媒体服务器命中所述目标内容,将所述目标内容发送至所述终端包括:
    所述第二媒体服务器确定所述第二媒体服务器命中所述目标内容;
    所述第二媒体服务器将所述目标内容的源IP地址修改为所述第一媒体服务器的IP地址,所述源IP地址用于所述终端继续与所述第一媒体服务器进行通信;
    所述第二媒体服务器将修改后的目标内容发送至所述终端。
  13. 一种服务器,其特征在于,所述服务器为第一媒体服务器,包括:
    接收单元,用于接收终端发送的服务请求,所述服务请求用于获取所述终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的IP地址和目的MAC地址,所述目的地址为所述第一媒体服务器的地址;
    查询单元,用于根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;
    第一处理单元,用于根据所述数据库反馈的候选IP地址确定所述目标IP地址;
    第二处理单元,若所述目标IP地址与所述第一媒体服务器的IP地址不同,则用于确定所述第一媒体服务器未命中所述目标内容,将所述服务请求发送至第二媒体服务器,所述第二媒体服务器的IP地址为所述目标IP地址。
  14. 根据权利要求13所述的服务器,其特征在于,所述第一处理单元包括:
    接收子单元,用于接收所述数据库反馈的至少一个候选IP地址;
    第一确定子单元,若所述至少一个候选IP地址中包括所述第一媒体服务器的IP地址,则用于确定所述第一媒体服务器的IP地址为所述目标IP地址;
    第二确定子单元,若所述至少一个候选IP地址中不包括所述第一媒体服务器的IP地址,则用于确定所述候选IP地址中的任一地址为所述目标IP地址。
  15. 根据权利要求14所述的服务器,其特征在于,所述第一处理单元还包括:
    第一丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。
  16. 根据权利要求14所述的服务器,其特征在于,所述第一处理单元还包括:
    第二丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。
  17. 根据权利要求13所述的服务器,其特征在于,所述第二处理单元包括:
    第三确定子单元,用于确定所述第一媒体服务器未命中所述目标内容;
    修改子单元,用于修改所述服务请求的目的MAC地址为所述第二媒体服务器的MAC地址;
    发送子单元,用于将修改后的服务请求发送至所述第二媒体服务器。
  18. 根据权利要求13所述的服务器,其特征在于,所述服务器还包括:
    第三处理单元,若所述目标IP地址与所述第一媒体服务器的IP地址相同,则用于确定所述第一媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。
  19. 一种服务器,其特征在于,所述服务器为第二媒体服务器,包括:
    接收单元,用于接收第一媒体服务器发送的服务请求,所述服务请求用于获取终端所需目标内容,所述服务请求包含目的地址,所述目的地址包括目的IP地址和目的MAC地址,所述目的地址为所述第二媒体服务器的地址;
    查询单元,用于根据所述服务请求向数据库查询目标IP地址,所述目标IP地址为所述目标内容所在服务器的IP地址;
    第一处理单元,用于根据所述数据库反馈的候选IP地址确定所述目标IP地址;
    第二处理单元,若所述目标IP地址与所述第二媒体服务器的IP地址相同,则用于确定所述第二媒体服务器命中所述目标内容,将所述目标内容发送至所述终端。
  20. 根据权利要求19所述的服务器,其特征在于,所述接收单元包括:
    第一接收子单元,用于接收第一媒体服务器发送的服务请求;
    第一修改子单元,用于将所述服务请求的目的IP地址修改为所述第二媒体服务器的IP地址。
  21. 根据权利要求19所述的服务器,其特征在于,所述第一处理单元包括:
    第二接收子单元,用于接收所述数据库反馈的至少一个候选IP地址;
    第一确定子单元,若所述至少一个候选IP地址中包括所述第二媒体服务器的IP地址,则用于确定所述第二媒体服务器的IP地址为所述目标IP地址;
    第二确定子单元,若所述至少一个候选IP地址中不包括所述第二媒体服务器的IP地址,则用于确定所述候选IP地址中的任一地址为所述目标IP地址。
  22. 根据权利要求21所述的服务器,其特征在于,所述第一处理单元还包括:
    第一丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。
  23. 根据权利要求21所述的服务器,其特征在于,所述第一处理单元还包括:
    第二丢弃子单元,用于丢弃未被确定为所述目标IP地址的候选IP地址。
  24. 根据权利要求19所述的服务器,其特征在于,所述第二处理单元包括:
    第三确定子单元,用于确定所述第二媒体服务器命中所述目标内容;
    第二修改子单元,用于将所述目标内容的源IP地址修改为所述第一媒体服务器的IP地址,所述源IP地址用于所述终端继续与所述第一媒体服务器进行通信;
    发送子单元,用于将修改后的目标内容发送至所述终端。
  25. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行如权利要求1-12任意一项所述的方法。
  26. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1-12任意一项所述的方法。
PCT/CN2018/076975 2017-02-23 2018-02-22 一种基于会话迁移的调度方法及服务器 WO2018153345A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18757467.8A EP3576369B1 (en) 2017-02-23 2018-02-22 Session transfer-based scheduling method and server
US16/545,227 US11431765B2 (en) 2017-02-23 2019-08-20 Session migration—based scheduling method and server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710101630.1A CN108494720B (zh) 2017-02-23 2017-02-23 一种基于会话迁移的调度方法及服务器
CN201710101630.1 2017-02-23

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/545,227 Continuation US11431765B2 (en) 2017-02-23 2019-08-20 Session migration—based scheduling method and server

Publications (1)

Publication Number Publication Date
WO2018153345A1 true WO2018153345A1 (zh) 2018-08-30

Family

ID=63253119

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/076975 WO2018153345A1 (zh) 2017-02-23 2018-02-22 一种基于会话迁移的调度方法及服务器

Country Status (4)

Country Link
US (1) US11431765B2 (zh)
EP (1) EP3576369B1 (zh)
CN (1) CN108494720B (zh)
WO (1) WO2018153345A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992414A (zh) * 2021-10-28 2022-01-28 马上消费金融股份有限公司 数据的访问方法、装置及设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113612735B (zh) * 2021-07-15 2022-09-02 中国联合网络通信集团有限公司 安全存储系统
CN115695301A (zh) * 2021-07-29 2023-02-03 中兴通讯股份有限公司 待传输报文的发送方法及装置、存储介质及电子装置
CN116996579B (zh) * 2023-09-27 2024-02-27 联通在线信息科技有限公司 基于复用302地址提高分片请求下载速度的方法及系统
CN117768467A (zh) * 2024-01-12 2024-03-26 腾讯科技(深圳)有限公司 数据传输方法、装置、计算机设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557423A (zh) * 2009-05-07 2009-10-14 北京邮电大学 一种实现流媒体内容服务的系统和方法
US20120089700A1 (en) * 2010-10-10 2012-04-12 Contendo, Inc. Proxy server configured for hierarchical caching and dynamic site acceleration and custom object and associated method
CN103905526A (zh) * 2014-03-05 2014-07-02 深圳市同洲电子股份有限公司 一种调度方法及服务器
CN104980416A (zh) * 2014-07-31 2015-10-14 腾讯科技(深圳)有限公司 一种内容分布网络中的数据访问方法、装置和系统

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419533B2 (en) * 2010-03-01 2019-09-17 Genghiscomm Holdings, LLC Edge server selection for device-specific network topologies
WO2011157150A2 (zh) * 2011-05-31 2011-12-22 华为技术有限公司 数据处理方法、缓存节点、协作控制器及系统
CN102255811B (zh) * 2011-07-14 2014-03-12 华为技术有限公司 一种获取节点间代价的方法,设备和系统
EP2753077A4 (en) * 2011-09-21 2015-05-20 Nec Corp CONTENT MANAGEMENT SYSTEM, CACHE SERVER, AND CONTENT PROCESSING METHOD
US8990509B2 (en) * 2012-09-24 2015-03-24 Hewlett-Packard Development Company, L.P. Accelerated path selection based on number of write requests and sequential trend
CN102932678A (zh) * 2012-10-31 2013-02-13 华为技术有限公司 媒体内容调度方法、系统及装置
CN103841142B (zh) * 2012-11-23 2017-06-20 华为技术有限公司 一种会话迁移的方法、装置及系统
US9130970B2 (en) * 2012-11-26 2015-09-08 Go Daddy Operating Company, LLC Systems for accelerating content delivery via DNS overriding
US10530738B2 (en) * 2014-08-07 2020-01-07 Citrix Systems, Inc. DNS resolution replay for bare domain names that map to “A” records
CN104967590B (zh) * 2014-09-18 2017-10-27 腾讯科技(深圳)有限公司 一种传输通信消息的方法、装置和系统
EP3213222B1 (en) * 2014-10-27 2021-03-24 Level 3 Communications, LLC Content delivery systems and methods
US9094464B1 (en) * 2014-12-18 2015-07-28 Limelight Networks, Inc. Connection digest for accelerating web traffic
CN106790324B (zh) * 2015-11-20 2020-06-16 华为技术有限公司 内容分发方法、虚拟服务器管理方法、云平台和系统
KR102293001B1 (ko) * 2016-03-03 2021-08-24 에스케이텔레콤 주식회사 컨텐츠 제공 및 캐싱 방법, 이를 위한 프로그램을 기록한 컴퓨터 판독 가능한 기록매체
CN105933399A (zh) * 2016-04-18 2016-09-07 乐视控股(北京)有限公司 基于sdn的内容分发网络的实现方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101557423A (zh) * 2009-05-07 2009-10-14 北京邮电大学 一种实现流媒体内容服务的系统和方法
US20120089700A1 (en) * 2010-10-10 2012-04-12 Contendo, Inc. Proxy server configured for hierarchical caching and dynamic site acceleration and custom object and associated method
CN103905526A (zh) * 2014-03-05 2014-07-02 深圳市同洲电子股份有限公司 一种调度方法及服务器
CN104980416A (zh) * 2014-07-31 2015-10-14 腾讯科技(深圳)有限公司 一种内容分布网络中的数据访问方法、装置和系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992414A (zh) * 2021-10-28 2022-01-28 马上消费金融股份有限公司 数据的访问方法、装置及设备

Also Published As

Publication number Publication date
US20190379709A1 (en) 2019-12-12
EP3576369A4 (en) 2020-01-08
US11431765B2 (en) 2022-08-30
CN108494720B (zh) 2021-02-12
EP3576369A1 (en) 2019-12-04
EP3576369B1 (en) 2021-04-07
CN108494720A (zh) 2018-09-04

Similar Documents

Publication Publication Date Title
WO2018153345A1 (zh) 一种基于会话迁移的调度方法及服务器
WO2021218397A1 (zh) 用于实现业务连续性的方法及相关设备
WO2020186909A1 (zh) 虚拟网络业务处理方法、装置和系统,控制器,存储介质
JP6008467B2 (ja) コンテンツセントリックネットワーク上のセッションマイグレーション
US10250646B2 (en) Method and device for establishing channel
US11025724B2 (en) Transport of control data in proxy-based network communications
WO2019128240A1 (zh) 一种数据路由方法以及终端
WO2016015582A1 (zh) 传输报文的方法、装置和系统
WO2020253631A1 (zh) Ip地址的配置方法、设备及系统
WO2014190791A1 (zh) 一种网关设备身份设置的方法及管理网关设备
WO2021063028A1 (zh) 为业务提供网络服务的方法、装置和计算设备
EP3217611A1 (en) Media resource feedback method and device
WO2019071995A1 (zh) 内容分发方法、设备及系统
US20210084100A1 (en) Packet Processing Method, Related Device, and Computer Storage Medium
WO2018040096A1 (zh) 一种标识信息的处理方法、数据库控制系统以及相关设备
US10455039B2 (en) Method and router for sending and processing data
CN112929264B (zh) 业务流量传输方法、系统及网络设备
KR20050008526A (ko) 컴퓨터 판독가능 매체
WO2017097092A1 (zh) 缓存集群服务的处理方法及系统
CN110545230A (zh) 用于转发vxlan报文的方法和装置
KR20110001863A (ko) Sip 서블릿 애플리케이션 공동 호스팅 방법, 서버 및 컴퓨터 판독 가능한 저장매체
US10129320B2 (en) QoS improvement method, apparatus, and system
WO2023143579A1 (zh) 流表项的控制方法以及装置
WO2015103738A1 (zh) 一种内容分发方法、装置和系统
JP2013126219A (ja) 転送サーバおよび転送プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18757467

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018757467

Country of ref document: EP

Effective date: 20190826