WO2014048310A1 - Method, device and system for data interaction - Google Patents

Method, device and system for data interaction Download PDF

Info

Publication number
WO2014048310A1
WO2014048310A1 PCT/CN2013/084133 CN2013084133W WO2014048310A1 WO 2014048310 A1 WO2014048310 A1 WO 2014048310A1 CN 2013084133 W CN2013084133 W CN 2013084133W WO 2014048310 A1 WO2014048310 A1 WO 2014048310A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel switching
fast channel
media stream
address
request message
Prior art date
Application number
PCT/CN2013/084133
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2014048310A1 publication Critical patent/WO2014048310A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • H04N21/4384Accessing a communication channel involving operations to reduce the access time, e.g. fast-tuning for reducing channel switching latency

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data interaction method, apparatus, and system. Background technique
  • the Fast Channel Switching (FCC) method is gradually deployed in an interactive network television (for example, Internet Protocol Telephony, IPTV, Over The Top TV, OTT TV for short).
  • the devices in the interactive network television service based on the fast channel switching method generally include a Set Top Box (STB) and a fast channel switching server.
  • the fast channel switching server generally adopts the public network address of IPv4.
  • IPv4 public network address
  • the STB and the fast channel switching server can easily perform data interaction, for example, the STB sends a data request to the fast channel switching server, and the fast channel switching is performed.
  • the server can return a response message to the STB relative to the data request and send the media stream to the STB.
  • the IPv4 public network address has gradually dried up. Therefore, when the interactive network TV service is deployed on a large scale, the general fast channel switching server adopts the IPv4 public network address, and the STB generally uses the IPv4 private network address or the IPv6 address, and the STB needs to access the fast channel switching server.
  • a network address translation (NAT) or a carrier-grade NAT (CGN) device is established between the STB and the fast channel switching server to enable the IPv4 private network address or I Pv of the STB.
  • the address of 6 is pretending to be an IPv4 public network address when transmitting the data packet to perform data interaction with the fast channel switching server.
  • the fast channel switching server receives the data packet sent by the STB, it cannot determine the relationship between the STB and the fast channel switching server. Whether the network has performed network address translation, resulting in STB The network address translation is performed with the network between the fast channel switching server, and the fast channel switching server cannot send the media stream to the STB. Summary of the invention
  • the embodiment of the present invention provides a data interaction method, device, and system, which can solve the problem in the prior art that the fast channel switching server cannot determine whether the network between the STB and the fast channel switching server performs network address translation. If the network between the STB and the fast channel switching server performs network address translation, the fast channel switching server cannot issue a media stream to the STB.
  • the data interaction method provided by the embodiment of the present invention includes:
  • the fast channel switching server receives the fast channel switching request message, where the fast channel switching request message is used to request the fast channel switching service from the fast channel switching server;
  • the fast channel switching server After receiving the fast channel request message, the fast channel switching server determines whether a network between the fast channel switching server and the set top box that sends the fast channel switching request message has undergone network address translation;
  • the fast channel switching server forms a sending policy corresponding to the result according to whether the network between the fast channel switching server and the set top box determined by the network channel address has been subjected to network address translation;
  • the fast channel switching server transmits a fast channel switching request response and a media stream according to the sending policy.
  • the fast channel switching request message carries an IP address of the set top box, and the fast channel switching server determines the fast channel switching server.
  • Whether the network between the set top box that sends the fast channel switching request message has undergone network address translation includes:
  • the fast channel switching server compares the IP address of the set top box with the source IP address of the fast channel switching request message to determine whether the IP address of the set top box and the source IP address of the fast channel switching request message are the same. Where the IP address of the set top box and the fast channel If the source IP address of the handover request message is the same, it indicates that the network between the fast channel switching server and the set top box has not undergone network address translation, if the IP address of the set top box and the source IP address of the fast channel switching request message Different, it means that the network between the fast channel switching server and the set top box has undergone network address translation.
  • the fast channel switching server determines whether a network between the fast channel switching server and a set top box that sends the fast channel switching request message is After network address translation, including:
  • the fast channel switching server receives an indication message that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation.
  • the fast channel switching request message further includes sending the fast channel switching a fast channel switching request message source port number of the request message, a fast channel switching request message destination IP address, and a fast channel switching request message destination port number;
  • the forming a sending policy corresponding to the result includes:
  • the fast channel switching server generates a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address; wherein the first media stream source port number is The fast channel switching request message destination port number is reduced by n, n is a non-zero integer, the first media stream source IP address is the same as the fast channel switching request message destination IP address, and the first media stream destination port number is The source IP address of the first media stream is the same as the source IP address of the fast channel switching request message;
  • the sending, by the fast channel switching server, the media stream according to the sending policy includes: sending, by the fast channel switching server, the first media stream source port number, the first media stream source IP address, and the third channel mode A media stream destination port number and a first media stream of the first media stream destination IP address.
  • a fourth implementation in the first aspect After the fast channel switching server determines that the first media stream fails to be sent, the method further includes:
  • the fast channel switching server generates a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number and The destination number of the fast channel switching request message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the destination number of the second media stream is the same as the fast channel switching request.
  • the source port number of the message source is the same, and the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message.
  • the fast channel switching server sends a second media stream including a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address in a quintuple mode.
  • the media data in the second media stream and the media data in the first media stream are the same or partially identical.
  • the fast channel switching server provided by the embodiment of the present invention includes:
  • a first receiving unit configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server;
  • a first determining unit configured to: after the first receiving unit receives the fast channel request message, the fast channel switching server determines between the fast channel switching server and a set top box that sends the fast channel switching request message Whether the network has undergone network address translation;
  • a policy generating unit configured to form, according to a result of the network address translation between the fast channel switching server and the set top box determined by the first determining unit, forming a sending policy corresponding to the result; Switch request response and media stream.
  • the fast channel switching request message carries an IP address of the set top box, and the first determining unit,
  • IP address of the set top box and the source IP address of the fast channel switching request message Specifically used for the IP address of the set top box and the source IP address of the fast channel switching request message.
  • the address is compared to determine whether the I ⁇ address of the set top box and the source I ⁇ address of the fast channel switching request message are the same, wherein the IP address of the set top box is the same as the source IP address of the fast channel switching request message.
  • the network between the fast channel switching server and the set top box is not subjected to network address translation. If the IP address of the set top box and the source IP address of the fast channel switching request message are different, the fast channel is indicated. The network between the switching server and the set top box undergoes network address translation.
  • the first determining unit determines whether the first determining unit is a second implementation manner of the second aspect.
  • the method is configured to receive an indication message that is configured by the user to indicate whether a network between the fast channel switching server and the set top box has undergone network address translation.
  • the fast channel switching request message further includes a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request message destination port number for transmitting the fast channel switching request message;
  • the policy generating unit After the first determining unit determines that the network between the fast channel switching server and the set top box has undergone network address translation, the policy generating unit,
  • the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address are generated, where the first media stream source port number is the fast The channel switch request message destination port number minus n, n is a non-zero integer, the first media stream source IP address is the same as the fast channel switch request message destination IP address, the first media stream destination port number is The fast channel switching request message source port number is the same, and the first media stream destination IP address is the same as the fast channel switching request message source IP address;
  • the first sending unit is specifically configured to send, in the triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • the first media stream is specifically configured to send, in the triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • the first media stream is specifically configured to send, in the triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • the destination port number of the message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the second media stream is the same as the source port number of the fast channel switching request message.
  • the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message;
  • the first sending unit is further configured to send, in a quintuple mode, a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address.
  • the media stream in the second media stream and the media data in the first media stream are the same or partially identical.
  • the data interaction system includes a fast channel switching server and a set top box, where
  • the fast channel switching server is configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server, determine the fast channel switching server, and send the fast Whether the network between the set top boxes of the channel switching request message has undergone network address translation, and forms a transmission policy corresponding to the result according to whether the network address translation has passed, and sends a fast channel switching request response according to the sending policy.
  • the set top box is configured to send the fast forward channel switching request message, and receive the fast channel switching request response and a media stream.
  • the fast channel switching server determines the fast channel switching server and sends the fast channel switching. Is the network between the set-top boxes requesting messages? After the network address translation, the transmission policy is generated according to whether the network address translation has been performed, and the fast channel switching request response and the media stream are sent according to the sending policy, thereby ensuring that the network address translation is performed.
  • the fast channel switching server can still send the media stream to the set top box.
  • FIG. 1 is a flowchart of a method for interacting data according to an embodiment of the present invention
  • FIG. 2 is a flowchart 1 of a method for interacting data according to an embodiment of the present invention
  • FIG. 3 is a second flowchart of a method for interacting data according to an embodiment of the present invention.
  • FIG. 4 is a flowchart 3 of a method for interacting data according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a fast channel switching server according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a fast channel switching server according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an interaction system of data according to an embodiment of the present invention. detailed description
  • the data interaction method provided by the embodiment of the present invention includes:
  • the fast channel switching server receives the fast channel switching request message.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • the fast channel switching server After receiving the fast channel request message, the fast channel switching server determines whether a network between the fast channel switching server and the set top box that sends the fast channel switching request message has undergone network address translation.
  • the fast channel switching request message may carry the IP address of the set top box.
  • the fast channel switching request message may be in a “3 ⁇ 4 text format, so the fast channel switching request message further carries The source IP address of the fast channel switching request message, the Internet Protocol (IP) address of the set top box is stored in the content of the text, and the fast channel switching request message The source IP address is stored in the IP header of the text.
  • IP Internet Protocol
  • the fast channel switching server compares the IP address of the set top box with the source IP address of the fast channel switching request message to determine the set top box.
  • IP address and the source IP address of the fast channel switching request message are the same, where the IP address of the set top box and the source IP address of the fast channel switching request message are the same, indicating the fast channel switching server and the The network between the set top boxes is not converted by network address, if the IP address of the set top box and the fast Different channel switching request message the source IP address, then the zapping network between the server and the set top box through the network address translation.
  • the fast channel switching server receives an indication message that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation.
  • the fast channel switching server forms a sending policy corresponding to the result according to whether the network between the fast channel switching server and the set top box determined by the fast channel switching server has undergone network address translation.
  • the sending policy is a fast channel switching request response and a media stream returned by the fast channel switching server to the set top box according to whether the network address translation is performed.
  • IP address and port number etc.
  • the fast channel switching server sends a fast channel switching request according to the sending policy. Should be as well as the media stream.
  • the fast channel switching server may send the fast channel switching request response and the media stream according to the IP address and the port number in the sending policy.
  • the fast channel switching request response is a response to the fast channel switching request message, to inform the set top box that the fast channel switching server can provide a media stream for the set top box, where the media stream is in a fast channel switching service.
  • Business data is a response to the fast channel switching request message, to inform the set top box that the fast channel switching server can provide a media stream for the set top box, where the media stream is in a fast channel switching service.
  • the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has passed, and performs a fast channel switching request response and a media stream transmission according to the sending policy, thereby ensuring that the network is transmitted through the network. In the case of address translation, the fast channel switching server can still send the media stream to the set top box.
  • the method for interacting data provided by the embodiment of the present invention, as shown in FIG. 2, includes:
  • the set top box sends a fast channel switching request message to the fast channel switching server.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message source IP address, a fast channel switching request message destination IP address, and a fast Channel switch request message destination port number.
  • the fast channel switching request message further carries the IP address of the organic set top box.
  • the fast channel switching request message may be in the form of a message, and the IP address of the set top box is stored in the packet of the packet.
  • the fast channel switching request message source IP address is stored in the IP header of the message.
  • step 202 Go to step 202 or step 203:
  • the fast channel switching server compares an IP address of the set top box with a source IP address of the fast channel switching request message, and determines that the determined result is an IP address of the set top box and the fast channel switching request message.
  • the source IP address is the same. Proceed to step 204.
  • the IP address of the set top box and the source IP address of the fast channel switching request message are the same, indicating that the network between the fast channel switching server and the set top box has not undergone network address translation.
  • the IP address of the set top box and the IP address of the fast channel switching server are both a network protocol version 4 (Internet Protocol Protocol 4, IPv4 for short) public network address, and the fast channel switching server and the The network between the set-top boxes can communicate normally without network address translation.
  • IP protocol version 4 Internet Protocol Protocol 4, IPv4 for short
  • the fast channel switching server receives an indication message that is configured by the user to indicate that the network between the fast channel switching server and the set top box has not undergone network address translation. Continue with step 204.
  • the fast channel switching server generates a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination. IP address.
  • the fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address,
  • the fast channel switching request response destination port number is the same as the fast channel switching request message source port number, and the fast channel switching request response destination IP address is the same as the fast channel switching request message source IP address.
  • the fast channel switching server generates a media stream source port number, a media stream source IP address, a media stream destination port number, and a media stream destination IP address of the media stream.
  • a media stream source port number a media stream source IP address
  • a media stream destination port number a media stream destination IP address of the media stream.
  • the media stream source port number is the destination number of the fast channel switching request message minus 1
  • the media stream source IP address is the same as the fast channel switching request message destination IP address
  • the media stream destination port number is The source port number of the fast channel switching request message is decremented by one, and the IP address of the media stream is the same as the source IP address of the fast channel switching request message.
  • the fast channel switching server sends the fast to the set top box by using a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address.
  • Channel switch request response The fast channel switching request response is used to notify the set top box that the fast channel switching server can provide the media stream to the set top box.
  • the fast channel switching server sends the media stream to the set top box by using the media stream source port number, the media stream source IP address, the media stream destination port number, and the media stream destination IP address.
  • the media stream is service data (such as TV program content, etc.) in the fast channel switching service, and the media stream destination port number is different from the fast channel switching request response source port number.
  • the port number is different from the fast channel switching request response destination port number, so when the set top box receives the fast channel switching request response and the media stream, the fast channel switching request response can be distinguished by the port number.
  • the media stream avoids confusing the fast channel switch request response with the media stream.
  • a method for interacting data according to another embodiment of the present invention includes:
  • Step 301 The set top box sends a fast channel switching request message to the fast channel switching server.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message source IP address, a fast channel switching request message destination IP address, and a fast Channel switch request message destination port number.
  • the fast channel switching request message further carries the IP address of the organic set top box.
  • the fast channel switching request message may be in the form of a message, and the IP address of the set top box is stored in the packet of the packet.
  • the fast channel switching request message source IP address is stored in the IP header of the message.
  • step 302 Go to step 302 or step 303:
  • the fast channel switching server compares an IP address of the set top box with a source IP address of the fast channel switching request message, and determines that the determined result is an IP address of the set top box and the fast channel switching request message.
  • the source IP address is not the same.
  • the IP address of the set top box and the source IP address of the fast channel switching request message are different.
  • the network between the fast channel switching server and the set top box is subjected to network address translation, and a network address translation device is disposed between the fast channel switching server and the set top box, and is configured to switch to the fast channel switching server.
  • the network between the set top boxes performs network address translation.
  • the network address translation device can masquerade the IP address of the IP address as an IPv4 public network address. In order to facilitate communication between the set top box and the fast channel switching server.
  • the fast channel switching server receives an indication message that is configured by the user to indicate that the network between the fast channel switching server and the set top box has undergone network address translation. Continue with step 304.
  • the fast channel switching server generates a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination. IP address.
  • the fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address,
  • the fast channel switching request response destination port number is the same as the fast channel switching request message source port number, and the fast channel switching request response destination IP address is the same as the fast channel switching request message source IP address, so that the The fast channel switching request response traverses the network address translation device to the set top box.
  • the fast channel switching server generates a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address.
  • the first media stream source IP address is the same as the fast channel switching request message destination IP address
  • the first media stream destination port number is the same as the fast channel switching request message source port number
  • the first media stream destination is The IP address is the same as the source IP address of the fast channel switching request message.
  • the setting is based on the default network address translation device being a triplet mode network address translation device, In the subsequent step, if the sending of the first media stream is successful, the network address translation device is a triplet mode network address translation device. If the first media stream fails to be sent, the network address translation device is five. Tuple mode network address translation device.
  • the fast channel switching server sends the fast to the set top box by using a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address.
  • Channel switch request response a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address.
  • the fast channel switching request response is used to notify the set top box that the fast channel switching server can provide the media stream to the set top box.
  • the fast channel switching server sends, in a triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • a media stream
  • the first media stream source port number is a source port number for sending the first media stream
  • the first media stream source IP address is a source IP address for sending the first media stream
  • the first The port number of the media stream is a destination port number for sending the first media stream
  • the destination IP address of the first media stream is a destination IP address for sending the first media stream.
  • the first media stream is service data (such as TV program content, etc.) in the fast channel switching service, and further, since the first media stream source port number is different from the fast channel switching request response source port number, When the set top box receives the fast channel switching request response and the first media stream, the fast channel switching request response and the first media stream can be distinguished by different port numbers, avoiding the fast The channel switch request response is confusing with the first media stream.
  • service data such as TV program content, etc.
  • the network between the fast channel switching server and the set top box passes through the triplet mode network.
  • Network address translation of the address translation device A triplet mode network address translation device is disposed between the fast channel switching server and the set top box (the triplet mode network address translation device maps all requests from the same internal IP address and port to the same external IP address And port, any external host can send IP packets to the internal host through the mapping).
  • the fast channel switching server generates a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address.
  • the setting is that after the first media stream fails to be sent, the network address translation device is considered to be a five-tuple mode network address translation device (when the same internal host uses the port corresponding to the same port number and the external of the different IP address) When the host communicates, the five-tuple mode network address translation device will have different mappings to the internal host.
  • the five-tuple mode network address translation device does not guarantee the binding between the private network IP address and the public network IP address in all sessions. The consistency is determined, and when the second media stream is sent, it will be transmitted in the quintuple mode.
  • the second media stream source port number is the same as the fast channel switching request message destination port number, and the second media stream source IP address is the same as the fast channel switching request message destination IP address, the second The port number of the media stream is the same as the source port number of the fast channel switching request message, and the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message.
  • the fast channel switching server sends, in a quintuple mode, a second media that includes a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address. flow.
  • the second media stream source port number is a source port number for sending the second media stream
  • the second media stream source IP address is a source IP address for sending the second media stream
  • the second The port number of the media stream is the destination port number of the second media stream
  • the destination IP address of the second media stream is the destination IP address of the second media stream.
  • the media data in the second media stream and the media data in the first media stream are the same or partially identical.
  • the second media stream is service data (such as a television program) in a fast channel switching service.
  • the fast channel switching server sends the fast channel switching request response and the second media stream source IP address, the second media stream destination IP address, and the second media stream source port of the second media stream And the port number of the second media stream are the same, so when the set top box receives the fast channel switching request response and the second media stream, in order to avoid the fast channel switching request response and the second
  • the media stream is confusing, and the packet headers of the fast channel switching request response and the second media stream may be specifically analyzed, for example, according to the number of bits of the feedback message type of the two types of packets and the number of bits of the payload type.
  • the fast channel switching request response and the second media stream are distinguished, but are not limited thereto.
  • the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has passed, and performs a fast channel switching request response and a media stream transmission according to the sending policy, thereby ensuring that the network is transmitted through the network. In the case of address translation, the fast channel switching server can still send the media stream to the set top box.
  • the fast channel switching server provided by the embodiment of the present invention is configured to implement the function of the fast channel switching server in any one of the embodiments corresponding to FIG.
  • the fast channel switching server as shown in FIG. 5 includes:
  • the first receiving unit 41 is configured to receive a fast channel switching request message.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • a first determining unit 42 configured to: after the first receiving unit 41 receives the fast channel request message, the fast channel switching server determines the fast channel switching server and a set top box that sends the fast channel switching request message Whether the network between the networks has undergone network address translation.
  • the fast channel switching server determines the fast channel switching server and a set top box that sends the fast channel switching request message Whether the network between the networks has undergone network address translation.
  • the policy generating unit 43 is configured to form, according to the result that the network between the fast channel switching server and the set top box that the first determining unit 42 has passed the network address translation, form a sending corresponding to the result.
  • Strategy For the specific implementation, refer to step 103 in Figure 1, where not Let me repeat.
  • the first sending unit 44 is configured to send a fast channel switching request response and a media stream according to the sending policy generated by the policy generating unit 43.
  • the first sending unit 44 refers to step 104 in Figure 1, and no further details are provided here.
  • the fast channel switching request message carries an IP address of the set top box.
  • the first determining unit 42 is specifically configured to compare an IP address of the set top box with a source IP address of the fast channel switching request message to determine an IP address of the set top box and the fast channel switching request message. Whether the source IP address is the same, if the IP address of the set-top box is the same as the source IP address of the fast channel switching request message, it indicates that the network between the fast channel switching server and the set-top box has not undergone network address translation. If the IP address of the set top box is different from the source IP address of the fast channel switching request message, it indicates that the network between the fast channel switching server and the set top box has undergone network address translation.
  • the first determining unit 42 is specifically configured to receive an indication that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation. Message.
  • the fast channel switching request message further carries a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching for transmitting the fast channel switching request message.
  • the destination port number of the request message is not limited to the destination port number of the request message.
  • the policy generating unit 43 when the first determining unit 42 determines that the network between the fast channel switching server and the set top box has not undergone network address translation, the policy generating unit 43
  • a fast channel switching request response source port number a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response;
  • the fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed.
  • Request The response destination port number is the same as the fast channel switching request message source port number, and the fast channel switching request response destination IP address is the same as the fast channel switching request message source IP address.
  • the destination IP address of the switching request message is the same, the port number of the media stream is the source port number of the fast channel switching request message minus 1, and the destination IP address of the media stream is the same as the source IP address of the fast channel switching request message.
  • the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request for sending the fast channel switching request message.
  • the destination port number of the message is a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request for sending the fast channel switching request message.
  • the policy generating unit 43 After the first determining unit 42 determines that the network between the fast channel switching server and the set top box has undergone network address translation, the policy generating unit 43
  • a fast channel switching request response source port number a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response;
  • the fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed.
  • the request response destination port number is the same as the fast channel switch request message source port number, and the fast channel switch request response destination IP address is the same as the fast channel switch request message source IP address.
  • the policy generating unit 43 is further configured to generate a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address; wherein the first media stream The source port number is the destination number of the fast channel switching request message minus n, n is a non-zero integer, and the first media stream source IP address is the same as the destination IP address of the fast channel switching request message, the first media The port number of the flow is the same as the source port number of the fast channel switching request message, the first medium The body stream destination IP address is the same as the fast channel switching request message source IP address.
  • the first sending unit 44 is specifically configured to send, in the triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • the first media stream source port number is a source port number for sending the first media stream
  • the first media stream source IP address is a source IP address for sending the first media stream
  • the destination port number is the destination port number of the first media stream
  • the destination IP address of the first media stream is the destination IP address of the first media stream.
  • the policy generating unit 43 is further configured to:
  • the destination port number of the message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the second media stream is the same as the source port number of the fast channel switching request message.
  • the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message;
  • the first sending unit 44 is further configured to send, in a quintuple mode, a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address.
  • the second media stream, the media data in the second media stream and the media data in the first media stream are the same or partially identical.
  • the second media stream source port number is a source port number for sending the second media stream
  • the second media stream source IP address is a source IP address for sending the second media stream
  • the destination port number is the destination port number of the second media stream
  • the destination IP address of the second media stream is the destination IP address of the second media stream.
  • the fast channel switching server provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has been performed, and according to The sending policy performs a fast channel switching request response and a media stream transmission, thereby ensuring that the fast channel switching server can still send the media stream to the set top box after the network address translation.
  • the fast channel switching server provided by the embodiment of the present invention is configured to implement the function of the fast channel switching server in any one of the embodiments corresponding to FIG.
  • the fast channel switching server as shown in FIG. 6 includes:
  • the receiver 51 is configured to receive a fast channel switching request message.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
  • the processor 52 is configured to: after the receiver 51 receives the fast channel request message, the fast channel switching server determines a network between the fast channel switching server and a set top box that sends the fast channel switching request message Whether it has undergone network address translation.
  • the fast channel switching server determines a network between the fast channel switching server and a set top box that sends the fast channel switching request message Whether it has undergone network address translation.
  • the processor 52 is further configured to: according to the result that the network between the fast channel switching server and the set top box determined by the processor 52 has undergone network address translation, form a sending corresponding to the result Strategy.
  • the network between the fast channel switching server and the set top box determined by the processor 52 has undergone network address translation, form a sending corresponding to the result Strategy.
  • the transmitter 53 is configured to send a fast channel switching request response and a media stream according to the processor 52 sending a policy.
  • a fast channel switching request response and a media stream according to the processor 52 sending a policy.
  • the fast channel switching request message carries an IP address of the set top box.
  • the processor 52 is configured to compare an IP address of the set top box with a source IP address of the fast channel switch request message to determine an IP address of the set top box and a source IP address of the fast channel switch request message. If the IP address of the set top box is the same as the source IP address of the fast channel switching request message, it indicates that the network between the fast channel switching server and the set top box has not undergone network address translation. The IP address of the set top box is different from the source IP address of the fast channel switching request message, indicating that the fast channel switching server and the set top box are The network has undergone network address translation.
  • the processor 52 is configured to receive an indication message that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation.
  • the fast channel switching request message further includes a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching for transmitting the fast channel switching request message.
  • the destination port number of the request message is not limited to the destination port number of the request message.
  • the processor 52 determines that the network between the fast channel switching server and the set top box has not undergone network address translation, the processor 52,
  • a fast channel switching request response source port number a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response;
  • the fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed.
  • the request response destination port number is the same as the fast channel switch request message source port number, and the fast channel switch request response destination IP address is the same as the fast channel switch request message source IP address.
  • the processor 52 is further configured to generate a media stream source port number, a media stream source IP address, a media stream destination port number, and a media stream destination IP address of the media stream, where the media stream source port number is The destination number of the fast channel switching request message is decreased by one, and the IP address of the media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the media stream is the source port of the fast channel switching request message. The number is decreased by 1, and the IP address of the media stream is the same as the source IP address of the fast channel switching request message.
  • the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request for sending the fast channel switching request message.
  • the destination port number of the message is a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request for sending the fast channel switching request message.
  • the processor 52 determines between the fast channel switching server and the set top box After the network has undergone network address translation, the processor 52
  • a fast channel switching request response source port number a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response;
  • the fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed.
  • the request response destination port number is the same as the fast channel switch request message source port number, and the fast channel switch request response destination IP address is the same as the fast channel switch request message source IP address.
  • the processor 52 is further configured to generate a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address; wherein the first media stream source The port number is the destination number of the fast channel switching request message minus n, n is a non-zero integer, and the first media stream source IP address is the same as the destination IP address of the fast channel switching request message, the first media stream The destination port number is the same as the source address of the fast channel switching request message, and the destination IP address of the first media stream is the same as the source IP address of the fast channel switching request message.
  • the transmitter 53 is configured to send, in a triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • the first media stream is configured to send, in a triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address.
  • the processor 52 is further configured to:
  • the destination port number of the message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the second media stream is the same as the source port number of the fast channel switching request message.
  • the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message.
  • the transmitter 53 is further configured to send, in a five-tuple mode, a second media stream source port number, and a second a second media stream of the media stream source IP address, the second media stream destination port number, and the second media stream destination IP address, where the media data in the second media stream is the same as the media data in the first media stream or Partially the same.
  • the fast channel switching server provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has passed, and performs a fast channel switching request response and a media stream transmission according to the sending policy, thereby ensuring that the network is transmitted through the network. In the case of address translation, the fast channel switching server can still send the media stream to the set top box.
  • the data interaction system provided by the embodiment of the present invention includes a fast channel switching server 61 and a set top box 62, and the fast channel switching server 61 and the set top box 62 are in the embodiment corresponding to FIG. 5 or FIG. Fast channel switching server and set-top box.
  • the fast channel switching server 61 is configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server, and determine the fast channel switching server. Whether the network between the set top box 62 that sends the fast channel switching request message has undergone network address translation, and forms a transmission policy corresponding to the result according to whether the network address translation has passed, and sends according to the sending policy. Fast channel switching request response and media stream.
  • the set top box 62 is configured to send the fast forward channel switching request message, and receive the fast channel switching request response and the media stream.
  • the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network between the networks has gone through the network Address conversion, and then generating a transmission policy according to whether the network address translation has been performed, and performing a fast channel switching request response and a media stream transmission according to the transmission policy, thereby ensuring a fast channel in the case of network address translation.
  • the switch server can still send media streams to the set top box.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • a hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A method, device and system for data interaction are disclosed in the embodiments of the invention. The invention relates to the technical field of communication and is configured to solve the problem in the prior art that when the Network Address Translation (NAT) occurs in the network between the Fast Channel Change (FCC) server and the Set Top Box (STB), the FCC server is unable to send media stream to STB. The method comprises the following steps: the FCC server receives an FCC request message; the FCC server confirms whether the NAT has occurred in the network between the FCC server and the STB sending the FCC request message; the FCC server forms corresponding transmission strategy according to the confirmed result whether the NAT has occurred in the network between the FCC server and the STB; and the FCC server sends the FCC request response and media stream according to the transmission strategy. The invention is applicable to mass deployment of IPTV service.

Description

数据的交互方法、 装置及系统 技术领域  Data interaction method, device and system
本发明涉及通信技术领域, 尤其涉及一种数据的交互方法、 装置及系统。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a data interaction method, apparatus, and system. Background technique
当前, 基于快速频道切换(Fas t Channel Change, 简称 FCC )方法在交互 式网络电视(例如: Internet Protocol Televi s ion, 简称 IPTV, Over The Top TV, 简称 OTT TV ) 中逐渐普及部署。 其中基于快速频道切换方法的交互式网络 电视业务中的设备一般包括机顶盒(Set Top Box, 简称 STB )、 快速频道切换服 务器。 快速频道切换服务器一般采用 IPv4的公网地址, 当 STB也采用 IPv4公网地 址时, STB与快速频道切换服务器即可轻易的进行数据交互, 例如 STB向快速频 道切换服务器发送数据请求, 快速频道切换服务器能够返回给 STB相对于所述数 据请求的响应消息, 并向 STB发送媒体流。 但是随着 IPv4公网地址的大量应用, IPv4公网地址已经逐渐枯竭。 因此, 当前大规模部署交互式网络电视业务时, 一般快速频道切换服务器采用 IPv4公网地址, 而 STB—般采用 IPv4私网地址或者 IPv6的地址, 则 STB若要访问快速频道切换服务器, 需要在 STB和快速频道切换 服务器之间建立网络地址转换 ( Network Addres s Trans lat ion, 简称 NAT )或 者运营级 NAT ( Carr ier Grade NAT, 简称 CGN )设备, 从而能使 STB的 IPv4私网 地址或者 I Pv 6的地址在发送数据包时伪装为一个 I Pv4公网地址, 以与所述快速 频道切换服务器进行数据交互。  Currently, the Fast Channel Switching (FCC) method is gradually deployed in an interactive network television (for example, Internet Protocol Telephony, IPTV, Over The Top TV, OTT TV for short). The devices in the interactive network television service based on the fast channel switching method generally include a Set Top Box (STB) and a fast channel switching server. The fast channel switching server generally adopts the public network address of IPv4. When the STB also adopts the IPv4 public network address, the STB and the fast channel switching server can easily perform data interaction, for example, the STB sends a data request to the fast channel switching server, and the fast channel switching is performed. The server can return a response message to the STB relative to the data request and send the media stream to the STB. However, with the large number of IPv4 public network addresses, the IPv4 public network address has gradually dried up. Therefore, when the interactive network TV service is deployed on a large scale, the general fast channel switching server adopts the IPv4 public network address, and the STB generally uses the IPv4 private network address or the IPv6 address, and the STB needs to access the fast channel switching server. A network address translation (NAT) or a carrier-grade NAT (CGN) device is established between the STB and the fast channel switching server to enable the IPv4 private network address or I Pv of the STB. The address of 6 is pretending to be an IPv4 public network address when transmitting the data packet to perform data interaction with the fast channel switching server.
在实现本发明实施例的过程中, 发明人发现现有技术中至少存在如下问题: 快速频道切换服务器在接收到 STB发送的数据包时, 并不能确定所述 STB 与快速频道切换服务器之间的网络是否进行了网络地址转换, 从而造成若 STB 与快速频道切换服务器之间的网络进行了网络地址转换, 快速频道切换服务器 不能向所述 STB发送媒体流的问题。 发明内容 In the process of implementing the embodiments of the present invention, the inventor finds that at least the following problems exist in the prior art: When the fast channel switching server receives the data packet sent by the STB, it cannot determine the relationship between the STB and the fast channel switching server. Whether the network has performed network address translation, resulting in STB The network address translation is performed with the network between the fast channel switching server, and the fast channel switching server cannot send the media stream to the STB. Summary of the invention
本发明的实施例提供一种数据的交互方法、 装置及系统, 能够解决现有技 术中由于快速频道切换服务器不能确定所述 STB与快速频道切换服务器之间的 网络是否进行了网络地址转换, 导致若 STB与快速频道切换服务器之间的网络 进行了网络地址转换, 快速频道切换服务器不能向所述 STB发送媒体流的问题。  The embodiment of the present invention provides a data interaction method, device, and system, which can solve the problem in the prior art that the fast channel switching server cannot determine whether the network between the STB and the fast channel switching server performs network address translation. If the network between the STB and the fast channel switching server performs network address translation, the fast channel switching server cannot issue a media stream to the STB.
为达到上述目的, 本发明采用如下技术方案:  In order to achieve the above object, the present invention adopts the following technical solutions:
第一方面, 本发明实施例提供的数据的交互方法, 包括:  The first aspect, the data interaction method provided by the embodiment of the present invention includes:
快速频道切换服务器接收快速频道切换请求消息, 所述快速频道切换请求 消息用于向所述快速频道切换服务器请求快速频道切换业务;  The fast channel switching server receives the fast channel switching request message, where the fast channel switching request message is used to request the fast channel switching service from the fast channel switching server;
在接收到所述快速频道请求消息后, 所述快速频道切换服务器确定所述快 速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否 经过了网络地址转换;  After receiving the fast channel request message, the fast channel switching server determines whether a network between the fast channel switching server and the set top box that sends the fast channel switching request message has undergone network address translation;
所述快速频道切换服务器根据其确定到的所述快速频道切换服务器与所述 机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所述结果相对应的 发送策略;  And the fast channel switching server forms a sending policy corresponding to the result according to whether the network between the fast channel switching server and the set top box determined by the network channel address has been subjected to network address translation;
所述快速频道切换服务器根据所述发送策略发送快速频道切换请求响应以 及媒体流。  The fast channel switching server transmits a fast channel switching request response and a media stream according to the sending policy.
结合所述第一方面, 在所述第一方面的第一种实现方式中, 所述快速频道 切换请求消息携带有所述机顶盒的 IP地址, 所述快速频道切换服务器确定所述 快速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络是 否经过了网络地址转换, 包括:  With reference to the first aspect, in a first implementation manner of the first aspect, the fast channel switching request message carries an IP address of the set top box, and the fast channel switching server determines the fast channel switching server. Whether the network between the set top box that sends the fast channel switching request message has undergone network address translation includes:
所述快速频道切换服务器对所述机顶盒的 IP地址和所述快速频道切换请求 消息的源 IP地址进行比较, 以确定所述机顶盒的 IP地址和所述快速频道切换 请求消息的源 IP地址是否相同, 其中若所述机顶盒的 IP地址和所述快速频道 切换请求消息的源 IP地址相同, 则表示所述快速频道切换服务器与所述机顶盒 之间的网络未经过网络地址转换, 若所述机顶盒的 IP地址和所述快速频道切换 请求消息的源 IP地址不同, 则表示所述快速频道切换服务器与所述机顶盒之间 的网络经过了网络地址转换。 The fast channel switching server compares the IP address of the set top box with the source IP address of the fast channel switching request message to determine whether the IP address of the set top box and the source IP address of the fast channel switching request message are the same. Where the IP address of the set top box and the fast channel If the source IP address of the handover request message is the same, it indicates that the network between the fast channel switching server and the set top box has not undergone network address translation, if the IP address of the set top box and the source IP address of the fast channel switching request message Different, it means that the network between the fast channel switching server and the set top box has undergone network address translation.
结合所述第一方面, 在所述第一方面的第二种实现方式中, 所述快速频道 切换服务器确定所述快速频道切换服务器与发送所述快速频道切换请求消息的 机顶盒之间的网络是否经过了网络地址转换, 包括:  With reference to the first aspect, in a second implementation manner of the first aspect, the fast channel switching server determines whether a network between the fast channel switching server and a set top box that sends the fast channel switching request message is After network address translation, including:
所述快速频道切换服务器接收用户配置的用于指示所述快速频道切换服务 器与所述机顶盒之间的网络是否经过了网络地址转换的指示消息。  The fast channel switching server receives an indication message that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation.
结合所述第一方面的第一种实现方式或第二种实现方式, 在所述第一方面 的第三种实现方式中, 所述快速频道切换请求消息中还携带有发送所述快速频 道切换请求消息的快速频道切换请求消息源端口号、 快速频道切换请求消息目 的 IP地址和快速频道切换请求消息目的端口号;  In combination with the first implementation manner or the second implementation manner of the first aspect, in the third implementation manner of the first aspect, the fast channel switching request message further includes sending the fast channel switching a fast channel switching request message source port number of the request message, a fast channel switching request message destination IP address, and a fast channel switching request message destination port number;
当所述快速频道切换服务器与所述机顶盒之间的网络经过了网络地址转换 后, 所述形成与所述结果相对应的发送策略, 包括:  After the network between the fast channel switching server and the set top box is subjected to network address translation, the forming a sending policy corresponding to the result includes:
所述快速频道切换服务器生成第一媒体流源端口号、第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP地址; 其中所述第一媒体流源端 口号为所述快速频道切换请求消息目的端口号减 n, n为非零整数, 所述第一媒 体流源 IP地址与所述快速频道切换请求消息目的 IP地址相同, 所述第一媒体 流目的端口号与所述快速频道切换请求消息源端口号相同, 所述第一媒体流目 的 IP地址与所述快速频道切换请求消息源 IP地址相同;  The fast channel switching server generates a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address; wherein the first media stream source port number is The fast channel switching request message destination port number is reduced by n, n is a non-zero integer, the first media stream source IP address is the same as the fast channel switching request message destination IP address, and the first media stream destination port number is The source IP address of the first media stream is the same as the source IP address of the fast channel switching request message;
所述快速频道切换服务器根据所述发送策略发送所述媒体流包括: 所述快速频道切换服务器以三元组模式发送包括所述第一媒体流源端口 号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP地 址的第一媒体流。  The sending, by the fast channel switching server, the media stream according to the sending policy includes: sending, by the fast channel switching server, the first media stream source port number, the first media stream source IP address, and the third channel mode A media stream destination port number and a first media stream of the first media stream destination IP address.
结合所述第一方面的第三种实现方式, 在所述第一方面的第四种实现方式 中, 当所述快速频道切换服务器确定所述第一媒体流发送失败后, 所述方法还 包括: In conjunction with the third implementation of the first aspect, a fourth implementation in the first aspect After the fast channel switching server determines that the first media stream fails to be sent, the method further includes:
所述快速频道切换服务器生成第二媒体流源端口号、第二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址; 其中所述第二媒体流源端 口号与所述快速频道切换请求消息目的端口号相同, 所述第二媒体流源 IP地址 与所述快速频道切换请求消息目的 IP地址相同, 所述第二媒体流目的端口号与 所述快速频道切换请求消息源端口号相同, 所述第二媒体流目的 IP地址与所述 快速频道切换请求消息源 IP地址相同;  The fast channel switching server generates a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number and The destination number of the fast channel switching request message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the destination number of the second media stream is the same as the fast channel switching request. The source port number of the message source is the same, and the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message.
所述快速频道切换服务器以五元组模式发送包括第二媒体流源端口号、 第 二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址的第 二媒体流, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相同 或部分相同。  The fast channel switching server sends a second media stream including a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address in a quintuple mode. The media data in the second media stream and the media data in the first media stream are the same or partially identical.
第二方面, 本发明实施例提供的快速频道切换服务器, 包括:  In a second aspect, the fast channel switching server provided by the embodiment of the present invention includes:
第一接收单元, 用于接收快速频道切换请求消息, 所述快速频道切换请求 消息用于向所述快速频道切换服务器请求快速频道切换业务;  a first receiving unit, configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server;
第一确定单元, 用于在所述第一接收单元接收到所述快速频道请求消息后, 所述快速频道切换服务器确定所述快速频道切换服务器与发送所述快速频道切 换请求消息的机顶盒之间的网络是否经过了网络地址转换;  a first determining unit, configured to: after the first receiving unit receives the fast channel request message, the fast channel switching server determines between the fast channel switching server and a set top box that sends the fast channel switching request message Whether the network has undergone network address translation;
策略生成单元, 用于根据所述第一确定单元确定到的所述快速频道切换服 务器与所述机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所述结 果相对应的发送策略; 切换请求响应以及媒体流。  a policy generating unit, configured to form, according to a result of the network address translation between the fast channel switching server and the set top box determined by the first determining unit, forming a sending policy corresponding to the result; Switch request response and media stream.
结合所述第二方面, 在所述第二方面的第一种实现方式中, 所述快速频道 切换请求消息携带有所述机顶盒的 IP地址, 所述第一确定单元,  With reference to the second aspect, in a first implementation manner of the second aspect, the fast channel switching request message carries an IP address of the set top box, and the first determining unit,
具体用于对所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地 址进行比较 ,以确定所述机顶盒的 I Ρ地址和所述快速频道切换请求消息的源 I Ρ 地址是否相同, 其中若所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地址相同, 则表示所述快速频道切换服务器与所述机顶盒之间的网络未经过 网络地址转换, 若所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP 地址不同, 则表示所述快速频道切换服务器与所述机顶盒之间的网络经过了网 络地址转换。 Specifically used for the IP address of the set top box and the source IP address of the fast channel switching request message. The address is compared to determine whether the I Ρ address of the set top box and the source I Ρ address of the fast channel switching request message are the same, wherein the IP address of the set top box is the same as the source IP address of the fast channel switching request message. The network between the fast channel switching server and the set top box is not subjected to network address translation. If the IP address of the set top box and the source IP address of the fast channel switching request message are different, the fast channel is indicated. The network between the switching server and the set top box undergoes network address translation.
结合所述第二方面, 在所述第二方面的第二种实现方式中, 所述第一确定 单元,  With reference to the second aspect, in a second implementation manner of the second aspect, the first determining unit,
具体用于接收用户配置的用于指示所述快速频道切换服务器与所述机顶盒 之间的网络是否经过了网络地址转换的指示消息。  Specifically, the method is configured to receive an indication message that is configured by the user to indicate whether a network between the fast channel switching server and the set top box has undergone network address translation.
结合所述第二方面的第一种实现方式或第二种实现方式, 在所述第二方面 的第三种实现方式中,  With reference to the first implementation manner or the second implementation manner of the second aspect, in a third implementation manner of the second aspect,
所述快速频道切换请求消息中还携带有发送所述快速频道切换请求消息的 快速频道切换请求消息源端口号、 快速频道切换请求消息目的 IP地址和快速频 道切换请求消息目的端口号;  The fast channel switching request message further includes a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request message destination port number for transmitting the fast channel switching request message;
当所述第一确定单元确定到所述快速频道切换服务器与所述机顶盒之间的 网络经过了网络地址转换后, 所述策略生成单元,  After the first determining unit determines that the network between the fast channel switching server and the set top box has undergone network address translation, the policy generating unit,
具体用于生成第一媒体流源端口号、 第一媒体流源 IP地址、 第一媒体流目 的端口号以及第一媒体流目的 IP地址; 其中所述第一媒体流源端口号为所述快 速频道切换请求消息目的端口号减 n, n为非零整数, 所述第一媒体流源 IP地 址与所述快速频道切换请求消息目的 I P地址相同, 所述第一媒体流目的端口号 与所述快速频道切换请求消息源端口号相同, 所述第一媒体流目的 IP地址与所 述快速频道切换请求消息源 IP地址相同;  Specifically, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address are generated, where the first media stream source port number is the fast The channel switch request message destination port number minus n, n is a non-zero integer, the first media stream source IP address is the same as the fast channel switch request message destination IP address, the first media stream destination port number is The fast channel switching request message source port number is the same, and the first media stream destination IP address is the same as the fast channel switching request message source IP address;
所述第一发送单元, 具体用于以三元组模式发送包括所述第一媒体流源端 口号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP 地址的第一媒体流。 结合所述第二方面的第三种实现方式, 在所述第二方面的第四种实现方式 中, 当所述快速频道切换服务器确定所述第一媒体流发送失败后, 所述策略生 成单元, 还用于: The first sending unit is specifically configured to send, in the triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address. The first media stream. With the third implementation of the second aspect, in a fourth implementation manner of the second aspect, after the fast channel switching server determines that the first media stream fails to be sent, the policy generating unit Also used for:
生成第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号 以及第二媒体流目的 IP地址; 其中所述第二媒体流源端口号与所述快速频道切 换请求消息目的端口号相同, 所述第二媒体流源 IP地址与所述快速频道切换请 求消息目的 IP地址相同, 所述第二媒体流目的端口号与所述快速频道切换请求 消息源端口号相同, 所述第二媒体流目的 IP地址与所述快速频道切换请求消息 源 IP地址相同;  Generating a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number and the fast channel switching request The destination port number of the message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the second media stream is the same as the source port number of the fast channel switching request message. The destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message;
所述第一发送单元, 还用于以五元组模式发送包括第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址的 第二媒体流, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相 同或部分相同。  The first sending unit is further configured to send, in a quintuple mode, a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address. The media stream in the second media stream and the media data in the first media stream are the same or partially identical.
第三方面, 本发明实施例提供的数据的交互系统, 包括快速频道切换服务 器和机顶盒, 其中,  In a third aspect, the data interaction system provided by the embodiment of the present invention includes a fast channel switching server and a set top box, where
所述快速频道切换服务器, 用于接收快速频道切换请求消息, 所述快速频 道切换请求消息用于向所述快速频道切换服务器请求快速频道切换业务, 确定 所述快速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网 络是否经过了网络地址转换, 并根据是否经过了网络地址转换的结果形成与所 述结果相对应的发送策略, 根据所述发送策略发送快速频道切换请求响应以及 媒体流;  The fast channel switching server is configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server, determine the fast channel switching server, and send the fast Whether the network between the set top boxes of the channel switching request message has undergone network address translation, and forms a transmission policy corresponding to the result according to whether the network address translation has passed, and sends a fast channel switching request response according to the sending policy. Media stream
所述机顶盒, 用于发送所述快速进频道切换请求消息, 并接收所述快速频 道切换请求响应以及媒体流。  The set top box is configured to send the fast forward channel switching request message, and receive the fast channel switching request response and a media stream.
本发明实施例提供的数据的交互方法、 装置及系统, 由于快速频道切换服 务器在接收到快速频道请求消息后, 所述快速频道切换服务器确定到了所述快 速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否 经过了网络地址转换, 进而根据是否经过了网络地址转换的结果生成发送策略, 并根据所述发送策略进行了快速频道切换请求响应以及媒体流的发送, 从而保 证了在经过网络地址转换的情况下, 快速频道切换服务器仍能将媒体流发送到 机顶盒上。 附图说明 例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 The data interaction method, device and system provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and sends the fast channel switching. Is the network between the set-top boxes requesting messages? After the network address translation, the transmission policy is generated according to whether the network address translation has been performed, and the fast channel switching request response and the media stream are sent according to the sending policy, thereby ensuring that the network address translation is performed. The fast channel switching server can still send the media stream to the set top box. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are incorporated in the drawings Other drawings can also be obtained from these drawings on the premise of creative labor.
图 1为本发明实施例提供的数据的交互方法的流程图;  FIG. 1 is a flowchart of a method for interacting data according to an embodiment of the present invention;
图 2为本发明实施例提供的数据的交互方法的流程图一;  2 is a flowchart 1 of a method for interacting data according to an embodiment of the present invention;
图 3为本发明实施例提供的数据的交互方法的流程图二;  3 is a second flowchart of a method for interacting data according to an embodiment of the present invention;
图 4为本发明实施例提供的数据的交互方法的流程图三;  4 is a flowchart 3 of a method for interacting data according to an embodiment of the present invention;
图 5为本发明实施例提供的快速频道切换服务器的结构示意图;  FIG. 5 is a schematic structural diagram of a fast channel switching server according to an embodiment of the present invention;
图 6为本发明实施例提供的快速频道切换服务器的结构示意图;  FIG. 6 is a schematic structural diagram of a fast channel switching server according to an embodiment of the present invention;
图 7为本发明实施例提供的数据的交互系统的结构示意图。 具体实施方式  FIG. 7 is a schematic structural diagram of an interaction system of data according to an embodiment of the present invention. detailed description
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  BRIEF DESCRIPTION OF THE DRAWINGS The technical solutions in the embodiments of the present invention will be described in detail with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative work are within the scope of the present invention.
为使本发明技术方案的优点更加清楚, 下面结合附图和实施例对本发明作 伴细说明。  In order to make the advantages of the technical solutions of the present invention clearer, the present invention will be described in detail below with reference to the accompanying drawings and embodiments.
如图 1所示, 本发明实施例提供的数据的交互方法, 包括:  As shown in FIG. 1, the data interaction method provided by the embodiment of the present invention includes:
101、 快速频道切换服务器接收快速频道切换请求消息。 其中, 所述快速频道切换请求消息用于向所述快速频道切换服务器请求快 速频道切换业务。 101. The fast channel switching server receives the fast channel switching request message. The fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
102、 在接收到所述快速频道请求消息后, 所述快速频道切换服务器确定所 述快速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络 是否经过了网络地址转换。  102. After receiving the fast channel request message, the fast channel switching server determines whether a network between the fast channel switching server and the set top box that sends the fast channel switching request message has undergone network address translation.
可选的, 所述快速频道切换请求消息可以携带有所述机顶盒的 IP地址, 具 体的, 所述快速频道切换请求消息可以是 "¾文形式, 因此所述快速频道切换请 求消息还带有所述快速频道切换请求消息的源 IP地址, 所述机顶盒的网络之间 互联协议( Internet Protocol , 简称 IP )地址存于所述才艮文的才艮文内容中, 而 所述快速频道切换请求消息的源 IP地址存于所述 文的 IP头上。 这样, 所述 快速频道切换服务器对所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地址进行比较,以确定所述机顶盒的 IP地址和所述快速频道切换请求消息的 源 IP地址是否相同, 其中若所述机顶盒的 IP地址和所述快速频道切换请求消 息的源 IP地址相同, 则表示所述快速频道切换服务器与所述机顶盒之间的网络 未经过网络地址转换, 若所述机顶盒的 IP地址和所述快速频道切换请求消息的 源 IP地址不同, 则表示所述快速频道切换服务器与所述机顶盒之间的网络经过 了网络地址转换。  Optionally, the fast channel switching request message may carry the IP address of the set top box. Specifically, the fast channel switching request message may be in a “3⁄4 text format, so the fast channel switching request message further carries The source IP address of the fast channel switching request message, the Internet Protocol (IP) address of the set top box is stored in the content of the text, and the fast channel switching request message The source IP address is stored in the IP header of the text. In this way, the fast channel switching server compares the IP address of the set top box with the source IP address of the fast channel switching request message to determine the set top box. Whether the IP address and the source IP address of the fast channel switching request message are the same, where the IP address of the set top box and the source IP address of the fast channel switching request message are the same, indicating the fast channel switching server and the The network between the set top boxes is not converted by network address, if the IP address of the set top box and the fast Different channel switching request message the source IP address, then the zapping network between the server and the set top box through the network address translation.
或者, 所述快速频道切换服务器接收用户配置的用于指示所述快速频道切 换服务器与所述机顶盒之间的网络是否经过了网络地址转换的指示消息。  Alternatively, the fast channel switching server receives an indication message that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation.
103、 所述快速频道切换服务器根据其确定到的所述快速频道切换服务器与 所述机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所述结果相对 应的发送策略。  103. The fast channel switching server forms a sending policy corresponding to the result according to whether the network between the fast channel switching server and the set top box determined by the fast channel switching server has undergone network address translation.
具体的, 所述发送策略是根据所述是否经过了网络地址转换的结果设置的 所述快速频道切换服务器向机顶盒返回的快速频道切换请求响应以及媒体流的 Specifically, the sending policy is a fast channel switching request response and a media stream returned by the fast channel switching server to the set top box according to whether the network address translation is performed.
IP地址和端口号等。 IP address and port number, etc.
104、 所述快速频道切换服务器根据所述发送策略发送快速频道切换请求响 应以及媒体流。 104. The fast channel switching server sends a fast channel switching request according to the sending policy. Should be as well as the media stream.
其中, 所述快速频道切换服务器可以根据所述发送策略中的 IP地址和端口 号发送所述快速频道切换请求响应以及媒体流。 所述快速频道切换请求响应是 相对于所述快速频道切换请求消息的响应, 以告知所述机顶盒所述快速频道切 换服务器能够为所述机顶盒提供媒体流, 所述媒体流为快速频道切换业务中的 业务数据。  The fast channel switching server may send the fast channel switching request response and the media stream according to the IP address and the port number in the sending policy. The fast channel switching request response is a response to the fast channel switching request message, to inform the set top box that the fast channel switching server can provide a media stream for the set top box, where the media stream is in a fast channel switching service. Business data.
本发明实施例提供的数据的交互方法, 由于快速频道切换服务器在接收到 快速频道请求消息后, 所述快速频道切换服务器确定到了所述快速频道切换服 务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否经过了网络地 址转换, 进而根据是否经过了网络地址转换的结果生成发送策略, 并根据所述 发送策略进行了快速频道切换请求响应以及媒体流的发送, 从而保证了在经过 网络地址转换的情况下, 快速频道切换服务器仍能将媒体流发送到机顶盒上。  The data interaction method provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has passed, and performs a fast channel switching request response and a media stream transmission according to the sending policy, thereby ensuring that the network is transmitted through the network. In the case of address translation, the fast channel switching server can still send the media stream to the set top box.
本发明实施例提供的数据的交互方法, 如图 2所示, 包括:  The method for interacting data provided by the embodiment of the present invention, as shown in FIG. 2, includes:
201、 机顶盒向快速频道切换服务器发送快速频道切换请求消息。  201. The set top box sends a fast channel switching request message to the fast channel switching server.
其中, 所述快速频道切换请求消息用于向所述快速频道切换服务器请求快 速频道切换业务。  The fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
具体的, 所述快速频道切换请求消息中携带有发送所述快速频道切换请求 消息的快速频道切换请求消息源端口号、 快速频道切换请求消息源 IP地址、 快 速频道切换请求消息目的 IP地址和快速频道切换请求消息目的端口号。 同时, 在所述快速频道切换请求消息中还携带有机顶盒的 IP地址, 具体的, 所述快速 频道切换请求消息可以是报文形式, 上述的机顶盒的 IP地址存于所述报文的报 文内容中, 而所述快速频道切换请求消息源 IP地址存于所述 ·艮文的 IP头上。  Specifically, the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message source IP address, a fast channel switching request message destination IP address, and a fast Channel switch request message destination port number. At the same time, the fast channel switching request message further carries the IP address of the organic set top box. Specifically, the fast channel switching request message may be in the form of a message, and the IP address of the set top box is stored in the packet of the packet. In the content, the fast channel switching request message source IP address is stored in the IP header of the message.
执行步骤 202或者步骤 203:  Go to step 202 or step 203:
202、 所述快速频道切换服务器对所述机顶盒的 IP地址和所述快速频道切 换请求消息的源 IP地址进行比较, 并确定得到确定结果为所述机顶盒的 IP地 址和所述快速频道切换请求消息的源 IP地址相同。 继续执行步骤 204。 所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地址相同表示 所述快速频道切换服务器与所述机顶盒之间的网络未经过网络地址转换。 202. The fast channel switching server compares an IP address of the set top box with a source IP address of the fast channel switching request message, and determines that the determined result is an IP address of the set top box and the fast channel switching request message. The source IP address is the same. Proceed to step 204. The IP address of the set top box and the source IP address of the fast channel switching request message are the same, indicating that the network between the fast channel switching server and the set top box has not undergone network address translation.
例如所述机顶盒的 IP地址与所述快速频道切换服务器的 IP地址均为网络 协议版本 4 ( Internet Protoco l Vers ion 4 , 简称 IPv4 )公网地址, 贝' J所述快 速频道切换服务器与所述机顶盒之间的网络无需进行网络地址转换即可正常通 信。  For example, the IP address of the set top box and the IP address of the fast channel switching server are both a network protocol version 4 (Internet Protocol Protocol 4, IPv4 for short) public network address, and the fast channel switching server and the The network between the set-top boxes can communicate normally without network address translation.
203、 所述快速频道切换服务器接收用户配置的用于指示所述快速频道切换 服务器与所述机顶盒之间的网络未经过网络地址转换的指示消息。 继续执行步 骤 204。  203. The fast channel switching server receives an indication message that is configured by the user to indicate that the network between the fast channel switching server and the set top box has not undergone network address translation. Continue with step 204.
204、 所述快速频道切换服务器生成所述快速频道切换请求响应的快速频道 切换请求响应源端口号、 快速频道切换请求响应源 IP地址、 快速频道切换请求 响应目的端口号以及快速频道切换请求响应目的 IP地址。  204. The fast channel switching server generates a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination. IP address.
其中, 所述快速频道切换请求响应源端口号与所述快速频道切换请求消息 目的端口号相同, 所述快速频道切换请求响应源 IP地址与所述快速频道切换请 求消息目的 IP地址相同, 所述快速频道切换请求响应目的端口号与所述快速频 道切换请求消息源端口号相同, 所述快速频道切换请求响应目的 IP地址与所述 快速频道切换请求消息源 IP地址相同。  The fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, The fast channel switching request response destination port number is the same as the fast channel switching request message source port number, and the fast channel switching request response destination IP address is the same as the fast channel switching request message source IP address.
205、 所述快速频道切换服务器生成所述媒体流的媒体流源端口号、 媒体流 源 IP地址、 媒体流目的端口号以及媒体流目的 IP地址。 继续执行步骤 206。  205. The fast channel switching server generates a media stream source port number, a media stream source IP address, a media stream destination port number, and a media stream destination IP address of the media stream. Continue to step 206.
其中, 所述媒体流源端口号为所述快速频道切换请求消息目的端口号减 1 , 所述媒体流源 IP地址与所述快速频道切换请求消息目的 IP地址相同, 所述媒 体流目的端口号为所述快速频道切换请求消息源端口号减 1 , 所述媒体流目的 IP地址与所述快速频道切换请求消息源 IP地址相同。  The media stream source port number is the destination number of the fast channel switching request message minus 1, the media stream source IP address is the same as the fast channel switching request message destination IP address, and the media stream destination port number is The source port number of the fast channel switching request message is decremented by one, and the IP address of the media stream is the same as the source IP address of the fast channel switching request message.
206、 所述快速频道切换服务器以快速频道切换请求响应源端口号、 快速频 道切换请求响应源 IP地址、 快速频道切换请求响应目的端口号以及快速频道切 换请求响应目的 IP地址向机顶盒发送所述快速频道切换请求响应。 其中, 所述快速频道切换请求响应用于告知所述机顶盒所述快速频道切换 服务器能够为所述机顶盒提供所述媒体流。 206. The fast channel switching server sends the fast to the set top box by using a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address. Channel switch request response. The fast channel switching request response is used to notify the set top box that the fast channel switching server can provide the media stream to the set top box.
207、 所述快速频道切换服务器以所述媒体流源端口号、 媒体流源 IP地址、 媒体流目的端口号以及媒体流目的 IP地址向机顶盒发送所述媒体流。  207. The fast channel switching server sends the media stream to the set top box by using the media stream source port number, the media stream source IP address, the media stream destination port number, and the media stream destination IP address.
其中, 所述媒体流为快速频道切换业务中的业务数据(例如电视节目内容 等), 此外由于所述媒体流源端口号与所述快速频道切换请求响应源端口号不 同, 所述媒体流目的端口号与所述快速频道切换请求响应目的端口号不同, 因 此在所述机顶盒接收到所述快速频道切换请求响应和媒体流时, 能够通过端口 号的不同而区分所述快速频道切换请求响应和媒体流, 避免将所述快速频道切 换请求响应和所述媒体流混淆。  The media stream is service data (such as TV program content, etc.) in the fast channel switching service, and the media stream destination port number is different from the fast channel switching request response source port number. The port number is different from the fast channel switching request response destination port number, so when the set top box receives the fast channel switching request response and the media stream, the fast channel switching request response can be distinguished by the port number. The media stream avoids confusing the fast channel switch request response with the media stream.
此外, 如图 3 所示, 本发明又一实施例提供的数据的交互方法, 所述方法 包括:  In addition, as shown in FIG. 3, a method for interacting data according to another embodiment of the present invention includes:
步骤 301、 所述机顶盒向快速频道切换服务器发送快速频道切换请求消息。 其中, 所述快速频道切换请求消息用于向所述快速频道切换服务器请求快 速频道切换业务。  Step 301: The set top box sends a fast channel switching request message to the fast channel switching server. The fast channel switching request message is used to request a fast channel switching service from the fast channel switching server.
具体的, 所述快速频道切换请求消息中携带有发送所述快速频道切换请求 消息的快速频道切换请求消息源端口号、 快速频道切换请求消息源 IP地址、 快 速频道切换请求消息目的 IP地址和快速频道切换请求消息目的端口号。 同时, 在所述快速频道切换请求消息中还携带有机顶盒的 IP地址, 具体的, 所述快速 频道切换请求消息可以是报文形式, 上述的机顶盒的 IP地址存于所述报文的报 文内容中, 而所述快速频道切换请求消息源 IP地址存于所述 ·艮文的 IP头上。  Specifically, the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message source IP address, a fast channel switching request message destination IP address, and a fast Channel switch request message destination port number. At the same time, the fast channel switching request message further carries the IP address of the organic set top box. Specifically, the fast channel switching request message may be in the form of a message, and the IP address of the set top box is stored in the packet of the packet. In the content, the fast channel switching request message source IP address is stored in the IP header of the message.
执行步骤 302或者步骤 303:  Go to step 302 or step 303:
302、 所述快速频道切换服务器对所述机顶盒的 IP地址和所述快速频道切 换请求消息的源 IP地址进行比较, 并确定得到确定结果为所述机顶盒的 IP地 址和所述快速频道切换请求消息的源 IP地址不相同。 继续执行步骤 304。  302. The fast channel switching server compares an IP address of the set top box with a source IP address of the fast channel switching request message, and determines that the determined result is an IP address of the set top box and the fast channel switching request message. The source IP address is not the same. Continue to step 304.
所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地址不相同表 示所述快速频道切换服务器与所述机顶盒之间的网络经过了网络地址转换, 所 述快速频道切换服务器与所述机顶盒之间设置有网络地址转换设备, 用于对所 述快速频道切换服务器与所述机顶盒之间的网络进行网络地址转换。 The IP address of the set top box and the source IP address of the fast channel switching request message are different. The network between the fast channel switching server and the set top box is subjected to network address translation, and a network address translation device is disposed between the fast channel switching server and the set top box, and is configured to switch to the fast channel switching server. The network between the set top boxes performs network address translation.
例如所述机顶盒的 IP地址为 IPv4私网地址, 而所述快速频道切换服务器 的 IP地址为 I Pv4公网地址, 则网络地址转换设备能够将所述 I Pv4私网地址伪 装为 IPv4公网地址, 以便于所述机顶盒与所述快速频道切换服务器的通信。  For example, if the IP address of the set top box is an IPv4 private network address, and the IP address of the fast channel switching server is an I Pv4 public network address, the network address translation device can masquerade the IP address of the IP address as an IPv4 public network address. In order to facilitate communication between the set top box and the fast channel switching server.
303、 所述快速频道切换服务器接收用户配置的用于指示所述快速频道切换 服务器与所述机顶盒之间的网络经过了网络地址转换的指示消息。 继续执行步 骤 304。  303. The fast channel switching server receives an indication message that is configured by the user to indicate that the network between the fast channel switching server and the set top box has undergone network address translation. Continue with step 304.
304、 所述快速频道切换服务器生成所述快速频道切换请求响应的快速频道 切换请求响应源端口号、 快速频道切换请求响应源 IP地址、 快速频道切换请求 响应目的端口号以及快速频道切换请求响应目的 IP地址。  304. The fast channel switching server generates a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination. IP address.
其中, 所述快速频道切换请求响应源端口号与所述快速频道切换请求消息 目的端口号相同, 所述快速频道切换请求响应源 IP地址与所述快速频道切换请 求消息目的 IP地址相同, 所述快速频道切换请求响应目的端口号与所述快速频 道切换请求消息源端口号相同, 所述快速频道切换请求响应目的 IP地址与所述 快速频道切换请求消息源 IP地址相同, 这样设置以使得所述快速频道切换请求 响应穿越所述网络地址转换设备而到达所述机顶盒。  The fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, The fast channel switching request response destination port number is the same as the fast channel switching request message source port number, and the fast channel switching request response destination IP address is the same as the fast channel switching request message source IP address, so that the The fast channel switching request response traverses the network address translation device to the set top box.
305、 所述快速频道切换服务器生成第一媒体流源端口号、 第一媒体流源 IP 地址、 第一媒体流目的端口号以及第一媒体流目的 I P地址。  305. The fast channel switching server generates a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address.
其中, 所述第一媒体流源端口号为所述快速频道切换请求消息目的端口号 减 n , n为非零整数, 也就是说 n可以为正整数或者负整数, 优选的 η=1 , 所述 第一媒体流源 IP地址与所述快速频道切换请求消息目的 IP地址相同, 所述第 一媒体流目的端口号与所述快速频道切换请求消息源端口号相同, 所述第一媒 体流目的 IP地址与所述快速频道切换请求消息源 I P地址相同。 这样设置是以 默认所述网络地址转换设备为三元组模式网络地址转换设备为基础设置的, 在 后续步骤中, 若发送所述第一媒体流成功, 则所述网络地址转换设备为三元组 模式网络地址转换设备, 若发送所述第一媒体流失败, 则所述网络地址转换设 备为五元组模式网络地址转换设备。 The first media stream source port number is the fast channel switching request message destination port number minus n, n is a non-zero integer, that is, n can be a positive integer or a negative integer, preferably η=1, The first media stream source IP address is the same as the fast channel switching request message destination IP address, the first media stream destination port number is the same as the fast channel switching request message source port number, and the first media stream destination is The IP address is the same as the source IP address of the fast channel switching request message. The setting is based on the default network address translation device being a triplet mode network address translation device, In the subsequent step, if the sending of the first media stream is successful, the network address translation device is a triplet mode network address translation device. If the first media stream fails to be sent, the network address translation device is five. Tuple mode network address translation device.
306、 所述快速频道切换服务器以快速频道切换请求响应源端口号、 快速频 道切换请求响应源 IP地址、 快速频道切换请求响应目的端口号以及快速频道切 换请求响应目的 IP地址向机顶盒发送所述快速频道切换请求响应。  306. The fast channel switching server sends the fast to the set top box by using a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address. Channel switch request response.
其中, 所述快速频道切换请求响应用于告知所述机顶盒所述快速频道切换 服务器能够为所述机顶盒提供所述媒体流。  The fast channel switching request response is used to notify the set top box that the fast channel switching server can provide the media stream to the set top box.
307、 所述快速频道切换服务器以三元组模式发送包括所述第一媒体流源端 口号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP 地址的第一媒体流。  307. The fast channel switching server sends, in a triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address. A media stream.
其中, 所述第一媒体流源端口号为发送所述第一媒体流的源端口号, 所述 第一媒体流源 IP地址为发送所述第一媒体流的源 IP地址, 所述第一媒体流目 的端口号为发送所述第一媒体流的目的端口号, 所述第一媒体流目的 IP地址为 发送所述第一媒体流的目的 IP地址。  The first media stream source port number is a source port number for sending the first media stream, and the first media stream source IP address is a source IP address for sending the first media stream, the first The port number of the media stream is a destination port number for sending the first media stream, and the destination IP address of the first media stream is a destination IP address for sending the first media stream.
其中, 所述第一媒体流为快速频道切换业务中的业务数据(例如电视节目 内容等), 此外由于所述第一媒体流源端口号与所述快速频道切换请求响应源端 口号不同, 因此在所述机顶盒接收到所述快速频道切换请求响应和所述第一媒 体流时, 能够通过端口号的不同而区分所述快速频道切换请求响应和所述第一 媒体流, 避免将所述快速频道切换请求响应和所述第一媒体流混淆。  The first media stream is service data (such as TV program content, etc.) in the fast channel switching service, and further, since the first media stream source port number is different from the fast channel switching request response source port number, When the set top box receives the fast channel switching request response and the first media stream, the fast channel switching request response and the first media stream can be distinguished by different port numbers, avoiding the fast The channel switch request response is confusing with the first media stream.
若步骤 307发送所述第一媒体流成功, 即第一媒体流未能到达机顶盒或未 能通过 NAT设备, 则所述快速频道切换服务器与所述机顶盒之间的网络经过了 三元组模式网络地址转换设备的网络地址转换。 所述快速频道切换服务器与所 述机顶盒之间设置有三元组模式网络地址转换设备 (所述三元组模式网络地址 转换设备将所有来自相同内部 IP地址和端口的请求映射到相同的外部 IP地址 和端口, 任何一个外部主机均可通过所述映射发送 IP包到内部主机)。 若步骤 307发送所述第一媒体流失败, 即第一媒体流到达机顶盒或第一媒 体流成功通过 NAT设备, 则进一步如图 4所示, 图 4中步骤 301-步骤 307与图 3中相同, 此处不再贅述。 图 4重点描述在上述步骤 307发送所述第一媒体流失 败后, 所述方法还包括如下步骤: If the first media stream is successfully sent in step 307, that is, the first media stream fails to reach the set top box or fails to pass the NAT device, the network between the fast channel switching server and the set top box passes through the triplet mode network. Network address translation of the address translation device. A triplet mode network address translation device is disposed between the fast channel switching server and the set top box (the triplet mode network address translation device maps all requests from the same internal IP address and port to the same external IP address And port, any external host can send IP packets to the internal host through the mapping). If the sending of the first media stream fails in step 307, that is, the first media stream arrives at the set top box or the first media stream successfully passes through the NAT device, further as shown in FIG. 4, steps 301-307 in FIG. 4 are the same as in FIG. , will not repeat them here. FIG. 4 focuses on the following steps: After the first media stream fails to be sent in the foregoing step 307, the method further includes the following steps:
308、 所述快速频道切换服务器生成第二媒体流源端口号、 第二媒体流源 IP 地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址。 这样设置是在所述 第一媒体流发送失败后, 则认为所述网络地址转换设备为五元组模式网络地址 转换设备(当同一内部主机使用相同的端口号对应的端口与不同 IP地址的外部 主机进行通信时, 五元组模式网络地址转换设备对该内部主机的映射会有所不 同, 五元组模式网络地址转换设备不保证所有会话中的私网 IP地址和公网 IP 地址之间绑定的一致性), 则在发送所述第二媒体流时, 将以五元组模式进行发 送。  308. The fast channel switching server generates a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address. The setting is that after the first media stream fails to be sent, the network address translation device is considered to be a five-tuple mode network address translation device (when the same internal host uses the port corresponding to the same port number and the external of the different IP address) When the host communicates, the five-tuple mode network address translation device will have different mappings to the internal host. The five-tuple mode network address translation device does not guarantee the binding between the private network IP address and the public network IP address in all sessions. The consistency is determined, and when the second media stream is sent, it will be transmitted in the quintuple mode.
其中, 所述第二媒体流源端口号与所述快速频道切换请求消息目的端口号 相同, 所述第二媒体流源 IP地址与所述快速频道切换请求消息目的 IP地址相 同, 所述第二媒体流目的端口号与所述快速频道切换请求消息源端口号相同, 所述第二媒体流目的 IP地址与所述快速频道切换请求消息源 IP地址相同。  The second media stream source port number is the same as the fast channel switching request message destination port number, and the second media stream source IP address is the same as the fast channel switching request message destination IP address, the second The port number of the media stream is the same as the source port number of the fast channel switching request message, and the destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message.
309、 所述快速频道切换服务器以五元组模式发送包括第二媒体流源端口 号、 第二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地 址的第二媒体流。  309. The fast channel switching server sends, in a quintuple mode, a second media that includes a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address. flow.
其中, 所述第二媒体流源端口号为发送所述第二媒体流的源端口号, 所述 第二媒体流源 IP地址为发送所述第二媒体流的源 IP地址, 所述第二媒体流目 的端口号为发送所述第二媒体流的目的端口号, 所述第二媒体流目的 IP地址为 发送所述第二媒体流的目的 IP地址。  The second media stream source port number is a source port number for sending the second media stream, and the second media stream source IP address is a source IP address for sending the second media stream, the second The port number of the media stream is the destination port number of the second media stream, and the destination IP address of the second media stream is the destination IP address of the second media stream.
其中, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相同 或部分相同。  The media data in the second media stream and the media data in the first media stream are the same or partially identical.
其中, 所述第二媒体流为快速频道切换业务中的业务数据(例如电视节目 内容等), 此外由于所述快速频道切换服务器发送所述快速频道切换请求响应和 所述第二媒体流的第二媒体流源 IP地址、 第二媒体流目的 IP地址、 第二媒体 流源端口号和第二媒体流目的端口号均相同, 因此在所述机顶盒接收到所述快 速频道切换请求响应和所述第二媒体流时, 为了避免将所述快速频道切换请求 响应和所述第二媒体流混淆, 可以具体分析所述快速频道切换请求响应和第二 媒体流两种报文的报文头部, 例如根据两种报文的反馈消息类型的位数和净荷 类型的位数以区分快速频道切换请求响应和第二媒体流, 但不仅局限于此。 The second media stream is service data (such as a television program) in a fast channel switching service. Content, etc., further, because the fast channel switching server sends the fast channel switching request response and the second media stream source IP address, the second media stream destination IP address, and the second media stream source port of the second media stream And the port number of the second media stream are the same, so when the set top box receives the fast channel switching request response and the second media stream, in order to avoid the fast channel switching request response and the second The media stream is confusing, and the packet headers of the fast channel switching request response and the second media stream may be specifically analyzed, for example, according to the number of bits of the feedback message type of the two types of packets and the number of bits of the payload type. The fast channel switching request response and the second media stream are distinguished, but are not limited thereto.
本发明实施例提供的数据的交互方法, 由于快速频道切换服务器在接收到 快速频道请求消息后, 所述快速频道切换服务器确定到了所述快速频道切换服 务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否经过了网络地 址转换, 进而根据是否经过了网络地址转换的结果生成发送策略, 并根据所述 发送策略进行了快速频道切换请求响应以及媒体流的发送, 从而保证了在经过 网络地址转换的情况下, 快速频道切换服务器仍能将媒体流发送到机顶盒上。  The data interaction method provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has passed, and performs a fast channel switching request response and a media stream transmission according to the sending policy, thereby ensuring that the network is transmitted through the network. In the case of address translation, the fast channel switching server can still send the media stream to the set top box.
如图 5 所示, 本发明实施例提供的快速频道切换服务器, 用于实现图 1-4 对应的任意一个实施例中的快速频道切换服务器的功能。 可选地, 如图 5 所示 的快速频道切换服务器包括:  As shown in FIG. 5, the fast channel switching server provided by the embodiment of the present invention is configured to implement the function of the fast channel switching server in any one of the embodiments corresponding to FIG. Optionally, the fast channel switching server as shown in FIG. 5 includes:
第一接收单元 41 , 用于接收快速频道切换请求消息。  The first receiving unit 41 is configured to receive a fast channel switching request message.
其中, 所述快速频道切换请求消息用于向所述快速频道切换服务器请求快 速频道切换业务。 其具体实现方式参见图 1中步骤 101所示, 此处不再贅述。  The fast channel switching request message is used to request a fast channel switching service from the fast channel switching server. For the specific implementation, refer to step 101 in Figure 1, and details are not described herein.
第一确定单元 42 ,用于在所述第一接收单元 41接收到所述快速频道请求消 息后, 所述快速频道切换服务器确定所述快速频道切换服务器与发送所述快速 频道切换请求消息的机顶盒之间的网络是否经过了网络地址转换。 其具体实现 方式参见图 1中步骤 102所示, 此处不再贅述。  a first determining unit 42 , configured to: after the first receiving unit 41 receives the fast channel request message, the fast channel switching server determines the fast channel switching server and a set top box that sends the fast channel switching request message Whether the network between the networks has undergone network address translation. For the specific implementation, refer to step 102 in Figure 1, and details are not described here.
策略生成单元 43 ,用于根据所述第一确定单元 42确定到的所述快速频道切 换服务器与所述机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所 述结果相对应的发送策略。 其具体实现方式参见图 1 中步骤 103所示, 此处不 再赘述。 The policy generating unit 43 is configured to form, according to the result that the network between the fast channel switching server and the set top box that the first determining unit 42 has passed the network address translation, form a sending corresponding to the result. Strategy. For the specific implementation, refer to step 103 in Figure 1, where not Let me repeat.
第一发送单元 44 ,用于根据所述策略生成单元 43生成的发送策略发送快速 频道切换请求响应以及媒体流。 其具体实现方式参见图 1 中步骤 104所示, 此 处不再赘述。  The first sending unit 44 is configured to send a fast channel switching request response and a media stream according to the sending policy generated by the policy generating unit 43. For the specific implementation, refer to step 104 in Figure 1, and no further details are provided here.
可选的, 如图 5所示, 所述快速频道切换请求消息携带有所述机顶盒的 IP 地址。  Optionally, as shown in FIG. 5, the fast channel switching request message carries an IP address of the set top box.
所述第一确定单元 42 ,具体用于对所述机顶盒的 IP地址和所述快速频道切 换请求消息的源 IP地址进行比较, 以确定所述机顶盒的 IP地址和所述快速频 道切换请求消息的源 IP地址是否相同, 其中若所述机顶盒的 IP地址和所述快 速频道切换请求消息的源 IP地址相同, 则表示所述快速频道切换服务器与所述 机顶盒之间的网络未经过网络地址转换, 若所述机顶盒的 IP地址和所述快速频 道切换请求消息的源 IP地址不同, 则表示所述快速频道切换服务器与所述机顶 盒之间的网络经过了网络地址转换。  The first determining unit 42 is specifically configured to compare an IP address of the set top box with a source IP address of the fast channel switching request message to determine an IP address of the set top box and the fast channel switching request message. Whether the source IP address is the same, if the IP address of the set-top box is the same as the source IP address of the fast channel switching request message, it indicates that the network between the fast channel switching server and the set-top box has not undergone network address translation. If the IP address of the set top box is different from the source IP address of the fast channel switching request message, it indicates that the network between the fast channel switching server and the set top box has undergone network address translation.
可选的, 如图 5所示, 所述第一确定单元 42 , 具体用于接收用户配置的用 于指示所述快速频道切换服务器与所述机顶盒之间的网络是否经过了网络地址 转换的指示消息。  Optionally, as shown in FIG. 5, the first determining unit 42 is specifically configured to receive an indication that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation. Message.
进一步的, 如图 5 所示, 所述快速频道切换请求消息中还携带有发送所述 快速频道切换请求消息的快速频道切换请求消息源端口号、 快速频道切换请求 消息目的 IP地址和快速频道切换请求消息目的端口号。  Further, as shown in FIG. 5, the fast channel switching request message further carries a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching for transmitting the fast channel switching request message. The destination port number of the request message.
可选地, 当所述第一确定单元 42确定所述快速频道切换服务器与所述机顶 盒之间的网络未经过网络地址转换, 所述策略生成单元 43 ,  Optionally, when the first determining unit 42 determines that the network between the fast channel switching server and the set top box has not undergone network address translation, the policy generating unit 43
具体用于生成所述快速频道切换请求响应的快速频道切换请求响应源端口 号、 快速频道切换请求响应源 IP地址、 快速频道切换请求响应目的端口号以及 快速频道切换请求响应目的 IP地址; 其中所述快速频道切换请求响应源端口号 与所述快速频道切换请求消息目的端口号相同, 所述快速频道切换请求响应源 IP地址与所述快速频道切换请求消息目的 IP地址相同,所述快速频道切换请求 响应目的端口号与所述快速频道切换请求消息源端口号相同, 所述快速频道切 换请求响应目的 IP地址与所述快速频道切换请求消息源 IP地址相同。 a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response; The fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed. Request The response destination port number is the same as the fast channel switching request message source port number, and the fast channel switching request response destination IP address is the same as the fast channel switching request message source IP address.
此外, 所述策略生成单元 43 , 还用于生成所述媒体流的媒体流源端口号、 媒体流源 IP地址、 媒体流目的端口号以及媒体流目的 IP地址; 其中所述媒体 流源端口号为所述快速频道切换请求消息目的端口号减 n, n为非零整数, 也就 是说 n可以为正整数或者负整数, 优选的 n=l , 所述媒体流源 IP地址与所述快 速频道切换请求消息目的 IP地址相同, 所述媒体流目的端口号为所述快速频道 切换请求消息源端口号减 1 , 所述媒体流目的 IP地址与所述快速频道切换请求 消息源 IP地址相同。  In addition, the policy generating unit 43 is further configured to generate a media stream source port number, a media stream source IP address, a media stream destination port number, and a media stream destination IP address of the media stream, where the media stream source port number is For the fast channel switching request message, the destination port number is reduced by n, n is a non-zero integer, that is, n can be a positive integer or a negative integer, preferably n=l, the media stream source IP address and the fast channel The destination IP address of the switching request message is the same, the port number of the media stream is the source port number of the fast channel switching request message minus 1, and the destination IP address of the media stream is the same as the source IP address of the fast channel switching request message.
具体的, 如图 5 所示, 所述快速频道切换请求消息中携带有发送所述快速 频道切换请求消息的快速频道切换请求消息源端口号、 快速频道切换请求消息 目的 IP地址和快速频道切换请求消息目的端口号。  Specifically, as shown in FIG. 5, the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request for sending the fast channel switching request message. The destination port number of the message.
可选地, 当所述第一确定单元 42确定所述快速频道切换服务器与所述机顶 盒之间的网络经过了网络地址转换后, 所述策略生成单元 43 ,  Optionally, after the first determining unit 42 determines that the network between the fast channel switching server and the set top box has undergone network address translation, the policy generating unit 43
具体用于生成所述快速频道切换请求响应的快速频道切换请求响应源端口 号、 快速频道切换请求响应源 IP地址、 快速频道切换请求响应目的端口号以及 快速频道切换请求响应目的 IP地址; 其中所述快速频道切换请求响应源端口号 与所述快速频道切换请求消息目的端口号相同, 所述快速频道切换请求响应源 IP地址与所述快速频道切换请求消息目的 IP地址相同,所述快速频道切换请求 响应目的端口号与所述快速频道切换请求消息源端口号相同, 所述快速频道切 换请求响应目的 IP地址与所述快速频道切换请求消息源 IP地址相同。  a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response; The fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed. The request response destination port number is the same as the fast channel switch request message source port number, and the fast channel switch request response destination IP address is the same as the fast channel switch request message source IP address.
所述策略生成单元 43 , 还用于生成第一媒体流源端口号、 第一媒体流源 IP 地址、 第一媒体流目的端口号以及第一媒体流目的 IP地址; 其中所述第一媒体 流源端口号为所述快速频道切换请求消息目的端口号减 n, n为非零整数, 所述 第一媒体流源 IP地址与所述快速频道切换请求消息目的 IP地址相同, 所述第 一媒体流目的端口号与所述快速频道切换请求消息源端口号相同, 所述第一媒 体流目的 IP地址与所述快速频道切换请求消息源 IP地址相同。 The policy generating unit 43 is further configured to generate a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address; wherein the first media stream The source port number is the destination number of the fast channel switching request message minus n, n is a non-zero integer, and the first media stream source IP address is the same as the destination IP address of the fast channel switching request message, the first media The port number of the flow is the same as the source port number of the fast channel switching request message, the first medium The body stream destination IP address is the same as the fast channel switching request message source IP address.
所述第一发送单元 44 , 具体用于以三元组模式发送包括所述第一媒体流源 端口号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP 地址的第一媒体流。 所述第一媒体流源端口号为发送所述第一媒体流的源端口 号, 所述第一媒体流源 IP地址为发送所述第一媒体流的源 IP地址, 所述第一 媒体流目的端口号为发送所述第一媒体流的目的端口号, 所述第一媒体流目的 IP地址为发送所述第一媒体流的目的 IP地址。  The first sending unit 44 is specifically configured to send, in the triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address. The first media stream of the address. The first media stream source port number is a source port number for sending the first media stream, and the first media stream source IP address is a source IP address for sending the first media stream, the first media stream The destination port number is the destination port number of the first media stream, and the destination IP address of the first media stream is the destination IP address of the first media stream.
进一步的, 如图 5 所示, 当所述快速频道切换服务器确定所述第一媒体流 发送失败后, 所述策略生成单元 43 , 还用于:  Further, as shown in FIG. 5, after the fast channel switching server determines that the first media stream fails to be sent, the policy generating unit 43 is further configured to:
生成第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号 以及第二媒体流目的 IP地址; 其中所述第二媒体流源端口号与所述快速频道切 换请求消息目的端口号相同, 所述第二媒体流源 IP地址与所述快速频道切换请 求消息目的 IP地址相同, 所述第二媒体流目的端口号与所述快速频道切换请求 消息源端口号相同, 所述第二媒体流目的 IP地址与所述快速频道切换请求消息 源 IP地址相同;  Generating a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number and the fast channel switching request The destination port number of the message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the second media stream is the same as the source port number of the fast channel switching request message. The destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message;
所述第一发送单元 44 ,还用于以五元组模式发送包括第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址的 第二媒体流, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相 同或部分相同。 所述第二媒体流源端口号为发送所述第二媒体流的源端口号, 所述第二媒体流源 IP地址为发送所述第二媒体流的源 IP地址, 所述第二媒体 流目的端口号为发送所述第二媒体流的目的端口号, 所述第二媒体流目的 IP地 址为发送所述第二媒体流的目的 IP地址。  The first sending unit 44 is further configured to send, in a quintuple mode, a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address. The second media stream, the media data in the second media stream and the media data in the first media stream are the same or partially identical. The second media stream source port number is a source port number for sending the second media stream, and the second media stream source IP address is a source IP address for sending the second media stream, the second media stream The destination port number is the destination port number of the second media stream, and the destination IP address of the second media stream is the destination IP address of the second media stream.
本发明实施例提供的快速频道切换服务器, 由于快速频道切换服务器在接 收到快速频道请求消息后, 所述快速频道切换服务器确定到了所述快速频道切 换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否经过了网 络地址转换, 进而根据是否经过了网络地址转换的结果生成发送策略, 并根据 所述发送策略进行了快速频道切换请求响应以及媒体流的发送, 从而保证了在 经过网络地址转换的情况下, 快速频道切换服务器仍能将媒体流发送到机顶盒 上。 The fast channel switching server provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has been performed, and according to The sending policy performs a fast channel switching request response and a media stream transmission, thereby ensuring that the fast channel switching server can still send the media stream to the set top box after the network address translation.
如图 6 所示, 本发明实施例提供的快速频道切换服务器, 用于实现图 1-4 对应的任意一个实施例中的快速频道切换服务器的功能。 可选地, 如图 6 所示 的快速频道切换服务器包括:  As shown in FIG. 6, the fast channel switching server provided by the embodiment of the present invention is configured to implement the function of the fast channel switching server in any one of the embodiments corresponding to FIG. Optionally, the fast channel switching server as shown in FIG. 6 includes:
接收器 51 , 用于接收快速频道切换请求消息。  The receiver 51 is configured to receive a fast channel switching request message.
其中, 所述快速频道切换请求消息用于向所述快速频道切换服务器请求快 速频道切换业务。 其具体实现方式参见图 1中步骤 101所示, 此处不再贅述。  The fast channel switching request message is used to request a fast channel switching service from the fast channel switching server. For the specific implementation, refer to step 101 in Figure 1, and details are not described herein.
处理器 52 , 用于在所述接收器 51接收到所述快速频道请求消息后, 所述快 速频道切换服务器确定所述快速频道切换服务器与发送所述快速频道切换请求 消息的机顶盒之间的网络是否经过了网络地址转换。 其具体实现方式参见图 1 中步骤 102所示, 此处不再贅述。  The processor 52 is configured to: after the receiver 51 receives the fast channel request message, the fast channel switching server determines a network between the fast channel switching server and a set top box that sends the fast channel switching request message Whether it has undergone network address translation. For the specific implementation, refer to step 102 in Figure 1, and details are not described here.
所述处理器 52 ,还用于根据所述处理器 52确定到的所述快速频道切换服务 器与所述机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所述结果 相对应的发送策略。 其具体实现方式参见图 1中步骤 103所示, 此处不再贅述。  The processor 52 is further configured to: according to the result that the network between the fast channel switching server and the set top box determined by the processor 52 has undergone network address translation, form a sending corresponding to the result Strategy. For the specific implementation, refer to step 103 in Figure 1, and no further details are provided here.
发送器 53 ,用于根据所述处理器 52发送策略发送快速频道切换请求响应以 及媒体流。 其具体实现方式参见图 1中步骤 104所示, 此处不再贅述。  The transmitter 53 is configured to send a fast channel switching request response and a media stream according to the processor 52 sending a policy. For the specific implementation, refer to step 104 in Figure 1, and details are not described herein.
可选的, 如图 6所示, 所述快速频道切换请求消息携带有所述机顶盒的 IP 地址。  Optionally, as shown in FIG. 6, the fast channel switching request message carries an IP address of the set top box.
所述处理器 52 ,具体用于对所述机顶盒的 IP地址和所述快速频道切换请求 消息的源 IP地址进行比较, 以确定所述机顶盒的 IP地址和所述快速频道切换 请求消息的源 IP地址是否相同, 其中若所述机顶盒的 IP地址和所述快速频道 切换请求消息的源 IP地址相同, 则表示所述快速频道切换服务器与所述机顶盒 之间的网络未经过网络地址转换, 若所述机顶盒的 IP地址和所述快速频道切换 请求消息的源 IP地址不同, 则表示所述快速频道切换服务器与所述机顶盒之间 的网络经过了网络地址转换。 The processor 52 is configured to compare an IP address of the set top box with a source IP address of the fast channel switch request message to determine an IP address of the set top box and a source IP address of the fast channel switch request message. If the IP address of the set top box is the same as the source IP address of the fast channel switching request message, it indicates that the network between the fast channel switching server and the set top box has not undergone network address translation. The IP address of the set top box is different from the source IP address of the fast channel switching request message, indicating that the fast channel switching server and the set top box are The network has undergone network address translation.
可选的, 如图 6所示, 所述处理器 52 , 具体用于接收用户配置的用于指示 所述快速频道切换服务器与所述机顶盒之间的网络是否经过了网络地址转换的 指示消息。  Optionally, as shown in FIG. 6, the processor 52 is configured to receive an indication message that is configured by the user to indicate whether the network between the fast channel switching server and the set top box has undergone network address translation.
进一步的, 如图 6 所示, 所述快速频道切换请求消息中还携带有发送所述 快速频道切换请求消息的快速频道切换请求消息源端口号、 快速频道切换请求 消息目的 IP地址和快速频道切换请求消息目的端口号。  Further, as shown in FIG. 6, the fast channel switching request message further includes a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching for transmitting the fast channel switching request message. The destination port number of the request message.
可选地, 当所述处理器 52确定所述快速频道切换服务器与所述机顶盒之间 的网络未经过网络地址转换, 所述处理器 52 ,  Optionally, when the processor 52 determines that the network between the fast channel switching server and the set top box has not undergone network address translation, the processor 52,
具体用于生成所述快速频道切换请求响应的快速频道切换请求响应源端口 号、 快速频道切换请求响应源 IP地址、 快速频道切换请求响应目的端口号以及 快速频道切换请求响应目的 IP地址; 其中所述快速频道切换请求响应源端口号 与所述快速频道切换请求消息目的端口号相同, 所述快速频道切换请求响应源 IP地址与所述快速频道切换请求消息目的 IP地址相同,所述快速频道切换请求 响应目的端口号与所述快速频道切换请求消息源端口号相同, 所述快速频道切 换请求响应目的 IP地址与所述快速频道切换请求消息源 IP地址相同。  a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response; The fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed. The request response destination port number is the same as the fast channel switch request message source port number, and the fast channel switch request response destination IP address is the same as the fast channel switch request message source IP address.
此外, 所述处理器 52 , 还用于生成所述媒体流的媒体流源端口号、 媒体流 源 IP地址、 媒体流目的端口号以及媒体流目的 IP地址; 其中所述媒体流源端 口号为所述快速频道切换请求消息目的端口号减 1 , 所述媒体流源 IP地址与所 述快速频道切换请求消息目的 IP地址相同, 所述媒体流目的端口号为所述快速 频道切换请求消息源端口号减 1 , 所述媒体流目的 IP地址与所述快速频道切换 请求消息源 ip地址相同。  In addition, the processor 52 is further configured to generate a media stream source port number, a media stream source IP address, a media stream destination port number, and a media stream destination IP address of the media stream, where the media stream source port number is The destination number of the fast channel switching request message is decreased by one, and the IP address of the media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the media stream is the source port of the fast channel switching request message. The number is decreased by 1, and the IP address of the media stream is the same as the source IP address of the fast channel switching request message.
具体的, 如图 6 所示, 所述快速频道切换请求消息中携带有发送所述快速 频道切换请求消息的快速频道切换请求消息源端口号、 快速频道切换请求消息 目的 IP地址和快速频道切换请求消息目的端口号。  Specifically, as shown in FIG. 6, the fast channel switching request message carries a fast channel switching request message source port number, a fast channel switching request message destination IP address, and a fast channel switching request for sending the fast channel switching request message. The destination port number of the message.
可选地, 当所述处理器 52确定所述快速频道切换服务器与所述机顶盒之间 的网络经过了网络地址转换后, 所述处理器 52 , Optionally, when the processor 52 determines between the fast channel switching server and the set top box After the network has undergone network address translation, the processor 52
具体用于生成所述快速频道切换请求响应的快速频道切换请求响应源端口 号、 快速频道切换请求响应源 IP地址、 快速频道切换请求响应目的端口号以及 快速频道切换请求响应目的 IP地址; 其中所述快速频道切换请求响应源端口号 与所述快速频道切换请求消息目的端口号相同, 所述快速频道切换请求响应源 IP地址与所述快速频道切换请求消息目的 IP地址相同,所述快速频道切换请求 响应目的端口号与所述快速频道切换请求消息源端口号相同, 所述快速频道切 换请求响应目的 IP地址与所述快速频道切换请求消息源 IP地址相同。  a fast channel switching request response source port number, a fast channel switching request response source IP address, a fast channel switching request response destination port number, and a fast channel switching request response destination IP address, which are used to generate the fast channel switching request response; The fast channel switching request response source port number is the same as the fast channel switching request message destination port number, and the fast channel switching request response source IP address is the same as the fast channel switching request message destination IP address, and the fast channel switching is performed. The request response destination port number is the same as the fast channel switch request message source port number, and the fast channel switch request response destination IP address is the same as the fast channel switch request message source IP address.
所述处理器 52 , 还用于生成第一媒体流源端口号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP地址; 其中所述第一媒体流源端 口号为所述快速频道切换请求消息目的端口号减 n, n为非零整数, 所述第一媒 体流源 IP地址与所述快速频道切换请求消息目的 IP地址相同, 所述第一媒体 流目的端口号与所述快速频道切换请求消息源端口号相同, 所述第一媒体流目 的 IP地址与所述快速频道切换请求消息源 IP地址相同。  The processor 52 is further configured to generate a first media stream source port number, a first media stream source IP address, a first media stream destination port number, and a first media stream destination IP address; wherein the first media stream source The port number is the destination number of the fast channel switching request message minus n, n is a non-zero integer, and the first media stream source IP address is the same as the destination IP address of the fast channel switching request message, the first media stream The destination port number is the same as the source address of the fast channel switching request message, and the destination IP address of the first media stream is the same as the source IP address of the fast channel switching request message.
所述发送器 53 ,具体用于以三元组模式发送包括所述第一媒体流源端口号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP地址的 第一媒体流。  The transmitter 53 is configured to send, in a triplet mode, the first media stream source port number, the first media stream source IP address, the first media stream destination port number, and the first media stream destination IP address. The first media stream.
进一步的, 如图 6 所示, 当所述快速频道切换服务器确定所述第一媒体流 发送失败后, 所述处理器 52 , 还用于:  Further, as shown in FIG. 6, after the fast channel switching server determines that the first media stream fails to be sent, the processor 52 is further configured to:
生成第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号 以及第二媒体流目的 IP地址; 其中所述第二媒体流源端口号与所述快速频道切 换请求消息目的端口号相同, 所述第二媒体流源 IP地址与所述快速频道切换请 求消息目的 IP地址相同, 所述第二媒体流目的端口号与所述快速频道切换请求 消息源端口号相同, 所述第二媒体流目的 IP地址与所述快速频道切换请求消息 源 IP地址相同。  Generating a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number and the fast channel switching request The destination port number of the message is the same, the IP address of the second media stream source is the same as the destination IP address of the fast channel switching request message, and the port number of the second media stream is the same as the source port number of the fast channel switching request message. The destination IP address of the second media stream is the same as the source IP address of the fast channel switching request message.
所述发送器 53 , 还用于以五元组模式发送包括第二媒体流源端口号、 第二 媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址的第二 媒体流, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相同或 部分相同。 The transmitter 53 is further configured to send, in a five-tuple mode, a second media stream source port number, and a second a second media stream of the media stream source IP address, the second media stream destination port number, and the second media stream destination IP address, where the media data in the second media stream is the same as the media data in the first media stream or Partially the same.
本发明实施例提供的快速频道切换服务器, 由于快速频道切换服务器在接 收到快速频道请求消息后, 所述快速频道切换服务器确定到了所述快速频道切 换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否经过了网 络地址转换, 进而根据是否经过了网络地址转换的结果生成发送策略, 并根据 所述发送策略进行了快速频道切换请求响应以及媒体流的发送, 从而保证了在 经过网络地址转换的情况下, 快速频道切换服务器仍能将媒体流发送到机顶盒 上。  The fast channel switching server provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network has undergone network address translation, and then generates a transmission policy according to whether the network address translation has passed, and performs a fast channel switching request response and a media stream transmission according to the sending policy, thereby ensuring that the network is transmitted through the network. In the case of address translation, the fast channel switching server can still send the media stream to the set top box.
如图 7 所示, 本发明实施例提供的数据的交互系统, 包括快速频道切换服 务器 61和机顶盒 62 , 所述快速频道切换服务器 61和机顶盒 62为与图 5或图 6 对应的实施例中的快速频道切换服务器和机顶盒。  As shown in FIG. 7, the data interaction system provided by the embodiment of the present invention includes a fast channel switching server 61 and a set top box 62, and the fast channel switching server 61 and the set top box 62 are in the embodiment corresponding to FIG. 5 or FIG. Fast channel switching server and set-top box.
可选的, 所述快速频道切换服务器 61 , 用于接收快速频道切换请求消息, 所述快速频道切换请求消息用于向所述快速频道切换服务器请求快速频道切换 业务, 确定所述快速频道切换服务器与发送所述快速频道切换请求消息的机顶 盒 62之间的网络是否经过了网络地址转换, 并根据是否经过了网络地址转换的 结果形成与所述结果相对应的发送策略, 根据所述发送策略发送快速频道切换 请求响应以及媒体流。  Optionally, the fast channel switching server 61 is configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server, and determine the fast channel switching server. Whether the network between the set top box 62 that sends the fast channel switching request message has undergone network address translation, and forms a transmission policy corresponding to the result according to whether the network address translation has passed, and sends according to the sending policy. Fast channel switching request response and media stream.
可选的, 所述机顶盒 62 , 用于发送所述快速进频道切换请求消息, 并接收 所述快速频道切换请求响应以及媒体流。  Optionally, the set top box 62 is configured to send the fast forward channel switching request message, and receive the fast channel switching request response and the media stream.
其具体实现方式参见上述快速频道切换服务器的具体实施例, 此处不再贅 述。  For a specific implementation manner, refer to the specific embodiment of the fast channel switching server, which is not described here.
本发明实施例提供的数据的交互系统, 由于快速频道切换服务器在接收到 快速频道请求消息后, 所述快速频道切换服务器确定到了所述快速频道切换服 务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否经过了网络地 址转换, 进而根据是否经过了网络地址转换的结果生成发送策略, 并根据所述 发送策略进行了快速频道切换请求响应以及媒体流的发送, 从而保证了在经过 网络地址转换的情况下, 快速频道切换服务器仍能将媒体流发送到机顶盒上。 The data interaction system provided by the embodiment of the present invention, after the fast channel switching server receives the fast channel request message, the fast channel switching server determines the fast channel switching server and the set top box that sends the fast channel switching request message. Whether the network between the networks has gone through the network Address conversion, and then generating a transmission policy according to whether the network address translation has been performed, and performing a fast channel switching request response and a media stream transmission according to the transmission policy, thereby ensuring a fast channel in the case of network address translation. The switch server can still send media streams to the set top box.
通过以上的实施方式的描述, 所属领域的技术人员可以清楚地了解到本发 明可借助软件加必需的通用硬件的方式来实现, 当然也可以通过硬件, 但很多 情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本质上或 者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计算机软 件产品存储在可读取的存储介质中, 如计算机的软盘, 硬盘或光盘等, 包括若 干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备 等)执行本发明各个实施例所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. . Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer. A hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应 所述以权利要求的保护范围为准。  The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims

权 利 要 求 书 claims
1、 一种数据的交互方法, 其特征在于, 包括: 1. A data interaction method, characterized by including:
快速频道切换服务器接收快速频道切换请求消息, 所述快速频道切换请求 消息用于向所述快速频道切换服务器请求快速频道切换业务; The fast channel switching server receives a fast channel switching request message, and the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server;
在接收到所述快速频道请求消息后, 所述快速频道切换服务器确定所述快 速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网络是否 经过了网络地址转换; After receiving the fast channel request message, the fast channel switching server determines whether the network between the fast channel switching server and the set-top box that sent the fast channel switching request message has undergone network address translation;
所述快速频道切换服务器根据其确定到的所述快速频道切换服务器与所述 机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所述结果相对应的 发送策略; The fast channel switching server determines whether the network between the fast channel switching server and the set-top box has undergone network address translation, and forms a sending strategy corresponding to the result;
所述快速频道切换服务器根据所述发送策略发送快速频道切换请求响应以 及媒体流。 The fast channel switching server sends a fast channel switching request response and a media stream according to the sending policy.
2、 根据权利 1所述的方法, 其特征在于, 所述快速频道切换请求消息携带 有所述机顶盒的 IP地址, 所述快速频道切换服务器确定所述快速频道切换服务 器与发送所述快速频道切换请求消息的机顶盒之间的网络是否经过了网络地址 转换, 包括: 2. The method according to claim 1, characterized in that, the fast channel switching request message carries the IP address of the set-top box, and the fast channel switching server determines the fast channel switching server and sends the fast channel switching Whether the network between the set-top boxes requesting the message has undergone network address translation, including:
所述快速频道切换服务器对所述机顶盒的 IP地址和所述快速频道切换请求 消息的源 IP地址进行比较, 以确定所述机顶盒的 IP地址和所述快速频道切换 请求消息的源 IP地址是否相同, 其中若所述机顶盒的 IP地址和所述快速频道 切换请求消息的源 IP地址相同, 则表示所述快速频道切换服务器与所述机顶盒 之间的网络未经过网络地址转换, 若所述机顶盒的 IP地址和所述快速频道切换 请求消息的源 IP地址不同, 则表示所述快速频道切换服务器与所述机顶盒之间 的网络经过了网络地址转换。 The fast channel switching server compares the IP address of the set-top box with the source IP address of the fast channel switching request message to determine whether the IP address of the set-top box and the source IP address of the fast channel switching request message are the same. , wherein if the IP address of the set-top box is the same as the source IP address of the fast channel switching request message, it means that the network between the fast channel switching server and the set-top box has not undergone network address translation. If the set-top box If the IP address is different from the source IP address of the fast channel switching request message, it means that the network between the fast channel switching server and the set-top box has undergone network address translation.
3、 根据权利要求 1所述的方法, 其特征在于, 所述快速频道切换服务器确 定所述快速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的 网络是否经过了网络地址转换, 包括: 3. The method according to claim 1, characterized in that, the fast channel switching server determines the communication between the fast channel switching server and the set-top box that sends the fast channel switching request message. Whether the network has undergone network address translation, including:
所述快速频道切换服务器接收用户配置的用于指示所述快速频道切换服务 器与所述机顶盒之间的网络是否经过了网络地址转换的指示消息。 The fast channel switching server receives an indication message configured by the user to indicate whether the network between the fast channel switching server and the set-top box has undergone network address translation.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 4. The method according to claim 2 or 3, characterized in that,
所述快速频道切换请求消息中还携带有发送所述快速频道切换请求消息的 快速频道切换请求消息源端口号、 快速频道切换请求消息目的 IP地址和快速频 道切换请求消息目的端口号; The fast channel switching request message also carries the fast channel switching request message source port number for sending the fast channel switching request message, the fast channel switching request message destination IP address, and the fast channel switching request message destination port number;
当所述快速频道切换服务器与所述机顶盒之间的网络经过了网络地址转换 后, 所述形成与所述结果相对应的发送策略, 包括: When the network between the fast channel switching server and the set-top box undergoes network address translation, forming a sending strategy corresponding to the result includes:
所述快速频道切换服务器生成第一媒体流源端口号、第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP地址; 其中所述第一媒体流源端 口号为所述快速频道切换请求消息目的端口号减 n, n为非零整数, 所述第一媒 体流源 IP地址与所述快速频道切换请求消息目的 IP地址相同, 所述第一媒体 流目的端口号与所述快速频道切换请求消息源端口号相同, 所述第一媒体流目 的 IP地址与所述快速频道切换请求消息源 IP地址相同; The fast channel switching server generates a first media stream source port number, a first media stream source IP address, a first media stream destination port number and a first media stream destination IP address; wherein the first media stream source port number is The destination port number of the fast channel switching request message is reduced by n, n is a non-zero integer, the first media stream source IP address is the same as the destination IP address of the fast channel switching request message, and the first media stream destination port number The source port number of the fast channel switching request message is the same, and the destination IP address of the first media stream is the same as the source IP address of the fast channel switching request message;
所述快速频道切换服务器根据所述发送策略发送所述媒体流包括: 所述快速频道切换服务器以三元组模式发送包括所述第一媒体流源端口 号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP地 址的第一媒体流。 The fast channel switching server sending the media stream according to the sending policy includes: the fast channel switching server sending the first media stream source port number, the first media stream source IP address, the first media stream source IP address, the first media stream source port number, the first media stream source IP address, and the first media stream source port number in a triplet mode. A media stream destination port number and a first media stream destination IP address.
5、 根据权利要求 4所述的方法, 其特征在于, 当所述快速频道切换服务器 确定所述第一媒体流发送失败后, 所述方法还包括: 5. The method according to claim 4, wherein when the fast channel switching server determines that the first media stream fails to be sent, the method further includes:
所述快速频道切换服务器生成第二媒体流源端口号、第二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址; 其中所述第二媒体流源端 口号与所述快速频道切换请求消息目的端口号相同, 所述第二媒体流源 IP地址 与所述快速频道切换请求消息目的 IP地址相同, 所述第二媒体流目的端口号与 所述快速频道切换请求消息源端口号相同, 所述第二媒体流目的 IP地址与所述 快速频道切换请求消息源 IP地址相同; The fast channel switching server generates a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number and The destination port number of the fast channel switching request message is the same, the second media stream source IP address is the same as the destination IP address of the fast channel switching request message, the second media stream destination port number is the same as the fast channel switching request message The message source port number is the same, and the destination IP address of the second media stream is the same as the The source IP address of the fast channel switching request message is the same;
所述快速频道切换服务器以五元组模式发送包括第二媒体流源端口号、 第 二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址的第 二媒体流, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相同 或部分相同。 The fast channel switching server sends the second media stream including the second media stream source port number, the second media stream source IP address, the second media stream destination port number and the second media stream destination IP address in a five-tuple mode, The media data in the second media stream is the same or partially the same as the media data in the first media stream.
6、 一种快速频道切换服务器, 其特征在于, 包括: 6. A fast channel switching server, characterized by including:
第一接收单元, 用于接收快速频道切换请求消息, 所述快速频道切换请求 消息用于向所述快速频道切换服务器请求快速频道切换业务; The first receiving unit is configured to receive a fast channel switching request message, where the fast channel switching request message is used to request a fast channel switching service from the fast channel switching server;
第一确定单元, 用于在所述第一接收单元接收到所述快速频道请求消息后, 所述快速频道切换服务器确定所述快速频道切换服务器与发送所述快速频道切 换请求消息的机顶盒之间的网络是否经过了网络地址转换; A first determining unit configured to determine, after the first receiving unit receives the fast channel switching request message, the fast channel switching server between the fast channel switching server and the set-top box that sent the fast channel switching request message. Whether the network has undergone network address translation;
策略生成单元, 用于根据所述第一确定单元确定到的所述快速频道切换服 务器与所述机顶盒之间的网络是否经过了网络地址转换的结果, 形成与所述结 果相对应的发送策略; 切换请求响应以及媒体流。 A policy generation unit configured to form a sending policy corresponding to the result based on the result determined by the first determination unit of whether the network between the fast channel switching server and the set-top box has undergone network address translation; Switch request responses and media streams.
7、 根据权利要求 6所述的快速频道切换服务器, 其特征在于, 所述快速频 道切换请求消息携带有所述机顶盒的 IP地址, 所述第一确定单元, 7. The fast channel switching server according to claim 6, wherein the fast channel switching request message carries the IP address of the set-top box, and the first determining unit,
具体用于对所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地 址进行比较 ,以确定所述机顶盒的 I P地址和所述快速频道切换请求消息的源 I P 地址是否相同, 其中若所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP地址相同, 则表示所述快速频道切换服务器与所述机顶盒之间的网络未经过 网络地址转换, 若所述机顶盒的 IP地址和所述快速频道切换请求消息的源 IP 地址不同, 则表示所述快速频道切换服务器与所述机顶盒之间的网络经过了网 络地址转换。 Specifically used to compare the IP address of the set-top box and the source IP address of the fast channel switching request message to determine whether the IP address of the set-top box and the source IP address of the fast channel switching request message are the same, where if If the IP address of the set-top box is the same as the source IP address of the fast channel switching request message, it means that the network between the fast channel switching server and the set-top box has not undergone network address translation. If the IP address of the set-top box and If the source IP addresses of the fast channel switching request messages are different, it means that the network between the fast channel switching server and the set-top box has undergone network address translation.
8、 根据权利要求 6所述的快速频道切换服务器, 其特征在于, 所述第一确 定单元, 8. The fast channel switching server according to claim 6, characterized in that the first confirmation fixed unit,
具体用于接收用户配置的用于指示所述快速频道切换服务器与所述机顶盒 之间的网络是否经过了网络地址转换的指示消息。 Specifically, it is used to receive an indication message configured by the user to indicate whether the network between the fast channel switching server and the set-top box has undergone network address translation.
9、 根据权利要求 7或 8所述的快速频道切换服务器, 其特征在于, 所述快速频道切换请求消息中还携带有发送所述快速频道切换请求消息的 快速频道切换请求消息源端口号、 快速频道切换请求消息目的 IP地址和快速频 道切换请求消息目的端口号; 9. The fast channel switching server according to claim 7 or 8, characterized in that, the fast channel switching request message also carries the fast channel switching request message source port number for sending the fast channel switching request message, and the fast channel switching request message. The destination IP address of the channel switching request message and the destination port number of the fast channel switching request message;
当所述第一确定单元确定到所述快速频道切换服务器与所述机顶盒之间的 网络经过了网络地址转换后, 所述策略生成单元, When the first determining unit determines that the network between the fast channel switching server and the set-top box has undergone network address translation, the policy generating unit,
具体用于生成第一媒体流源端口号、 第一媒体流源 IP地址、 第一媒体流目 的端口号以及第一媒体流目的 IP地址; 其中所述第一媒体流源端口号为所述快 速频道切换请求消息目的端口号减 n, n为非零整数, 所述第一媒体流源 IP地 址与所述快速频道切换请求消息目的 I P地址相同, 所述第一媒体流目的端口号 与所述快速频道切换请求消息源端口号相同, 所述第一媒体流目的 IP地址与所 述快速频道切换请求消息源 IP地址相同; Specifically used to generate a first media stream source port number, a first media stream source IP address, a first media stream destination port number and a first media stream destination IP address; wherein the first media stream source port number is the fast The destination port number of the channel switching request message is reduced by n, n is a non-zero integer, the source IP address of the first media stream is the same as the destination IP address of the fast channel switching request message, and the destination port number of the first media stream is the same as the destination IP address of the fast channel switching request message. The source port number of the fast channel switching request message is the same, and the destination IP address of the first media stream is the same as the source IP address of the fast channel switching request message;
所述第一发送单元, 具体用于以三元组模式发送包括所述第一媒体流源端 口号、 第一媒体流源 IP地址、 第一媒体流目的端口号以及第一媒体流目的 IP 地址的第一媒体流。 The first sending unit is specifically configured to send the first media stream source port number, the first media stream source IP address, the first media stream destination port number and the first media stream destination IP address in triplet mode. ’s first media stream.
10、 根据权利要求 9 所述的快速频道切换服务器, 其特征在于, 当所述快 速频道切换服务器确定所述第一媒体流发送失败后, 所述策略生成单元, 还用 于: 10. The fast channel switching server according to claim 9, characterized in that, when the fast channel switching server determines that the first media stream fails to be sent, the policy generation unit is also used to:
生成第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号 以及第二媒体流目的 IP地址; 其中所述第二媒体流源端口号与所述快速频道切 换请求消息目的端口号相同, 所述第二媒体流源 IP地址与所述快速频道切换请 求消息目的 IP地址相同, 所述第二媒体流目的端口号与所述快速频道切换请求 消息源端口号相同, 所述第二媒体流目的 IP地址与所述快速频道切换请求消息 源 IP地址相同; Generate a second media stream source port number, a second media stream source IP address, a second media stream destination port number, and a second media stream destination IP address; wherein the second media stream source port number is consistent with the fast channel switching request The message destination port number is the same, the second media stream source IP address is the same as the fast channel switching request message destination IP address, the second media stream destination port number is the same as the fast channel switching request message source port number, The second media stream destination IP address and the fast channel switching request message The source IP address is the same;
所述第一发送单元, 还用于以五元组模式发送包括第二媒体流源端口号、 第二媒体流源 IP地址、 第二媒体流目的端口号以及第二媒体流目的 IP地址的 第二媒体流, 所述第二媒体流中的媒体数据和所述第一媒体流中的媒体数据相 同或部分相同。 The first sending unit is also configured to send the second media stream source port number, the second media stream source IP address, the second media stream destination port number and the second media stream destination IP address in a five-tuple mode. Two media streams, the media data in the second media stream is the same or partially the same as the media data in the first media stream.
11、 一种数据的交互系统, 其特征在于, 包括快速频道切换服务器和机顶 盒, 其中, 11. A data interaction system, characterized by including a fast channel switching server and a set-top box, wherein,
所述快速频道切换服务器, 用于接收快速频道切换请求消息, 所述快速频 道切换请求消息用于向所述快速频道切换服务器请求快速频道切换业务, 确定 所述快速频道切换服务器与发送所述快速频道切换请求消息的机顶盒之间的网 络是否经过了网络地址转换, 并根据是否经过了网络地址转换的结果形成与所 述结果相对应的发送策略, 根据所述发送策略发送快速频道切换请求响应以及 媒体流; The fast channel switching server is used to receive a fast channel switching request message. The fast channel switching request message is used to request a fast channel switching service from the fast channel switching server. Determine the fast channel switching server and send the fast channel switching server. Whether the network between the set-top boxes of the channel switching request message has undergone network address translation, and based on the result of whether the network address translation has been performed, a sending strategy corresponding to the result is formed, and a fast channel switching request response is sent according to the sending strategy and media stream;
所述机顶盒, 用于发送所述快速进频道切换请求消息, 并接收所述快速频 道切换请求响应以及媒体流。 The set-top box is configured to send the fast channel switching request message, and receive the fast channel switching request response and media stream.
PCT/CN2013/084133 2012-09-28 2013-09-24 Method, device and system for data interaction WO2014048310A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210370619.2A CN103716659A (en) 2012-09-28 2012-09-28 Data interaction method, device and system
CN201210370619.2 2012-09-28

Publications (1)

Publication Number Publication Date
WO2014048310A1 true WO2014048310A1 (en) 2014-04-03

Family

ID=50386996

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084133 WO2014048310A1 (en) 2012-09-28 2013-09-24 Method, device and system for data interaction

Country Status (2)

Country Link
CN (1) CN103716659A (en)
WO (1) WO2014048310A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350825A (en) * 2008-08-22 2009-01-21 中兴通讯股份有限公司 Method and system for crossing network address conversion, stream media server, set-top box
WO2010114450A1 (en) * 2009-03-31 2010-10-07 Telefonaktiebolaget L M Ericsson (Publ) Methods and arrangements for channel change in an iptv network
CN101742175B (en) * 2008-11-18 2012-04-04 华为技术有限公司 Method and device for finding quick channel switching service
CN102651778A (en) * 2011-02-24 2012-08-29 中兴通讯股份有限公司 Method and system for implementing NAT (Network Address Translator) traversal by FCC (Fast Channel Change) system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350825A (en) * 2008-08-22 2009-01-21 中兴通讯股份有限公司 Method and system for crossing network address conversion, stream media server, set-top box
CN101742175B (en) * 2008-11-18 2012-04-04 华为技术有限公司 Method and device for finding quick channel switching service
WO2010114450A1 (en) * 2009-03-31 2010-10-07 Telefonaktiebolaget L M Ericsson (Publ) Methods and arrangements for channel change in an iptv network
CN102651778A (en) * 2011-02-24 2012-08-29 中兴通讯股份有限公司 Method and system for implementing NAT (Network Address Translator) traversal by FCC (Fast Channel Change) system

Also Published As

Publication number Publication date
CN103716659A (en) 2014-04-09

Similar Documents

Publication Publication Date Title
CN114866521B (en) Conference server
US20150156107A1 (en) Method, Controller, and System for Processing Data Packet
US8989185B2 (en) Method and apparatus for converting a multicast session to a unicast session
EP2139158B1 (en) Method, device and system for realizing multicast service
US10027496B2 (en) Method for distributing identifiers of multicast sources
US9516385B2 (en) Technique for obtaining a multicast address that matches an IP version supported by a terminal
US9686709B2 (en) Method, apparatus and system for guaranteeing QoS of communication service in NAT scenario
WO2011006324A1 (en) Method and terminal for file transmission
WO2011143880A1 (en) Method and system for transmitting wireless multicast data
WO2014019451A1 (en) Method, device, and system for quick notification of cgn exception
US20130117460A1 (en) Data management methods for use in a network system and network systems using the same
CN113630439B (en) Real-time communication RTC connection method, server and storage medium
EP3175580B1 (en) System, gateway and method for an improved quality of service, qos, in a data stream delivery
WO2017185212A1 (en) Multicast delay diagnosis method and apparatus
WO2009021460A1 (en) Method for reporting implement result of policy, network communication system and equipment
WO2014173066A1 (en) Method and system for forwarding information in distributed network
WO2015096302A1 (en) Nat traversal method based on sip media capability re-negotiation, proxy server and system
WO2011157126A2 (en) Packet forwarding method and inter-network routing apparatus
WO2014067486A1 (en) Packet forwarding method and relevant device
WO2014015786A1 (en) Two-layer access method, device and system in hfc network
WO2011103820A2 (en) Method and apparatus for network address translation
US9374235B2 (en) Method for implementing communication between different networks and apparatus
WO2014048310A1 (en) Method, device and system for data interaction
WO2015139397A1 (en) Nat64 resource acquisition method and acquisition/distribution apparatus
WO2014101733A1 (en) Message processing method and device

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: 13842330

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13842330

Country of ref document: EP

Kind code of ref document: A1