[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2020000493A1 - Media playing method and media playing device - Google Patents

Media playing method and media playing device Download PDF

Info

Publication number
WO2020000493A1
WO2020000493A1 PCT/CN2018/093931 CN2018093931W WO2020000493A1 WO 2020000493 A1 WO2020000493 A1 WO 2020000493A1 CN 2018093931 W CN2018093931 W CN 2018093931W WO 2020000493 A1 WO2020000493 A1 WO 2020000493A1
Authority
WO
WIPO (PCT)
Prior art keywords
media data
network access
access device
playback
playback device
Prior art date
Application number
PCT/CN2018/093931
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 华为技术有限公司
Priority to CN201880094871.0A priority Critical patent/CN112368987B/en
Priority to PCT/CN2018/093931 priority patent/WO2020000493A1/en
Publication of WO2020000493A1 publication Critical patent/WO2020000493A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the technical field of media playback, and in particular, to a media playback method and a playback device.
  • the present application provides a media playback method and a playback device, which can improve the speed of recovering media playback in the case of network disconnection and reconnection.
  • a first aspect of the present application provides a method for playing media.
  • the method includes: first, buffering media data from a streaming media server through a first network access device connected to the media, and playing the media data. Then, the reserved media data is determined from the cached media data, and the condition of the reserved media data after the connection with the first network access device is disconnected and it is not connected to the second network access device Is not played. Then, when disconnected from the first network access device, the first part of the buffered media data is played.
  • the second part of the buffered media data is played, and the media data is cached from the streaming media server through the second network access device; wherein the buffered media data It includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
  • the second network access device may be the first network access device, or may be another network access device other than the first network access device.
  • the playback device plays media data from the streaming media server while buffering, and determines the reserved media data.
  • the reserved media data is connected between the playback device and the first network access device. After being disconnected and not connected to the second network access device, it will not be played.
  • the reserved media data will be played when the playback device is connected to the second network access device.
  • the reserved media data can be played.
  • the reserved media data obtains time for the background to obtain an IP address, so that users can still enjoy video or audio during the network disconnection recovery stage (the stage of obtaining an IP address).
  • the playback device reconnected to the streaming media server can normally obtain media data from the streaming media server. This is equivalent to greatly improving the streaming media loading efficiency during the network recovery stage and improving the user experience.
  • the method further includes: pausing to play the buffered media data.
  • playing the second part of the buffered media data includes: when the second network access device is connected, playing the reserved media data.
  • the playback device pauses when playing the buffered media data to the reserved media data. Play.
  • the reserved media data can be played, and the IP address is obtained and the streaming media server is successfully accessed during the playback of the reserved media data. Because the media data is reserved, the reserved media data can be played immediately after reconnecting to the access network device without waiting to re-establish a connection with the streaming media server, which improves the user experience.
  • the reserved media data when connecting to the second network access device, the reserved media data has not yet been played, and the buffered media data in the second part is greater than The reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
  • the playback time of the reserved media data is obtained by obtaining the IP
  • the historical experience value of the time required for the address is determined, and the IP address is used to cache the media data from the streaming media server through the network access device. That is to say, the playback device can determine the playback duration of the reserved media data according to the historical experience value of the IP address obtained by the playback device. In this way, after the network disconnection and reconnection, the playback device does not need to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for the user to view the media data.
  • the foregoing historical experience value includes multiple time values required to obtain the IP address multiple times.
  • the playback duration of the reserved media data is determined by the historical experience value of the time required to obtain the IP address, and specifically includes: taking the average time value of the multiple time values required to obtain the IP address multiple times as the reserved media data. Or the playback time of the reserved media data is taken as the maximum time value among the multiple time values.
  • the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
  • the connecting to the second network access device includes: connecting to the second network access device through a wired communication connection.
  • playing the second part of the buffered media data specifically includes: when detecting that the state of the wired network port is switched from the disabled state to the enabled state, playing the second Partially cached media data.
  • the wired network port is used to connect to the second network access device. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
  • the connecting to the second network access device includes: connecting to the second network access device through a wireless communication connection.
  • the playing the second part of the buffered media data when connected to the second network access device specifically includes: when the identity authentication of the wireless communication connection with the second network access device is completed, playing the second Partially cached media data. That is, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when the wireless device is authenticated with the second network access device.
  • the present application provides a playback device.
  • the playback device includes a playback unit, a cache unit, and a determination unit.
  • the cache unit is configured to cache a stream media server through a first network access device connected to the cache unit.
  • Media data The playback unit is configured to play the media data.
  • the determining unit is further configured to determine the reserved media data from the buffered media data, and the reserved media data is not connected to the first network access device after the playback device is disconnected, It is not played under the conditions of the second network access device.
  • the playing unit is further configured to play the first buffered media data when disconnected from the first network access device.
  • the playback unit is further configured to play the second part of the buffered media data when the playback device is connected to the second network access device, and cache the media data from the streaming media server through the second network access device.
  • the buffered media data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
  • the second network access device may be the first network access device, or may be another network access device other than the first network access device.
  • the playback device plays the data of the first media from the cache on the streaming media server.
  • the playback device can determine the reserved media data and copy the reserved media data. It is reserved for playback when the playback device is connected to the second network access device, and an IP address may be obtained by using the reserved playback time of the media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
  • the playback unit is further configured to: after the playback device is disconnected from the first network access device, when the playback unit plays the buffered media data to the reserved media data, the playback device is not connected to the second The network access device pauses playing the reserved media data.
  • the playback unit is further specifically configured to play the reserved media data when the playback device is connected to the second network access device.
  • the playback device pauses when playing the buffered media data to the reserved media data. Play.
  • the reserved media data can be played, and the IP address is obtained and the streaming media server is successfully accessed during the playback of the reserved media data. Because the media data is reserved, the reserved media data can be played immediately after reconnecting to the access network device without waiting to re-establish a connection with the streaming media server, which improves the user experience.
  • the playback unit when connected to the second network access device, the playback unit has not yet played the above-mentioned reserved media data, and the above-mentioned second part is cached
  • the media data is larger than the reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
  • the playback device further includes an obtaining unit, and the obtaining unit is used for To obtain an IP address.
  • the playback duration of the reserved media data is determined by the historical experience value of the time required for the obtaining unit to obtain an IP address, and the IP address is used by the cache unit to cache the media data from the streaming media server through a network access device. That is to say, the playback device can determine the playback duration of the reserved media data according to the historical experience value of the IP address obtained by the playback device. In this way, after the network disconnection and reconnection, the playback device does not need to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for the user to view the media data.
  • the historical experience value includes multiple time values required by the obtaining unit to obtain the IP address multiple times.
  • the reserved media data is determined by the historical experience value of the time required for the IP unit to obtain the IP address, and specifically includes: taking the average time value of the multiple time values required to obtain the IP address multiple times as the reserved media data. Or the playback time of the reserved media data is taken as the maximum time value among the multiple time values.
  • the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
  • the playback device is specifically configured to connect to the second network access device through a wired communication connection.
  • the playback unit is specifically configured to: when the state of the wired network port of the playback device is switched from the disabled state to the enabled state, play the second part of the buffered media data. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
  • the playback device is specifically configured to connect to the second network access device through a wireless communication connection.
  • the playback unit is specifically configured to: when the playback device and the second network access device complete identity authentication of the wireless communication connection, play the media data buffered in the second part. That is to say, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when completing the identity authentication of the wireless communication connection with the second network access device.
  • the present application provides a playback device including a processor and a memory; wherein the processor is configured to call software instructions in the memory to perform the following operations: access through a first network connected to The device caches the media data from the streaming media server to the memory to play the media data. Determine the reserved media data from the buffered media data, the condition of the reserved media data after the transceiver is disconnected from the first network access device and is not connected to the second network access device Is not played. When the transceiver is disconnected from the first network access device, the first part of the buffered media data is played.
  • the transceiver When the transceiver is connected to the second network access device, playing the second part of the buffered media data, and buffering the media data from the streaming media server through the second network access device; wherein the buffered media
  • the data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
  • the second network access device may be the first network access device, or may be another network access device other than the first network access device.
  • the playback device plays the data of the first media from the cache on the streaming media server.
  • the playback device can determine the reserved media data and copy the reserved media data. It is reserved for playback when the playback device is connected to the second network access device, and an IP address may be obtained by using the reserved playback time of the media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
  • the processor after disconnecting from the first network access device, when the processor plays the cached media data to the reserved media When the data is not yet connected to the second network access device, the buffered media data in the second part is equal to the reserved media data.
  • the processor is further configured to: after disconnecting from the first network access device, when the processor plays the buffered media data to the reserved media data, the processor is not connected to the second network access device and pauses Play the above reserved media data.
  • the processor is further specifically configured to: when connected to the second network access device, play the reserved media data.
  • the playback device pauses when playing the buffered media data to the reserved media data. Play. In this way, after the playback device is disconnected from the network, as long as unplayed media data is reserved, as much media data as possible can be played for users to watch.
  • the processor When connected to the second network access device, the processor has not yet played to the reserved media data, and the buffered media data in the second part is larger than the reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
  • the playing time of the reserved media data is determined by the historical experience value of the time required for the transceiver to obtain an IP address, and the IP address is used by the transceiver to buffer the media data from the streaming media server through a network access device. That is to say, the playback device can determine the playback duration of the reserved media data according to the historical experience value of the IP address obtained by the playback device. In this way, after the network disconnection and reconnection, the playback device does not need to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for the user to view the media data.
  • the foregoing historical experience value includes multiple time values required to obtain the IP address multiple times.
  • the reserved media data is determined by the historical experience value of the time required to obtain the IP address, and specifically includes: taking the average time value of the multiple time values required to obtain the IP address multiple times as the playing time of the reserved media data. Or, taking the maximum time value among the multiple time values as the playing duration of the reserved media data.
  • the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
  • the transceiver is specifically configured to connect to the second network access device through a wired communication connection.
  • the processor is specifically configured to: when detecting that the state of the wired network port is switched from the disabled state to the enabled state, play the second part of the buffered media data. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
  • the transceiver is specifically configured to connect to the second network access device through a wireless communication connection.
  • the processor is specifically configured to: when the identity authentication of the wireless communication connection is completed with the second network access device, play the media data buffered in the second part. That is to say, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when completing the identity authentication of the wireless communication connection with the second network access device.
  • the present application provides a computer-readable storage medium.
  • the computer-readable storage medium stores program instructions.
  • the program instructions run on a processor, the first aspect or any one of the first aspects is implemented.
  • One possible implementation is the method described.
  • the present application provides a computer program product, which is characterized in that when the computer program product runs on a processor, the first aspect or the method described in any possible implementation manner of the first aspect is implemented .
  • FIG. 1 is a schematic architecture diagram of a multimedia system involved in this application
  • FIG. 2 is a schematic flowchart of a media playback method according to an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a media playback method according to another embodiment of the present application.
  • FIG. 4 is a schematic diagram of displaying playback progress according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of displaying playback progress according to another embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a playback device according to an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a playback device according to another embodiment of the present application.
  • FIG. 8 is a schematic diagram of information interaction between internal devices of a playback device according to an embodiment of the present application.
  • At least one (a), a, b, or c can represent: a, b, c, "a and b", “a and c", “b and c", or "a and b and c" ", Where a, b, and c can be single or multiple.
  • FIG. 1 is a schematic diagram of a multimedia system architecture provided by an embodiment of the present application.
  • the multimedia system architecture 100 may include the Internet 101, a streaming media server 102, a network access device 103, and a playback device 104. among them:
  • the streaming media server 102 may be a widely distributed video server or a content distribution network (CDN) server based on the Internet 101.
  • CDN content distribution network
  • the network access device 103 may be a router, which may support a dynamic host configuration protocol (DHCP) function, and may be used to dynamically assign an IP address to the playback device 104.
  • DHCP dynamic host configuration protocol
  • the network access device 103 may perform a wired communication connection or a wireless communication connection with the playback device 104.
  • the playback device 104 may be a laptop computer, a set-top box (STB), a personal computer (PC), a tablet computer, an interactive personal television (IPTV) ), A smart handheld device (SHD). After receiving the IP address allocated by the network device 103, the playback device 104 can access the Internet 101 and download multimedia data from the streaming server 102 in the Internet 101.
  • STB set-top box
  • PC personal computer
  • IPTV interactive personal television
  • SHD smart handheld device
  • FIG. 2 is a schematic flowchart of a media playback method according to an embodiment of the present application.
  • the media playback method may include S201-S212.
  • the second network access device may be a first network access device, and the second network access device may also be a network access device other than the first network access device.
  • the playback device sends an access request for media data to the first network access device.
  • the source IP address and destination IP address can be carried in the media data access request.
  • the source IP address in the media data access request is used to indicate the IP address of the playback device
  • the destination IP address in the media data access request is used to indicate the media data.
  • the IP address of the streaming server After receiving the access request for the media data sent by the playback device, the first network access device may directly forward the access request for the media data to the streaming media server or the streaming media server through another network device according to the source IP address.
  • the playback device obtains the media data forwarded by the first network access device.
  • the streaming media server may send the media data to the first network access device, and the media data may carry a source IP address and a destination IP address.
  • the source IP address carried in the media data is used to indicate the IP address of the streaming media server, and the destination IP address carried in the media data is used to indicate the IP address of the playback device.
  • the first network access device receives the media data sent by the streaming media server. After that, the media data can be sent to the playback device according to the destination IP address carried in the media data, and the playback device can obtain the media data.
  • S203 The playback device buffers and plays the media data.
  • the media data may be video data, audio data, and the like.
  • the playback device can support playback control functions such as start, stop, rewind, fast forward or pause of media data.
  • the playback device determines the reserved media data from the buffered media data. After the reserved media data is disconnected from the first network access device of the playback device and is not connected to the second network access device, it is not played.
  • the playback time of the reserved media data can be 1s, 2s, 3s or longer.
  • the playback duration of the reserved media data may also be determined by a historical experience value, and the historical experience value may be determined by a time value required for the playback device to obtain an IP address.
  • the historical experience value may also be determined by multiple time values required by the playback device to obtain the IP address multiple times, and the playback duration of the reserved media data may be the multiple obtained IP addresses.
  • the first time to obtain the IP address was 2s
  • the second time to obtain the IP address was 1s
  • the third time to obtain the IP address is 3s
  • the playback device may determine the maximum time value of the three times taken to obtain the IP address as the playback time of the reserved media data, that is, determine that the playback time of the reserved media data is 3s.
  • the playback device records the time required to obtain an IP address each time, and then in the case that the playback device is disconnected from the network, the length of the appropriate reserved media data can be determined according to the time required to obtain the IP address before, reducing the playback device Chance of media data playback interruption after reconnecting to the second network access device.
  • the buffered media data includes the first portion of the buffered media data and the second portion of the buffered media data, and the second portion of the buffered media data includes the reserved media data.
  • the first part of the buffered media data may be the buffered media data played by the playback device within a period of time after the playback device disconnects from the first network access device and connects to the second network access device.
  • the second part of the buffered media data may be media data that has been buffered but not played by the playback device when connected to the second network access device.
  • the disconnection of the communication connection between the playback device and the first network access device may be a disconnection of a wired communication connection or a disconnection of a wireless communication connection. If the wired communication connection between the playback device and the first network access device is disconnected, the playback device can detect the status of the wired network port on the playback device to determine whether the communication connection with the first network access device is disconnected. If the state of the wired network port on the playback device is switched from enabled to disabled, it can be determined that the communication connection between the playback device and the first network access device has been disconnected.
  • the playback device may periodically send an access request to the first network access device; if the playback device cannot receive the access request from the first network access device Response, the playback device may determine that the communication connection between the playback device and the first network access device has been disconnected.
  • the playback device establishes a connection with the second network access device.
  • the playback device may establish a wired communication connection with the second network access device, or may establish a wireless communication connection with the second network access device.
  • the playback device can detect the network port status of the playback device to determine whether to establish a wired communication connection with the second network access device. If the playback device detects playback The state of the wired network port of the device is switched from the disabled state to the enabled state, and the playback device may determine that the playback device establishes a wired communication connection with the second network access device.
  • the playback device can detect whether the playback device and the second network access device have completed the identity authentication of the wireless communication connection. If the identity authentication is completed, the playback device can It is determined that the playback device establishes a wireless communication connection with the second network access device.
  • the process of establishing wireless communication between the playback device and the second network access device may be first, the playback device scans the wireless signal sent by the second network access device, and then the playback device may perform identity authentication with the second network access device. Finally, when the playback device and the second network access device have completed identity authentication, the playback device and the second network access device can complete the establishment of a communication connection.
  • the identity authentication method between the playback device and the second network access device may include: open-system authentication, shared-key authentication, and pre-shared key , PSK) certification.
  • the playback device plays the second part of the buffered media data.
  • the second playback device is not connected to the second network access device, and the playback device is paused. Playing the buffered media data, the second part of the buffered media data is equal to the reserved media data. That is, after the playback device is disconnected from the first network access device, if the playback device has not established a connection with the second network access device, the playback device plays the buffered media data to the reserved media data. Pause playback from time to time. In this way, after the playback device is disconnected from the network, as long as unplayed media data is reserved, as much media data as possible can be played for users to watch.
  • the playback device when connecting to the second network access device, the playback device has not yet played the reserved media data, and the second part of the buffered media data is larger than the reserved media data,
  • the playback device can continue to cache normally and continue to play media data without the interruption of playback caused by unbuffered data to play. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
  • the playback device Under the condition that the playback device is connected to the second network access device, the playback device sends a request for obtaining an IP address to the second network access device.
  • the playback device obtains an IP address allocated by the second network access device to the playback device.
  • the playback device may obtain an IP address based on a dynamic host configuration protocol (DHCP) mechanism. Therefore, the DHCP client is a playback device, and the DHCP server may be a second network access device, or it may be another device connected to the local area network or wireless local area network where the second network access device is located.
  • DHCP dynamic host configuration protocol
  • the following uses the DHCP server as the second network access device as an example to specifically describe the process in which the playback device obtains an IP address.
  • the following examples are only used to explain the application and should not be construed as limiting.
  • the playback device sends a request for obtaining an IP address to the second network access device.
  • the request for obtaining the IP address may be DHCP discovery information.
  • the playback device sends the DHCP discovery information in a broadcast manner to find the DHCP through the second network access device. server.
  • the second network access device serving as the DHCP server can receive the DHCP discovery information, and the second network access device selects one of the IP addresses that have not been allocated and assigns it to the playback device, that is, the playback device can receive the first
  • the DHCP providing information sent by the network access device includes the IP address allocated to the playback device. If there are multiple DHCP servers, the playback device can only accept the first DHCP provided information.
  • the playback device may broadcast the DHCP request information, which includes the IP address requested from the DHCP server selected by the playback device.
  • the second network access device may send a DHCP confirmation message to the playback device, and the confirmation information includes the IP allocated by the second network access device to the playback device. address.
  • the second network access device and the first network access device may be in the same local area network or wireless local area network. That is to say, the playback device is reconnected to the local area network or wireless local area network before disconnecting from the first network access device. At this time, the playback device may not need to send DHCP discovery information anymore, but directly broadcast the information including the previous DHCP request information for the IP address assigned to the playback device at a time.
  • the second network access device receives the DHCP request message with the IP address previously assigned to the playback device, the second network access device sends a DHCP confirmation message to the playback device, so that the playback device continues to use the last time it was allocated. IP address.
  • the second network access device may send a DHCP denial message to the playback device, and the DHCP denial information is used to instruct the playback device to send the above DHCP discovery information to obtain The new IP address.
  • the playback device may perform step S207, while the playback device plays the buffered but unplayed media data, and simultaneously execute step S208, when the playback device is connected to the second network access device.
  • the playback device sends a request for obtaining an IP address to the second network access device, and S209, the playback device obtains the IP address allocated by the second network access device to the playback device. In this way, after disconnecting from the first network access device, the execution time of the process of obtaining the IP address of the playback device can be provided through the reserved time, which reduces the waiting time for the playback device to resume playback.
  • the playback device sends an access request for media data to the second network access device.
  • the source IP address and destination IP address can be carried in the media data access request.
  • the source IP address in the media data access request is used to indicate the IP address of the playback device
  • the destination IP address in the media data access request is used to indicate the media data.
  • the IP address of the streaming server After receiving the access request for the media data sent by the playback device, the second network access device may directly forward the access request for the media data to the streaming media server or the other media devices to the streaming media server according to the source IP address.
  • the playback device obtains the media data forwarded by the second network access device.
  • the streaming media server may send the media data to the second network access device, and the media data may carry a source IP address and a destination IP address.
  • the source IP address carried in the media data is used to indicate the IP address of the streaming media server
  • the destination IP address in the media data is used to indicate the IP address of the playback device
  • the second network access device receives the media data sent by the streaming media server.
  • the media data can be sent to the playback device according to the destination IP address carried in the media data, and the playback device can obtain the media data.
  • the playback device continues to buffer and play media data.
  • the playback device may continue to cache and play the media data when the playback device is disconnected from the first network access device. For example, when the playback device is disconnected from the first network access device, the playback device caches a video at 30 minutes and 20 seconds, and then after the playback device obtains the media data forwarded by the second network access device, the playback The device can continue to cache the video from 30 minutes and 20 seconds.
  • the examples are only used to explain the application and should not be construed as limiting.
  • the playback device plays the data of the first media while buffering from the streaming media server.
  • the playback device may determine the reserved media data, and The reserved media data is left to be played when the playback device is connected to the second network access device, and an IP address may be obtained by using the playback time of the reserved media data.
  • the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
  • the playback device disconnects from the first network access device, the reserved media data is determined. If the playback device plays media data to the reserved media data, the playback device has not yet established a connection with the second network device. , The playback device can pause playing media data.
  • FIG. 3 is a schematic flowchart of a media playback method according to an embodiment of the present application.
  • the media playback method may include S301-S313.
  • the playback device sends an access request for media data to the first network access device.
  • step S201 in the embodiment of FIG. 2, and details are not described herein.
  • the playback device obtains the media data forwarded by the first network access device.
  • step S202 in the embodiment in FIG. 2, and details are not described herein.
  • the playback device buffers and plays the media data.
  • step S203 in the embodiment in FIG. 2, and details are not described herein.
  • the playback device determines the reserved media data from the buffered media data. After the reserved media data is disconnected from the first network access device of the playback device and is not connected to the second network access device, it is not played.
  • step S204 in the embodiment shown in FIG. 2, and details are not described herein.
  • the buffered media data includes the first portion of the buffered media data and the second portion of the buffered media data, and the second portion of the buffered media data includes the reserved media data.
  • the first part of the buffered media data may be the buffered media data played by the playback device within a period of time after the playback device disconnects from the first network access device and connects to the second network access device.
  • the second part of the buffered media data may be media data that has been buffered but not played by the playback device when connected to the second network access device.
  • the playback device When the playback device is playing the reserved media data, the playback device is not connected to the second network access device, the playback device pauses playing the buffered media data.
  • the playback device plays media data at a total time of 28 minutes and 40 seconds, and the playback device determines the time for the reserved media data.
  • the segment is a period from 30 minutes and 18 seconds to 30 minutes and 20 seconds of the total length of the media data.
  • the playback device continues to play media data to 30 minutes and 18 seconds of the total media data length. If the playback device is not connected to the second network access device, the playback device can pause at 30 minutes and 18 seconds of the total media data length. Play.
  • the examples are only used to explain the application and should not be construed as limiting.
  • the playback device establishes a connection with the second network access device.
  • the playback device may establish a wired communication connection with the second network access device, or may establish a wireless communication connection with the second network access device.
  • the playback device can detect the network port status of the playback device to determine whether to establish a wired communication connection with the second network access device. If the playback device detects playback The state of the wired network port of the device is switched from the disabled state to the enabled state, and the playback device may determine that the playback device establishes a wired communication connection with the second network access device.
  • the playback device can detect whether the playback device and the second network access device have completed the identity authentication of the wireless communication connection. If the identity authentication is completed, the playback device can It is determined that the playback device establishes a wireless communication connection with the second network access device.
  • the process of establishing wireless communication between the playback device and the second network access device may be first, the playback device scans the wireless signal sent by the second network access device, and then the playback device may perform identity authentication with the second network access device. Finally, when the playback device and the second network access device have completed identity authentication, the playback device and the second network access device can complete the establishment of a communication connection.
  • the identity authentication method between the playback device and the second network access device may include: open system identity authentication, shared key authentication, pre-shared key authentication, and the like.
  • the playback device plays the second part of the buffered media data.
  • the second part of the buffered media data may be reserved media data.
  • the playback device can continue to play the reserved media from the point where the playback device pauses playing media data when the playback device is not connected to the second network access device. data. For example, when the playback device is disconnected from the first network access device, the playback device determines that the time period of the reserved media data is a time period from 30 minutes and 18 seconds to 30 minutes and 20 seconds, After the playback device is connected to the second network access device, the playback device can continue to play the video from a total length of 30 minutes and 18 seconds of the media data.
  • the examples are only used to explain the application and should not be construed as limiting.
  • the playback device Under the condition that the playback device is connected to the second network access device, the playback device sends a request for obtaining an IP address to the second network access device.
  • step S208 in the embodiment in FIG. 2 described above, and details are not described herein.
  • the playback device obtains an IP address allocated by the second network access device to the playback device.
  • step S209 in the embodiment shown in FIG. 2, and details are not described herein.
  • the playback device sends an access request for media data to the second network access device.
  • step S210 in the embodiment in FIG. 2 described above, and details are not described herein.
  • the playback device obtains the media data forwarded by the second network access device.
  • step S211 in the embodiment in FIG. 2 described above, and details are not described herein.
  • the playback device continues to buffer and play media data.
  • step S212 in the embodiment of FIG. 2 described above, and details are not described herein.
  • the playback device plays media data from the streaming media server while buffering.
  • the playback device can determine the reserved media data. After disconnecting from the first network access device, if the playback device has not been connected to the first network access device, When the second network access device establishes a connection, the playback device pauses playback when it plays the buffered media data to the reserved media data. In this way, after the playback device reconnects to the network device, the reserved media data can be played and played back.
  • the reserved media data obtains an IP address during this time and successfully accesses the streaming media server, that is, after the disconnection and reconnection, because the media data is reserved, the reserved media can be played immediately after reconnecting to the access network device Data does not need to wait to re-establish a connection with the streaming media server, which improves the user experience.
  • FIG. 4 is a schematic diagram of a playback progress display in an embodiment of the present application.
  • the display progress of the media data is divided into four stages:
  • the first stage is the stage of buffering and playing the media data before the playback device disconnects from the first network access device.
  • the playback device normally accesses the streaming media server, so the playback device can play media data while caching.
  • the second stage is a stage in which the playback device is disconnected from the first network access device, and the playback device suspends playback but does not cache the media data when the playback device plays the reserved media data.
  • the playback device pauses buffering the media data, but after determining the reserved media data, the playback device can continue to play the media data until the reserved media data is played. At the start time, playback is paused.
  • the third stage is a stage in which the playback device is connected to the second network access device and continues to play the reserved media data.
  • the playback device can continue to play the reserved media data.
  • the fourth stage is a stage in which the playback device plays while buffering after the playback device accesses the streaming media server.
  • the media data can be obtained. Therefore, the playback device can continue to cache the media data from the end time of the reserved media data while playing the media data.
  • the playback device after the playback device is disconnected from the first network access device, the playback device has not yet played to the start time of the reserved media data, and the playback device has been connected to the second network access device. , The playback device can play the media data continuously. In this way, the playback device can continuously play media data while reconnecting quickly after disconnection, improving the user experience.
  • the possible situation is described in detail below with reference to FIG. 5.
  • the display progress of the media data is divided into four stages:
  • the first stage is the stage of buffering and playing the media data before the playback device disconnects from the first network access device.
  • the playback device normally accesses the streaming media server, so the playback device can play media data while caching.
  • the second stage is the stage where the playback device is disconnected from the first network access device, and the playback device is connected to the second network access device. After the playback device is disconnected from the first network access device, the playback device may continue to play the media data after determining the reserved media data.
  • the third stage is a stage in which the playback device plays from the connection to the second network access device to the playback device to the starting time point of the reserved media data.
  • the playback device can continuously play media data.
  • the fourth stage is the stage from when the playback device starts to the reserved media data to when the playback device accesses the streaming media server.
  • the playback device can also continuously play the reserved media data. After the playback device accesses the streaming media server, the playback device can continue to play media data while buffering.
  • FIG. 6 is a schematic structural diagram of a playback device 600 provided by the present application.
  • the playback device 600 may be the playback device 104 in the multimedia system architecture of FIG. 1.
  • the playback device 600 may include a buffer unit 610, a playback unit 620, and a determination unit 630. among them,
  • the buffering unit 610 may be configured to buffer media data from the streaming media server through the first network access device connected to the buffering unit;
  • a playing unit 620 configured to play the media data
  • the determining unit 630 may be configured to determine the reserved media data from the cached media data, where the reserved media data is disconnected after the playback device 600 is disconnected from the first network access device and is not connected. Is not played under the condition of accessing the second network access device;
  • the playing unit 620 is further configured to play the first part of the buffered media data when disconnected from the first network access device;
  • the playback unit 620 is further configured to play the second part of the buffered media data when the playback device 600 is connected to the second network access device, and cache the media data from the streaming media server through the second network access device.
  • Media data wherein the cached media data includes the first part of the cached media data and the second part of the cached media data, and the second part of the cached media data includes the reserved Media data.
  • the second network access device may be the first network access device, or may be another network access device other than the first network access device.
  • the playback device 600 can determine the reserved media data and use the reserved media The data is left to be played when the playback device is connected to the second network access device, and an IP address can be obtained by using the reserved playback time of the media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
  • the playback unit 620 plays the buffered media data to the reserved media data, it plays The device 600 has not been connected to the second network access device, and the second part of the buffered media data is equal to the reserved media data.
  • the playback unit 620 may be further configured to: pause playback of the reserved media data.
  • the playback unit 620 may be specifically configured to: when the playback device 600 is connected to the second network access device, play the reserved media data. That is, after disconnecting from the first network access device, if the playback device has not established a connection with the second network access device, the playback device pauses when playing the buffered media data to the reserved media data. Play. In this way, after the playback device is disconnected from the network, as long as unplayed media data is reserved, as much media data as possible can be played for users to watch.
  • the playback unit 620 when connected to the second network access device, has not yet played the reserved media data, and the second part of the buffered media data is larger than the reserved media data.
  • Reserved media data That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
  • the playback device 600 further includes an obtaining unit 640.
  • the playback duration of the reserved media data is determined by the historical experience value of the time required for the obtaining unit 640 to obtain an IP address, and the IP address is used by the cache unit 630 to cache the media from the streaming media server through a network access device. data. That is to say, according to the historical experience value of the IP address obtained by the playback device, the playback duration of the reserved media data can be determined. In this way, after disconnecting the network and reconnecting, it is not necessary to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for users to view the media data.
  • the historical experience value may include multiple time values required by the obtaining unit 640 to obtain the IP address multiple times.
  • the foregoing reserved media data is determined by the historical experience value of the time required by the obtaining unit 640 to obtain the IP address, and may specifically include: taking the average time value of the multiple time values required for obtaining the IP address multiple times as the pre- Playing time of the reserved media data; or taking the maximum time value among the plurality of time values as the playing time of the reserved media data.
  • the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
  • the playback device 600 may be specifically configured to connect to the second network access device through a wired communication connection.
  • the playback unit 620 may be specifically configured to: when the state of the wired network port of the playback device 600 is switched from the disabled state to the enabled state, play the second part of the buffered media data. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
  • the playback device 600 may be specifically configured to connect to the second network access device through a wireless communication connection.
  • the playback unit 620 may be specifically configured to: when the playback device 600 and the second network access device complete the identity authentication of the wireless communication connection, play the second buffered media data. That is to say, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when completing the identity authentication of the wireless communication connection with the second network access device.
  • FIG. 7 is a schematic structural diagram of a playback device 700 provided by the present application.
  • the playback device 700 may include a processor 710, a transceiver 720, a memory 730, an output circuit 740, and a bus 750.
  • the processor 710, the transceiver 720, the memory 730, and the output circuit 740 are connected to each other through a bus 750.
  • the playback device 700 may further include a display screen and an audio circuit, and the display screen and the audio circuit may be connected to the output circuit.
  • the display screen is used to display a dynamic or static picture when the playback device plays media data, and the audio circuit is used to When the playback device plays the media data, it outputs the audio of the media data.
  • the playback device 700 may be a playback chip.
  • the playback device may include a processor, a memory, and some interface circuits.
  • the processor invokes software instructions in the memory to perform steps of one or more methods of the foregoing method embodiments.
  • the processor 710 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor 1001 may further include a hardware chip.
  • the above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the transceiver 720 may include a baseband processing unit, a digital-to-analog conversion unit, and a radio frequency channel module.
  • the baseband processing unit may include a digital signal processor (DSP), a microcontroller (microcontrol unit), a code converter and a submultiplexer (TCSM) (for completing Using demultiplexing and code conversion functions).
  • the baseband processing unit can be used to synthesize the baseband signal to be transmitted or to decode the received baseband signal.
  • Digital-to-analog conversion is used to perform digital-to-analog conversion on the baseband signal to be transmitted or the received baseband signal.
  • the radio frequency channel module may include a transmitter (TX) and a receiver (RX).
  • the transmitter (TX) may be used to perform transmission processing on a signal output by the playback device 700.
  • the receiver (RX) can be used to receive the signal received by the antenna.
  • the antenna may be coupled with the transceiver 720 to complete the transmission processing of the signal output by the playback device 700 and the reception processing of the signal received by the playback device 700.
  • the memory 730 is coupled to the processor 710 and is configured to store various software programs and / or multiple sets of instructions.
  • the memory 730 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory may also include non-volatile memory (non-volatile memory), such as flash memory ( flash memory).
  • volatile memory volatile memory
  • non-volatile memory non-volatile memory
  • flash memory flash memory
  • the memory may also include a combination of the above-mentioned kinds of memories.
  • the memory 730 may cache media data and may also store an operating system.
  • the memory 730 may also store a network communication program, which may be used to communicate with one or more additional devices, one or more terminal devices, and one or more communication devices.
  • the transceiver 720 may be configured to obtain media data from a streaming media server through a first network access device connected to the transceiver.
  • the memory 730 may be configured to buffer the media data.
  • the processor 710 may be configured to play the media data.
  • the transceiver 720 may be further configured to detect that the communication connection between the playback device 700 and the first network access device is disconnected.
  • the processor 710 may be further configured to determine the reserved media data from the cached media data, where the reserved media data is not connected to the first network access device after the transceiver 720 is disconnected, and Not connected to the second network access device.
  • the processor 710 may be further configured to play the first part of the buffered media data when the transceiver 720 is disconnected from the first network access device.
  • the processor 710 may be further configured to play the second part of the buffered media data when the transceiver 720 is connected to the second network access device, and the processor 710 caches the media data from the streaming media server through the second network access device Media data; wherein the buffered media data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
  • the playback device plays media data from the streaming media server while buffering.
  • the playback device can determine the reserved media data.
  • the playback device plays to When the media data is reserved, when the playback device is not connected to the second network access device, the playback is paused, and when the playback device is connected to the second network access device, the reserved media data is played.
  • the IP address can be obtained using the reserved playing time of the media data. In this way, when the network is restored, the waiting time for obtaining an IP address is saved, the playback of media data is quickly resumed, and the user experience is improved.
  • FIG. 8 illustrates a schematic diagram of information interaction of internal devices of a playback device according to an embodiment of the present application.
  • the transceiver 720 accesses the streaming media server through the connected first network access device, and obtains the media data in the streaming media server.
  • the transceiver 720 may notify the processor 710 of the message of obtaining the media data, and then, after receiving the notification message, the processor 710 may instruct the memory 730 to cache the media data. Then, the memory 730 buffers the media data acquired by the transceiver 720. While the memory 730 caches the media data, the processor 710 may play the buffered media data and instruct the output circuit 740 to output pictures and sounds in the media data.
  • the transceiver 720 may notify the processor 710 that the playback device 700 has disconnected from the first network access device. Then, the processor 710 may instruct the memory to temporarily buffer the media data and determine the reserved media data, and the reserved media data is played only under the condition that the playback device 700 is connected to the second network access device. At the initial point in time when the processor 710 plays the media data reserved by the media data value, if no notification is received from the transceiver 720 to connect to the second network access device, the processor 710 pauses playing the media data and instructs the output The circuit displays a still frame picture when paused.
  • the transceiver 720 may notify the processor 710 that a connection has been established with the second network access device. Then, the processor 710 may continue to play the buffered but unplayed media data, and instruct the output circuit to output a display screen and sound of the media data. While the processor 710 continues to play the buffered but unplayed media data, the transceiver 720 may perform a process of obtaining an IP address through the second network access device.
  • the transceiver 720 can access the streaming media server and continue to obtain media data from the streaming media server.
  • the transceiver 720 may notify the processor 710 of the message that the media data is acquired.
  • the processor 710 may instruct the memory 730 to cache the media data. While the memory 730 caches the media data, the processor 710 continues to play the buffered media data and instructs the output circuit 740 to output pictures and sounds in the media data.
  • FIG. 8 only exemplarily illustrates an embodiment of the present application from the internal devices of the playback device 700.
  • an adaptive adjustment process may be adopted.
  • parts that are not described in detail refer to FIG. 2 The embodiment is not repeated here.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, a computer, a server, or a data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available medium integration.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD), etc.).
  • implementation of the embodiments of the present invention can support flexible bandwidth transmission and can better adapt to the multi-bandwidth scenario supported by the next-generation new air interface technology.
  • the processes may be completed by a computer program instructing related hardware.
  • the program may be stored in a computer-readable storage medium. It may include the processes of the method embodiments described above.
  • the foregoing storage media include: ROM or random storage memory RAM, magnetic disks, or optical discs, which can store various program code media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Disclosed are a media playing method and a media playing device. The method may comprise: a playing device first caching, by means of a first network access device connected thereto, media data from a streaming media server, and playing the media data; then, determining reserved media data from the cached media data, wherein the reserved media data is not played in the case where the playing device has been disconnected from the first network access device and is not connected to a second network access device; next, when the playing device is disconnected from the first network access device, playing a first portion of the cached media data; and finally, when the playing device is connected to the second network access device, playing a second portion of the cached media data, and caching media data from the streaming media server by means of the second network access device. In this way, the speed of restoring media playing can be improved in the case of reconnecting after being disconnected from a network.

Description

一种媒体播放方法及播放设备Media playing method and playing equipment 技术领域Technical field
本申请涉及媒体播放技术领域,尤其涉及一种媒体播放方法及播放设备。The present application relates to the technical field of media playback, and in particular, to a media playback method and a playback device.
背景技术Background technique
随着互联网技术的发展,通过互联网观赏网络媒体资源已成为人们的生活方式。人们通过媒体播放器观赏互联网上的网络媒体资源时,媒体播放器会边播放边下载媒体资源的数据至媒体播放器的缓存区中,当媒体播放器与互联网断开时,媒体播放器会继续播放缓存区中的媒体数据,直至缓存区中的媒体数据被播放完,媒体播放器就会停止播放媒体数据。媒体播放器断网重连后,媒体播放器需要等待下载媒体数据到缓冲区中后,才开始继续播放媒体数据。这样,会造成用户等待时间过长的不良观赏体验。With the development of Internet technology, viewing online media resources through the Internet has become a way of life for people. When people watch online media resources on the Internet through a media player, the media player will download the data of the media resources to the buffer area of the media player while playing. When the media player is disconnected from the Internet, the media player will continue The media data in the buffer area is played until the media data in the buffer area is played, and the media player stops playing the media data. After the media player is disconnected from the network and reconnected, the media player needs to wait for downloading the media data to the buffer before it starts to play the media data. In this way, a poor viewing experience of the user waiting too long will be caused.
发明内容Summary of the invention
本申请提供了一种媒体播放方法及播放设备,能够在断网重连的情况下提高恢复媒体播放的速度。The present application provides a media playback method and a playback device, which can improve the speed of recovering media playback in the case of network disconnection and reconnection.
本申请第一方面提供了一种媒体播放方法,该方法包括:首先,通过连接到的第一网络接入设备从流媒体服务器缓存媒体数据,并播放该媒体数据。然后,从已缓存的媒体数据中确定出预留的媒体数据,该预留的媒体数据在与该第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放。接着,当与该第一网络接入设备断开连接,播放第一部分已缓存的媒体数据。接着,当连接到该第二网络接入设备时,播放第二部分已缓存的媒体数据,并通过该第二网络接入设备从该流媒体服务器缓存媒体数据;其中,该已缓存的媒体数据包括该第一部分已缓存的媒体数据和该第二部分已缓存的媒体数据,该第二部分已缓存的媒体数据包括该预留的媒体数据。A first aspect of the present application provides a method for playing media. The method includes: first, buffering media data from a streaming media server through a first network access device connected to the media, and playing the media data. Then, the reserved media data is determined from the cached media data, and the condition of the reserved media data after the connection with the first network access device is disconnected and it is not connected to the second network access device Is not played. Then, when disconnected from the first network access device, the first part of the buffered media data is played. Then, when connecting to the second network access device, the second part of the buffered media data is played, and the media data is cached from the streaming media server through the second network access device; wherein the buffered media data It includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
本申请中,第二网络接入设备可以是第一网络接入设备,也可以是除第一网络接入设备之外的其他网络接入设备。In this application, the second network access device may be the first network access device, or may be another network access device other than the first network access device.
通过实施第一方面的方法,播放设备从流媒体服务器上边缓存边播放媒体数据,并确定出预留的媒体数据,该预留的媒体数据在播放设备与所述第一网络接入设备的连接断开后且未连接到第二网络接入设备的条件下不被播放,该预留的媒体数据在播放设备连接到第二网络接入设备时会被播放,同时可以在播放该预留的媒体数据的播放时间获取IP地址,以重新连接到流媒体服务器。这样,预留的媒体数据为后台获取IP地址争取到时间,可实现用户在断网恢复阶段(获取IP地址的阶段)仍然能够欣赏视频或音频。另外,在获取到IP地址后,重新连接到流媒体服务器的播放设备又可以正常获取到来自流媒体服务器的媒体数据。这对于用户而言相当于大大提高了网络恢复阶段的流媒体加载效率,提高了用户体验。By implementing the method of the first aspect, the playback device plays media data from the streaming media server while buffering, and determines the reserved media data. The reserved media data is connected between the playback device and the first network access device. After being disconnected and not connected to the second network access device, it will not be played. The reserved media data will be played when the playback device is connected to the second network access device. At the same time, the reserved media data can be played. Obtain an IP address for the playback time of the media data to reconnect to the streaming server. In this way, the reserved media data obtains time for the background to obtain an IP address, so that users can still enjoy video or audio during the network disconnection recovery stage (the stage of obtaining an IP address). In addition, after obtaining the IP address, the playback device reconnected to the streaming media server can normally obtain media data from the streaming media server. This is equivalent to greatly improving the streaming media loading efficiency during the network recovery stage and improving the user experience.
结合第一方面,在第一方面的第一种可能的实现方式中,在与该第一网络接入设备断开连接之后,当播放该已缓存的媒体数据至该预留的媒体数据时,还未连接到第二网络接入设备,上述第二部分已缓存的媒体数据等于该预留的媒体数据,该方法还包括:暂停播 放该已缓存的媒体数据。上述当连接到第二网络接入设备时,播放第二部分已缓存的媒体数据,包括:当连接到第二网络接入设备时,播放该预留的媒体数据。With reference to the first aspect, in a first possible implementation manner of the first aspect, after disconnecting from the first network access device, when playing the buffered media data to the reserved media data, The second portion of the buffered media data is equal to the reserved media data, and the method further includes: pausing to play the buffered media data. When the second network access device is connected, playing the second part of the buffered media data includes: when the second network access device is connected, playing the reserved media data.
也即是说,在与第一网络接入设备断开连接之后,如果播放设备一直未与第二网络接入设备建立连接,则播放设备播放已缓存的媒体数据至预留的媒体数据时暂停播放,这样,在播放设备重新接入网络设备后可以播放该预留的媒体数据,并在播放预留的媒体数据这段时间内获取IP地址并成功访问到流媒体服务器,即断网重连后,由于预留了媒体数据,因此在重新连接到接入网设备后可立即播放预留的媒体数据无需等待重新与流媒体服务器建立连接,提升了用户体验。That is, after disconnecting from the first network access device, if the playback device has not established a connection with the second network access device, the playback device pauses when playing the buffered media data to the reserved media data. Play. In this way, after the playback device reconnects to the network device, the reserved media data can be played, and the IP address is obtained and the streaming media server is successfully accessed during the playback of the reserved media data. Because the media data is reserved, the reserved media data can be played immediately after reconnecting to the access network device without waiting to re-establish a connection with the streaming media server, which improves the user experience.
结合第一方面,在第一方面的第二种可能的实现方式中,当连接到第二网络接入设备时,还未播放至预留的媒体数据,该第二部分已缓存的媒体数据大于该预留的媒体数据。也即是说,在播放设备还没有播放至预留的媒体数据时,播放设备已经连接到了第二网络接入设备,播放可以在断网至重新入网的过程中连续的播放媒体数据而不中途暂停,提高了用户的观赏体验。With reference to the first aspect, in a second possible implementation manner of the first aspect, when connecting to the second network access device, the reserved media data has not yet been played, and the buffered media data in the second part is greater than The reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
结合第一方面,或第一方面的第一至第二种中任一可能的实现方式,在第一方面的第三种可能的实现方式中,上述预留的媒体数据的播放时长由获取IP地址所需时间的历史经验值确定,该IP地址用于通过网络接入设备从流媒体服务器缓存上述媒体数据。也即是说,播放设备可以根据播放设备获取IP地址的历史经验值,确定出预留的媒体数据的播放时长。这样,在断网重连后,播放设备可以不用等到获取IP地址之后才开始播放媒体数据,减少了用户观赏媒体数据的等待时间。With reference to the first aspect, or any possible implementation manner of the first to second aspects of the first aspect, in a third possible implementation manner of the first aspect, the playback time of the reserved media data is obtained by obtaining the IP The historical experience value of the time required for the address is determined, and the IP address is used to cache the media data from the streaming media server through the network access device. That is to say, the playback device can determine the playback duration of the reserved media data according to the historical experience value of the IP address obtained by the playback device. In this way, after the network disconnection and reconnection, the playback device does not need to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for the user to view the media data.
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,上述历史经验值包括多次获取到IP地址所需的多个时间值。上述预留的媒体数据的播放时长由获取IP地址所需时间的历史经验值确定,具体包括:取该多次获取到IP地址所需的多个时间值的平均时间值作为该预留媒体数据的播放时长;或,取该多个时间值中的最大时间值作为所述预留媒体数据的播放时长。也即是说,播放设备可以根据历史经验值中多次获取到IP地址所需的时间值,确定出预留媒体数据的播放时长,更准确的确定预留媒体数据的播放时长,减少了播放设备重连接到第二网络接入设备后媒体数据播放中断的几率。With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the foregoing historical experience value includes multiple time values required to obtain the IP address multiple times. The playback duration of the reserved media data is determined by the historical experience value of the time required to obtain the IP address, and specifically includes: taking the average time value of the multiple time values required to obtain the IP address multiple times as the reserved media data. Or the playback time of the reserved media data is taken as the maximum time value among the multiple time values. In other words, the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
结合第一方面,在第一方面的第五种可能的实现方式中,上述连接到该第二网络接入设备包括:通过有线通信连接,连接到该第二网络接入设备。上述当连接到该第二网络接入设备时,播放第二部分已缓存的媒体数据,具体包括:当检测到有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。其中,该有线网口用于连接到该第二网络接入设备。也即是说,如果播放设备有线连接到第二网络接入设备,播放设备可以在检测到有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。With reference to the first aspect, in a fifth possible implementation manner of the first aspect, the connecting to the second network access device includes: connecting to the second network access device through a wired communication connection. When the second network access device is connected, playing the second part of the buffered media data specifically includes: when detecting that the state of the wired network port is switched from the disabled state to the enabled state, playing the second Partially cached media data. The wired network port is used to connect to the second network access device. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
结合第一方面,在第一方面的第六种可能的实现方式中,上述连接到该第二网络接入设备包括:通过无线通信连接,连接到该第二网络接入设备。上述当连接到该第二网络接入设备时,播放第二部分已缓存的媒体数据,具体包括:当与该第二网络接入设备完成上述无线通信连接的身份认证时,播放所述第二部分已缓存的媒体数据。也即是说,如果播放设备无线连接到第二网络接入设备,播放设备可以在与第二网络接入设备完成上述无线 通信连接的身份认证时,播放该第二部分已缓存的媒体数据。With reference to the first aspect, in a sixth possible implementation manner of the first aspect, the connecting to the second network access device includes: connecting to the second network access device through a wireless communication connection. The playing the second part of the buffered media data when connected to the second network access device specifically includes: when the identity authentication of the wireless communication connection with the second network access device is completed, playing the second Partially cached media data. That is, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when the wireless device is authenticated with the second network access device.
第二方面,本申请提供了一种播放设备,该播放设备包括:播放单元、缓存单元、确定单元;其中,该缓存单元,用于通过连接到的第一网络接入设备从流媒体服务器缓存媒体数据。所述播放单元,用于播放所述媒体数据。该确定单元,还用于从已缓存的该媒体数据中确定出预留的媒体数据,该预留的媒体数据在该播放设备与第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放。该播放单元,还用于当与该第一网络接入设备断开连接,播放第一部分已缓存的媒体数据。该播放单元,还用于当该播放设备连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,并通过该第二网络接入设备从该流媒体服务器缓存媒体数据。其中,该已缓存的媒体数据包括该第一部分已缓存的媒体数据和该第二部分已缓存的媒体数据,该第二部分已缓存的媒体数据包括该预留的媒体数据。In a second aspect, the present application provides a playback device. The playback device includes a playback unit, a cache unit, and a determination unit. The cache unit is configured to cache a stream media server through a first network access device connected to the cache unit. Media data. The playback unit is configured to play the media data. The determining unit is further configured to determine the reserved media data from the buffered media data, and the reserved media data is not connected to the first network access device after the playback device is disconnected, It is not played under the conditions of the second network access device. The playing unit is further configured to play the first buffered media data when disconnected from the first network access device. The playback unit is further configured to play the second part of the buffered media data when the playback device is connected to the second network access device, and cache the media data from the streaming media server through the second network access device. . The buffered media data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
本申请中,第二网络接入设备可以是第一网络接入设备,也可以是除第一网络接入设备之外的其他网络接入设备。播放设备从流媒体服务器上边缓存边播放第一媒体的数据,在播放设备与第一网络接入设备断开连接时,播放设备可以确定出预留的媒体数据,并将该预留的媒体数据留到播放设备连接到第二网络接入设备时播放,并可以利用这预留的媒体数据的播放时间获取IP地址。这样,可以在断网恢复时,将播放媒体数据的时间点提前,减少了在断网恢复后用户等待媒体数据被播放的时间,提高了用户的体验。In this application, the second network access device may be the first network access device, or may be another network access device other than the first network access device. The playback device plays the data of the first media from the cache on the streaming media server. When the playback device is disconnected from the first network access device, the playback device can determine the reserved media data and copy the reserved media data. It is reserved for playback when the playback device is connected to the second network access device, and an IP address may be obtained by using the reserved playback time of the media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
结合第二方面,在第二方面的第一种可能的实现方式中,在该播放设备与该第一网络接入设备断开连接之后,当该播放单元播放上述已缓存的媒体数据至该预留的媒体数据时,该播放设备还未连接到第二网络接入设备,上述第二部分已缓存的媒体数据等于该预留的媒体数据。播放单元,还用于:在该播放设备与第一网络接入设备断开连接之后,当该播放单元播放该已缓存的媒体数据至预留的媒体数据时,该播放设备未连接到第二网络接入设备,暂停播放上述预留的媒体数据。所述播放单元,还具体用于:当该播放设备连接到该第二网络接入设备时,播放上述预留的媒体数据。也即是说,在与第一网络接入设备断开连接之后,如果播放设备一直未与第二网络接入设备建立连接,则播放设备播放已缓存的媒体数据至预留的媒体数据时暂停播放,这样,在播放设备重新接入网络设备后可以播放该预留的媒体数据,并在播放预留的媒体数据这段时间内获取IP地址并成功访问到流媒体服务器,即断网重连后,由于预留了媒体数据,因此在重新连接到接入网设备后可立即播放预留的媒体数据无需等待重新与流媒体服务器建立连接,提升了用户体验。With reference to the second aspect, in a first possible implementation manner of the second aspect, after the playback device is disconnected from the first network access device, when the playback unit plays the cached media data to the pre- When the media data is retained, the playback device has not been connected to the second network access device, and the buffered media data in the second part is equal to the reserved media data. The playback unit is further configured to: after the playback device is disconnected from the first network access device, when the playback unit plays the buffered media data to the reserved media data, the playback device is not connected to the second The network access device pauses playing the reserved media data. The playback unit is further specifically configured to play the reserved media data when the playback device is connected to the second network access device. That is, after disconnecting from the first network access device, if the playback device has not established a connection with the second network access device, the playback device pauses when playing the buffered media data to the reserved media data. Play. In this way, after the playback device reconnects to the network device, the reserved media data can be played, and the IP address is obtained and the streaming media server is successfully accessed during the playback of the reserved media data. Because the media data is reserved, the reserved media data can be played immediately after reconnecting to the access network device without waiting to re-establish a connection with the streaming media server, which improves the user experience.
结合第二方面,在第二方面的第二种可能的实现方式中,当连接到第二网络接入设备时,该播放单元还未播放至上述预留的媒体数据,上述第二部分已缓存的媒体数据大于上述预留的媒体数据。也即是说,在播放设备还没有播放至预留的媒体数据时,播放设备已经连接到了第二网络接入设备,播放可以在断网至重新入网的过程中连续的播放媒体数据而不中途暂停,提高了用户的观赏体验。With reference to the second aspect, in a second possible implementation manner of the second aspect, when connected to the second network access device, the playback unit has not yet played the above-mentioned reserved media data, and the above-mentioned second part is cached The media data is larger than the reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
结合第二方面,或第二方面的第一至第二种中任一可能的实现方式,在第二方面的第三种可能的实现方式中,该播放设备还包括获取单元,该获取单元用于获取IP地址。上述预留的媒体数据的播放时长由该获取单元获取IP地址所需时间的历史经验值确定,该IP地址用于该缓存单元通过网络接入设备从该流媒体服务器缓存该媒体数据。也即是说,播 放设备可以根据播放设备获取IP地址的历史经验值,确定出预留的媒体数据的播放时长。这样,在断网重连后,播放设备可以不用等到获取IP地址之后才开始播放媒体数据,减少了用户观赏媒体数据的等待时间。With reference to the second aspect or any possible implementation manner of the first to second aspects of the second aspect, in a third possible implementation manner of the second aspect, the playback device further includes an obtaining unit, and the obtaining unit is used for To obtain an IP address. The playback duration of the reserved media data is determined by the historical experience value of the time required for the obtaining unit to obtain an IP address, and the IP address is used by the cache unit to cache the media data from the streaming media server through a network access device. That is to say, the playback device can determine the playback duration of the reserved media data according to the historical experience value of the IP address obtained by the playback device. In this way, after the network disconnection and reconnection, the playback device does not need to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for the user to view the media data.
结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,上述历史经验值包括该获取单元多次获取到IP地址所需的多个时间值。上述预留的媒体数据由该获取单元获取IP地址所需时间的历史经验值确定,具体包括:取该多次获取到IP地址所需的多个时间值的平均时间值作为上述预留媒体数据的播放时长;或,取该多个时间值中的最大时间值作为该预留媒体数据的播放时长。也即是说,播放设备可以根据历史经验值中多次获取到IP地址所需的时间值,确定出预留媒体数据的播放时长,更准确的确定预留媒体数据的播放时长,减少了播放设备重连接到第二网络接入设备后媒体数据播放中断的几率。With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the historical experience value includes multiple time values required by the obtaining unit to obtain the IP address multiple times. The reserved media data is determined by the historical experience value of the time required for the IP unit to obtain the IP address, and specifically includes: taking the average time value of the multiple time values required to obtain the IP address multiple times as the reserved media data. Or the playback time of the reserved media data is taken as the maximum time value among the multiple time values. In other words, the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
结合第二方面,在第二方面的第五种可能的实现方式中,该播放设备,具体用于:通过有线通信连接,连接到该第二网络接入设备。该播放单元,具体用于:当该播放设备的有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。也即是说,如果播放设备有线连接到第二网络接入设备,播放设备可以在检测到有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。With reference to the second aspect, in a fifth possible implementation manner of the second aspect, the playback device is specifically configured to connect to the second network access device through a wired communication connection. The playback unit is specifically configured to: when the state of the wired network port of the playback device is switched from the disabled state to the enabled state, play the second part of the buffered media data. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
结合第二方面,在第二方面的第六种可能的实现方式中,该播放设备,具体用于:通过无线通信连接,连接到该第二网络接入设备。该播放单元,具体用于:当该播放设备与该第二网络接入设备完成该无线通信连接的身份认证时,播放上述第二部分已缓存的媒体数据。也即是说,如果播放设备无线连接到第二网络接入设备,播放设备可以在与第二网络接入设备完成上述无线通信连接的身份认证时,播放该第二部分已缓存的媒体数据。With reference to the second aspect, in a sixth possible implementation manner of the second aspect, the playback device is specifically configured to connect to the second network access device through a wireless communication connection. The playback unit is specifically configured to: when the playback device and the second network access device complete identity authentication of the wireless communication connection, play the media data buffered in the second part. That is to say, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when completing the identity authentication of the wireless communication connection with the second network access device.
第三方面,本申请提供了一种播放设备,该播放设备包括:处理器和存储器;其中,该处理器用于调用该存储器中的软件指令以执行如下操作:通过连接到的第一网络接入设备从流媒体服务器缓存媒体数据至该存储器播放所述媒体数据。从已缓存的媒体数据中确定出预留的媒体数据,该预留的媒体数据在该收发器与第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放。当该收发器与该第一网络接入设备断开连接,播放第一部分已缓存的媒体数据。当该收发器连接到该第二网络接入设备时,播放第二部分已缓存的媒体数据,并通过该第二网络接入设备从该流媒体服务器缓存媒体数据;其中,该已缓存的媒体数据包括该第一部分已缓存的媒体数据和该第二部分已缓存的媒体数据,所述第二部分已缓存的媒体数据包括所述预留的媒体数据。In a third aspect, the present application provides a playback device including a processor and a memory; wherein the processor is configured to call software instructions in the memory to perform the following operations: access through a first network connected to The device caches the media data from the streaming media server to the memory to play the media data. Determine the reserved media data from the buffered media data, the condition of the reserved media data after the transceiver is disconnected from the first network access device and is not connected to the second network access device Is not played. When the transceiver is disconnected from the first network access device, the first part of the buffered media data is played. When the transceiver is connected to the second network access device, playing the second part of the buffered media data, and buffering the media data from the streaming media server through the second network access device; wherein the buffered media The data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
本申请中,第二网络接入设备可以是第一网络接入设备,也可以是除第一网络接入设备之外的其他网络接入设备。播放设备从流媒体服务器上边缓存边播放第一媒体的数据,在播放设备与第一网络接入设备断开连接时,播放设备可以确定出预留的媒体数据,并将该预留的媒体数据留到播放设备连接到第二网络接入设备时播放,并可以利用这预留的媒体数据的播放时间获取IP地址。这样,可以在断网恢复时,将播放媒体数据的时间点提前,减少了在断网恢复后用户等待媒体数据被播放的时间,提高了用户的体验。In this application, the second network access device may be the first network access device, or may be another network access device other than the first network access device. The playback device plays the data of the first media from the cache on the streaming media server. When the playback device is disconnected from the first network access device, the playback device can determine the reserved media data and copy the reserved media data. It is reserved for playback when the playback device is connected to the second network access device, and an IP address may be obtained by using the reserved playback time of the media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
结合第三方面,在第三方面的第一种可能的实现方式中,在与该第一网络接入设备断 开连接之后,当该处理器播放上述已缓存的媒体数据至该预留的媒体数据时,还未连接到第二网络接入设备,上述第二部分已缓存的媒体数据等于该预留的媒体数据。处理器,还用于:在与第一网络接入设备断开连接之后,当该处理器播放该已缓存的媒体数据至预留的媒体数据时,未连接到第二网络接入设备,暂停播放上述预留的媒体数据。所述处理器,还具体用于:当连接到该第二网络接入设备时,播放上述预留的媒体数据。也即是说,在与第一网络接入设备断开连接之后,如果播放设备一直未与第二网络接入设备建立连接,则播放设备播放已缓存的媒体数据至预留的媒体数据时暂停播放,这样,在播放设备断网后,可以在预留有未播放的媒体数据的前提下,播放尽可能多的媒体数据供用户观赏。With reference to the third aspect, in a first possible implementation manner of the third aspect, after disconnecting from the first network access device, when the processor plays the cached media data to the reserved media When the data is not yet connected to the second network access device, the buffered media data in the second part is equal to the reserved media data. The processor is further configured to: after disconnecting from the first network access device, when the processor plays the buffered media data to the reserved media data, the processor is not connected to the second network access device and pauses Play the above reserved media data. The processor is further specifically configured to: when connected to the second network access device, play the reserved media data. That is, after disconnecting from the first network access device, if the playback device has not established a connection with the second network access device, the playback device pauses when playing the buffered media data to the reserved media data. Play. In this way, after the playback device is disconnected from the network, as long as unplayed media data is reserved, as much media data as possible can be played for users to watch.
结合第三方面,在第三方面的第二种可能的实现方式中,With reference to the third aspect, in a second possible implementation manner of the third aspect,
当连接到第二网络接入设备时,该处理器还未播放至上述预留的媒体数据,上述第二部分已缓存的媒体数据大于上述预留的媒体数据。也即是说,在播放设备还没有播放至预留的媒体数据时,播放设备已经连接到了第二网络接入设备,播放可以在断网至重新入网的过程中连续的播放媒体数据而不中途暂停,提高了用户的观赏体验。When connected to the second network access device, the processor has not yet played to the reserved media data, and the buffered media data in the second part is larger than the reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
结合第三方面,或第三方面的第一至第二种中任一可能的实现方式,在第三方面的第三种可能的实现方式中,在第二方面的第三种可能的实现方式中,上述预留的媒体数据的播放时长由该收发器获取IP地址所需时间的历史经验值确定,该IP地址用于该收发器通过网络接入设备从该流媒体服务器缓存该媒体数据。也即是说,播放设备可以根据播放设备获取IP地址的历史经验值,确定出预留的媒体数据的播放时长。这样,在断网重连后,播放设备可以不用等到获取IP地址之后才开始播放媒体数据,减少了用户观赏媒体数据的等待时间。With reference to the third aspect, or any one of the first to second possible implementation manners of the third aspect, in the third possible implementation manner of the third aspect, the third possible implementation manner of the second aspect In the above, the playing time of the reserved media data is determined by the historical experience value of the time required for the transceiver to obtain an IP address, and the IP address is used by the transceiver to buffer the media data from the streaming media server through a network access device. That is to say, the playback device can determine the playback duration of the reserved media data according to the historical experience value of the IP address obtained by the playback device. In this way, after the network disconnection and reconnection, the playback device does not need to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for the user to view the media data.
结合第三方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,上述历史经验值包括多次获取到IP地址所需的多个时间值。上述预留的媒体数据由获取IP地址所需时间的历史经验值确定,具体包括:取该多次获取到IP地址所需的多个时间值的平均时间值作为上述预留媒体数据的播放时长;或,取该多个时间值中的最大时间值作为该预留媒体数据的播放时长。也即是说,播放设备可以根据历史经验值中多次获取到IP地址所需的时间值,确定出预留媒体数据的播放时长,更准确的确定预留媒体数据的播放时长,减少了播放设备重连接到第二网络接入设备后媒体数据播放中断的几率。With reference to the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the first aspect, the foregoing historical experience value includes multiple time values required to obtain the IP address multiple times. The reserved media data is determined by the historical experience value of the time required to obtain the IP address, and specifically includes: taking the average time value of the multiple time values required to obtain the IP address multiple times as the playing time of the reserved media data. Or, taking the maximum time value among the multiple time values as the playing duration of the reserved media data. In other words, the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
结合第三方面,在第三方面的第五种可能的实现方式中,该收发器,具体用于:通过有线通信连接,连接到该第二网络接入设备。该处理器,具体用于:当检测到有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。也即是说,如果播放设备有线连接到第二网络接入设备,播放设备可以在检测到有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。With reference to the third aspect, in a fifth possible implementation manner of the third aspect, the transceiver is specifically configured to connect to the second network access device through a wired communication connection. The processor is specifically configured to: when detecting that the state of the wired network port is switched from the disabled state to the enabled state, play the second part of the buffered media data. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
该收发器,具体用于:通过无线通信连接,连接到该第二网络接入设备。该处理器,具体用于:当与该第二网络接入设备完成该无线通信连接的身份认证时,播放上述第二部分已缓存的媒体数据。也即是说,如果播放设备无线连接到第二网络接入设备,播放设备可以在与第二网络接入设备完成上述无线通信连接的身份认证时,播放该第二部分已缓存的媒体数据。The transceiver is specifically configured to connect to the second network access device through a wireless communication connection. The processor is specifically configured to: when the identity authentication of the wireless communication connection is completed with the second network access device, play the media data buffered in the second part. That is to say, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when completing the identity authentication of the wireless communication connection with the second network access device.
第四方面,本申请提供一种计算机可读存储介质,该计算机可读存储介质中存储有程 序指令,当该程序指令在处理器上运行时,实现第一方面,或第一方面的任意一种可能的实现方式所描述的方法。According to a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores program instructions. When the program instructions run on a processor, the first aspect or any one of the first aspects is implemented. One possible implementation is the method described.
第五方面,本申请提供一种计算机程序产品,其特征在于,当该计算机程序产品在处理器上运行时,实现第一方面,或第一方面的任意一种可能的实现方式所描述的方法。In a fifth aspect, the present application provides a computer program product, which is characterized in that when the computer program product runs on a processor, the first aspect or the method described in any possible implementation manner of the first aspect is implemented .
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
下面将对本申请实施例中所需要使用的附图进行说明。The drawings needed to be used in the embodiments of the present application will be described below.
图1是本申请中涉及的一种多媒体系统的架构示意图;FIG. 1 is a schematic architecture diagram of a multimedia system involved in this application;
图2是本申请的一个实施例提供的一种媒体播放方法的流程示意图;2 is a schematic flowchart of a media playback method according to an embodiment of the present application;
图3是本申请的另一个实施例提供的一种媒体播放方法的流程示意图;3 is a schematic flowchart of a media playback method according to another embodiment of the present application;
图4是本申请的一个实施例提供的一种播放进度显示示意图;FIG. 4 is a schematic diagram of displaying playback progress according to an embodiment of the present application; FIG.
图5是本申请的另一个实施例提供的一种播放进度显示示意图;FIG. 5 is a schematic diagram of displaying playback progress according to another embodiment of the present application; FIG.
图6是本申请的一个实施例提供的一种播放设备的结构示意图;6 is a schematic structural diagram of a playback device according to an embodiment of the present application;
图7是本申请的另一个实施例提供的一种播放设备的结构示意图;7 is a schematic structural diagram of a playback device according to another embodiment of the present application;
图8是本申请的一个实施例提供的一种播放设备内部器件信息交互示意图。FIG. 8 is a schematic diagram of information interaction between internal devices of a playback device according to an embodiment of the present application.
具体实施方式detailed description
本申请的说明书实施例和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元。方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms “first”, “second”, and the like in the description embodiments and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a series of steps or units. The methods, systems, products, or devices are not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products, or devices.
应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in the present application, "at least one (item)" means one or more, and "multiple" means two or more. "And / or" is used to describe the association relationship of related objects, which means that there can be three kinds of relationships, for example, "A and / or B" can mean: only A, B, and both A and B Where A and B can be singular or plural. The character "/" generally indicates that the related objects are an "or" relationship. "At least one or more of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one (a), a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c" ", Where a, b, and c can be single or multiple.
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,The terms used in the implementation part of this application are only used to explain specific examples of this application,
下面结合本申请实施例中的附图对本申请实施例进行描述。The following describes the embodiments of the present application with reference to the drawings in the embodiments of the present application.
请参见图1,图1是本申请实施例提供的一种多媒体系统架构示意图,该多媒体系统架构100可以包括互联网101,流媒体服务器102,网络接入设备103,播放设备104。其中:Please refer to FIG. 1. FIG. 1 is a schematic diagram of a multimedia system architecture provided by an embodiment of the present application. The multimedia system architecture 100 may include the Internet 101, a streaming media server 102, a network access device 103, and a playback device 104. among them:
该流媒体服务器102可以为基于互联网101,广泛分布地视频服务器或内容分发网络(content delivery network/content distribution network,CDN)服务器。The streaming media server 102 may be a widely distributed video server or a content distribution network (CDN) server based on the Internet 101.
网络接入设备103可以是路由器,可以支持动态主机配置协议(dynamic host configuration protocol,DHCP)功能,可用于动态分配IP地址给播放设备104。网络接入 设备103可以与播放设备104进行有线通信连接或者无线通信连接。The network access device 103 may be a router, which may support a dynamic host configuration protocol (DHCP) function, and may be used to dynamically assign an IP address to the playback device 104. The network access device 103 may perform a wired communication connection or a wireless communication connection with the playback device 104.
播放设备104可以是膝上型计算机(laptop computer)、机顶盒(set-top box,STB)、个人计算机(personal computer,PC)、平板计算机(tablet computer)、交互式网络电视(interactive personality television,IPTV),智能手持设备(smart handheld device,SHD)。播放设备104在接收到网络设备103分配的IP地址之后,就可以访问到互联网101,在互联网101中的流媒体服务器102中下载多媒体数据。The playback device 104 may be a laptop computer, a set-top box (STB), a personal computer (PC), a tablet computer, an interactive personal television (IPTV) ), A smart handheld device (SHD). After receiving the IP address allocated by the network device 103, the playback device 104 can access the Internet 101 and download multimedia data from the streaming server 102 in the Internet 101.
下面基于上述图1所示的多媒体系统架构,介绍本申请中提供的一种媒体播放方法。Based on the multimedia system architecture shown in FIG. 1 described above, a media playback method provided in the present application is introduced below.
请参见图2,图2是本申请实施例提供的一种媒体播放方法的流程示意图,如图2所示,该媒体播放方法可包括:S201-S212。其中,第二网络接入设备可以是第一网络接入设备,第二网络接入设备也可以是第一网络接入设备之外的其他网络接入设备。Please refer to FIG. 2. FIG. 2 is a schematic flowchart of a media playback method according to an embodiment of the present application. As shown in FIG. 2, the media playback method may include S201-S212. The second network access device may be a first network access device, and the second network access device may also be a network access device other than the first network access device.
S201、播放设备发送媒体数据的访问请求给第一网络接入设备。S201. The playback device sends an access request for media data to the first network access device.
媒体数据的访问请求中可以携带源IP地址和目的IP地址,媒体数据的访问请求中的源IP地址用于指示播放设备的IP地址,媒体数据的访问请求中的目的IP地址用于指示媒体数据所在的流媒体服务器的IP地址。第一网络接入设备在接收到播放设备发送的媒体数据的访问请求之后,可以根据源IP地址将该媒体数据的访问请求直接转发给流媒体服务器或者通过其他网络设备转发给流媒体服务器。The source IP address and destination IP address can be carried in the media data access request. The source IP address in the media data access request is used to indicate the IP address of the playback device, and the destination IP address in the media data access request is used to indicate the media data. The IP address of the streaming server. After receiving the access request for the media data sent by the playback device, the first network access device may directly forward the access request for the media data to the streaming media server or the streaming media server through another network device according to the source IP address.
S202、播放设备获取到经过第一网络接入设备转发的媒体数据。S202. The playback device obtains the media data forwarded by the first network access device.
流媒体服务器在接收到媒体数据的访问请求之后,可以发送媒体数据给第一网络接入设备,媒体数据中可以携带源IP地址和目的IP地址。媒体数据中携带的源IP地址用于指示流媒体服务器的IP地址,媒体数据中的目的IP地址用于指示播放设备的IP地址,第一网络接入设备在接收到流媒体服务器发送的媒体数据之后,可以根据媒体数据中携带的目的IP地址,将媒体数据发送给播放设备,播放设备即可获取到媒体数据。After receiving the media data access request, the streaming media server may send the media data to the first network access device, and the media data may carry a source IP address and a destination IP address. The source IP address carried in the media data is used to indicate the IP address of the streaming media server, and the destination IP address carried in the media data is used to indicate the IP address of the playback device. The first network access device receives the media data sent by the streaming media server. After that, the media data can be sent to the playback device according to the destination IP address carried in the media data, and the playback device can obtain the media data.
S203、播放设备缓存并播放媒体数据。S203: The playback device buffers and plays the media data.
媒体数据可以是视频数据、音频数据等。播放设备可以支持媒体数据的开始播放,停止,后退,快进或暂停等播放控制功能。The media data may be video data, audio data, and the like. The playback device can support playback control functions such as start, stop, rewind, fast forward or pause of media data.
S204、播放设备从已缓存的媒体数据中确定出预留的媒体数据。该预留的媒体数据在与播放设备所述第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放。S204. The playback device determines the reserved media data from the buffered media data. After the reserved media data is disconnected from the first network access device of the playback device and is not connected to the second network access device, it is not played.
预留的媒体数据的播放时长可以是1s,2s,3s或者更长。可选的,预留的媒体数据的播放时长还可以由历史经验值确定,该历史经验值可以由播放设备获取到IP地址所需的时间值确定。在一种可能的实现方式中,历史经验值还可以由播放设备多次获取到IP地址所需的多个时间值确定,该预留的媒体数据的播放时长可以为该多次获取到IP地址所需的时间值的平均时间值或者最大时间值,又或者通过其他算法根据该多次获取到IP地址所需的时间算出的时间值。举例说明,例如,历史经验值中,播放设备共获取了3次IP地址,第一次获取到IP地址所用时间为2s,第二次获取到IP地址所用时间为1s,第三次获取到IP地址所用时间为3s,则播放设备可以将这三次获取IP地址所用时间的最大时间值确定为预留的媒体数据的播放时长,即确定预留的媒体数据的播放时长为3s。示例仅仅用于解释本 申请,不应构成限定。这样,播放设备记录每次获取IP地址所需时长,然后在播放设备断网的情况下,可以根据之前获取IP地址所需的时长确定出合适的预留的媒体数据的时长,减少了播放设备重连接到第二网络接入设备后媒体数据播放中断的几率。The playback time of the reserved media data can be 1s, 2s, 3s or longer. Optionally, the playback duration of the reserved media data may also be determined by a historical experience value, and the historical experience value may be determined by a time value required for the playback device to obtain an IP address. In a possible implementation manner, the historical experience value may also be determined by multiple time values required by the playback device to obtain the IP address multiple times, and the playback duration of the reserved media data may be the multiple obtained IP addresses. The average time value or the maximum time value of the required time value, or a time value calculated by other algorithms according to the time required to obtain the IP address multiple times. For example, for example, in the historical experience value, the playback device obtained a total of 3 IP addresses. The first time to obtain the IP address was 2s, the second time to obtain the IP address was 1s, and the third time to obtain the IP address. The time taken by the address is 3s, then the playback device may determine the maximum time value of the three times taken to obtain the IP address as the playback time of the reserved media data, that is, determine that the playback time of the reserved media data is 3s. The examples are only used to explain the application and should not be construed as limiting. In this way, the playback device records the time required to obtain an IP address each time, and then in the case that the playback device is disconnected from the network, the length of the appropriate reserved media data can be determined according to the time required to obtain the IP address before, reducing the playback device Chance of media data playback interruption after reconnecting to the second network access device.
S205、当播放设备与第一网络接入设备断开连接,播放第一部分已缓存的媒体数据。S205. When the playback device is disconnected from the first network access device, play the first part of the buffered media data.
上述已缓存的媒体数据包括第一部分已缓存的媒体数据和第二部分已缓存的媒体数据,第二部分已缓存的媒体数据包括所述预留的媒体数据。上述第一部分已缓存的媒体数据可以是播放设备从与第一网络接入设备断开连接之后到连接到第二网络接入设备的时间段内,播放设备播放的已缓存的媒体数据。第二部分已缓存的媒体数据可以是在连接到第二网络接入设备时,播放设备已缓存的但未播放的媒体数据。The buffered media data includes the first portion of the buffered media data and the second portion of the buffered media data, and the second portion of the buffered media data includes the reserved media data. The first part of the buffered media data may be the buffered media data played by the playback device within a period of time after the playback device disconnects from the first network access device and connects to the second network access device. The second part of the buffered media data may be media data that has been buffered but not played by the playback device when connected to the second network access device.
播放设备与第一网络接入设备之间的通信连接断开可以是有线通信连接断开,还可以是无线通信连接断开。如果播放设备与第一网络接入设备之间是有线通信连接断开,则播放设备可以检测播放设备上的有线网口的状态确定出是否与第一网络接入设备之间的通信连接断开,若播放设备上的有线网口的状态由使能切换为去使能,则可以确定出播放设备与第一网络接入设备之间的通信连接已断开。如果播放设备与第一网络接入设备之间是无线通信连接,则播放设备可以周期性地发送访问请求给第一网络接入设备,如果播放设备接收不到第一网络接入设备对访问请求的响应,则播放设备可以确定出播放设备与第一网络接入设备之间的通信连接已断开。The disconnection of the communication connection between the playback device and the first network access device may be a disconnection of a wired communication connection or a disconnection of a wireless communication connection. If the wired communication connection between the playback device and the first network access device is disconnected, the playback device can detect the status of the wired network port on the playback device to determine whether the communication connection with the first network access device is disconnected. If the state of the wired network port on the playback device is switched from enabled to disabled, it can be determined that the communication connection between the playback device and the first network access device has been disconnected. If there is a wireless communication connection between the playback device and the first network access device, the playback device may periodically send an access request to the first network access device; if the playback device cannot receive the access request from the first network access device Response, the playback device may determine that the communication connection between the playback device and the first network access device has been disconnected.
S206、播放设备与第二网络接入设备建立连接。S206. The playback device establishes a connection with the second network access device.
播放设备可以与第二网络接入设备建立有线通信连接,也可以与第二网络接入设备建立无线通信连接。The playback device may establish a wired communication connection with the second network access device, or may establish a wireless communication connection with the second network access device.
如果播放设备与第二网络接入设备建立的是有线通信连接,则播放设备可以检测播放设备的网口状态确定出是否与第二网路接入设备建立有线通信连接,若播放设备检测到播放设备的有线网口的状态由去使能状态切换为使能状态,则播放设备可以确定出播放设备与第二网络接入设备建立有线通信连接。If the playback device establishes a wired communication connection with the second network access device, the playback device can detect the network port status of the playback device to determine whether to establish a wired communication connection with the second network access device. If the playback device detects playback The state of the wired network port of the device is switched from the disabled state to the enabled state, and the playback device may determine that the playback device establishes a wired communication connection with the second network access device.
如果播放设备与第二网络接入设备建立的是无线通信连接,则播放设备可以检测播放设备与第二网络接入设备是否完成无线通信连接的身份认证,若完成身份认证了,则播放设备可以确定出播放设备与第二网络接入设备建立无线通信连接。播放设备与第二网络接入设备之间建立无线通信的过程可以是首先,播放设备扫描到第二网络接入设备发出的无线信号,然后,播放设备可以与第二网络接入设备进行身份认证,最后,当播放设备与第二网络接入设备完成了身份认证,则播放设备与第二网络接入设备可以完成建立通信连接。播放设备与第二网络接入设备之间进行身份认证的方式可以包括:开放系统身份认证(open-system authentication)、共享密钥认证(shared-key authentication)、预共享密钥(pre-shared key,PSK)认证等。If the playback device establishes a wireless communication connection with the second network access device, the playback device can detect whether the playback device and the second network access device have completed the identity authentication of the wireless communication connection. If the identity authentication is completed, the playback device can It is determined that the playback device establishes a wireless communication connection with the second network access device. The process of establishing wireless communication between the playback device and the second network access device may be first, the playback device scans the wireless signal sent by the second network access device, and then the playback device may perform identity authentication with the second network access device. Finally, when the playback device and the second network access device have completed identity authentication, the playback device and the second network access device can complete the establishment of a communication connection. The identity authentication method between the playback device and the second network access device may include: open-system authentication, shared-key authentication, and pre-shared key , PSK) certification.
S207、当播放设备连接到第二网络接入设备时,播放设备播放第二部分已缓存的媒体数据。S207. When the playback device is connected to the second network access device, the playback device plays the second part of the buffered media data.
可选的,在播放设备与第一网络接入设备断开连接之后,当播放已缓存的媒体数据至预留的媒体数据时,还未连接到所述第二网络接入设备,播放设备暂停播放已缓存的媒体数据,该第二部分已缓存的媒体数据等于所述预留的媒体数据。也即是说,在播放设备与 第一网络接入设备断开连接之后,如果播放设备一直未与第二网络接入设备建立连接,则播放设备播放已缓存的媒体数据至预留的媒体数据时暂停播放,这样,在播放设备断网后,可以在预留有未播放的媒体数据的前提下,播放尽可能多的媒体数据供用户观赏。Optionally, after the playback device is disconnected from the first network access device, when the buffered media data is played to the reserved media data, the second playback device is not connected to the second network access device, and the playback device is paused. Playing the buffered media data, the second part of the buffered media data is equal to the reserved media data. That is, after the playback device is disconnected from the first network access device, if the playback device has not established a connection with the second network access device, the playback device plays the buffered media data to the reserved media data. Pause playback from time to time. In this way, after the playback device is disconnected from the network, as long as unplayed media data is reserved, as much media data as possible can be played for users to watch.
可选的,当连接到所述第二网络接入设备时,播放设备还未播放至所述预留的媒体数据,所述第二部分已缓存的媒体数据大于所述预留的媒体数据,播放设备可以继续正常缓存并持续播放媒体数据而不会出现因无缓存数据可播而导致的播放中断的情况。也即是说,在播放设备还没有播放至预留的媒体数据时,播放设备已经连接到了第二网络接入设备,播放可以在断网至重新入网的过程中连续的播放媒体数据而不中途暂停,提高了用户的观赏体验。Optionally, when connecting to the second network access device, the playback device has not yet played the reserved media data, and the second part of the buffered media data is larger than the reserved media data, The playback device can continue to cache normally and continue to play media data without the interruption of playback caused by unbuffered data to play. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
S208、在播放设备连接到第二网络接入设备的条件下,播放设备发送获取IP地址的请求给第二网络接入设备。S208. Under the condition that the playback device is connected to the second network access device, the playback device sends a request for obtaining an IP address to the second network access device.
S209、播放设备获取到第二网络接入设备分配给播放设备的IP地址。S209. The playback device obtains an IP address allocated by the second network access device to the playback device.
播放设备可以是基于动态主机配置协议(dynamic host configuration protocol,DHCP)机制,获取到IP地址。因此DHCP客户机为播放设备,DHCP服务器可以是第二网络接入设备,也可以是连入第二网络接入设备所处局域网或无线局域网中的其他设备。The playback device may obtain an IP address based on a dynamic host configuration protocol (DHCP) mechanism. Therefore, the DHCP client is a playback device, and the DHCP server may be a second network access device, or it may be another device connected to the local area network or wireless local area network where the second network access device is located.
下面以DHCP服务器是第二网络接入设备为例,具体说明播放设备获取到IP地址的过程。下述示例仅仅用于解释本申请,不应构成限定。The following uses the DHCP server as the second network access device as an example to specifically describe the process in which the playback device obtains an IP address. The following examples are only used to explain the application and should not be construed as limiting.
首先,播放设备发送获取IP地址的请求给第二网络接入设备,该获取IP地址的请求可以为DHCP发现信息,播放设备通过第二网络接入设备以广播的方式发送DHCP发现信息来寻找DHCP服务器。然后,作为DHCP服务器的第二网络接入设备可以接收到该DHCP发现信息,第二网络接入设备从还未分配出去的IP地址中挑选出一个分配给播放设备,即播放设备可以接收到第二网络接入设备发送的DHCP提供信息,该DHCP提供信息包含有分配给播放设备的IP地址。如果有多个DHCP服务器,播放设备可以只接受第一个收到的DHCP提供信息。接着,在播放设备接收到第二网络接入设备发送的DHCP提供信息之后,播放设备可以广播DHCP请求信息,该DHCP请求信息包括向播放设备所选定的DHCP服务器请求的IP地址。最后,第二网络接入设备收到播放设备发送的DHCP请求信息之后,第二网络接入设备可以向播放设备发送DHCP确认信息,该确认信息包括第二网络接入设备分配给播放设备的IP地址。First, the playback device sends a request for obtaining an IP address to the second network access device. The request for obtaining the IP address may be DHCP discovery information. The playback device sends the DHCP discovery information in a broadcast manner to find the DHCP through the second network access device. server. Then, the second network access device serving as the DHCP server can receive the DHCP discovery information, and the second network access device selects one of the IP addresses that have not been allocated and assigns it to the playback device, that is, the playback device can receive the first The DHCP providing information sent by the network access device includes the IP address allocated to the playback device. If there are multiple DHCP servers, the playback device can only accept the first DHCP provided information. Then, after the playback device receives the DHCP provided information sent by the second network access device, the playback device may broadcast the DHCP request information, which includes the IP address requested from the DHCP server selected by the playback device. Finally, after the second network access device receives the DHCP request information sent by the playback device, the second network access device may send a DHCP confirmation message to the playback device, and the confirmation information includes the IP allocated by the second network access device to the playback device. address.
可选的,第二网络接入设备与第一网络接入设备可以处于同一局域网或无线局域网中。也即是说,播放设备重新连接到与第一网络接入设备断开连接之前的局域网或无线局域网中,此时,播放设备可以不需要再发送DHCP发现信息了,而是直接广播包含有前一次分配给播放设备的IP地址的DHCP请求信息。当第二网络接入设备接收到该带有前一次分配给播放设备的IP地址的DHCP请求信息之后,第二网络接入设备发送DHCP确认信息给播放设备,让播放设备继续使用上一次被分配的IP地址。如果上一次分配给播放设备的IP地址无法再分配给播放设备使用,则第二网络接入设备可以发送DHCP否认信息给播放设备,该DHCP否认信息用于指示播放设备发送上述DHCP发现信息,获取新的IP地址。Optionally, the second network access device and the first network access device may be in the same local area network or wireless local area network. That is to say, the playback device is reconnected to the local area network or wireless local area network before disconnecting from the first network access device. At this time, the playback device may not need to send DHCP discovery information anymore, but directly broadcast the information including the previous DHCP request information for the IP address assigned to the playback device at a time. When the second network access device receives the DHCP request message with the IP address previously assigned to the playback device, the second network access device sends a DHCP confirmation message to the playback device, so that the playback device continues to use the last time it was allocated. IP address. If the IP address previously allocated to the playback device can no longer be allocated to the playback device, the second network access device may send a DHCP denial message to the playback device, and the DHCP denial information is used to instruct the playback device to send the above DHCP discovery information to obtain The new IP address.
在播放设备连接到第二网络接入设备的条件下,播放设备可以在执行步骤S207、播放设备播放缓存的但未播放的媒体数据,的同时,并行执行步骤S208、在播放设备连接到第 二网络接入设备的条件下,播放设备发送获取IP地址的请求给第二网络接入设备,以及S209、播放设备获取到第二网络接入设备分配给播放设备的IP地址。这样,可以在与第一网络接入设备断开后,通过预留的时间,为播放设备获取IP地址的过程提供执行时间,减少了等待播放设备恢复播放的时间。Under the condition that the playback device is connected to the second network access device, the playback device may perform step S207, while the playback device plays the buffered but unplayed media data, and simultaneously execute step S208, when the playback device is connected to the second network access device. Under the condition of the network access device, the playback device sends a request for obtaining an IP address to the second network access device, and S209, the playback device obtains the IP address allocated by the second network access device to the playback device. In this way, after disconnecting from the first network access device, the execution time of the process of obtaining the IP address of the playback device can be provided through the reserved time, which reduces the waiting time for the playback device to resume playback.
S210、播放设备发送媒体数据的访问请求给第二网络接入设备。S210: The playback device sends an access request for media data to the second network access device.
媒体数据的访问请求中可以携带源IP地址和目的IP地址,媒体数据的访问请求中的源IP地址用于指示播放设备的IP地址,媒体数据的访问请求中的目的IP地址用于指示媒体数据所在的流媒体服务器的IP地址。第二网络接入设备在接收到播放设备发送的媒体数据的访问请求之后,可以根据源IP地址将该媒体数据的访问请求直接转发给流媒体服务器或者通过其他网络设备转发给流媒体服务器。The source IP address and destination IP address can be carried in the media data access request. The source IP address in the media data access request is used to indicate the IP address of the playback device, and the destination IP address in the media data access request is used to indicate the media data. The IP address of the streaming server. After receiving the access request for the media data sent by the playback device, the second network access device may directly forward the access request for the media data to the streaming media server or the other media devices to the streaming media server according to the source IP address.
S211、播放设备获取到经过第二网络接入设备转发的媒体数据。S211. The playback device obtains the media data forwarded by the second network access device.
流媒体服务器在接收到媒体数据的访问请求之后,可以发送媒体数据给第二网络接入设备,媒体数据中可以携带源IP地址和目的IP地址。媒体数据中携带的源IP地址用于指示流媒体服务器的IP地址,媒体数据中的目的IP地址用于指示播放设备的IP地址,第二网络接入设备在接收到流媒体服务器发送的媒体数据之后,可以根据媒体数据中携带的目的IP地址,将媒体数据发送给播放设备,播放设备即可获取到媒体数据。After receiving the media data access request, the streaming media server may send the media data to the second network access device, and the media data may carry a source IP address and a destination IP address. The source IP address carried in the media data is used to indicate the IP address of the streaming media server, the destination IP address in the media data is used to indicate the IP address of the playback device, and the second network access device receives the media data sent by the streaming media server. After that, the media data can be sent to the playback device according to the destination IP address carried in the media data, and the playback device can obtain the media data.
S212、播放设备继续缓存并播放媒体数据。S212. The playback device continues to buffer and play media data.
播放设备可以在播放设备与第一网络接入设备断开连接时暂停缓存的位置继续缓存并播放媒体数据。例如,在播放设备与第一网络接入设备断开连接时,播放设备缓存到了一段视频的30分钟20秒处,则在播放设备获取到经过第二网络接入设备转发的媒体数据之后,播放设备可以从该视频的30分钟20秒处继续缓存该视频。示例仅仅用于解释本申请,不应构成限定。The playback device may continue to cache and play the media data when the playback device is disconnected from the first network access device. For example, when the playback device is disconnected from the first network access device, the playback device caches a video at 30 minutes and 20 seconds, and then after the playback device obtains the media data forwarded by the second network access device, the playback The device can continue to cache the video from 30 minutes and 20 seconds. The examples are only used to explain the application and should not be construed as limiting.
本申请实施例中,播放设备从流媒体服务器上边缓存边播放第一媒体的数据,在播放设备与第一网络接入设备断开连接时,播放设备可以确定出预留的媒体数据,并将该预留的媒体数据留到播放设备连接到第二网络接入设备时播放,并可以利用这预留的媒体数据的播放时间获取IP地址。这样,可以在断网恢复时,将播放媒体数据的时间点提前,减少了在断网恢复后用户等待媒体数据被播放的时间,提高了用户的体验。In the embodiment of the present application, the playback device plays the data of the first media while buffering from the streaming media server. When the playback device is disconnected from the first network access device, the playback device may determine the reserved media data, and The reserved media data is left to be played when the playback device is connected to the second network access device, and an IP address may be obtained by using the playback time of the reserved media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
下面基于上述图2所示实施例,具体说明一种可能出现的情况。播放设备在与第一网络接入设备断开连接的情况下,确定出了预留的媒体数据,如果播放设备播放媒体数据至预留的媒体数据,播放设备还未与第二网络设备建立连接,则播放设备可以暂停播放媒体数据。Based on the embodiment shown in FIG. 2 above, a possible situation is specifically described below. When the playback device disconnects from the first network access device, the reserved media data is determined. If the playback device plays media data to the reserved media data, the playback device has not yet established a connection with the second network device. , The playback device can pause playing media data.
请参见图3,图3是本申请实施例提供的一种媒体播放方法的流程示意图,如图3所示,该媒体播放方法可包括:S301-S313。Please refer to FIG. 3. FIG. 3 is a schematic flowchart of a media playback method according to an embodiment of the present application. As shown in FIG. 3, the media playback method may include S301-S313.
S301、播放设备发送媒体数据的访问请求给第一网络接入设备。S301. The playback device sends an access request for media data to the first network access device.
具体可以参考上述图2实施例中的步骤S201,在此不作赘述。For details, reference may be made to step S201 in the embodiment of FIG. 2, and details are not described herein.
S302、播放设备获取到经过第一网络接入设备转发的媒体数据。S302. The playback device obtains the media data forwarded by the first network access device.
具体可以参考上述图2实施例中的步骤S202,在此不作赘述。For details, reference may be made to step S202 in the embodiment in FIG. 2, and details are not described herein.
S303、播放设备缓存并播放媒体数据。S303. The playback device buffers and plays the media data.
具体可以参考上述图2实施例中的步骤S203,在此不作赘述。For details, reference may be made to step S203 in the embodiment in FIG. 2, and details are not described herein.
S304、播放设备从已缓存的媒体数据中确定出预留的媒体数据。该预留的媒体数据在与播放设备所述第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放。S304. The playback device determines the reserved media data from the buffered media data. After the reserved media data is disconnected from the first network access device of the playback device and is not connected to the second network access device, it is not played.
具体可以参考上述图2实施例中的步骤S204,在此不作赘述。For details, reference may be made to step S204 in the embodiment shown in FIG. 2, and details are not described herein.
S305、当播放设备与第一网络接入设备断开连接,播放第一部分已缓存的媒体数据。S305. When the playback device is disconnected from the first network access device, the first part of the buffered media data is played.
上述已缓存的媒体数据包括第一部分已缓存的媒体数据和第二部分已缓存的媒体数据,第二部分已缓存的媒体数据包括所述预留的媒体数据。上述第一部分已缓存的媒体数据可以是播放设备从与第一网络接入设备断开连接之后到连接到第二网络接入设备的时间段内,播放设备播放的已缓存的媒体数据。第二部分已缓存的媒体数据可以是在连接到第二网络接入设备时,播放设备已缓存的但未播放的媒体数据。The buffered media data includes the first portion of the buffered media data and the second portion of the buffered media data, and the second portion of the buffered media data includes the reserved media data. The first part of the buffered media data may be the buffered media data played by the playback device within a period of time after the playback device disconnects from the first network access device and connects to the second network access device. The second part of the buffered media data may be media data that has been buffered but not played by the playback device when connected to the second network access device.
S306、当播放设备在播放至预留的媒体数据时,播放设备未连接到第二网络接入设备上,则播放设备暂停播放已缓存的媒体数据。S306. When the playback device is playing the reserved media data, the playback device is not connected to the second network access device, the playback device pauses playing the buffered media data.
举例具体说明,例如,在播放设备与第一网络接入设备断开连接时,播放设备播放媒体数据的进度在媒体数据总时长的28分钟40秒处,播放设备确定预留的媒体数据的时间段为媒体数据总时长的30分钟18秒处至30分钟20秒处的时间段。播放设备继续播放媒体数据至媒体数据总时长的30分钟18秒处,若播放设备未连接到第二网络接入设备上,则播放设备可以在该媒体数据总时长的30分钟18秒处,暂停播放。示例仅仅用于解释本申请,不应构成限定。For example, for example, when the playback device is disconnected from the first network access device, the playback device plays media data at a total time of 28 minutes and 40 seconds, and the playback device determines the time for the reserved media data. The segment is a period from 30 minutes and 18 seconds to 30 minutes and 20 seconds of the total length of the media data. The playback device continues to play media data to 30 minutes and 18 seconds of the total media data length. If the playback device is not connected to the second network access device, the playback device can pause at 30 minutes and 18 seconds of the total media data length. Play. The examples are only used to explain the application and should not be construed as limiting.
S307、播放设备与第二网络接入设备建立连接。S307. The playback device establishes a connection with the second network access device.
播放设备可以与第二网络接入设备建立有线通信连接,也可以与第二网络接入设备建立无线通信连接。The playback device may establish a wired communication connection with the second network access device, or may establish a wireless communication connection with the second network access device.
如果播放设备与第二网络接入设备建立的是有线通信连接,则播放设备可以检测播放设备的网口状态确定出是否与第二网路接入设备建立有线通信连接,若播放设备检测到播放设备的有线网口的状态由去使能状态切换为使能状态,则播放设备可以确定出播放设备与第二网络接入设备建立有线通信连接。If the playback device establishes a wired communication connection with the second network access device, the playback device can detect the network port status of the playback device to determine whether to establish a wired communication connection with the second network access device. If the playback device detects playback The state of the wired network port of the device is switched from the disabled state to the enabled state, and the playback device may determine that the playback device establishes a wired communication connection with the second network access device.
如果播放设备与第二网络接入设备建立的是无线通信连接,则播放设备可以检测播放设备与第二网络接入设备是否完成无线通信连接的身份认证,若完成身份认证了,则播放设备可以确定出播放设备与第二网络接入设备建立无线通信连接。播放设备与第二网络接入设备之间建立无线通信的过程可以是首先,播放设备扫描到第二网络接入设备发出的无线信号,然后,播放设备可以与第二网络接入设备进行身份认证,最后,当播放设备与第二网络接入设备完成了身份认证,则播放设备与第二网络接入设备可以完成建立通信连接。播放设备与第二网络接入设备之间的身份认证的方式可以包括:开放系统身份认证、共享密钥认证、预共享密钥认证等。If the playback device establishes a wireless communication connection with the second network access device, the playback device can detect whether the playback device and the second network access device have completed the identity authentication of the wireless communication connection. If the identity authentication is completed, the playback device can It is determined that the playback device establishes a wireless communication connection with the second network access device. The process of establishing wireless communication between the playback device and the second network access device may be first, the playback device scans the wireless signal sent by the second network access device, and then the playback device may perform identity authentication with the second network access device. Finally, when the playback device and the second network access device have completed identity authentication, the playback device and the second network access device can complete the establishment of a communication connection. The identity authentication method between the playback device and the second network access device may include: open system identity authentication, shared key authentication, pre-shared key authentication, and the like.
S308、当播放设备连接到第二网络接入设备时,播放设备播放第二部分已缓存的媒体数据。S308. When the playback device is connected to the second network access device, the playback device plays the second part of the buffered media data.
该第二部分已缓存的媒体数据可以为预留的媒体数据。在播放设备连接到第二网络接 入设备的条件下,播放设备可以从播放设备在播放设备未连接到第二网络接入设备的条件下暂停播放媒体数据的位置点,继续播放预留的媒体数据。例如,在播放设备与第一网络接入设备断开连接时,播放设备确定预留的媒体数据的时间段为媒体数据总时长的30分钟18秒处至30分钟20秒处的时间段,则在播放设备与第二网络接入设备连接之后,播放设备可以从该媒体数据总时长的30分钟18秒处继续播放该视频。示例仅仅用于解释本申请,不应构成限定。The second part of the buffered media data may be reserved media data. Under the condition that the playback device is connected to the second network access device, the playback device can continue to play the reserved media from the point where the playback device pauses playing media data when the playback device is not connected to the second network access device. data. For example, when the playback device is disconnected from the first network access device, the playback device determines that the time period of the reserved media data is a time period from 30 minutes and 18 seconds to 30 minutes and 20 seconds, After the playback device is connected to the second network access device, the playback device can continue to play the video from a total length of 30 minutes and 18 seconds of the media data. The examples are only used to explain the application and should not be construed as limiting.
S309、在播放设备连接到第二网络接入设备的条件下,播放设备发送获取IP地址的请求给第二网络接入设备。S309. Under the condition that the playback device is connected to the second network access device, the playback device sends a request for obtaining an IP address to the second network access device.
具体可以参考上述图2实施例中的步骤S208,在此不作赘述。For details, reference may be made to step S208 in the embodiment in FIG. 2 described above, and details are not described herein.
S310、播放设备获取到第二网络接入设备分配给播放设备的IP地址。S310: The playback device obtains an IP address allocated by the second network access device to the playback device.
具体可以参考上述图2实施例中的步骤S209,在此不作赘述。For details, reference may be made to step S209 in the embodiment shown in FIG. 2, and details are not described herein.
S311、播放设备发送媒体数据的访问请求给第二网络接入设备。S311. The playback device sends an access request for media data to the second network access device.
具体可以参考上述图2实施例中的步骤S210,在此不作赘述。For details, reference may be made to step S210 in the embodiment in FIG. 2 described above, and details are not described herein.
S312、播放设备获取到经过第二网络接入设备转发的媒体数据。S312: The playback device obtains the media data forwarded by the second network access device.
具体可以参考上述图2实施例中的步骤S211,在此不作赘述。For details, refer to step S211 in the embodiment in FIG. 2 described above, and details are not described herein.
S313、播放设备继续缓存并播放媒体数据。S313. The playback device continues to buffer and play media data.
具体可以参考上述图2实施例中的步骤S212,在此不作赘述。For details, reference may be made to step S212 in the embodiment of FIG. 2 described above, and details are not described herein.
本申请实施例中,播放设备从流媒体服务器上边缓存边播放媒体数据,播放设备可以确定出预留的媒体数据,在与第一网络接入设备断开连接之后,如果播放设备一直未与第二网络接入设备建立连接,则播放设备播放已缓存的媒体数据至预留的媒体数据时暂停播放,这样,在播放设备重新接入网络设备后可以播放该预留的媒体数据,并在播放预留的媒体数据这段时间内获取IP地址并成功访问到流媒体服务器,即断网重连后,由于预留了媒体数据,因此在重新连接到接入网设备后可立即播放预留的媒体数据无需等待重新与流媒体服务器建立连接,提升了用户体验。In the embodiment of the present application, the playback device plays media data from the streaming media server while buffering. The playback device can determine the reserved media data. After disconnecting from the first network access device, if the playback device has not been connected to the first network access device, When the second network access device establishes a connection, the playback device pauses playback when it plays the buffered media data to the reserved media data. In this way, after the playback device reconnects to the network device, the reserved media data can be played and played back. The reserved media data obtains an IP address during this time and successfully accesses the streaming media server, that is, after the disconnection and reconnection, because the media data is reserved, the reserved media can be played immediately after reconnecting to the access network device Data does not need to wait to re-establish a connection with the streaming media server, which improves the user experience.
下面基于图3所示实施例,结合图4具体说明播放设备在播放至预留的媒体数据时,播放设备未连接到第二网络接入设备上,则播放设备暂停播放媒体数据。图4是本申请实施例中的一种播放进度显示示意图。Based on the embodiment shown in FIG. 3 and FIG. 4, when the playback device plays the reserved media data, the playback device is not connected to the second network access device, the playback device pauses playing the media data. FIG. 4 is a schematic diagram of a playback progress display in an embodiment of the present application.
如图4所示,媒体数据的播放进度显示情况分为四个阶段:As shown in Figure 4, the display progress of the media data is divided into four stages:
第一阶段为播放设备与第一网络接入设备断开连接之前的媒体数据边缓存边播放阶段。在第一阶段,播放设备正常访问到流媒体服务器,因此,播放设备可以一边缓存一边播放媒体数据。The first stage is the stage of buffering and playing the media data before the playback device disconnects from the first network access device. In the first stage, the playback device normally accesses the streaming media server, so the playback device can play media data while caching.
第二阶段为播放设备从与第一网络接入设备断开连接,到播放设备播放至预留的媒体数据时暂停播放但不缓存媒体数据的阶段。在播放设备与第一网络接入设备断开连接后,播放设备暂停缓存媒体数据,但播放设备在确定出预留的媒体数据后,可以继续播放媒体数据,直至播放到预留的媒体数据的起始时间点,则暂停播放。The second stage is a stage in which the playback device is disconnected from the first network access device, and the playback device suspends playback but does not cache the media data when the playback device plays the reserved media data. After the playback device is disconnected from the first network access device, the playback device pauses buffering the media data, but after determining the reserved media data, the playback device can continue to play the media data until the reserved media data is played. At the start time, playback is paused.
第三阶段为播放设备与第二网络接入设备连接,继续播放预留的媒体数据的阶段。在 第三阶段,播放设备在检测到与第二网络接入设备连接的情况下,播放设备可以继续播放预留的媒体数据。The third stage is a stage in which the playback device is connected to the second network access device and continues to play the reserved media data. In the third stage, when the playback device detects a connection with the second network access device, the playback device can continue to play the reserved media data.
第四阶段为播放设备访问到流媒体服务器后,播放设备边缓存边播放的阶段。播放设备访问到流媒体服务器时,则可以获取到媒体数据,因此,播放设备可以在播放媒体数据的同时继续从预留的媒体数据的结束时间点,缓存媒体数据。The fourth stage is a stage in which the playback device plays while buffering after the playback device accesses the streaming media server. When the playback device accesses the streaming media server, the media data can be obtained. Therefore, the playback device can continue to cache the media data from the end time of the reserved media data while playing the media data.
在一种可能的情况下,播放设备在与第一网络接入设备断开连接之后,还未播放至预留的媒体数据的起始时间点,播放设备已经连接上了第二网络接入设备,则播放设备可以连续不间断的播放媒体数据。这样,播放设备可以在断网后快速恢复重连的情况下连续播放媒体数据,提高了用户体验。下面结合图5具体说明该可能的情况。In a possible case, after the playback device is disconnected from the first network access device, the playback device has not yet played to the start time of the reserved media data, and the playback device has been connected to the second network access device. , The playback device can play the media data continuously. In this way, the playback device can continuously play media data while reconnecting quickly after disconnection, improving the user experience. The possible situation is described in detail below with reference to FIG. 5.
如图5所示,媒体数据的播放进度显示情况分为四个阶段:As shown in Figure 5, the display progress of the media data is divided into four stages:
第一阶段为播放设备与第一网络接入设备断开连接之前的媒体数据边缓存边播放阶段。在第一阶段,播放设备正常访问到流媒体服务器,因此,播放设备可以一边缓存一边播放媒体数据。The first stage is the stage of buffering and playing the media data before the playback device disconnects from the first network access device. In the first stage, the playback device normally accesses the streaming media server, so the playback device can play media data while caching.
第二阶段为播放设备从与第一网络接入设备断开连接,到播放设备与第二网络接入设备连接的阶段。在播放设备与第一网络接入设备断开连接后,播放设备在确定出预留的媒体数据后,可以继续播放媒体数据。The second stage is the stage where the playback device is disconnected from the first network access device, and the playback device is connected to the second network access device. After the playback device is disconnected from the first network access device, the playback device may continue to play the media data after determining the reserved media data.
第三阶段为播放设备从与第二网络接入设备连接到播放设备播放至预留的媒体数据的起始时间点的阶段。在第三阶段中,播放设备可以连续地播放媒体数据。The third stage is a stage in which the playback device plays from the connection to the second network access device to the playback device to the starting time point of the reserved media data. In the third stage, the playback device can continuously play media data.
第四阶段为播放设备从播放至预留的媒体数据的起始时间点至播放设备访问到流媒体服务器的阶段。在第四阶段,播放设备也可以连续的播放预留的媒体数据,在播放设备访问到流媒体服务器之后,播放设备可以继续边缓存边播放媒体数据。The fourth stage is the stage from when the playback device starts to the reserved media data to when the playback device accesses the streaming media server. In the fourth stage, the playback device can also continuously play the reserved media data. After the playback device accesses the streaming media server, the playback device can continue to play media data while buffering.
请参见图6,图6示出了本申请提供的一种播放设备600的结构示意图。播放设备600可以为图1的多媒体系统架构中的播放设备104。如图6所示,播放设备600可包括:缓存单元610、播放单元620和确定单元630。其中,Please refer to FIG. 6, which is a schematic structural diagram of a playback device 600 provided by the present application. The playback device 600 may be the playback device 104 in the multimedia system architecture of FIG. 1. As shown in FIG. 6, the playback device 600 may include a buffer unit 610, a playback unit 620, and a determination unit 630. among them,
缓存单元610,可用于通过连接到的第一网络接入设备从流媒体服务器缓存媒体数据;The buffering unit 610 may be configured to buffer media data from the streaming media server through the first network access device connected to the buffering unit;
播放单元620,可用于播放所述媒体数据;A playing unit 620, configured to play the media data;
确定单元630,可用于从已缓存的所述媒体数据中确定出预留的媒体数据,所述预留的媒体数据在播放设备600与第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放;The determining unit 630 may be configured to determine the reserved media data from the cached media data, where the reserved media data is disconnected after the playback device 600 is disconnected from the first network access device and is not connected. Is not played under the condition of accessing the second network access device;
播放单元620,还用于当与所述第一网络接入设备断开连接,播放第一部分已缓存的媒体数据;The playing unit 620 is further configured to play the first part of the buffered media data when disconnected from the first network access device;
播放单元620,还用于当播放设备600连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,并通过所述第二网络接入设备从所述流媒体服务器缓存媒体数据;其中,所述已缓存的媒体数据包括所述第一部分已缓存的媒体数据和所述第二部分已缓存的媒体数据,所述第二部分已缓存的媒体数据包括所述预留的媒体数据。The playback unit 620 is further configured to play the second part of the buffered media data when the playback device 600 is connected to the second network access device, and cache the media data from the streaming media server through the second network access device. Media data; wherein the cached media data includes the first part of the cached media data and the second part of the cached media data, and the second part of the cached media data includes the reserved Media data.
本申请中,第二网络接入设备可以是第一网络接入设备,也可以是除第一网络接入设 备之外的其他网络接入设备。通过从流媒体服务器上边缓存边播放第一媒体的数据,在播放设备600与第一网络接入设备断开连接时,播放设备600可以确定出预留的媒体数据,并将该预留的媒体数据留到播放设备连接到第二网络接入设备时播放,并可以利用这预留的媒体数据的播放时间获取IP地址。这样,可以在断网恢复时,将播放媒体数据的时间点提前,减少了在断网恢复后用户等待媒体数据被播放的时间,提高了用户的体验。In this application, the second network access device may be the first network access device, or may be another network access device other than the first network access device. By playing the first media data from the streaming media server while buffering, when the playback device 600 is disconnected from the first network access device, the playback device 600 can determine the reserved media data and use the reserved media The data is left to be played when the playback device is connected to the second network access device, and an IP address can be obtained by using the reserved playback time of the media data. In this way, when the network disconnection is restored, the time point of playing the media data can be advanced, the time that the user waits for the media data to be played after the network disconnection is restored, and the user experience is improved.
在一些可选的实施例中,在播放设备600与所述第一网络接入设备断开连接之后,当播放单元620播放所述已缓存的媒体数据至所述预留的媒体数据时,播放设备600还未连接到所述第二网络接入设备,所述第二部分已缓存的媒体数据等于所述预留的媒体数据。此时,播放单元620还可用于:暂停播放所述预留的媒体数据。播放单元620可具体用于:当播放设备600连接到所述第二网络接入设备时,播放所述预留的媒体数据。也即是说,在与第一网络接入设备断开连接之后,如果播放设备一直未与第二网络接入设备建立连接,则播放设备播放已缓存的媒体数据至预留的媒体数据时暂停播放,这样,在播放设备断网后,可以在预留有未播放的媒体数据的前提下,播放尽可能多的媒体数据供用户观赏。In some optional embodiments, after the playback device 600 is disconnected from the first network access device, when the playback unit 620 plays the buffered media data to the reserved media data, it plays The device 600 has not been connected to the second network access device, and the second part of the buffered media data is equal to the reserved media data. At this time, the playback unit 620 may be further configured to: pause playback of the reserved media data. The playback unit 620 may be specifically configured to: when the playback device 600 is connected to the second network access device, play the reserved media data. That is, after disconnecting from the first network access device, if the playback device has not established a connection with the second network access device, the playback device pauses when playing the buffered media data to the reserved media data. Play. In this way, after the playback device is disconnected from the network, as long as unplayed media data is reserved, as much media data as possible can be played for users to watch.
在一些可选的实施例中,当连接到所述第二网络接入设备时,播放单元620还未播放至所述预留的媒体数据,所述第二部分已缓存的媒体数据大于所述预留的媒体数据。也即是说,在播放设备还没有播放至预留的媒体数据时,播放设备已经连接到了第二网络接入设备,播放可以在断网至重新入网的过程中连续的播放媒体数据而不中途暂停,提高了用户的观赏体验。In some optional embodiments, when connected to the second network access device, the playback unit 620 has not yet played the reserved media data, and the second part of the buffered media data is larger than the reserved media data. Reserved media data. That is to say, when the playback device has not played the reserved media data, the playback device has been connected to the second network access device, and the playback can continuously play the media data without interruption during the process of disconnecting the network to re-entering the network. Pause improves the viewing experience for users.
在一些可选的实施例中,所述播放设备600还包括获取单元640。所述预留的媒体数据的播放时长由获取单元640获取IP地址所需时间的历史经验值确定,所述IP地址用于缓存单元630通过网络接入设备从所述流媒体服务器缓存所述媒体数据。也即是说,可以根据播放设备获取IP地址的历史经验值,确定出预留的媒体数据的播放时长。这样,在断网重连后,可以不用等到获取IP地址之后才开始播放媒体数据,减少了用户观赏媒体数据的等待时间。In some optional embodiments, the playback device 600 further includes an obtaining unit 640. The playback duration of the reserved media data is determined by the historical experience value of the time required for the obtaining unit 640 to obtain an IP address, and the IP address is used by the cache unit 630 to cache the media from the streaming media server through a network access device. data. That is to say, according to the historical experience value of the IP address obtained by the playback device, the playback duration of the reserved media data can be determined. In this way, after disconnecting the network and reconnecting, it is not necessary to wait to obtain the IP address before starting to play the media data, which reduces the waiting time for users to view the media data.
在一些可选的实施例中,所述历史经验值可包括获取单元640多次获取到IP地址所需的多个时间值。前述预留的媒体数据由获取单元640获取IP地址所需时间的历史经验值确定,具体可包括:取所述多次获取到IP地址所需的多个时间值的平均时间值作为所述预留媒体数据的播放时长;或,取所述多个时间值中的最大时间值作为所述预留媒体数据的播放时长。也即是说,播放设备可以根据历史经验值中多次获取到IP地址所需的时间值,确定出预留媒体数据的播放时长,更准确的确定预留媒体数据的播放时长,减少了播放设备重连接到第二网络接入设备后媒体数据播放中断的几率。In some optional embodiments, the historical experience value may include multiple time values required by the obtaining unit 640 to obtain the IP address multiple times. The foregoing reserved media data is determined by the historical experience value of the time required by the obtaining unit 640 to obtain the IP address, and may specifically include: taking the average time value of the multiple time values required for obtaining the IP address multiple times as the pre- Playing time of the reserved media data; or taking the maximum time value among the plurality of time values as the playing time of the reserved media data. In other words, the playback device can determine the playback time of the reserved media data based on the time required to obtain the IP address multiple times in the historical experience value, and more accurately determine the playback time of the reserved media data, reducing the playback The probability that the media data playback is interrupted after the device reconnects to the second network access device.
在一些可选的实施例中,播放设备600可具体用于通过有线通信连接,连接到所述第二网络接入设备。播放单元620可具体用于:当播放设备600的有线网口的状态由去使能状态切换为使能状态时,播放所述第二部分已缓存的媒体数据。也即是说,如果播放设备有线连接到第二网络接入设备,播放设备可以在检测到有线网口的状态由去使能状态切换为使能状态时,播放该第二部分已缓存的媒体数据。In some optional embodiments, the playback device 600 may be specifically configured to connect to the second network access device through a wired communication connection. The playback unit 620 may be specifically configured to: when the state of the wired network port of the playback device 600 is switched from the disabled state to the enabled state, play the second part of the buffered media data. That is, if the playback device is wired to the second network access device, the playback device can play the second part of the buffered media when it detects that the state of the wired network port is switched from the disabled state to the enabled state. data.
在一些可选的实施例中,播放设备600可具体用于:通过无线通信连接,连接到所述第二网络接入设备。播放单元620可具体用于:当播放设备600与所述第二网络接入设备 完成所述无线通信连接的身份认证时,播放所述第二部分已缓存的媒体数据。也即是说,如果播放设备无线连接到第二网络接入设备,播放设备可以在与第二网络接入设备完成上述无线通信连接的身份认证时,播放该第二部分已缓存的媒体数据。In some optional embodiments, the playback device 600 may be specifically configured to connect to the second network access device through a wireless communication connection. The playback unit 620 may be specifically configured to: when the playback device 600 and the second network access device complete the identity authentication of the wireless communication connection, play the second buffered media data. That is to say, if the playback device is wirelessly connected to the second network access device, the playback device can play the second part of the buffered media data when completing the identity authentication of the wireless communication connection with the second network access device.
可以理解的,播放设备600包括的各个功能单元的具体实现可具体参考前述图2或图3方法实施例,这里不再赘述。It can be understood that, for specific implementation of each functional unit included in the playback device 600, reference may be made specifically to the foregoing method embodiment in FIG. 2 or FIG.
请参见图7,图7示出了本申请提供的一种播放设备700的结构示意图。如图7所示,播放设备700可以包括:处理器710、收发器720、存储器730、输出电路740、总线750。其中,处理器710、收发起720、存储器730和输出电路740通过总线750相互连接。可选的,播放设备700还可以包括显示屏和音频电路,显示屏和音频电路可以与输出电路相连,显示屏用于在播放设备播放媒体数据时,显示动态或静态画面,音频电路用于在播放设备播放媒体数据时,输出媒体数据的音频。在一种可选的情况中,播放设备700可以是播放芯片,此种情况下,播放设备可以包括处理器、存储器和部分接口电路等。Please refer to FIG. 7, which is a schematic structural diagram of a playback device 700 provided by the present application. As shown in FIG. 7, the playback device 700 may include a processor 710, a transceiver 720, a memory 730, an output circuit 740, and a bus 750. The processor 710, the transceiver 720, the memory 730, and the output circuit 740 are connected to each other through a bus 750. Optionally, the playback device 700 may further include a display screen and an audio circuit, and the display screen and the audio circuit may be connected to the output circuit. The display screen is used to display a dynamic or static picture when the playback device plays media data, and the audio circuit is used to When the playback device plays the media data, it outputs the audio of the media data. In an optional case, the playback device 700 may be a playback chip. In this case, the playback device may include a processor, a memory, and some interface circuits.
处理器调用存储器中的软件指令,以执行前述方法实施例的一个或多个方法的步骤。The processor invokes software instructions in the memory to perform steps of one or more methods of the foregoing method embodiments.
处理器710可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器1001还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 710 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 1001 may further include a hardware chip. The above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
收发器720可以包括基带处理单元,数模转换单元和射频通道模块。其中,基带处理单元可包括为数字信号处理器(digital signal processing,DSP)、微控制器(micro control unit,MCU)、码变换及子复用单元(transcoder and submultiplexer,TCSM)(用于完成复用解复用及码变换功能)等单元。基带处理单元可用于合成即将发射的基带信号,或对接收到的基带信号进行解码。数模转换用于对即将发射的基带信号或者对接收到的基带信号进行数模转换。射频通道模块可包括发射器(TX)和接收器(RX)。其中,发射器(TX)可用于对播放设备700输出的信号进行发射处理。接收器(RX)可用于对天线接收的信号进行接收处理。天线可以与收发器720耦合共同完成播放设备700输出的信号的发射处理以及播放设备700接收到的信号进行接收处理。The transceiver 720 may include a baseband processing unit, a digital-to-analog conversion unit, and a radio frequency channel module. Among them, the baseband processing unit may include a digital signal processor (DSP), a microcontroller (microcontrol unit), a code converter and a submultiplexer (TCSM) (for completing Using demultiplexing and code conversion functions). The baseband processing unit can be used to synthesize the baseband signal to be transmitted or to decode the received baseband signal. Digital-to-analog conversion is used to perform digital-to-analog conversion on the baseband signal to be transmitted or the received baseband signal. The radio frequency channel module may include a transmitter (TX) and a receiver (RX). The transmitter (TX) may be used to perform transmission processing on a signal output by the playback device 700. The receiver (RX) can be used to receive the signal received by the antenna. The antenna may be coupled with the transceiver 720 to complete the transmission processing of the signal output by the playback device 700 and the reception processing of the signal received by the playback device 700.
存储器730与处理器710耦合,用于存储各种软件程序和/或多组指令。存储器730可包括可以包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory)。存储器还可以包括上述种类的存储器的组合。存储器730可以缓存媒体数据,还可以存储操作系统。存储器730还可以存储网络通信程序,该网络通信程序可用于与一个或多个附加设备,一个或多个终端设备,一个或多个通信设备进行通信。The memory 730 is coupled to the processor 710 and is configured to store various software programs and / or multiple sets of instructions. The memory 730 may include volatile memory (volatile memory), such as random-access memory (RAM); the memory may also include non-volatile memory (non-volatile memory), such as flash memory ( flash memory). The memory may also include a combination of the above-mentioned kinds of memories. The memory 730 may cache media data and may also store an operating system. The memory 730 may also store a network communication program, which may be used to communicate with one or more additional devices, one or more terminal devices, and one or more communication devices.
收发器720,可用于通过连接到的第一网络接入设备从流媒体服务器获取媒体数据。存储器730,可用于缓存该媒体数据。处理器710,可用于播放该媒体数据。收发器720,还可用于检测到播放设备700与第一网络接入设备之间的通信连接断开。The transceiver 720 may be configured to obtain media data from a streaming media server through a first network access device connected to the transceiver. The memory 730 may be configured to buffer the media data. The processor 710 may be configured to play the media data. The transceiver 720 may be further configured to detect that the communication connection between the playback device 700 and the first network access device is disconnected.
处理器710,还可用于从已缓存的媒体数据中确定出预留的媒体数据,所述预留的媒体数据在所述收发器720与第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放。The processor 710 may be further configured to determine the reserved media data from the cached media data, where the reserved media data is not connected to the first network access device after the transceiver 720 is disconnected, and Not connected to the second network access device.
处理器710,还可用于当收发器720与所述第一网络接入设备断开连接,播放第一部分已缓存的媒体数据。The processor 710 may be further configured to play the first part of the buffered media data when the transceiver 720 is disconnected from the first network access device.
处理器710,还可用于当收发器720连接到第二网络接入设备时,播放第二部分已缓存的媒体数据,并且,处理器710通过第二网络接入设备从所述流媒体服务器缓存媒体数据;其中,所述已缓存的媒体数据包括所述第一部分已缓存的媒体数据和第二部分已缓存的媒体数据,第二部分已缓存的媒体数据包括预留的媒体数据。The processor 710 may be further configured to play the second part of the buffered media data when the transceiver 720 is connected to the second network access device, and the processor 710 caches the media data from the streaming media server through the second network access device Media data; wherein the buffered media data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
本申请实施例中,播放设备从流媒体服务器上边缓存边播放媒体数据,在播放设备与第一网络接入设备断开连接时,播放设备可以确定出预留的媒体数据,当播放设备播放至预留的媒体数据时,播放设备未连接到第二网络接入设备时,则暂停播放,等到播放设备连接到了第二网络接入设备上时,再播放该预留的媒体数据。并可以利用这预留的媒体数据的播放时间获取IP地址。这样,可以在断网恢复时,节省了获取IP地址的等待时间,快速恢复了媒体数据的播放,提高了用户的体验。In the embodiment of the present application, the playback device plays media data from the streaming media server while buffering. When the playback device is disconnected from the first network access device, the playback device can determine the reserved media data. When the playback device plays to When the media data is reserved, when the playback device is not connected to the second network access device, the playback is paused, and when the playback device is connected to the second network access device, the reserved media data is played. And the IP address can be obtained using the reserved playing time of the media data. In this way, when the network is restored, the waiting time for obtaining an IP address is saved, the playback of media data is quickly resumed, and the user experience is improved.
基于图7所示的播放设备700的结构示意图,下面详细说明播放设备700内部各器件的信息交互的协作关系。请参见图8,图8示出了本申请实施例提供的一种播放设备内部器件的信息交互示意图。Based on the schematic structural diagram of the playback device 700 shown in FIG. 7, the following describes the cooperative relationship of information interaction among various devices in the playback device 700 in detail. Please refer to FIG. 8, which illustrates a schematic diagram of information interaction of internal devices of a playback device according to an embodiment of the present application.
1-2.收发器720通过连接的第一网络接入设备访问到流媒体服务器,并获取流媒体服务器中的媒体数据。1-2. The transceiver 720 accesses the streaming media server through the connected first network access device, and obtains the media data in the streaming media server.
3-8.首先,收发器720可以将获取到媒体数据的消息通知给处理器710,然后,处理器710在接收到该通知消息后,可以指示存储器730缓存媒体数据。接着,存储器730进行缓存该收发器720获取到的媒体数据。在存储器730缓存媒体数据的同时,处理器710可以播放已缓存的媒体数据,并指示输出电路740输出媒体数据中的画面和声音。3-8. First, the transceiver 720 may notify the processor 710 of the message of obtaining the media data, and then, after receiving the notification message, the processor 710 may instruct the memory 730 to cache the media data. Then, the memory 730 buffers the media data acquired by the transceiver 720. While the memory 730 caches the media data, the processor 710 may play the buffered media data and instruct the output circuit 740 to output pictures and sounds in the media data.
9-16.首先,收发器720在检测到与第一网络接入设备断开连接之后,可以通知处理器710播放设备700与第一网络接入设备已经断开连接。接着,处理器710可以指示存储器暂停缓存媒体数据,并确定出预留的媒体数据,该预留的媒体数据在播放设备700连接到第二网络接入设备的条件下才被播放。在处理器710播放媒体数据值预留的媒体数据的初始时间点时,未接收到来自收发器720的连接到第二网络接入设备的通知,则处理器710暂停播放媒体数据,并指示输出电路显示暂停时的静帧画面。9-16. First, after detecting that the transceiver 720 is disconnected from the first network access device, the transceiver 720 may notify the processor 710 that the playback device 700 has disconnected from the first network access device. Then, the processor 710 may instruct the memory to temporarily buffer the media data and determine the reserved media data, and the reserved media data is played only under the condition that the playback device 700 is connected to the second network access device. At the initial point in time when the processor 710 plays the media data reserved by the media data value, if no notification is received from the transceiver 720 to connect to the second network access device, the processor 710 pauses playing the media data and instructs the output The circuit displays a still frame picture when paused.
17-23.首先,收发器720在连接到了第二网络接入设备的条件下,可以通知处理器710已经与第二网络接入设备建立连接的消息。然后,处理器710可以继续播放已缓存的但未播放的媒体数据,并指示输出电路输出媒体数据的显示画面和声音。在处理器710继续播放已缓存但未播放的媒体数据的同时,收发器720可以通过第二网络接入设备进行获取IP地址的过程。17-23. First, under the condition that the transceiver 720 is connected to the second network access device, the transceiver 720 may notify the processor 710 that a connection has been established with the second network access device. Then, the processor 710 may continue to play the buffered but unplayed media data, and instruct the output circuit to output a display screen and sound of the media data. While the processor 710 continues to play the buffered but unplayed media data, the transceiver 720 may perform a process of obtaining an IP address through the second network access device.
24-28.在获取到了IP地址之后,收发器720可以访问到流媒体服务器,并从流媒体服务器上继续获取媒体数据。收发器720可以将获取到媒体数据的消息通知给处理器710。 然后,处理器710在接收到该通知消息后,可以指示存储器730缓存媒体数据。在存储器730缓存媒体数据的同时,处理器710继续播放已缓存的媒体数据,并指示输出电路740输出媒体数据中的画面和声音。24-28. After obtaining the IP address, the transceiver 720 can access the streaming media server and continue to obtain media data from the streaming media server. The transceiver 720 may notify the processor 710 of the message that the media data is acquired. After receiving the notification message, the processor 710 may instruct the memory 730 to cache the media data. While the memory 730 caches the media data, the processor 710 continues to play the buffered media data and instructs the output circuit 740 to output pictures and sounds in the media data.
上述图8仅仅从播放设备700的内部器件示例性的说明了本申请的一个实施例,关于本申请的其他实施例可以适应性调整流程,其中没有详述的部分内容可以参考前面图2所述实施例,这里不赘述。The above FIG. 8 only exemplarily illustrates an embodiment of the present application from the internal devices of the playback device 700. Regarding other embodiments of the present application, an adaptive adjustment process may be adopted. For parts that are not described in detail, refer to FIG. 2 The embodiment is not repeated here.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present invention are wholly or partially generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, a computer, a server, or a data center. Transmission via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes one or more available medium integration. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD), etc.).
综上,实施本发明实施例,可支持灵活带宽传输,能够更好的适应下一代新空口技术支持的多带宽场景。In summary, implementation of the embodiments of the present invention can support flexible bandwidth transmission and can better adapt to the multi-bandwidth scenario supported by the next-generation new air interface technology.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。A person of ordinary skill in the art may understand that all or part of the processes in the method of the foregoing embodiments are implemented. The processes may be completed by a computer program instructing related hardware. The program may be stored in a computer-readable storage medium. It may include the processes of the method embodiments described above. The foregoing storage media include: ROM or random storage memory RAM, magnetic disks, or optical discs, which can store various program code media.

Claims (16)

  1. 一种媒体播放方法,其特征在于,包括:A method for playing media, comprising:
    通过连接到的第一网络接入设备从流媒体服务器缓存媒体数据,并播放所述媒体数据;Buffering media data from a streaming media server through a first network access device connected to the first network access device, and playing the media data;
    从已缓存的媒体数据中确定出预留的媒体数据,所述预留的媒体数据在与所述第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放;Determining the reserved media data from the cached media data, the condition of the reserved media data being disconnected from the first network access device and not being connected to the second network access device Not be played
    当与所述第一网络接入设备断开连接,播放第一部分已缓存的媒体数据;When disconnected from the first network access device, playing the first part of the buffered media data;
    当连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,并通过所述第二网络接入设备从所述流媒体服务器缓存媒体数据;其中,所述已缓存的媒体数据包括所述第一部分已缓存的媒体数据和所述第二部分已缓存的媒体数据,所述第二部分已缓存的媒体数据包括所述预留的媒体数据。When connected to the second network access device, playing the second part of the buffered media data, and buffering the media data from the streaming media server through the second network access device; wherein the buffered The media data includes the first part of the buffered media data and the second part of the buffered media data, and the second part of the buffered media data includes the reserved media data.
  2. 根据权利要求1所述方法,其特征在于,在与所述第一网络接入设备断开连接之后,当播放所述已缓存的媒体数据至所述预留的媒体数据时,还未连接到所述第二网络接入设备,所述第二部分已缓存的媒体数据等于所述预留的媒体数据,所述方法还包括:The method according to claim 1, characterized in that, after the disconnection from the first network access device, when the buffered media data is played to the reserved media data, it has not been connected to For the second network access device, the second part of the buffered media data is equal to the reserved media data, and the method further includes:
    暂停播放所述已缓存的媒体数据;Pause playing the cached media data;
    所述当连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,包括:When the second network access device is connected, playing the second part of the buffered media data includes:
    当连接到所述第二网络接入设备时,播放所述预留的媒体数据。When connected to the second network access device, playing the reserved media data.
  3. 根据权利要求1所述方法,其特征在于,当连接到所述第二网络接入设备时,还未播放至所述预留的媒体数据,所述第二部分已缓存的媒体数据大于所述预留的媒体数据。The method according to claim 1, characterized in that when connected to the second network access device, the reserved media data has not been played yet, and the second part of the buffered media data is larger than the reserved media data Reserved media data.
  4. 根据权利要求1至3任一所述方法,其特征在于,所述预留的媒体数据的播放时长由获取IP地址所需时间的历史经验值确定,所述IP地址用于通过网络接入设备从所述流媒体服务器缓存所述媒体数据。The method according to any one of claims 1 to 3, wherein a playback duration of the reserved media data is determined by a historical experience value of a time required to obtain an IP address, and the IP address is used to access a device through a network Buffering the media data from the streaming media server.
  5. 根据权利要求4所述方法,其特征在于,所述历史经验值包括多次获取到IP地址所需的多个时间值;The method according to claim 4, wherein the historical experience value comprises a plurality of time values required for obtaining the IP address multiple times;
    所述预留的媒体数据的播放时长由获取IP地址所需时间的历史经验值确定,具体包括:The playback duration of the reserved media data is determined by the historical experience value of the time required to obtain the IP address, and specifically includes:
    取所述多次获取到IP地址所需的多个时间值的平均时间值作为所述预留媒体数据的播放时长;或,Taking the average time value of the multiple time values required for obtaining the IP address multiple times as the playing duration of the reserved media data; or,
    取所述多个时间值中的最大时间值作为所述预留媒体数据的播放时长。The maximum time value among the multiple time values is taken as the playing duration of the reserved media data.
  6. 根据权利要求1所述方法,其特征在于,所述连接到所述第二网络接入设备包括:通过有线通信连接,连接到所述第二网络接入设备;The method according to claim 1, wherein the connecting to the second network access device comprises: connecting to the second network access device through a wired communication connection;
    所述当连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,具体包括:When the second network access device is connected, playing the second part of the buffered media data specifically includes:
    当检测到有线网口的状态由去使能状态切换为使能状态时,播放所述第二部分已缓存的媒体数据;所述有线网口用于连接到所述第二网络接入设备。When it is detected that the state of the wired network port is switched from the disabled state to the enabled state, the second part of the buffered media data is played; the wired network port is used to connect to the second network access device.
  7. 根据权利要求1所述方法,其特征在于,所述连接到所述第二网络接入设备包括:通过无线通信连接,连接到所述第二网络接入设备;The method according to claim 1, wherein the connecting to the second network access device comprises: connecting to the second network access device through a wireless communication connection;
    所述当连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,具体包括:When the second network access device is connected, playing the second part of the buffered media data specifically includes:
    当与所述第二网络接入设备完成所述无线通信连接的身份认证时,播放所述第二部分已缓存的媒体数据。When the identity authentication of the wireless communication connection is completed with the second network access device, the second part of the buffered media data is played.
  8. 一种播放设备,其特征在于,包括:A playback device, comprising:
    缓存单元,用于通过连接到的第一网络接入设备从流媒体服务器缓存媒体数据;A buffering unit, configured to buffer media data from a streaming media server through a first network access device connected to the buffering unit;
    播放单元,用于播放所述媒体数据;A playback unit, configured to play the media data;
    确定单元,用于从已缓存的所述媒体数据中确定出预留的媒体数据,所述预留的媒体数据在与所述第一网络接入设备的连接断开后,且未连接到第二网络接入设备的条件下不被播放;A determining unit, configured to determine the reserved media data from the cached media data, where the reserved media data is disconnected from the first network access device and is not connected to the first network access device; It will not be played under the condition of two network access devices;
    所述播放单元,还用于当与所述第一网络接入设备断开连接,播放第一部分已缓存的媒体数据;The playing unit is further configured to play the first part of the buffered media data when disconnected from the first network access device;
    所述播放单元,还用于当连接到所述第二网络接入设备时,播放第二部分已缓存的媒体数据,并通过所述第二网络接入设备从所述流媒体服务器缓存媒体数据;其中,所述已缓存的媒体数据包括所述第一部分已缓存的媒体数据和所述第二部分已缓存的媒体数据,所述第二部分已缓存的媒体数据包括所述预留的媒体数据。The playing unit is further configured to, when connected to the second network access device, play the second part of the buffered media data, and cache the media data from the streaming media server through the second network access device. ; Wherein the cached media data includes the first part of the cached media data and the second part of the cached media data, and the second part of the cached media data includes the reserved media data .
  9. 根据权利要求8所述播放设备,其特征在于,在所述播放设备与所述第一网络接入设备断开连接之后,当所述播放单元播放所述已缓存的媒体数据至所述预留的媒体数据时,所述播放设备还未连接到所述第二网络接入设备,所述第二部分已缓存的媒体数据等于所述预留的媒体数据;The playback device according to claim 8, characterized in that after the playback device is disconnected from the first network access device, when the playback unit plays the buffered media data to the reservation The media data, the playback device has not been connected to the second network access device, and the second part of the buffered media data is equal to the reserved media data;
    所述播放单元,还用于:The playback unit is further configured to:
    在所述播放设备与所述第一网络接入设备断开连接之后,当所述媒体模块播放所述已缓存的媒体数据至预留的媒体数据时,所述播放设备未连接到所述第二网络接入设备,暂停播放所述预留的媒体数据;After the playback device is disconnected from the first network access device, when the media module plays the buffered media data to the reserved media data, the playback device is not connected to the first Two network access devices, which pause playing the reserved media data;
    所述播放单元,还具体用于:The playback unit is further specifically configured to:
    当所述播放设备连接到所述第二网络接入设备时,播放所述预留的媒体数据。When the playback device is connected to the second network access device, the reserved media data is played.
  10. 根据权利要求8所述播放设备,其特征在于,当连接到所述第二网络接入设备时,所述播放单元还未播放至所述预留的媒体数据,所述第二部分已缓存的媒体数据大于所述预留的媒体数据。The playback device according to claim 8, characterized in that when connected to the second network access device, the playback unit has not yet played to the reserved media data, and the second part has been cached The media data is larger than the reserved media data.
  11. 根据权利要求8至10任一所述播放设备,其特征在于,还包括:获取单元,用于获取IP地址;所述预留的媒体数据的播放时长由所述获取单元获取所述IP地址所需时间的历史经验值确定,所述IP地址用于所述缓存单元通过网络接入设备从所述流媒体服务器缓 存所述媒体数据。The playback device according to any one of claims 8 to 10, further comprising: an obtaining unit configured to obtain an IP address; and the playback duration of the reserved media data is obtained by the obtaining unit obtaining the IP address. The time-consuming historical experience value determines that the IP address is used by the cache unit to cache the media data from the streaming media server through a network access device.
  12. 根据权利要求11所述播放设备,其特征在于,所述历史经验值包括所述获取单元多次获取到所述IP地址所需的多个时间值;The playback device according to claim 11, wherein the historical experience value comprises a plurality of time values required for the obtaining unit to obtain the IP address multiple times;
    所述预留的媒体数据由所述获取单元获取所述IP地址所需时间的历史经验值确定,具体包括:The reserved media data is determined by the historical experience value of the time required for the obtaining unit to obtain the IP address, and specifically includes:
    取所述多次获取到IP地址所需的多个时间值的平均时间值作为所述预留媒体数据的播放时长;或,Taking the average time value of the multiple time values required for obtaining the IP address multiple times as the playing duration of the reserved media data; or,
    取所述多个时间值中的最大时间值作为所述预留媒体数据的播放时长。The maximum time value among the multiple time values is taken as the playing duration of the reserved media data.
  13. 根据权利要求8所述播放设备,其特征在于,所述播放设备通过有线通信连接,连接到所述第二网络接入设备;The playback device according to claim 8, wherein the playback device is connected to the second network access device through a wired communication connection;
    所述播放单元,具体用于:The playback unit is specifically configured to:
    当所述播放设备的有线网口的状态由去使能状态切换为使能状态时,播放所述第二部分已缓存的媒体数据。When the state of the wired network port of the playback device is switched from the disabled state to the enabled state, the second part of the buffered media data is played.
  14. 根据权利要求8所述播放设备,其特征在于,所述播放设备通过无线通信连接,连接到所述第二网络接入设备;The playback device according to claim 8, wherein the playback device is connected to the second network access device through a wireless communication connection;
    所述播放单元,具体用于:The playback unit is specifically configured to:
    当所述播放设备与所述第二网络接入设备完成所述无线通信连接的身份认证时,播放所述第二部分已缓存的媒体数据。When the playback device and the second network access device complete the identity authentication of the wireless communication connection, the second part of the buffered media data is played.
  15. 一种播放设备,其特征在于,所述播放设备包括处理器和存储器;其中,A playback device, characterized in that the playback device includes a processor and a memory; wherein,
    所述处理器,用于调用所述存储器中的软件指令以执行如权利要求1-7任一项所述的方法。The processor is configured to call software instructions in the memory to execute the method according to any one of claims 1-7.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有程序指令,当所述程序指令在处理器上运行时,实现权利要求1至7任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores program instructions, and when the program instructions are run on a processor, the method according to any one of claims 1 to 7 is implemented.
PCT/CN2018/093931 2018-06-30 2018-06-30 Media playing method and media playing device WO2020000493A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880094871.0A CN112368987B (en) 2018-06-30 2018-06-30 Media playing method and playing equipment
PCT/CN2018/093931 WO2020000493A1 (en) 2018-06-30 2018-06-30 Media playing method and media playing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/093931 WO2020000493A1 (en) 2018-06-30 2018-06-30 Media playing method and media playing device

Publications (1)

Publication Number Publication Date
WO2020000493A1 true WO2020000493A1 (en) 2020-01-02

Family

ID=68985851

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093931 WO2020000493A1 (en) 2018-06-30 2018-06-30 Media playing method and media playing device

Country Status (2)

Country Link
CN (1) CN112368987B (en)
WO (1) WO2020000493A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179505B (en) * 2021-03-10 2023-04-28 歌尔科技有限公司 Bluetooth playing device restarting and reconnecting method, bluetooth playing device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140223500A1 (en) * 2013-02-04 2014-08-07 Samsung Electronics Co., Ltd. Method and system for transmitting wirelessly video in portable terminal
CN105100685A (en) * 2014-05-06 2015-11-25 中兴通讯股份有限公司 Wireless video processing method and device, media server, and monitoring terminal and system
CN106375822A (en) * 2016-10-08 2017-02-01 广东欧珀移动通信有限公司 Multimedia synchronous playing method, device and system and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110087603A1 (en) * 2009-10-13 2011-04-14 Google Inc. Cloud based media player and offline media access
CN104244063B (en) * 2014-09-04 2017-05-31 广东欧珀移动通信有限公司 The conversion method and device of many playback equipments
CN105898595A (en) * 2016-05-31 2016-08-24 乐视控股(北京)有限公司 Media playing method, media playing device and television
CN106412664B (en) * 2016-10-08 2019-08-13 Oppo广东移动通信有限公司 Multimedia synchronous plays method, apparatus, terminal and system
CN107707969A (en) * 2017-09-04 2018-02-16 深圳市屯奇尔科技有限公司 Video broadcasting method, device and terminal device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140223500A1 (en) * 2013-02-04 2014-08-07 Samsung Electronics Co., Ltd. Method and system for transmitting wirelessly video in portable terminal
CN105100685A (en) * 2014-05-06 2015-11-25 中兴通讯股份有限公司 Wireless video processing method and device, media server, and monitoring terminal and system
CN106375822A (en) * 2016-10-08 2017-02-01 广东欧珀移动通信有限公司 Multimedia synchronous playing method, device and system and terminal

Also Published As

Publication number Publication date
CN112368987A (en) 2021-02-12
CN112368987B (en) 2021-12-28

Similar Documents

Publication Publication Date Title
TWI429290B (en) Sharing of audio/visual content with a selected user
US8719373B2 (en) Dynamically optimizing delivery of multimedia content over a network
US9648073B2 (en) Streaming control for real-time transport protocol
KR101943139B1 (en) Device linking
EP3089466A1 (en) Method and device for same-screen interaction
WO2020134720A1 (en) Data transmission control method and related product
KR101657914B1 (en) Method and terminal for sharing media stream
WO2019090902A1 (en) Screen sharing method and apparatus, electronic device, and storage medium
US9749373B2 (en) System and method for improved content streaming
US10708349B2 (en) Offloading a distribution server task to a media gateway
WO2023071813A1 (en) Data transmission method and device, and storage medium and terminal device
US12003558B2 (en) Device discovery for social playback
WO2014036960A1 (en) Method for automatically publishing information and mobile terminal
JP2004272371A (en) Information equipment and mail control method
US20220286731A1 (en) Multimedia apparatus and cast method
JP5552171B2 (en) Live media stream time shift
WO2020000493A1 (en) Media playing method and media playing device
US10708330B2 (en) Multimedia resource management method, cloud server and electronic apparatus
US20110004670A1 (en) Electronic apparatus and control method for remotely processing files
KR101700349B1 (en) Display apparatus and streaming tranforting method of the same
WO2022022652A1 (en) Media content sharing method and apparatus
WO2022143339A1 (en) Cross-network segment discovery method, routing device and system
WO2020063341A1 (en) Video transmission method and device
JP5752550B2 (en) Service providing system, terminal device, and control program
US20230231895A1 (en) System and method for accessing streaming data

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

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

Country of ref document: EP

Kind code of ref document: A1